forked from pool/deno
- Do not depend on rusty_v8 from openSUSE:Factory.
* deno has changed how they ship the v8 crate. - Apply patch directly to vendored v8 with ./compiler-rt-adjust-paths.patch. OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/deno?expand=0&rev=238
This commit is contained in:
committed by
Git OBS Bridge
parent
6e007115c7
commit
b933641f18
32
compiler-rt-adjust-paths.patch
Normal file
32
compiler-rt-adjust-paths.patch
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn
|
||||||
|
index fcca59b0f..fdf14f306 100644
|
||||||
|
--- a/build/config/clang/BUILD.gn
|
||||||
|
+++ b/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" ]
|
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Nov 10 09:20:03 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>
|
||||||
|
|
||||||
|
- Do not depend on rusty_v8 from openSUSE:Factory.
|
||||||
|
* deno has changed how they ship the v8 crate.
|
||||||
|
- Apply patch directly to vendored v8 with ./compiler-rt-adjust-paths.patch.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Nov 10 06:13:41 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>
|
Sun Nov 10 06:13:41 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>
|
||||||
|
|
||||||
|
10
deno.spec
10
deno.spec
@@ -28,6 +28,7 @@ Group: Productivity/Other
|
|||||||
URL: https://github.com/denoland/deno
|
URL: https://github.com/denoland/deno
|
||||||
Source0: %{name}-%{version}.tar.zst
|
Source0: %{name}-%{version}.tar.zst
|
||||||
Source1: vendor.tar.zst
|
Source1: vendor.tar.zst
|
||||||
|
Source2: compiler-rt-adjust-paths.patch
|
||||||
BuildRequires: cargo-packaging
|
BuildRequires: cargo-packaging
|
||||||
BuildRequires: clang
|
BuildRequires: clang
|
||||||
# needed by `libz-ng-sys` after 1.36.1
|
# needed by `libz-ng-sys` after 1.36.1
|
||||||
@@ -97,11 +98,10 @@ updated with the --reload flag.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -a1 -p1 -n %{name}
|
%autosetup -a1 -p1 -n %{name}
|
||||||
|
# Now we patch whatever was vendored
|
||||||
# From archlinux. We are using a patched v8 from our build
|
pushd vendor/v8-0.106.0
|
||||||
unlink $PWD/rusty_v8 || true
|
patch -p1 -s --fuzz=0 --no-backup-if-mismatch -i %{SOURCE2}
|
||||||
ln -sf %{_libdir}/crates/rusty_v8 $PWD/rusty_v8
|
popd
|
||||||
echo -e "\n[patch.crates-io]\nv8 = { path = './rusty_v8' }" >> Cargo.toml
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Ensure that the clang version matches. This command came from Archlinux. Thanks.
|
# Ensure that the clang version matches. This command came from Archlinux. Thanks.
|
||||||
|
Reference in New Issue
Block a user