Use system V8. Hopefully bug #357809 shouldn't return. Remove old.
authorPaweł Hajdan <phajdan.jr@gentoo.org>
Wed, 12 Oct 2011 20:42:56 +0000 (20:42 +0000)
committerPaweł Hajdan <phajdan.jr@gentoo.org>
Wed, 12 Oct 2011 20:42:56 +0000 (20:42 +0000)
Package-Manager: portage-2.1.10.11/cvs/Linux i686

www-client/chromium/ChangeLog
www-client/chromium/Manifest
www-client/chromium/chromium-16.0.904.0-r2.ebuild [moved from www-client/chromium/chromium-16.0.904.0.ebuild with 90% similarity]
www-client/chromium/chromium-9999-r1.ebuild
www-client/chromium/files/extract_v8_version.py [new file with mode: 0644]

index 26b7fcf4455551492017b6ec7bff362622073fb1..737731f961bcdc09e87c5f0992e6db91923c5e87 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for www-client/chromium
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.463 2011/10/12 02:39:57 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.464 2011/10/12 20:42:56 phajdan.jr Exp $
+
+*chromium-16.0.904.0-r2 (12 Oct 2011)
+
+  12 Oct 2011; Pawel Hajdan jr <phajdan.jr@gentoo.org>
+  +files/extract_v8_version.py, -chromium-16.0.904.0.ebuild,
+  +chromium-16.0.904.0-r2.ebuild, chromium-9999-r1.ebuild:
+  Use system V8. Hopefully bug #357809 shouldn't return. Remove old.
 
 *chromium-16.0.904.0-r1 (12 Oct 2011)
 
index 290abe68ef05f1ba721ab298a0ca6e4bcd13cfcb..c9df391a9708366e8dba0a0f2402d1a7906aa75c 100644 (file)
@@ -8,6 +8,7 @@ AUX chromium-launcher-r2.sh 940 RMD160 7a64e597998a8f95a7e3d1c26377842ff8106f89
 AUX chromium-system-libevent-r0.patch 404 RMD160 0dc32cfbd0770e4be1b6f9d3cf8ac08987a5992d SHA1 f6127a903eeb4ce13a4f8fc75dda0102e68d759a SHA256 127945ad45ede0e2aefbc28d8d5eb241675abb83f3aedc2569133e437f98a841
 AUX chromium.default 147 RMD160 4c0669585499b94c225e34e985e615d0299b66fb SHA1 1cdcbcd4a3517f70ba67c749da95c2a307971846 SHA256 de16d72d77ac9fe04f781df4f50dfb714ba33574755932df950c1d9472b589d9
 AUX dot-gclient 253 RMD160 a768770d8e6f5b73395451277beea1cc9240fc3a SHA1 3eaf2074da58cfe4f2af3d08f59b27a16fe13dad SHA256 8c5750251ff681044cc584ef3768fe39c56c7877ade5fb9107298734126e62cf
+AUX extract_v8_version.py 731 RMD160 71b134c9b88902259cb20ec232b8da6c3d8a15de SHA1 3dc5d6f9437f4b0ffb584395e19663450384b53a SHA256 4011f1e2f44bd18ad1266dffc1d3fbc13a6430afade2b19240b31ee9437dcbda
 AUX nacl.gypi 98 RMD160 fa4806fbc8c2e19763c1905a3bc431022b247825 SHA1 df4cee39e1d49e10f9c075f5e6e9db28e8260926 SHA256 25bddd2eee7821e18ddda06f6e69552c359e1c04a10971ac3985556c3d8ef059
 DIST chromium-14.0.835.163.tar.bz2 155868619 RMD160 36009ea3db7270a90ffe9d77ba3a52d86d5d5a84 SHA1 f38e8835f4c12a61734eb99ee0a16d1386e2726d SHA256 2a16908fce65fda294448c43ec16dbbe3ff07603f0695126e5e845f727c6b5aa
 DIST chromium-14.0.835.202.tar.bz2 155892873 RMD160 af580b4fa74416a66a701343dcd9fa7815e46041 SHA1 e1c2d7cacaa256b1d343ee012d07170dbb3beb2f SHA256 8fcbeda57e45c990257c0ef2a021fad5e58dca1686688ffaccc2d6fa421fe0db
