Name: v8 Epoch: 1 Version: 3.26.33 Release: 1%{?dist} Summary: JavaScript engine License: MIT URL: https://code.google.com/p/v8/ # Source0 generated with v8-tarball.sh Source0: %{name}-%{version}.tar.xz Source100: v8-tarball.sh # make v8 work with the system ICU Source1: http://src.chromium.org/chrome/trunk/deps/third_party/icu46/icu.gyp Source2: http://src.chromium.org/chrome/trunk/deps/third_party/icu46/icu.gypi # fix up v8 postmortem codegen Patch1: v8-3.26.33-postmortem-1.patch # cherry-pick r21297 from v8 trunk # # Changes the return value of PropertyCallbackInfo::This() from # Local back to Local. See [1] and [2] for background. # # [1] https://groups.google.com/forum/#!topic/v8-users/wP2UcQ4cBW4 # [2] https://codereview.chromium.org/285643008/ Patch2: v8-3.26.33-PropertyCallbackInfo.patch # cherry-pick r21466 from v8 trunk # # Check for cached transition to ExternalArray elements kind. # See [1] and [2] for details. # # [1] https://code.google.com/p/v8/issues/detail?id=3337 # [2] https://codereview.chromium.org/291193011 Patch3: v8-3.26.33-ExternalArray.patch # fix post-mortem in v0.11 Patch4: v8-3.26.33-postmortem-2.patch # backport 60c316 from v8 trunk # Extend the interceptor setter ASSERT to support the JSGlobalProxy case. # fixes https://github.com/joyent/node/issues/7969 Patch5: v8-3.26.33-JSGlobalProxy.patch BuildRequires: python-devel BuildRequires: gyp BuildRequires: readline-devel %global ver_x %(echo %{version} | cut -d. -f1) %global ver_y %(echo %{version} | cut -d. -f2) %global ver_z %(echo %{version} | cut -d. -f1) %global soname %{ver_x}.%{ver_y} %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript as specified in ECMA-262, 5th edition, and runs on systems that use IA-32, x64, or ARM processors. V8 can run standalone, or can be embedded into any C++ application. This package provides the main v8 shared library for use by other applications. %package tools Summary: JavaScript engine tools Requires: %{name} = %{epoch}:%{version}-%{release} %description tools V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript as specified in ECMA-262, 5th edition, and runs on systems that use IA-32, x64, or ARM processors. V8 can run standalone, or can be embedded into any C++ application. This package provides several tools that can be used in conjunction with v8, including d8, a debugging shell (REPL). %package devel Summary: JavaScript engine development headers and miscellanea Requires: %{name} = %{epoch}:%{version}-%{release} %description devel This package provides development headers and miscellanea for the v8 JavaScript engine. %prep %setup -q %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 # use the system gyp mkdir -p build/gyp ln -sf %{_bindir}/gyp build/gyp/gyp # use the system icu mkdir -p third_party/icu cp -p %{SOURCE1} %{SOURCE2} third_party/icu/ %build export ICUFLAGS=$(pkg-config --libs-only-l icu-i18n) export CFLAGS="${CFLAGS:-%optflags} $ICUFLAGS" export CXXFLAGS="${CXXFLAGS:-%optflags} $ICUFLAGS" export GYPFLAGS="-Duse_system_icu=1" make native %{?_smp_mflags} \ %ifarch armv7hl armv7hnl hardfp=on \ %endif library=shared \ soname_version=%{soname} \ console=readline \ werror=no %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_includedir} install -p include/*.h %{buildroot}%{_includedir} mkdir -p %{buildroot}%{_libdir} install -p out/native/lib.target/libv8.so.%{soname} %{buildroot}%{_libdir}/libv8.so.%{version} mkdir -p %{buildroot}%{_bindir} install -p -m0755 out/native/d8 %{buildroot}%{_bindir} install -p -m0755 out/native/cctest %{buildroot}%{_bindir}/v8-cctest install -p -m0755 out/native/lineprocessor %{buildroot}%{_bindir}/v8-lineprocessor install -p -m0755 out/native/mksnapshot* %{buildroot}%{_bindir}/v8-mksnapshot install -p -m0755 out/native/process %{buildroot}%{_bindir}/v8-process install -p -m0755 out/native/shell %{buildroot}%{_bindir}/v8-shell pushd %{buildroot}%{_libdir} ln -sf libv8.so.%{version} libv8.so.%{soname} ln -sf libv8.so.%{version} libv8.so popd chmod -x %{buildroot}%{_includedir}/v8*.h # install Python JS minifier scripts for nodejs mkdir -p %{buildroot}%{_datadir}/v8 sed -i 's|/usr/bin/python2.4|/usr/bin/env python|g' tools/jsmin.py install -p -m0744 tools/jsmin.py %{buildroot}%{_datadir}/v8 install -p -m0744 tools/js2c.py %{buildroot}%{_datadir}/v8 ln -sf ../share/v8/jsmin.py %{buildroot}%{_bindir}/v8-jsmin ln -sf ../share/v8/js2c.py %{buildroot}%{_bindir}/v8-js2c %files %doc AUTHORS ChangeLog LICENSE %{_libdir}/libv8.so.%{version} %{_libdir}/libv8.so.%{soname} %files tools %{_bindir}/* %{_datadir}/v8 %files devel %{_includedir}/*.h %{_libdir}/libv8.so %changelog * Sat Aug 16 2014 T.C. Hollingsworth - initial repackaging for v8 3.26.33 / node v0.11.x - now uses gyp intead of scons to build