packages: v8/v8-dynlink.patch, v8/v8-strndup.patch, v8/v8.spec, v8/v8-2.0.0...

qboosh qboosh at pld-linux.org
Tue Jun 14 20:40:40 CEST 2011


Author: qboosh                       Date: Tue Jun 14 18:40:40 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- updated to 3.4.3
- fixed dynlink patch (do not replace all needed libs by just libv8)
- one more fix in strndup patch (this patch replaces old 2.0.0-d8-allocation patch)
- general spec cleanup
- pl

---- Files affected:
packages/v8:
   v8-dynlink.patch (1.1 -> 1.2) , v8-strndup.patch (1.1 -> 1.2) , v8.spec (1.23 -> 1.24) , v8-2.0.0-d8-allocation.patch (1.1 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/v8/v8-dynlink.patch
diff -u packages/v8/v8-dynlink.patch:1.1 packages/v8/v8-dynlink.patch:1.2
--- packages/v8/v8-dynlink.patch:1.1	Mon May 16 09:39:41 2011
+++ packages/v8/v8-dynlink.patch	Tue Jun 14 20:40:35 2011
@@ -1,13 +1,14 @@
-Only in v8-3.3.6.1: Makefile
-diff -ur v8-3.3.6.1-o//SConstruct v8-3.3.6.1/SConstruct
---- v8-3.3.6.1-o//SConstruct	2011-05-16 01:31:49.000000000 -0600
+diff -ur v8-3.3.6.1-o/SConstruct v8-3.3.6.1/SConstruct
+--- v8-3.3.6.1-o/SConstruct	2011-05-16 01:31:49.000000000 -0600
 +++ v8-3.3.6.1/SConstruct	2011-05-16 01:32:25.000000000 -0600
-@@ -1356,7 +1356,7 @@
+@@ -1355,8 +1355,9 @@
+ 
    d8_env = Environment(tools=tools)
    d8_env.Replace(**context.flags['d8'])
++  d8_env.Prepend(LIBS=['v8'], LIBPATH='.')
    context.ApplyEnvOverrides(d8_env)
 -  shell = d8_env.Program('d8' + suffix, object_files + shell_files)
-+  shell = d8_env.Program('d8' + suffix, shell_files, LIBS='v8', LIBPATH='.')
++  shell = d8_env.Program('d8' + suffix, shell_files)
    context.d8_targets.append(shell)
  
    for sample in context.samples:

================================================================
Index: packages/v8/v8-strndup.patch
diff -u packages/v8/v8-strndup.patch:1.1 packages/v8/v8-strndup.patch:1.2
--- packages/v8/v8-strndup.patch:1.1	Wed Mar 10 05:22:44 2010
+++ packages/v8/v8-strndup.patch	Tue Jun 14 20:40:35 2011
@@ -10,3 +10,16 @@
  
  
  // Allocation policy for allocating in the C free store using malloc
+--- v8-3.4.3/src/allocation.cc.orig	2011-06-14 16:53:10.000000000 +0200
++++ v8-3.4.3/src/allocation.cc	2011-06-14 19:36:16.581069856 +0200
+@@ -90,8 +90,8 @@
+ }
+ 
+ 
+-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);

================================================================
Index: packages/v8/v8.spec
diff -u packages/v8/v8.spec:1.23 packages/v8/v8.spec:1.24
--- packages/v8/v8.spec:1.23	Mon May 16 09:41:26 2011
+++ packages/v8/v8.spec	Tue Jun 14 20:40:35 2011
@@ -1,41 +1,48 @@
 # $Revision$, $Date$
-#
-# 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
 
@@ -46,28 +53,42 @@
 
 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"
@@ -76,43 +97,29 @@
 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
@@ -122,18 +129,21 @@
 
 %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
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -141,6 +151,13 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.24  2011/06/14 18:40:35  qboosh
+- updated to 3.4.3
+- fixed dynlink patch (do not replace all needed libs by just libv8)
+- one more fix in strndup patch (this patch replaces old 2.0.0-d8-allocation patch)
+- general spec cleanup
+- pl
+
 Revision 1.23  2011/05/16 07:41:26  aredridel
 - 3.3.6.1
 - patch SConstruct to build properly instead of the hackery that needed a
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/v8/v8-dynlink.patch?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/v8/v8-strndup.patch?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/v8/v8.spec?r1=1.23&r2=1.24&f=u



More information about the pld-cvs-commit mailing list