+++ /dev/null
-diff -up v8/src/allocation.cc.allocation v8/src/allocation.cc
---- v8/src/allocation.cc.allocation 2009-11-18 22:37:12.000000000 -0500
-+++ v8/src/allocation.cc 2009-11-18 22:38:33.000000000 -0500
-@@ -88,8 +88,8 @@ char* StrDup(const char* str) {
- }
-
-
--char* StrNDup(const char* str, int n) {
-- int length = StrLength(str);
-+char* StrNDup(const char* str, size_t n) {
-+ size_t length = StrLength(str);
- if (n < length) length = n;
- char* result = NewArray<char>(length + 1);
- memcpy(result, str, length * kCharSize);
-diff -up v8/src/d8-readline.cc.allocation v8/src/d8-readline.cc
---- v8/src/d8-readline.cc.allocation 2009-11-18 15:09:01.000000000 -0500
-+++ v8/src/d8-readline.cc 2009-11-18 22:37:58.000000000 -0500
-@@ -32,6 +32,7 @@
-
-
- #include "d8.h"
-+#include "allocation.h"
-
-
- // There are incompatibilities between different versions and different
-@@ -103,7 +104,7 @@ char* ReadLineEditor::CompletionGenerato
- static unsigned current_index;
- static Persistent<Array> current_completions;
- if (state == 0) {
-- i::SmartPointer<char> full_text(i::StrNDup(rl_line_buffer, rl_point));
-+ i::SmartPointer<char> full_text(i::StrNDup(rl_line_buffer, (size_t) rl_point));
- HandleScope scope;
- Handle<Array> completions =
- Shell::GetCompletions(String::New(text), String::New(*full_text));
-#
-# TODO: fix readline
-#
-
-%define sover %(v=%{version}; echo ${v%.*})
-%define somajor %(v=%{version}; echo ${v%%%%.*})
-Summary: JavaScript Engine
+Summary: JavaScript Engine by Google
+Summary(pl.UTF-8): Silnik JavaScript firmy Google
Name: v8
-Version: 3.3.6.1
+Version: 3.4.3
Release: 1
-License: New BSD License
-Group: Libraries
-URL: http://code.google.com/p/v8
+License: BSD
+Group: Applications
# No tarballs, pulled from svn
# svn export http://v8.googlecode.com/svn/tags/%{version} v8-%{version}
Source0: http://distfiles.gentoo.org/distfiles/%{name}-%{version}.tar.gz
-# Source0-md5: b8504e98681669c95738724717c4e93f
-#Patch1: %{name}-2.0.0-d8-allocation.patch
-Patch2: %{name}-cstdio.patch
-Patch3: %{name}-strndup.patch
-Patch4: %{name}-soname.patch
-Patch5: %{name}-dynlink.patch
+# Source0-md5: 5b0f6342961d2b0e74c362c6d119077a
+Patch0: %{name}-cstdio.patch
+Patch1: %{name}-strndup.patch
+Patch2: %{name}-soname.patch
+Patch3: %{name}-dynlink.patch
+URL: http://code.google.com/p/v8/
BuildRequires: libstdc++-devel >= 5:4.0
+BuildRequires: python >= 1:2.4
BuildRequires: readline-devel
-BuildRequires: scons
+BuildRequires: scons >= 1.0.0
+BuildRequires: sed >= 4.0
ExclusiveArch: %{ix86} %{x8664} arm
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define somajor %(v=%{version}; echo ${v%%%%.*})
+
%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, 3rd edition.
-This package contains the command line program.
+This package contains the V8 developer shell.
+
+%description -l pl.UTF-8
+V8 to mający otwarte źródła silnik JavaScriptu firmy Google. V8 jest
+napisany w C++ i wykorzystywany w mającej otwarte źródła przeglądarce
+Google Chrome. V8 implementuje ECMAScript zgodnie ze specyfikacją
+ECMA-262, edycja 3.
+
+Ten pakiet zawiera powłokę programistyczną V8.
%package libs
Summary: V8 JavaScript Engine shared library
+Summary(pl.UTF-8): Biblioteka współdzielona silnika JavaScriptu V8
Group: Libraries
Conflicts: v8 < 2.0.0
This package contains the shared library.
+%description libs -l pl.UTF-8
+V8 to mający otwarte źródła silnik JavaScriptu firmy Google. V8 jest
+napisany w C++ i wykorzystywany w mającej otwarte źródła przeglądarce
+Google Chrome. V8 implementuje ECMAScript zgodnie ze specyfikacją
+ECMA-262, edycja 3.
+
+Ten pakiet zawiera bibliotekę współdzieloną.
+
%package devel
-Summary: Development headers and libraries for v8
+Summary: Development headers for V8 JavaScript engine
+Summary(pl.UTF-8): Pliki nagłówkowe silnika JavaScriptu V8
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
+Requires: libstdc++-devel
%description devel
-Development headers and libraries for v8.
+Development headers for V8 JavaScript engine.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe silnika JavaScriptu V8.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
-%patch5 -p1
%{__sed} -i -e "s,'-O3','%{rpmcxxflags}'.split(' ')," SConstruct
+# some "unused-but-set" warnings
+%{__sed} -i -e "s/'-Werror',//" SConstruct
%build
# build library
-
CFLAGS="%{rpmcflags}"
CXXFLAGS="%{rpmcxxflags}"
-LDFLAGS="%{rpmcflags}"
+LDFLAGS="%{rpmldflags}"
%if "%{pld_release}" == "ac"
CC="%{__cc}4"
CXX="%{__cxx}4"
CXX="%{__cxx}"
%endif
export CFLAGS LDFLAGS CXXFLAGS CC CXX
-%scons \
+%scons library d8 \
library=shared \
snapshots=on \
soname=on \
console=readline \
visibility=default \
-%ifarch x86_64
+%ifarch %{x8664}
arch=x64 \
%endif
env=CCFLAGS:"-fPIC"
-mv libv8.so libv8.so.%{sover}
-
-# We need to do this so d8 binary can link against it.
-ln -sf libv8.so.%{sover} libv8.so
-
-# build binary
-%scons d8 \
- library=shared \
- snapshots=on \
- console=dumb \
- visibility=default \
- %ifarch x86_64
- arch=x64 \
- %endif
- env=CCFLAGS:"-fPIC"
-
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}}
-install -p d8 $RPM_BUILD_ROOT%{_bindir}/v8
+
+for lib in libv8 libv8preparser ; do
+ install -p ${lib}.so $RPM_BUILD_ROOT%{_libdir}/${lib}.so.%{version}
+ ln -sf ${lib}.so.%{version} $RPM_BUILD_ROOT%{_libdir}/${lib}.so.%{somajor}
+ ln -sf ${lib}.so.%{version} $RPM_BUILD_ROOT%{_libdir}/${lib}.so
+done
cp -a include/*.h $RPM_BUILD_ROOT%{_includedir}
-install -p libv8.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
-lib=$(basename $RPM_BUILD_ROOT%{_libdir}/libv8.so.*.*.*)
-ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libv8.so
-ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libv8.so.%{somajor}
+install -p d8 $RPM_BUILD_ROOT%{_bindir}/v8
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog LICENSE
+%doc AUTHORS ChangeLog LICENSE LICENSE.strongtalk LICENSE.valgrind
%attr(755,root,root) %{_bindir}/v8
%files libs
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libv8.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libv8.so.3
+%attr(755,root,root) %{_libdir}/libv8preparser.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libv8preparser.so.3
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libv8.so
-%{_includedir}/*.h
+%attr(755,root,root) %{_libdir}/libv8preparser.so
+%{_includedir}/v8*.h