# # spec file for package rusty_v8 # # Copyright (c) 2023 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.63.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 BuildRequires: clang BuildRequires: gn BuildRequires: lld BuildRequires: llvm BuildRequires: ninja BuildRequires: pkgconfig BuildRequires: python3-base 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 -p1 %define cargo_registry $(pwd)/vendor %{cargo_prep} %build # workaround to use python3 # where "python" is invoked mkdir -p "$(pwd)/bin" ln -sf %{_bindir}/python3 "$(pwd)/bin/python" export PATH="$PATH:$(pwd)/bin" #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}/libv8.rlib %changelog