summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Hajdan <phajdan.jr@gentoo.org>2011-10-12 20:42:56 +0000
committerPaweł Hajdan <phajdan.jr@gentoo.org>2011-10-12 20:42:56 +0000
commitfcbe3d374dfe78c2a124ea70894cd2063a89aac9 (patch)
tree1e4845fb050fa8e1b87e58531822f6f6c68aaacf /www-client
parentStable on amd64 wrt bug #386789 (diff)
downloadgentoo-2-fcbe3d374dfe78c2a124ea70894cd2063a89aac9.tar.gz
gentoo-2-fcbe3d374dfe78c2a124ea70894cd2063a89aac9.tar.bz2
gentoo-2-fcbe3d374dfe78c2a124ea70894cd2063a89aac9.zip
Use system V8. Hopefully bug #357809 shouldn't return. Remove old.
(Portage version: 2.1.10.11/cvs/Linux i686)
Diffstat (limited to 'www-client')
-rw-r--r--www-client/chromium/ChangeLog9
-rw-r--r--www-client/chromium/chromium-16.0.904.0-r2.ebuild (renamed from www-client/chromium/chromium-16.0.904.0.ebuild)68
-rw-r--r--www-client/chromium/chromium-9999-r1.ebuild36
-rw-r--r--www-client/chromium/files/extract_v8_version.py24
4 files changed, 110 insertions, 27 deletions
diff --git a/www-client/chromium/ChangeLog b/www-client/chromium/ChangeLog
index 26b7fcf44555..737731f961bc 100644
--- a/www-client/chromium/ChangeLog
+++ b/www-client/chromium/ChangeLog
@@ -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)
diff --git a/www-client/chromium/chromium-16.0.904.0.ebuild b/www-client/chromium/chromium-16.0.904.0-r2.ebuild
index 2e30a626d92f..b8a99ada2ebb 100644
--- a/www-client/chromium/chromium-16.0.904.0.ebuild
+++ b/www-client/chromium/chromium-16.0.904.0-r2.ebuild
@@ -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
diff --git a/www-client/chromium/chromium-9999-r1.ebuild b/www-client/chromium/chromium-9999-r1.ebuild
index 65ae3d06776e..369f98f9d1d8 100644
--- a/www-client/chromium/chromium-9999-r1.ebuild
+++ b/www-client/chromium/chromium-9999-r1.ebuild
@@ -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
index 000000000000..55615138b863
--- /dev/null
+++ b/www-client/chromium/files/extract_v8_version.py
@@ -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)