From 5f62db4dbbe8181a697833a13f6bcbd4b5992578e3e66626836e162ddec7056a Mon Sep 17 00:00:00 2001 From: Soc Virnyl Estela Date: Tue, 12 Nov 2024 02:48:05 +0000 Subject: [PATCH] - Update specfile and sources * remove compiler-rt-adjust-paths.patch * remove rusty_v8-0.106.0.tar.zst * revert back to old build logic we have before in deno.spec * revert back _service to old service file OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/deno?expand=0&rev=258 --- _service | 17 ---------------- compiler-rt-adjust-paths.patch | 33 ------------------------------ deno.changes | 10 +++++++++ deno.spec | 37 ++++++++++++++++++---------------- rusty_v8-0.106.0.tar.zst | 3 --- 5 files changed, 30 insertions(+), 70 deletions(-) delete mode 100644 compiler-rt-adjust-paths.patch delete mode 100644 rusty_v8-0.106.0.tar.zst diff --git a/_service b/_service index ca81c6d..41e6c92 100644 --- a/_service +++ b/_service @@ -14,17 +14,6 @@ enable - - https://github.com/denoland/rusty_v8 - git - v0.106.0 - 0.106.0 - .git - .github - .gitignore - .prettierrc.json - .rustfmt.toml - true false @@ -37,11 +26,5 @@ true true - - rusty_v8 - rusty_v8-0.106.0.tar.zst - true - true - diff --git a/compiler-rt-adjust-paths.patch b/compiler-rt-adjust-paths.patch deleted file mode 100644 index ed33338..0000000 --- a/compiler-rt-adjust-paths.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn -index fcca59b0f..fdf14f306 100644 ---- a/rusty_v8/build/config/clang/BUILD.gn -+++ b/rusty_v8/build/config/clang/BUILD.gn -@@ -192,12 +192,15 @@ template("clang_lib") { - } else if (is_linux || is_chromeos) { - if (current_cpu == "x64") { - _dir = "x86_64-unknown-linux-gnu" -+ _suffix = "-x86_64" - } else if (current_cpu == "x86") { - _dir = "i386-unknown-linux-gnu" -+ _suffix = "-i386" - } else if (current_cpu == "arm") { - _dir = "armv7-unknown-linux-gnueabihf" - } else if (current_cpu == "arm64") { - _dir = "aarch64-unknown-linux-gnu" -+ _suffix = "-aarch64" - } else { - assert(false) # Unhandled cpu type - } -@@ -228,6 +231,11 @@ template("clang_lib") { - assert(false) # Unhandled target platform - } - -+ # Bit of a hack to make this find builtins from compiler-rt >= 16 -+ if (is_linux || is_chromeos) { -+ _dir = "linux" -+ } -+ - _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib" - _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}" - libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ] - diff --git a/deno.changes b/deno.changes index 6916984..8c44e8b 100644 --- a/deno.changes +++ b/deno.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Nov 12 02:45:19 UTC 2024 - Soc Virnyl Estela + +- Update specfile and sources + * remove compiler-rt-adjust-paths.patch + * remove rusty_v8-0.106.0.tar.zst + * revert back to old build logic we have before in deno.spec + * revert back _service to old service file +- Use gcc for non-tumbleweed images. This will not work all the time. + ------------------------------------------------------------------- Mon Nov 11 12:03:43 UTC 2024 - Soc Virnyl Estela diff --git a/deno.spec b/deno.spec index 8598db9..0d8a539 100644 --- a/deno.spec +++ b/deno.spec @@ -29,12 +29,17 @@ Group: Productivity/Other URL: https://github.com/denoland/deno Source0: %{name}-%{version}.tar.zst Source1: registry.tar.zst -Source2: rusty_v8-%{_v8_version}.tar.zst -Patch1: compiler-rt-adjust-paths.patch -Patch2: deno-v8-arm.patch -Patch3: zeromq-update.patch +Patch1: deno-v8-arm.patch +Patch2: zeromq-update.patch BuildRequires: cargo-packaging -BuildRequires: clang + +%if 0%{?suse_version} > 1600 +BuildRequires: clang19 +%else +BuildRequires: gcc +BuildRequires: gcc-c++ +%endif + # needed by `libz-ng-sys` after 1.36.1 # see: https://build.opensuse.org/package/show/devel:languages:javascript/deno#comment-1808174 BuildRequires: cmake @@ -46,6 +51,7 @@ BuildRequires: llvm-gold BuildRequires: ninja BuildRequires: pkgconfig BuildRequires: python3-base +BuildRequires: rusty_v8 BuildRequires: zstd BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gmodule-2.0) @@ -100,20 +106,11 @@ Remote code is fetched and cached on first execution, and only updated with the --reload flag. %prep -%autosetup -a2 -p1 -n %{name} +%autosetup -a1 -p1 -n %{name} -# Extract vendor source -tar xf %{SOURCE1} -# Now we patch V8 or %%{SOURCE2} +unlink rusty_v8 || true +ln -sf %{_libdir}/crates/rusty_v8/ $PWD/rusty_v8 echo -e "\n[patch.crates-io]\nv8 = { path = './rusty_v8' }" >> Cargo.toml -pushd rusty_v8 -# Keeping this ifarch in case someone tries to build 32 bit -# which is not our problem -%ifarch x86_64 || x86_64_v3 || aarch64 -# lib to lib64 -sed -i 's|lib/clang|lib64/clang|g' build/config/clang/BUILD.gn -%endif -popd %build export CARGO_HOME="$PWD/.cargo" @@ -121,10 +118,16 @@ export CARGO_HOME="$PWD/.cargo" export CLANG_VERSION=$(clang --version | grep -m1 version | sed 's/.* \([0-9]\+\).*/\1/') export V8_FROM_SOURCE=1 export CLANG_BASE_PATH=%{_prefix} +%if 0%{?suse_version} > 1600 export CC=clang export CXX=clang++ export CFLAGS="%{optflags} -Wno-unknown-warning-option" export CXXFLAGS="%{optflags} -Wno-unknown-warning-option" +%else +export CFLAGS="%{optflags}" +export CXXFLAGS="%{optflags}" +%endif + # https://www.chromium.org/developers/gn-build-configuration export GN_ARGS="clang_version=${CLANG_VERSION} use_lld=true enable_nacl = false blink_symbol_level = 0 v8_symbol_level = 0" %{cargo_build} diff --git a/rusty_v8-0.106.0.tar.zst b/rusty_v8-0.106.0.tar.zst deleted file mode 100644 index 3a6b24c..0000000 --- a/rusty_v8-0.106.0.tar.zst +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4bbdc154daf89cabfa796298714f20bf5df5ad8c238e774be0cd7f2979c2c79b -size 62136047