Accepting request 866956 from home:avindra:devel:languages:javascript
+jstime OBS-URL: https://build.opensuse.org/request/show/866956 OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/jstime?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
116
_service
Normal file
116
_service
Normal file
@@ -0,0 +1,116 @@
|
||||
<!--
|
||||
# vim: set syntax=xml
|
||||
-->
|
||||
|
||||
<services>
|
||||
<!--
|
||||
See deno.spec for the master copy of this file
|
||||
-->
|
||||
<service name="tar_scm" mode="manual">
|
||||
<param name="scm">git</param>
|
||||
<param name="url">https://github.com/denoland/rusty_v8</param>
|
||||
<param name="revision">v0.16.0</param>
|
||||
<param name="version">0.16.0</param>
|
||||
<param name="exclude">.github</param>
|
||||
|
||||
<!--
|
||||
mirror pruning of build tree expressed in Cargo.toml
|
||||
except for LICENSE +README, which we ship
|
||||
-->
|
||||
<param name="exclude">*.settings</param>
|
||||
<param name="exclude">*.txt</param>
|
||||
<param name="exclude">AUTHORS</param>
|
||||
<param name="exclude">build/android</param>
|
||||
<param name="exclude">build/chromeos</param>
|
||||
<param name="exclude">build/fuchsia</param>
|
||||
|
||||
<!-- todo: send upstream: deno doesnt run on 32-bit
|
||||
<param name="exclude">v8/src/compiler/backend/ia32</param>
|
||||
<param name="exclude">v8/src/codegen/ia32</param>
|
||||
<param name="exclude">v8/src/builtins/ia32</param>
|
||||
<param name="exclude">v8/src/execution/ia32</param>
|
||||
<param name="exclude">v8/src/diagnostics/ia32</param>
|
||||
<param name="exclude">v8/src/wasm/baseline/ia32</param>
|
||||
<param name="exclude">v8/src/regexp/ia32</param>
|
||||
-->
|
||||
|
||||
<!-- additional platforms that can be dropped todo: send relevant upstream
|
||||
<param name="exclude">build/apple</param>
|
||||
<param name="exclude">build/ios</param>
|
||||
<param name="exclude">build/mac</param>
|
||||
<param name="exclude">build/win</param>
|
||||
<param name="exclude">build/toolchain/win</param>
|
||||
<param name="exclude">build/toolchain/mac</param>
|
||||
<param name="exclude">build/toolchain/apple</param>
|
||||
<param name="exclude">build/toolchain/aix</param>
|
||||
<param name="exclude">build/toolchain/android</param>
|
||||
<param name="exclude">build/toolchain/fuchsia</param>
|
||||
-->
|
||||
|
||||
<!-- todo: send this batch upstream:
|
||||
<param name="exclude">build/config/android</param>
|
||||
<param name="exclude">build/config/ios</param>
|
||||
<param name="exclude">build/config/mac</param>
|
||||
<param name="exclude">build/config/win</param>
|
||||
<param name="exclude">build/config/fuchsia</param>
|
||||
<param name="exclude">build/config/chromeos</param>
|
||||
<param name="exclude">build/config/chromecast</param>
|
||||
<param name="exclude">build/config/aix</param>
|
||||
<param name="exclude">build/config/apple</param>
|
||||
-->
|
||||
|
||||
<param name="exclude">buildtools/checkdeps</param>
|
||||
<param name="exclude">buildtools/clang_format</param>
|
||||
<param name="exclude">buildtools/third_party/libc++/trunk/benchmarks</param>
|
||||
<param name="exclude">buildtools/third_party/libc++/trunk/docs</param>
|
||||
<param name="exclude">buildtools/third_party/libc++/trunk/lib</param>
|
||||
<param name="exclude">buildtools/third_party/libc++/trunk/test</param>
|
||||
<param name="exclude">buildtools/third_party/libc++/trunk/utils</param>
|
||||
<param name="exclude">buildtools/third_party/libc++/trunk/www</param>
|
||||
<param name="exclude">buildtools/third_party/libc++abi/trunk/test</param>
|
||||
<param name="exclude">v8/ChangeLog</param>
|
||||
<param name="exclude">v8/benchmarks/</param>
|
||||
<param name="exclude">v8/docs/</param>
|
||||
<param name="exclude">v8/samples</param>
|
||||
|
||||
<!-- tests are bloated but there isnt a clear way to skip
|
||||
<param name="exclude">v8/test/cctest</param>
|
||||
<param name="exclude">v8/test/mjsunit</param>
|
||||
<param name="exclude">v8/test/webkit</param>
|
||||
<param name="exclude">v8/test/unittests</param>
|
||||
<param name="exclude">v8/test/inspector</param>
|
||||
<param name="exclude">v8/test/debugger</param>
|
||||
<param name="exclude">v8/test/js-perf-test</param>
|
||||
<param name="exclude">v8/test/intl</param>
|
||||
<param name="exclude">v8/test/message</param>
|
||||
-->
|
||||
|
||||
<param name="exclude">v8/tools/*.js</param>
|
||||
<param name="exclude">v8/tools/*.mjs</param>
|
||||
<param name="exclude">v8/tools/*.html</param>
|
||||
<param name="exclude">v8/tools/turbolizer</param>
|
||||
<param name="exclude">v8/tools/clusterfuzz</param>
|
||||
|
||||
<!--
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
When trimming the build.... remember that the following files
|
||||
are required to build and cannot be the subject of any
|
||||
exclusion rules:
|
||||
|
||||
v8/test (most things)
|
||||
v8/test/torque/test-torque.tq
|
||||
v8/tools/gen-postmortem-metadata.py
|
||||
v8/tools/js2c.py
|
||||
v8/tools/run.py
|
||||
v8/tools/snapshot/asm_to_inline_asm.py
|
||||
v8/tools/testrunner/utils/dump_build_config.py
|
||||
-->
|
||||
|
||||
</service>
|
||||
<service name="tar" mode="manual"/>
|
||||
<service name="recompress" mode="manual">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
</services>
|
||||
|
3
jstime-0.21.0.tar.gz
Normal file
3
jstime-0.21.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:668b4b7f1f1018a465a9d0a155334e1844899c196d8d24c00480bf342177a450
|
||||
size 32313
|
11
jstime.changes
Normal file
11
jstime.changes
Normal file
@@ -0,0 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 20 15:00:39 UTC 2021 - Avindra Goolcharan <avindra@opensuse.org>
|
||||
|
||||
- update to v0.21.0:
|
||||
* rusty_v8 updated to 0.16.0
|
||||
- enable binary stripping
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 3 21:48:14 UTC 2021 - Avindra Goolcharan <avindra@opensuse.org>
|
||||
|
||||
- initial package at v0.20.1, based mostly on the deno build
|
73
jstime.spec
Normal file
73
jstime.spec
Normal file
@@ -0,0 +1,73 @@
|
||||
#
|
||||
# spec file for package jstime
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2020-2021 Avindra Goolcharan <avindra@opensuse.org>
|
||||
#
|
||||
# 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: jstime
|
||||
Version: 0.21.0
|
||||
Release: 0
|
||||
Summary: Another JavaScript runtime based on rusty_v8
|
||||
License: MIT
|
||||
Group: Productivity/Other
|
||||
URL: https://github.com/jstime/jstime
|
||||
Source0: https://github.com/jstime/jstime/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
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)
|
||||
# deno does not build on 32-bit archs
|
||||
ExclusiveArch: x86_64 aarch64 ppc64 ppc64le s390x
|
||||
|
||||
%description
|
||||
A JavaScript runtime built on rusty_v8 (from deno).
|
||||
|
||||
%prep
|
||||
%autosetup -a1
|
||||
%define cargo_registry $(pwd)/vendor
|
||||
%{cargo_prep}
|
||||
|
||||
%build
|
||||
export V8_FROM_SOURCE=1
|
||||
export CLANG_BASE_PATH=%{_prefix}
|
||||
# https://www.chromium.org/developers/gn-build-configuration
|
||||
export GN_ARGS="enable_nacl = false blink_symbol_level = 0"
|
||||
# enable binary stripping
|
||||
export RUSTFLAGS="%{__global_rustflags} -Clink-arg=-s"
|
||||
%{cargo_build}
|
||||
|
||||
%install
|
||||
# place jstime cli manually (cannot cargo install)
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
cp target/release/jstime %{buildroot}%{_bindir}
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/%{name}
|
||||
|
||||
%changelog
|
64
revendor_source.sh
Normal file
64
revendor_source.sh
Normal file
@@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
set -euo pipefail
|
||||
|
||||
# packaging helper to workaround:
|
||||
# https://github.com/denoland/rusty_v8/issues/566
|
||||
|
||||
# the defacto output from "cargo vendor" is
|
||||
# not useful as it is missing files. this
|
||||
# script merges rusty_v8 into place from source
|
||||
|
||||
# output is a single, merged vendor tarball
|
||||
|
||||
wd="$(mktemp -d /tmp/revendor.XXXXX)"
|
||||
|
||||
# take what we need into the build
|
||||
cp rusty_v8*xz $wd
|
||||
cp vendor*xz $wd
|
||||
|
||||
cd $wd
|
||||
|
||||
echo -n "Extracting vendor..."
|
||||
tar xf vendor*xz
|
||||
echo "done"
|
||||
|
||||
echo -n "Extracting rusty_v8..."
|
||||
tar xf rusty*xz \
|
||||
--exclude="Cargo.toml" \
|
||||
--exclude="Cargo.lock"
|
||||
echo " done"
|
||||
|
||||
# take vendored Cargo toml and lock which
|
||||
# can still be used
|
||||
cp vendor/rusty_v8/{Cargo.*,.cargo*} .
|
||||
|
||||
|
||||
# get rid of everything else
|
||||
rm -fr vendor/rusty_v8
|
||||
|
||||
# drop version prefix
|
||||
target=$(find . -name "rusty_v8-*" -type d)
|
||||
mv $target rusty_v8
|
||||
|
||||
# insert proper files
|
||||
mv Cargo.* .cargo* rusty_v8
|
||||
echo "Check final rusty_v8 root:"
|
||||
ls -la rusty_v8
|
||||
mv rusty_v8 vendor
|
||||
|
||||
# extra: workaround winapi bloat
|
||||
# by ejecting it from the build
|
||||
#
|
||||
# https://github.com/rust-lang/cargo/issues/7058
|
||||
echo -n "Pruning winapi bloat... "
|
||||
rm -fr vendor/winapi*gnu*/lib/*.a
|
||||
echo "done"
|
||||
|
||||
# remake tarball
|
||||
echo -n "Compressing archive... "
|
||||
tar -cf - vendor/ | xz -6 -c - > vendor-merged.tar.xz
|
||||
echo "done"
|
||||
|
||||
echo "Inspect the tarball and replace the"
|
||||
echo "existing one if it's ok. Should be under 30MB."
|
||||
ls -lh vendor-merged.tar.xz
|
3
vendor.tar.xz
Normal file
3
vendor.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5e5e1df7f59c1a2ed67cc1991661e57f30e503de85bd44a9a8c4fa6345872d70
|
||||
size 20765396
|
Reference in New Issue
Block a user