2021-01-26 17:32:04 +01:00
|
|
|
#
|
|
|
|
# spec file for package deno
|
|
|
|
#
|
2023-01-29 00:28:31 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2023-01-29 01:17:36 +01:00
|
|
|
# Copyright (c) 2020-2023 Avindra Goolcharan <avindra@opensuse.org>
|
|
|
|
# Copyright (c) 2018-2023 the Deno authors
|
2021-01-26 17:32:04 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: deno
|
2023-03-11 19:12:12 +01:00
|
|
|
Version: 1.31.2
|
2021-01-26 17:32:04 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: A secure JavaScript and TypeScript runtime
|
|
|
|
License: MIT
|
|
|
|
Group: Productivity/Other
|
|
|
|
URL: https://github.com/denoland/deno
|
|
|
|
Source0: %{name}-%{version}.tar.xz
|
|
|
|
Source1: vendor.tar.xz
|
2023-01-29 00:28:31 +01:00
|
|
|
Source2: cargo_config
|
2021-01-26 17:32:04 +01:00
|
|
|
Source99: revendor_source.sh
|
2023-02-24 06:32:27 +01:00
|
|
|
# PATCH-FIX-OPENSUSE - Disable LTO (to reduce req memory)
|
|
|
|
%ifarch %{arm} aarch64
|
|
|
|
Patch1: deno-disable-lto.patch
|
|
|
|
%endif
|
2021-03-03 01:10:36 +01:00
|
|
|
# gcc-c++ needed to build SPIRV-Cross
|
2022-06-21 19:22:56 +02:00
|
|
|
BuildRequires: clang
|
2023-01-29 00:28:31 +01:00
|
|
|
BuildRequires: cargo-packaging
|
2021-03-03 01:10:36 +01:00
|
|
|
BuildRequires: gcc-c++
|
2021-01-26 17:32:04 +01:00
|
|
|
BuildRequires: gn
|
|
|
|
BuildRequires: lld
|
|
|
|
BuildRequires: llvm
|
|
|
|
BuildRequires: ninja
|
|
|
|
BuildRequires: pkgconfig
|
2022-06-21 19:22:56 +02:00
|
|
|
BuildRequires: python3-base
|
2023-03-14 21:04:18 +01:00
|
|
|
BuildRequires: rust >= 1.68.0
|
2021-01-26 17:32:04 +01:00
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
|
|
BuildRequires: pkgconfig(gmodule-2.0)
|
|
|
|
BuildRequires: pkgconfig(gobject-2.0)
|
|
|
|
BuildRequires: pkgconfig(gthread-2.0)
|
|
|
|
# deno does not build on 32-bit archs
|
|
|
|
ExclusiveArch: x86_64 aarch64 ppc64 ppc64le s390x
|
|
|
|
|
|
|
|
%description
|
2022-09-04 19:34:12 +02:00
|
|
|
A JavaSript and TypeScript platform built on V8
|
2021-01-26 17:32:04 +01:00
|
|
|
|
2022-09-04 19:34:12 +02:00
|
|
|
Deno has standard library and has features such as
|
2021-01-27 18:27:48 +01:00
|
|
|
a linter, a language server protocol, a code formatter and
|
|
|
|
a unit test runner.
|
|
|
|
|
|
|
|
Remote code is fetched and cached on first execution, and only
|
2022-09-04 19:34:12 +02:00
|
|
|
updated with the --reload flag.
|
2021-01-26 17:32:04 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -a1 -p1
|
2023-01-29 00:28:31 +01:00
|
|
|
cp %{SOURCE2} .cargo/config
|
|
|
|
# Drop lock file due to revendor_source.sh breaking check
|
|
|
|
rm Cargo.lock
|
2021-01-26 17:32:04 +01:00
|
|
|
|
|
|
|
%build
|
2022-06-21 19:22:56 +02:00
|
|
|
# workaround to use python3
|
|
|
|
# where "python" is invoked
|
2022-09-04 19:34:12 +02:00
|
|
|
mkdir "$(pwd)/bin"
|
2022-06-21 19:22:56 +02:00
|
|
|
ln -sf %{_bindir}/python3 "$(pwd)/bin/python"
|
|
|
|
export PATH="$PATH:$(pwd)/bin"
|
|
|
|
|
2021-01-26 17:32:04 +01:00
|
|
|
export V8_FROM_SOURCE=1
|
|
|
|
export CLANG_BASE_PATH=%{_prefix}
|
|
|
|
# https://www.chromium.org/developers/gn-build-configuration
|
2022-09-04 19:34:12 +02:00
|
|
|
export GN_ARGS="enable_nacl = false blink_symbol_level = 0 v8_symbol_level = 0"
|
2021-01-26 17:32:04 +01:00
|
|
|
# enable binary stripping
|
|
|
|
export RUSTFLAGS="%{__global_rustflags} -Clink-arg=-s"
|
|
|
|
%{cargo_build}
|
|
|
|
|
|
|
|
%install
|
|
|
|
# place deno cli manually (cannot cargo install)
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
2021-05-13 04:33:06 +02:00
|
|
|
cp target/release/deno %{buildroot}%{_bindir}
|
2021-01-26 17:32:04 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE.md
|
|
|
|
%doc README.md
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|