packages: chromium-browser/chromium-browser.spec, chromium-browser/nacl-bui...

glen glen at pld-linux.org
Sat Jul 7 12:08:58 CEST 2012


Author: glen                         Date: Sat Jul  7 10:08:58 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- build nacl with crossnacl toolchain

---- Files affected:
packages/chromium-browser:
   chromium-browser.spec (1.213 -> 1.214) , nacl-build-irt.patch (NONE -> 1.1)  (NEW), nacl-linkingfix.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/chromium-browser/chromium-browser.spec
diff -u packages/chromium-browser/chromium-browser.spec:1.213 packages/chromium-browser/chromium-browser.spec:1.214
--- packages/chromium-browser/chromium-browser.spec:1.213	Mon Jul  2 23:37:51 2012
+++ packages/chromium-browser/chromium-browser.spec	Sat Jul  7 12:08:53 2012
@@ -8,7 +8,7 @@
 %bcond_without	cups			# with cups
 %bcond_without	gconf			# with GConf
 %bcond_without	pulseaudio		# with pulseaudio
-%bcond_with		nacl			# build Native Client support
+%bcond_without	nacl			# build Native Client support
 %bcond_without	sandboxing		# with sandboxing
 %bcond_with		selinux			# with SELinux (need policy first)
 %bcond_with		shared_libs		# with shared libs
@@ -22,7 +22,7 @@
 %bcond_without	system_vpx		# with system vpx
 %bcond_without	system_yasm		# with system yasm
 %bcond_without	system_zlib		# with system zlib
-%bcond_without	libjpegturbo		# use libjpeg-turbo features
+%bcond_without	libjpegturbo	# use libjpeg-turbo features
 %bcond_with		verbose			# verbose build (V=1)
 
 # TODO
@@ -53,7 +53,7 @@
 Summary:	A WebKit powered web browser
 Name:		chromium-browser
 Version:	20.0.1132.47
-Release:	1
+Release:	2
 License:	BSD, LGPL v2+ (ffmpeg)
 Group:		X11/Applications/Networking
 Source0:	http://carme.pld-linux.org/~glen/chromium-browser/src/beta/%{name}-%{version}.tar.xz
@@ -81,6 +81,8 @@
 Patch12:	tcmalloc.patch
 Patch13:	%{name}-c++.patch
 Patch14:	chromium-alignment-r0.patch
+Patch15:	nacl-build-irt.patch
+Patch16:	nacl-linkingfix.patch
 URL:		http://www.chromium.org/Home
 %{?with_gconf:BuildRequires:	GConf2-devel}
 BuildRequires:	OpenGL-GLU-devel
@@ -88,6 +90,10 @@
 BuildRequires:	atk-devel
 BuildRequires:	bison
 BuildRequires:	bzip2-devel
+%{?with_nacl:BuildRequires:	crossnacl-binutils >= 2.20.1}
+%{?with_nacl:BuildRequires:	crossnacl-gcc >= 4.4.3}
+%{?with_nacl:BuildRequires:	crossnacl-gcc-c++ >= 4.4.3}
+%{?with_nacl:BuildRequires:	crossnacl-newlib >= 1.18.0}
 %{?with_cups:BuildRequires:	cups-devel}
 BuildRequires:	dbus-glib-devel
 BuildRequires:	expat-devel
@@ -113,7 +119,6 @@
 BuildRequires:	libxslt-devel
 BuildRequires:	lzma
 BuildRequires:	minizip-devel
-%{?with_nacl:BuildRequires:	nacl-toolchain-newlib >= 0.6941}
 BuildRequires:	nspr-devel
 BuildRequires:	nss-devel >= 1:3.12.3
 BuildRequires:	pam-devel
@@ -227,6 +232,8 @@
 %patch12 -p0
 %patch13 -p0
 %patch14 -p0
+%patch15 -p1
+%patch16 -p1
 cd ..
 
 cd src
@@ -234,6 +241,34 @@
 
 %build
 cd src
