From 768de23fb4dd7aeca5d18c9ad936de2786e8c9c5afe1b903bf0b9a0ba4f3cd14 Mon Sep 17 00:00:00 2001 From: Avindra Goolcharan Date: Tue, 26 Jan 2021 16:33:15 +0000 Subject: [PATCH] +rusty_v8 (testing only package) OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/rusty_v8?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + _constraints | 8 +++++ _service | 18 ++++++++++ revendor_source.sh | 32 ++++++++++++++++++ rusty_v8-0.16.0.tar.xz | 3 ++ rusty_v8.changes | 17 ++++++++++ rusty_v8.spec | 74 ++++++++++++++++++++++++++++++++++++++++++ vendor.tar.xz | 3 ++ 9 files changed, 179 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _constraints create mode 100644 _service create mode 100644 revendor_source.sh create mode 100644 rusty_v8-0.16.0.tar.xz create mode 100644 rusty_v8.changes create mode 100644 rusty_v8.spec create mode 100644 vendor.tar.xz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..058f4f7 --- /dev/null +++ b/_constraints @@ -0,0 +1,8 @@ + + + + + 8 + + + diff --git a/_service b/_service new file mode 100644 index 0000000..ed51e80 --- /dev/null +++ b/_service @@ -0,0 +1,18 @@ + + + https://github.com/denoland/rusty_v8 + git + v0.16.0 + 0.16.0 + .git + .github + .gitignore + .prettierrc.json + .rustfmt.toml + + + + *.tar + xz + + diff --git a/revendor_source.sh b/revendor_source.sh new file mode 100644 index 0000000..76a7f1f --- /dev/null +++ b/revendor_source.sh @@ -0,0 +1,32 @@ +#!/bin/sh +set -euo pipefail + +# packaging helper to workaround: +# https://github.com/rust-lang/cargo/issues/7058 + +wd="$(mktemp -d /tmp/revendor.XXXXX)" + +# take what we need into the build +cp vendor*xz $wd + +cd $wd + +echo -n "Extracting vendor..." +tar xf vendor*xz +echo "done" + +echo -n "Ejecting winapi bloat... " +rm -fr vendor/winapi*gnu*/lib/*.a +echo "done" + +# remake tarball +echo -n "Compressing archive... " +tar -cf - vendor/ | xz -9 -c - > vendor-merged.tar.xz +echo "done" + +cd - + +echo -n "Replacing tarball... " +cp $wd/vendor-merged.tar.xz vendor.tar.xz +rm -fr $wd +echo "ok" diff --git a/rusty_v8-0.16.0.tar.xz b/rusty_v8-0.16.0.tar.xz new file mode 100644 index 0000000..33c57a0 --- /dev/null +++ b/rusty_v8-0.16.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:914e0a27bbd0c98bf6a3209bde7f89eeba6f19726c1ad244c86b57a16dee5c43 +size 21295036 diff --git a/rusty_v8.changes b/rusty_v8.changes new file mode 100644 index 0000000..ae1f28d --- /dev/null +++ b/rusty_v8.changes @@ -0,0 +1,17 @@ +------------------------------------------------------------------- +Tue Jan 19 00:37:25 UTC 2021 - Avindra Goolcharan + +- bump to 0.16 + +------------------------------------------------------------------- +Sun Jan 10 20:39:55 UTC 2021 - Avindra Goolcharan + +- bump to 0.15 +- remove fix-ninja-check.patch (upstreamed) + +------------------------------------------------------------------- +Sun Dec 20 07:11:31 UTC 2020 - Avindra Goolcharan + +- Init package at 0.14.0 for deno 1.6.1 +- add fix-ninja-check.patch to fix gn/ninja validation +- add _constraints for huge v8/chromium build diff --git a/rusty_v8.spec b/rusty_v8.spec new file mode 100644 index 0000000..8f35fdb --- /dev/null +++ b/rusty_v8.spec @@ -0,0 +1,74 @@ +# +# spec file for package rusty_v8 +# +# Copyright (c) 2021 SUSE LLC +# +# 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: rusty_v8 +Version: 0.16.0 +Release: 0 +Summary: Build tooling for Deno (do not install or use!) +License: MIT +Group: Productivity/Other +URL: https://github.com/denoland/rusty_v8 +Source0: %{name}-%{version}.tar.xz +Source1: vendor.tar.xz +Source99: revendor_source.sh +BuildRequires: clang +BuildRequires: gn +BuildRequires: lld +BuildRequires: llvm +BuildRequires: ninja +BuildRequires: pkgconfig +BuildRequires: python +BuildRequires: python2-setuptools +BuildRequires: rust-packaging +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gmodule-2.0) +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gthread-2.0) +%ifarch ppc64 # wants g++ for some reason +BuildRequires: gcc-c++ +%endif + +%description +V8 build tooling for Deno. This represents all of the common +cruft that is dragged along into the deno build from V8, +Chromium, etc. + +%prep +%autosetup -a1 +%define cargo_registry $(pwd)/vendor +%{cargo_prep} + +%build +#https://github.com/denoland/rusty_v8/#build-v8-from-source +export V8_FROM_SOURCE=1 +export CLANG_BASE_PATH=%{_prefix} +# note: built in debug mode to +# emit symbols for linker in deno build +export GN_ARGS="is_debug=true" +%{__cargo} build %{__cargo_common_opts} + +%install +mkdir -p %{buildroot}%{_libdir} +cp target/debug/*.rlib %{buildroot}%{_libdir} + +%files +%license LICENSE +%doc README.md +%{_libdir}/lib%{name}.rlib + +%changelog diff --git a/vendor.tar.xz b/vendor.tar.xz new file mode 100644 index 0000000..cf57021 --- /dev/null +++ b/vendor.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3696188c54d4ae05ba5e2168202198561256f367a89fb7fc608efb4e41a67a33 +size 1762436