--- /dev/null
+diff -ur v8-/src/d8-readline.cc v8/src/d8-readline.cc
+--- v8-/src/d8-readline.cc 2010-03-09 20:28:47.000000000 -0700
++++ v8/src/d8-readline.cc 2010-03-09 20:52:00.000000000 -0700
+@@ -26,7 +26,7 @@
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+-#include <cstdio> // NOLINT
++#include <stdio.h> // NOLINT
+ #include <readline/readline.h> // NOLINT
+ #include <readline/history.h> // NOLINT
+
--- /dev/null
+diff -ur v8-/src/allocation.h v8/src/allocation.h
+--- v8-/src/allocation.h 2010-03-09 20:28:45.000000000 -0700
++++ v8/src/allocation.h 2010-03-09 21:07:04.000000000 -0700
+@@ -124,7 +124,7 @@
+ // and StrNDup uses new and calls the FatalProcessOutOfMemory handler
+ // if allocation fails.
+ char* StrDup(const char* str);
+-char* StrNDup(const char* str, int n);
++char* StrNDup(const char* str, size_t n);
+
+
+ // Allocation policy for allocating in the C free store using malloc
-# TODO
-# - cxx is not passed to build
-# - cleaner way for cxxflags
# For the 1.2 branch, we use 0s here
# For 1.3+, we use the three digit versions
%define somajor 2
%define sominor 0
-%define sobuild 0
+%define sobuild 6
%define sover %{somajor}.%{sominor}.%{sobuild}
-%define snap 20091118svn3334
+%define snap 20100309svn4070
%define rel 1
Summary: JavaScript Engine
Name: v8
-Version: 2.0.0
+Version: 2.0.6
Release: 0.%{snap}.%{rel}
License: BSD
Group: Libraries
# No tarballs, pulled from svn
# svn export http://v8.googlecode.com/svn/trunk/ v8
Source0: %{name}-%{snap}.tar.bz2
-# Source0-md5: 014dd59b50b7859f3845b535ebd06ad2
-Patch0: %{name}-d8-fwrite-return.patch
+# Source0-md5: f329539eacdd444b2517ff66561ab0fe
+#Patch0: %{name}-d8-fwrite-return.patch
Patch1: %{name}-2.0.0-d8-allocation.patch
+Patch2: %{name}-cstdio.patch
+Patch3: %{name}-strndup.patch
+BuildRequires: gcc >= 4.0
BuildRequires: libstdc++-devel
BuildRequires: readline-devel
BuildRequires: scons
%prep
%setup -q -n %{name}
-%patch0 -p1
+#%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%{__sed} -i -e "s,'-O3','%{rpmcxxflags}'.split(' ')," SConstruct
# create simple makefile
%build
# build library
+
+CFLAGS="%{rpmcflags}"
+CXXFLAGS="%{rpmcxxflags}"
+LDFLAGS="%{rpmcflags}"
+%if "%{pld_release}" == "ac"
+CC=%{__cc}4
+CXX=%{__cxx}4
+%else
+CC=%{__cc}
+CXX=%{__cxx}
+%endif
+export CFLAGS LDFLAGS CXXFLAGS CC CXX
%scons \
library=shared \
snapshots=on \