@@ -21,14 +22,15 @@ EBUILD chromium-15.0.874.81.ebuild 14224 RMD160 6a2ee651876a66c268fbcc457e74c95c
 EBUILD chromium-15.0.874.83.ebuild 14224 RMD160 df78a96ac7bd075a4a8f21fd24a1fc3bac6a3cea SHA1 4bd640fe84767ef334c0682ef544a76aef225631 SHA256 73d9c3db531079bbed5559e9076047b895f60e3a131fb6108a29822f3f623ab2
 EBUILD chromium-16.0.899.0.ebuild 13949 RMD160 5a5333ade34f2aacc504f70e16faf4b2ad4144b7 SHA1 06bb027a26c5517240ae9c2e4aef2a8eee7e5e70 SHA256 cd314d18256783329639ab69f9e088daad5c6fe5344a6c0e4a6c0c848c5a8cf4
 EBUILD chromium-16.0.904.0-r1.ebuild 14040 RMD160 73616a8f003006d5e435f1d118c9484d4ce11769 SHA1 7d1e9778e62961b07fdeb37051ac71f07a4c24c9 SHA256 d176bff6151f9d2ccb784ac052c408d2d1d9893cc3fcf57a4dacbb595a843af9
-EBUILD chromium-16.0.904.0.ebuild 13946 RMD160 f7bf502fa5c4e31d25c2369f565b8b1229d27d72 SHA1 7b68ef2bbf965010365e68f7140d5e39e13c908b SHA256 508c21b0b4cecf4e9d584fdd270036d4b89f54cdea04e3d479a962f1e0acbc2d
-EBUILD chromium-9999-r1.ebuild 16629 RMD160 293f84090ed0fd9125c0520d622da4dda549d06c SHA1 75eb3deed17a916ac378c5ca83fe211cec5d6df5 SHA256 d3cb996d63381254a1fa0a38bf564f86e52c8e535f481b1e4e35b6602082f898
-MISC ChangeLog 102180 RMD160 17254e7e229a49cc8ab097d1a4a788e661b4ddd5 SHA1 ef7f391d81f8d2f47ad399af4b8f57b8ac9b9384 SHA256 0c5d34372ee0c1fadc212769dcb828b759d46d28d85928e9e21d36fefe1a0a53
+EBUILD chromium-16.0.904.0-r2.ebuild 14769 RMD160 d772d6c1292ded69608a3c090b591652da852e7b SHA1 48fae120a142cbcbcd30cfecb0bfe09255fe8dcd SHA256 b556b80d650397f0fd2a596e8a9fc5203f4ea668eaac8635a42811392c9933da
+EBUILD chromium-9999-r1.ebuild 17358 RMD160 a4d89193b733eec3b3b0dc966a9189b78b41d50e SHA1 53bec1e45f185b101c0761ac6c24cf42e50cbde2 SHA256 784f337c6fa1558ee3d7d070ab77d599cedaee1aeb3d26e50b6e4783a1726f2e
+MISC ChangeLog 102464 RMD160 d57e2b3c9e5e41bc14769d3b91b48a3807c72c7a SHA1 f8fff57aa533438f35b9f02c7126c6ccc3c6c427 SHA256 225a7e6a7d4dbd2947270ca1dc5088130234503a9c332a6d0dcc35b64f8e5309
+MISC chromium-9999-r1.ebuild.orig 16629 RMD160 293f84090ed0fd9125c0520d622da4dda549d06c SHA1 75eb3deed17a916ac378c5ca83fe211cec5d6df5 SHA256 d3cb996d63381254a1fa0a38bf564f86e52c8e535f481b1e4e35b6602082f898
 MISC metadata.xml 495 RMD160 91f2c4344cde85374523c8c16f5987ad0320b607 SHA1 5e97c7979fac0de374958532e38fcbca1191963b SHA256 375fb24d5d647728a58b3a7d0d552bf7d8eb5f26eef3c249dcf9a2dcb9e5bb37
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (GNU/Linux)
 
-iEYEAREKAAYFAk6U/g8ACgkQuUQtlDBCeQIRNQCeLv2YuTMpfVJy7bj7fannb+oq
-YWMAn1b/184xC7vRE42zJyR1vyJt58FP
-=oUfd
+iEYEAREKAAYFAk6V+98ACgkQuUQtlDBCeQJM0wCeLR5XdPe8AJ9lbJPMIoyJr+Hy
+dFEAniBtZl8i/Hta2xSFPRUeAlYcTSGB
+=DeQh
 -----END PGP SIGNATURE-----
similarity index 90%
rename from www-client/chromium/chromium-16.0.904.0.ebuild
rename to www-client/chromium/chromium-16.0.904.0-r2.ebuild
index 2e30a626d92ff5c79d0b30b7e9961b8e53051d3e..b8a99ada2ebba845eced07bf116c7b9895716c9c 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-16.0.904.0.ebuild,v 1.1 2011/10/11 17:36:43 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-16.0.904.0-r2.ebuild,v 1.1 2011/10/12 20:42:56 phajdan.jr Exp $
 
 EAPI="3"
 PYTHON_DEPEND="2:2.6"
@@ -26,7 +26,9 @@ for lang in ${LANGS}; do
 done
 
 RDEPEND="app-arch/bzip2
