From b455d98abd8a784a27693d4d16002ff1b0a32e65f1e68a83f1c8a67ba065748e Mon Sep 17 00:00:00 2001 From: Avindra Goolcharan Date: Sat, 28 Jan 2023 23:28:31 +0000 Subject: [PATCH] Accepting request 1061193 from home:Guillaume_G:branches:devel:languages:javascript - Switch from deprecated rust-packaging to cargo-packaging - Disable LTO to build with half of the RAM (fixes build on aarch64): * deno-disbale-lto.patch - Update _constraints with current values OBS-URL: https://build.opensuse.org/request/show/1061193 OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/deno?expand=0&rev=91 --- _constraints | 27 ++------------------------- _service | 3 +++ cargo_config | 5 +++++ deno-disbale-lto.patch | 17 +++++++++++++++++ deno.changes | 8 ++++++++ deno.spec | 14 +++++++++----- 6 files changed, 44 insertions(+), 30 deletions(-) create mode 100644 cargo_config create mode 100644 deno-disbale-lto.patch diff --git a/_constraints b/_constraints index 5a4be7e..6b2d169 100644 --- a/_constraints +++ b/_constraints @@ -6,33 +6,10 @@ - 4 + 18 - 11 + 12 - - 1 - - - - aarch64 - - - - 15 - - - - - - x86_64 - - - - 25 - - - diff --git a/_service b/_service index f716c41..31f5985 100644 --- a/_service +++ b/_service @@ -139,5 +139,8 @@ *.tar xz + + deno + diff --git a/cargo_config b/cargo_config new file mode 100644 index 0000000..97852b5 --- /dev/null +++ b/cargo_config @@ -0,0 +1,5 @@ +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" diff --git a/deno-disbale-lto.patch b/deno-disbale-lto.patch new file mode 100644 index 0000000..508b1de --- /dev/null +++ b/deno-disbale-lto.patch @@ -0,0 +1,17 @@ +--- deno-1.26.2/Cargo.toml.orig 2023-01-26 10:13:11.259679321 +0100 ++++ deno-1.26.2/Cargo.toml 2023-01-26 10:13:28.467861544 +0100 +@@ -37,14 +37,12 @@ exclude = ["test_util/std/hash/_wasm"] + [profile.release] + codegen-units = 1 + incremental = true +-lto = true + opt-level = 'z' # Optimize for size + + # NB: the `bench` and `release` profiles must remain EXACTLY the same. + [profile.bench] + codegen-units = 1 + incremental = true +-lto = true + opt-level = 'z' # Optimize for size + + # Key generation is too slow on `debug` diff --git a/deno.changes b/deno.changes index 4f0fb81..8af14f5 100644 --- a/deno.changes +++ b/deno.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jan 26 10:52:37 UTC 2023 - Guillaume GARDET + +- Switch from deprecated rust-packaging to cargo-packaging +- Disable LTO to build with half of the RAM (fixes build on aarch64): + * deno-disbale-lto.patch +- Update _constraints with current values + ------------------------------------------------------------------- Mon Oct 17 20:29:27 UTC 2022 - Avindra Goolcharan diff --git a/deno.spec b/deno.spec index 3bf72f3..d0c978f 100644 --- a/deno.spec +++ b/deno.spec @@ -1,7 +1,7 @@ # # spec file for package deno # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2020-2022 Avindra Goolcharan # Copyright (c) 2018-2022 the Deno authors # @@ -27,9 +27,13 @@ Group: Productivity/Other URL: https://github.com/denoland/deno Source0: %{name}-%{version}.tar.xz Source1: vendor.tar.xz +Source2: cargo_config Source99: revendor_source.sh +# PATCH-FIX-OPENSUSE - Disable LTO +Patch1: deno-disbale-lto.patch # gcc-c++ needed to build SPIRV-Cross BuildRequires: clang +BuildRequires: cargo-packaging BuildRequires: gcc-c++ BuildRequires: gn BuildRequires: lld @@ -37,8 +41,7 @@ BuildRequires: llvm BuildRequires: ninja BuildRequires: pkgconfig BuildRequires: python3-base -BuildRequires: rust >= 1.53.0 -BuildRequires: rust-packaging +BuildRequires: rust >= 1.62.1 BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gmodule-2.0) BuildRequires: pkgconfig(gobject-2.0) @@ -58,8 +61,9 @@ updated with the --reload flag. %prep %autosetup -a1 -p1 -%define cargo_registry $(pwd)/vendor -%{cargo_prep} +cp %{SOURCE2} .cargo/config +# Drop lock file due to revendor_source.sh breaking check +rm Cargo.lock %build # workaround to use python3