+
+%if %{with nacl}
+rm -rf native_client/toolchain/linux_x86_newlib
+# Make symlinks for nacl
+cd native_client/toolchain
+install -d linux_x86_newlib/x86_64-nacl/bin
+install -d linux_x86_newlib/x86_64-nacl/lib
+install -d linux_x86_newlib/x86_64-nacl/lib32
+install -d linux_x86_newlib/x86_64-nacl/nacl/include/bits
+install -d linux_x86_newlib/x86_64-nacl/nacl/include/machine
+install -d linux_x86_newlib/x86_64-nacl/nacl/include/sys
+cd linux_x86_newlib/x86_64-nacl/bin
+ln -s %{_bindir}/x86_64-nacl-gcc gcc
+ln -s %{_bindir}/x86_64-nacl-g++ g++
+ln -s %{_bindir}/x86_64-nacl-ar ar
+ln -s %{_bindir}/x86_64-nacl-as as
+ln -s %{_bindir}/x86_64-nacl-ranlib ranlib
+ln -s %{_bindir}/x86_64-nacl-strip x86-64-nacl-strip
+ln -s %{_bindir}/x86_64-nacl-strip strip
+ln -s %{_prefix}/x86_64-nacl/lib/*.a ../lib/
+ln -s %{_prefix}/x86_64-nacl/lib/32/*.a ../lib32/
+cd ../nacl/include
+for i in $(find %{_prefix}/x86_64-nacl/include -type f | grep -v "c++"); do
+	ln -s $i ${i#%{_prefix}/x86_64-nacl/include/}
+done
+cd ../../../../../..
+%endif
+
 test -e Makefile || %{__python} build/gyp_chromium --format=make build/all.gyp \
 %ifarch %{ix86}
 	-Dtarget_arch=ia32 \
@@ -410,6 +445,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.214  2012/07/07 10:08:53  glen
+- build nacl with crossnacl toolchain
+
 Revision 1.213  2012/07/02 21:37:51  glen
 - rel 1 for th
 

================================================================
Index: packages/chromium-browser/nacl-build-irt.patch
diff -u /dev/null packages/chromium-browser/nacl-build-irt.patch:1.1
--- /dev/null	Sat Jul  7 12:08:58 2012
+++ packages/chromium-browser/nacl-build-irt.patch	Sat Jul  7 12:08:53 2012
@@ -0,0 +1,40 @@
+--- chromium-browser-20.0.1132.47/native_client/SConstruct~	2012-06-28 16:03:20.000000000 +0300
++++ chromium-browser-20.0.1132.47/native_client/SConstruct	2012-07-07 01:27:46.054400799 +0300
+@@ -3329,7 +3329,7 @@
+     #### ALPHABETICALLY SORTED ####
+     ], ppapi_scons_files['nonvariant_test_scons_files'])
+ 
+-nacl_env.Append(BUILD_SCONSCRIPTS=irt_variant_tests + nonvariant_tests)
++#nacl_env.Append(BUILD_SCONSCRIPTS=irt_variant_tests + nonvariant_tests)
+ 
+ # ----------------------------------------------------------
+ # Possibly install an sdk by downloading it
+diff -up chromium-17.0.963.46/native_client/site_scons/site_tools/naclsdk.py.buildnacl chromium-17.0.963.46/native_client/site_scons/site_tools/naclsdk.py
+--- chromium-17.0.963.46/native_client/site_scons/site_tools/naclsdk.py.buildnacl	2012-01-27 03:03:50.000000000 -0500
++++ chromium-17.0.963.46/native_client/site_scons/site_tools/naclsdk.py	2012-02-13 17:09:38.402988894 -0500
+@@ -138,18 +138,21 @@ def _SetEnvForX86Sdk(env, sdk_path):
+   # does not run under Cygwin and does not follow Cygwin symlinks.
+   if env['TARGET_SUBARCH'] == default_subarch:
+     libsuffix = 'lib'
+-    as_mode_flag = ''
+-    ld_mode_flag = ''
++    cc_mode_flag = ' -m%s -L/usr/x86_64-nacl/lib/%s' % (env['TARGET_SUBARCH'], env['TARGET_SUBARCH'])
++    as_mode_flag = ' --%s' % env['TARGET_SUBARCH']
++    if env['TARGET_SUBARCH'] == '64':
++      ld_mode_flag = ' -melf64_nacl'
++    else:
++      ld_mode_flag = ' -melf_nacl'
+   else:
+     libsuffix = 'lib%s' % env['TARGET_SUBARCH']
++    cc_mode_flag = '-m%s' % env['TARGET_SUBARCH']
+     as_mode_flag = '--%s' % env['TARGET_SUBARCH']
+     if env['TARGET_SUBARCH'] == '64':
+       ld_mode_flag = ' -melf64_nacl'
+     else:
+       ld_mode_flag = ' -melf_nacl'
+ 
+-  cc_mode_flag = '-m%s' % env['TARGET_SUBARCH']
+-
+   env.Replace(# Replace header and lib paths.
+               # where to put nacl extra sdk headers
+               # TODO(robertm): switch to using the mechanism that

================================================================
Index: packages/chromium-browser/nacl-linkingfix.patch
diff -u /dev/null packages/chromium-browser/nacl-linkingfix.patch:1.1
--- /dev/null	Sat Jul  7 12:08:58 2012
+++ packages/chromium-browser/nacl-linkingfix.patch	Sat Jul  7 12:08:53 2012
@@ -0,0 +1,20 @@
+diff -up chromium-9.0.600.0/native_client/src/trusted/service_runtime/service_runtime.gyp.linking-fix chromium-9.0.600.0/native_client/src/trusted/service_runtime/service_runtime.gyp
+--- chromium-9.0.600.0/native_client/src/trusted/service_runtime/service_runtime.gyp.linking-fix	2010-12-03 06:56:29.000000000 -0500
++++ chromium-9.0.600.0/native_client/src/trusted/service_runtime/service_runtime.gyp	2010-12-13 12:56:50.063551554 -0500
+@@ -187,6 +187,16 @@
+                     'linux/arm/sel_segments.c',
+                   ],
+                 }],
++                ['target_arch=="ia32"', {
++                  'sources': [
++                    'linux/nacl_signal_32.c',
++                  ],
++                }],
++                ['target_arch=="x64"', {
++                  'sources': [
++                    'linux/nacl_signal_64.c',
++                  ],
++                }],
+               ],
+             }],
+             ['OS=="linux" or OS=="mac" or OS=="FreeBSD"', {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/chromium-browser/chromium-browser.spec?r1=1.213&r2=1.214



More information about the pld-cvs-commit mailing list