diff --git a/cargo-librusty-v8-v0.105.1 b/cargo-librusty-v8-v0.105.1 new file mode 100644 index 0000000000000000000000000000000000000000..509985bc69205bf46b8725392c8a00566c647691 Binary files /dev/null and b/cargo-librusty-v8-v0.105.1 differ diff --git a/prepare_librusty_v8.sh b/prepare_librusty_v8.sh new file mode 100755 index 0000000000000000000000000000000000000000..c05fd989e630a605ee95f05a95e29536f049c1cf --- /dev/null +++ b/prepare_librusty_v8.sh @@ -0,0 +1,10 @@ +#!/bin/sh +echo "Download librusty_v8 static version ${1}" +mkdir -p v$1 +cd v$1 +wget https://github.com/denoland/rusty_v8/releases/download/v${1}/librusty_v8_release_aarch64-unknown-linux-gnu.a.gz +wget https://github.com/denoland/rusty_v8/releases/download/v${1}/librusty_v8_release_x86_64-unknown-linux-gnu.a.gz +ls -alh +cd - +tar -czvf cargo-librusty-v8-v$1 v$1 +rm v$1 diff --git a/python-vl-convert-python.spec b/python-vl-convert-python.spec index 883e05e2308b67e0617e4d2f829987ed1afcfd7e..391a25e3c23008033cf5b3f2b82ccf6dd2a19109 100644 --- a/python-vl-convert-python.spec +++ b/python-vl-convert-python.spec @@ -3,13 +3,15 @@ Name: python-%{pypi_name} Version: 1.7.0 -Release: 1 +Release: 2 Summary: Convert Vega-Lite chart specifications to SVG, PNG, or Vega. License: BSD-3-Clause URL: https://github.com/jonmmease/vl-convert Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz +# Source2 created with ./prepare_rusty_v6.sh v8-version Source1: cargo-vendor-cache +Source2: cargo-librusty-v8-v0.105.1 BuildRequires: rust-packaging BuildRequires: cmake @@ -35,6 +37,14 @@ Convert Vega-Lite chart specifications to SVG, PNG, or Vega. %prep %autosetup -p1 -n vl-convert-%{version} tar xzvf %{SOURCE1} -C . +tar xzvf %{SOURCE2} -C ./vendor/v8/ +oldsum=$(sha256sum ./vendor/v8/build.rs) +oldv8=${oldsum%%%% *} +sed -i '/ env::var(\"RUSTY_V8_MIRROR\")/,1 d' ./vendor/v8/build.rs +sed -i "s#^ let base =.*# let base = env\:\:current_dir().unwrap().into_os_string().into_string().unwrap();#g" ./vendor/v8/build.rs +newsum=$(sha256sum ./vendor/v8/build.rs) +newv8=${newsum%%%% *} +sed -i s#${oldv8}#${newv8}#g `grep ${oldv8} -rl ./vendor/v8/` mkdir .cargo cat >> .cargo/config.toml << EOF [source.crates-io] @@ -59,6 +69,9 @@ cd vl-convert-python %{python3_sitearch}/vl_convert*.dist-info/ %changelog +* Thu Feb 13 2025 Dongxing Wang - 1.7.0-2 +- Fix build error for compile rusty-v8 offline + * Wed Nov 13 2024 Dongxing Wang - 1.7.0-1 - Update version to 1.7.0 Adds vl_convert.pyi type stub