+       dev-lang/v8
        dev-libs/dbus-glib
+       dev-libs/elfutils
        >=dev-libs/icu-4.4.1
        >=dev-libs/libevent-1.4.13
        dev-libs/libxml2[icu]
@@ -52,6 +54,7 @@ RDEPEND="app-arch/bzip2
        x11-libs/libXtst
        kerberos? ( virtual/krb5 )"
 DEPEND="${RDEPEND}
+       dev-lang/nacl-toolchain-newlib
        dev-lang/perl
        >=dev-util/gperf-3.0.3
        >=dev-util/pkgconfig-0.23
@@ -90,6 +93,14 @@ chromium_lang() {
        fi
 }
 
+get_bundled_v8_version() {
+       "$(PYTHON -2)" "${FILESDIR}"/extract_v8_version.py v8/src/version.cc
+}
+
+get_installed_v8_version() {
+       best_version dev-lang/v8 | sed -e 's@dev-lang/v8-@@g'
+}
+
 pkg_setup() {
        CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
 
@@ -122,6 +133,9 @@ pkg_setup() {
 }
 
 src_prepare() {
+       ln -s "/usr/$(get_libdir)/nacl-toolchain-newlib" \
+               "native_client/toolchain/linux_x86_newlib" || die
+
        # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371.
        sed -i '1i#define OF(x) x' \
                third_party/zlib/contrib/minizip/{ioapi,{,un}zip}.c \
@@ -148,6 +162,7 @@ src_prepare() {
                \! -path 'third_party/libjingle/*' \
                \! -path 'third_party/libphonenumber/*' \
                \! -path 'third_party/libvpx/*' \
+               \! -path 'third_party/lss/*' \
                \! -path 'third_party/mesa/*' \
                \! -path 'third_party/modp_b64/*' \
                \! -path 'third_party/mongoose/*' \
@@ -155,6 +170,7 @@ src_prepare() {
                \! -path 'third_party/openmax/*' \
                \! -path 'third_party/ots/*' \
                \! -path 'third_party/protobuf/*' \
+               \! -path 'third_party/scons-2.0.1/*' \
                \! -path 'third_party/sfntly/*' \
                \! -path 'third_party/skia/*' \
                \! -path 'third_party/smhasher/*' \
@@ -171,6 +187,20 @@ src_prepare() {
                \! -path 'third_party/zlib/contrib/minizip/*' \
                -delete || die
 
+       local v8_bundled="$(get_bundled_v8_version)"
+       local v8_installed="$(get_installed_v8_version)"
+       elog "V8 version: bundled - ${v8_bundled}; installed - ${v8_installed}"
+
+       # Remove bundled v8.
+       find v8 -type f \! -iname '*.gyp*' -delete || die
+
+       # The implementation files include v8 headers with full path,
+       # like #include "v8/include/v8.h". Make sure the system headers
+       # will be used.
+       # TODO: find a solution that can be upstreamed.
+       rmdir v8/include || die
+       ln -s /usr/include v8/include || die
+
        # Make sure the build system will use the right python, bug #344367.
        # Only convert directories that need it, to save time.
        python_convert_shebangs -q -r 2 build tools
@@ -183,9 +213,6 @@ src_configure() {
        # additions, bug #336871.
        myconf+=" -Ddisable_sse2=1"
 
-       # Disable NaCl temporarily, this tarball doesn't have IRT.
-       myconf+=" -Ddisable_nacl=1"
-
        # Use system-provided libraries.
        # TODO: use_system_ffmpeg
        # TODO: use_system_hunspell (upstream changes needed).
@@ -202,6 +229,7 @@ src_configure() {
                -Duse_system_libwebp=1
                -Duse_system_libxml=1
                -Duse_system_speex=1
+               -Duse_system_v8=1
                -Duse_system_xdg_utils=1
                -Duse_system_zlib=1"
 
@@ -220,11 +248,11 @@ src_configure() {
                -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
                -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
 
-       if host-is-pax; then
-               # Prevent the build from failing (bug #301880). The performance
-               # difference is very small.
-               myconf+=" -Dv8_use_snapshot=0"
-       fi
+       if host-is-pax; then
+       #       # Prevent the build from failing (bug #301880). The performance
+       #       # difference is very small.
+       #       myconf+=" -Dv8_use_snapshot=0"
+       fi
 
        # Our system ffmpeg should support more codecs than the bundled one
        # for Chromium.
@@ -314,17 +342,17 @@ src_install() {
        fi
 
        # Install Native Client files on platforms that support it.
-       insinto "${CHROMIUM_HOME}"
-       case "$(tc-arch)" in
-       #       amd64)
-       #               doins native_client/irt_binaries/nacl_irt_x86_64.nexe || die
-       #               doins out/Release/libppGoogleNaClPluginChrome.so || die
-       #       ;;
-       #       x86)
-       #               doins native_client/irt_binaries/nacl_irt_x86_32.nexe || die
-       #               doins out/Release/libppGoogleNaClPluginChrome.so || die
-       #       ;;
-       esac
+       insinto "${CHROMIUM_HOME}"
+       case "$(tc-arch)" in
+               amd64)
+                       doins out/Release/nacl_irt_x86_64.nexe || die
+                       doins out/Release/libppGoogleNaClPluginChrome.so || die
+               ;;
+               x86)
+                       doins out/Release/nacl_irt_x86_32.nexe || die
+                       doins out/Release/libppGoogleNaClPluginChrome.so || die
+               ;;
+       esac
 
        newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die
 
index 65ae3d06776e2b7083d108da7e478d42851317a4..369f98f9d1d8da7357cd3016c9921cff6cc5ab6a 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v 1.57 2011/10/12 02:39:57 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v 1.58 2011/10/12 20:42:56 phajdan.jr Exp $
 
 EAPI="3"
 PYTHON_DEPEND="2:2.6"
@@ -26,6 +26,7 @@ for lang in ${LANGS}; do
 done
 
 RDEPEND="app-arch/bzip2
+       dev-lang/v8
        dev-libs/dbus-glib
        dev-libs/elfutils
        >=dev-libs/icu-4.4.1
@@ -143,6 +144,14 @@ chromium_lang() {
        fi
 }
 
+get_bundled_v8_version() {
+       "$(PYTHON -2)" "${FILESDIR}"/extract_v8_version.py v8/src/version.cc
+}
+
+get_installed_v8_version() {
+       best_version dev-lang/v8 | sed -e 's@dev-lang/v8-@@g'
+}
+
 pkg_setup() {
        SUFFIX="-${SLOT}"
        CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${SUFFIX}"
@@ -230,6 +239,20 @@ src_prepare() {
                \! -path 'third_party/zlib/contrib/minizip/*' \
                -delete || die
 
+       local v8_bundled="$(get_bundled_v8_version)"
+       local v8_installed="$(get_installed_v8_version)"
+       elog "V8 version: bundled - ${v8_bundled}; installed - ${v8_installed}"
+
+       # Remove bundled v8.
+       find v8 -type f \! -iname '*.gyp*' -delete || die
+
+       # The implementation files include v8 headers with full path,
+       # like #include "v8/include/v8.h". Make sure the system headers
+       # will be used.
+       # TODO: find a solution that can be upstreamed.
+       rmdir v8/include || die
+       ln -s /usr/include v8/include || die
+
        # Make sure the build system will use the right python, bug #344367.
        # Only convert directories that need it, to save time.
        python_convert_shebangs -q -r 2 build tools
@@ -258,6 +281,7 @@ src_configure() {
                -Duse_system_libwebp=1
                -Duse_system_libxml=1
                -Duse_system_speex=1
+               -Duse_system_v8=1
                -Duse_system_xdg_utils=1
                -Duse_system_zlib=1"
 
@@ -276,11 +300,11 @@ src_configure() {
                -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
                -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
 
-       if host-is-pax; then
-               # Prevent the build from failing (bug #301880). The performance
-               # difference is very small.
-               myconf+=" -Dv8_use_snapshot=0"
-       fi
+       if host-is-pax; then
+       #       # Prevent the build from failing (bug #301880). The performance
+       #       # difference is very small.
+       #       myconf+=" -Dv8_use_snapshot=0"
+       fi
 
        # Our system ffmpeg should support more codecs than the bundled one
        # for Chromium.
diff --git a/www-client/chromium/files/extract_v8_version.py b/www-client/chromium/files/extract_v8_version.py
new file mode 100644 (file)
index 0000000..5561513
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/python2
+
+import re
+import sys
+
+MAJOR_VERSION_PATTERN = re.compile(r"#define\s+MAJOR_VERSION\s+(.*)")
+MINOR_VERSION_PATTERN = re.compile(r"#define\s+MINOR_VERSION\s+(.*)")
+BUILD_NUMBER_PATTERN = re.compile(r"#define\s+BUILD_NUMBER\s+(.*)")
+PATCH_LEVEL_PATTERN = re.compile(r"#define\s+PATCH_LEVEL\s+(.*)")
+
+patterns = [MAJOR_VERSION_PATTERN,
+            MINOR_VERSION_PATTERN,
+            BUILD_NUMBER_PATTERN,
+            PATCH_LEVEL_PATTERN]
+
+source = open(sys.argv[1]).read()
+version_components = []
+for pattern in patterns:
+  version_components.append(pattern.search(source).group(1).strip())
+
+if version_components[len(version_components) - 1] == '0':
+  version_components.pop()
+
+print  '.'.join(version_components)