]> git.pld-linux.org Git - packages/v8.git/commitdiff
- up to r4070 / 2.0.6+
authoraredridel <aredridel@pld-linux.org>
Wed, 10 Mar 2010 04:22:44 +0000 (04:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- fix minor type mismatch
- patch for older libstdc++ lack of cstdio
- build on Ac with GCC4

Changed files:
    v8-cstdio.patch -> 1.1
    v8-strndup.patch -> 1.1
    v8.spec -> 1.8

v8-cstdio.patch [new file with mode: 0644]
v8-strndup.patch [new file with mode: 0644]
v8.spec

diff --git a/v8-cstdio.patch b/v8-cstdio.patch
new file mode 100644 (file)
index 0000000..69762c0
--- /dev/null
@@ -0,0 +1,12 @@
+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
diff --git a/v8-strndup.patch b/v8-strndup.patch
new file mode 100644 (file)
index 0000000..ec0ef97
--- /dev/null
@@ -0,0 +1,12 @@
+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
diff --git a/v8.spec b/v8.spec
index 7911673847659ed510c6f7d31d1af8841e23ba38..03e0276dbb63ccac8cdbf8b7a29c843bcd74e75e 100644 (file)
--- a/v8.spec
+++ b/v8.spec
@@ -1,19 +1,16 @@
-# 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
@@ -21,9 +18,12 @@ URL:         http://code.google.com/p/v8
 # 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
@@ -59,8 +59,10 @@ Development headers and libraries for v8.
 
 %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
@@ -74,6 +76,18 @@ EOF
 
 %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 \
This page took 0.112561 seconds and 4 git commands to generate.