File rubygem-libv8.spec of Package rubygem-libv8

#
# spec file for package rubygem-libv8
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


#
# This file was generated with a gem2rpm.yml and not just plain gem2rpm.
# All sections marked as MANUAL, license headers, summaries and descriptions
# can be maintained in that file. Please consult this file before editing any
# of those fields
#

Name:           rubygem-libv8
Version:        8.4.255.0
Release:        0
%define mod_name libv8
%define mod_full_name %{mod_name}-%{version}
# MANUAL
%define v8_version 8.4.255
BuildRequires:  gcc-c++
BuildRequires:  python-xml
BuildRequires:  ruby
BuildRequires:  binutils-gold
BuildRequires:  libncurses5
BuildRequires:  libxml2-2
BuildRequires:  glib2-devel
BuildRequires:  gn
BuildRequires:  ninja
BuildRequires:  clang
BuildRequires:  llvm
ExclusiveArch: x86_64
# /MANUAL
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  ruby-macros >= 5
BuildRequires:  %{rubydevel}
BuildRequires:  %{rubygem gem2rpm}
Url:            http://github.com/rubyjs/libv8
Source:         https://rubygems.org/gems/%{mod_full_name}.gem
Source1:        v8-%{v8_version}.tar.xz
Source2:        0008-BUILD_gn.patch
Source3:        regenerate_files.rb
Source4:        build_clean.rb
Source5:        README.Maintainers
Source6:        rubygem-libv8-rpmlintrc
Source7:        gem2rpm.yml
# MANUAL
Patch0:  0001-No-download-v8.patch
# /MANUAL
Summary:        Distribution of the V8 JavaScript engine
License:        MIT
Group:          Development/Languages/Ruby

%description
Distributes the V8 JavaScript engine in binary and source forms in order to
support fast builds of The Ruby Racer.

%prep
%gem_unpack
%patch0 -p1
# MANUAL
tar -xf %{SOURCE1}
rm -rf vendor/v8
pushd v8-%{v8_version}
patch -p1 -i %{SOURCE2}
popd
mv v8-%{v8_version} vendor/v8
mv vendor/v8/test/webkit/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-final-object-expected.txt vendor/v8/test/webkit/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-expected.txt
mv vendor/v8/test/webkit/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-final-object.js vendor/v8/test/webkit/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven.js
mv vendor/v8/.cipd vendor/
rm -rf vendor/depot_tools
cp -r vendor/v8/third_party/depot_tools vendor
mkdir -p vendor/v8/third_party/perfetto/ui/dist/gen
ruby="$(ruby-find-versioned ruby | head -n 1)"
$ruby %{SOURCE3} %{version}
# /MANUAL
find -type f -print0 | xargs -0 touch -r %{S:0}
%gem_build

%build

%install
%gem_install \
  --doc-files="CHANGELOG.md README.md" \
  -f
%gem_cleanup
# MANUAL
ruby="$(ruby-find-versioned ruby | head -n 1)"
$ruby %{SOURCE4}
find %{buildroot} -name "*.orig" -delete -print
# /MANUAL


%gem_packages

%changelog
openSUSE Build Service is sponsored by