diff options
author | Steev Klimaszewski <steev@gentoo.org> | 2013-08-13 22:40:52 -0500 |
---|---|---|
committer | Steev Klimaszewski <steev@gentoo.org> | 2013-08-13 22:40:52 -0500 |
commit | 9b24095550da638b1ad537a8ceb96af1586f5871 (patch) | |
tree | 1178ad9c7eb352d948339fa7026402dc9c348437 /www-client | |
parent | xf86-video-armsoc: Fix to build with the new xorg-server in this overlay (diff) | |
download | arm-9b24095550da638b1ad537a8ceb96af1586f5871.tar.gz arm-9b24095550da638b1ad537a8ceb96af1586f5871.tar.bz2 arm-9b24095550da638b1ad537a8ceb96af1586f5871.zip |
chromium: Initial WIP of chromium 28 for hardfloat+neon
Diffstat (limited to 'www-client')
-rw-r--r-- | www-client/chromium/Manifest | 11 | ||||
-rw-r--r-- | www-client/chromium/chromium-28.0.1500.71.ebuild | 560 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-browser.xml | 13 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-bug471198.patch | 43 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-gpsd-r0.patch | 12 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-launcher-r3.sh | 32 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-nss-3.15.patch | 26 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-system-ffmpeg-r5.patch | 75 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-system-harfbuzz-r0.patch | 44 | ||||
-rw-r--r-- | www-client/chromium/files/chromium.default | 5 |
10 files changed, 821 insertions, 0 deletions
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest new file mode 100644 index 0000000..226d114 --- /dev/null +++ b/www-client/chromium/Manifest @@ -0,0 +1,11 @@ +AUX chromium-browser.xml 407 SHA256 bc039012f8677468e9ce5df825f9d8096be6deb5813031c86a087c88105096ff SHA512 b767fb4fd1925029d95560fc14cb7ab12ae43b2fe923e92d75e733b9723cbe1dcdf6df041a2b62554e98b79b47ef3f6028c773e72e6fd53166a021d49657aeca WHIRLPOOL be37cd2e7d02c510e84c484f32ab6ab2e1f38a2a03c0cdbc9b6b485d64feaf79944d8ce097f0838ae9bc71c42401b633350b847ad316b8e23cf5614e3913e7ec +AUX chromium-bug471198.patch 1774 SHA256 e1bce3b82147702faf8f0f5bcfadcccb831247b27904b89d9b17403004839f1c SHA512 2785752ab74d59b3248dc3ec7e49b307de71d357b339364261a254a938f8560074bb5d21d51fb28c3b0e85d037eccd5a5f9f84af895e7211eea5b5541e22773a WHIRLPOOL ca5741478ad245cba10fa75168de07a656e73921fb9474ef04ff645f12ea7da0f8bcc297fb6f1b39e257ea5d51626fc1d331f9b5980afbe9d68918698beb61b8 +AUX chromium-gpsd-r0.patch 592 SHA256 9af056bd99e5176af6f5d8acb7d54241731b64fb3fa517fe1a698b35e21692d1 SHA512 72a668dbd5b343a34a1938c2a6f1147d14a149b9a4a981487e9ca8fa6d912791a6c11e29178c3abe1e691c0e1bf6e435a390eb89aa63bda72d592ab3b0a55b1c WHIRLPOOL 7f04535d674498e2f2d572b6feb5ee4a183ffcf9671f308947e5c4a7370399bc8388d53705f7ca23dd6038bb12c81af0fe0b8b1f3cb7d90465b255e4d3c8b7d9 +AUX chromium-launcher-r3.sh 932 SHA256 2025eb484eb1a86da9aff3946847ffc47162080b7a7700102b1608235b87ba3e SHA512 92ce9e24e8862b4a437fb1eb97613cbb3f596650efd6bf4a46ded92d99d6c7549f4e184db48d1695ef4390145665a3acc4714427292ba19414d3d2e1f9ba0e34 WHIRLPOOL e0735b33e003dca28356a83194ca949f7799a513b24f44efbf60af877a67fd14d3ad7a860e5ba5b1f533a5a891001ac173465f664a4ee398b3c0b71e24f84370 +AUX chromium-nss-3.15.patch 675 SHA256 a5ca532d213cc6f9ad19341445309ad4e4aec9530f4309536fb42ee97deca5a6 SHA512 865cc692cf8adf6897f42e0093dd9eb98d6d2123bdb22afbc37e3f3d0210c826f3204ec84b79d80d7c00ead0f95317906c63fe106fd468dccaf910557b5d593a WHIRLPOOL f72b409ec78d2be41f62afae2f8f17c7e7745202058091f2c0192477c65ba652ea6246d32853364b5928ffafffffc9232a17cdf5e7d16c8c94e8a8fe21c72c15 +AUX chromium-system-ffmpeg-r5.patch 3015 SHA256 b9b35f885f5662897e7d14a7335c9a2cd134a8763064bd3f1459dcec1b7b0cec SHA512 c52f20f3eeee5e2b0ede40e60d8f5da780f5e1fe91eaf83dc2aea206bbb54b0202acaf37e62bb1f456a3e4aefa4cd47285994b43abd1682aa0dab6a04a990bf4 WHIRLPOOL 57c1dce3f1aed33c8fa6f93acb9bece0d31d043e559a9bc29f04666604889f03cad99180d7c90936ca05a06fc926760484ae07420b7df651bfb80585883859b2 +AUX chromium-system-harfbuzz-r0.patch 1522 SHA256 2bc4cf17adac9864f4e832e57247984f28fce171d3699c0fc2c3596d1ab20386 SHA512 601951322f0f2467a6e6286196f4d97bf15097638f464329c78c982fafac82096ee9207ed6a678dbffecf255736b1083994736297aa8f65d988029e698333bbb WHIRLPOOL 272f6e3d76f63e9b25fc3c59cf3842a6c450919a31274235ef1d7cda32525e9b3e523389bfa5d1ee9d93c93781e35356f05c4dd7019d3143d61fb79ff2462724 +AUX chromium.default 148 SHA256 bdac1d32025d53158f96c8ad5bd71a58abdcf02f3a8759a43154e97e812fcdd1 SHA512 0d4849e03592fb58b05e62a43021eca7e61615616c8907c3b2e445402e03adaf9e8fa25b0a745d6c31eb037456215cc02b59e345a3a06d932e76cf990c92d739 WHIRLPOOL 2e51e864134426668cc73fc5081c35288677d8ce855b07dfbd3413397f9c43148a6d6096a9b7a617511388f87623a3ce7f3387103202db53876a74bccb9dbe6c +DIST chromium-28.0.1500.71-lite.tar.xz 147525416 SHA256 eaf8d15c87ac3c8c88b19a3ebddc65ac35f4d925aca992f45f01536f054853a1 SHA512 fc3e399bd9f2205a59cc6f9c6b984a3354f7da5e9c50542a463cf0224724615a16de2c9e5a5d9b49f1a02784981937d4ef6e89320c9ada6f3e2bb916784fdce9 WHIRLPOOL 59a81e8ca63fe1079e3a37a726dd92927740728e498f8927a8122e11ee85bfbcc31020c84dfaa747d180b5ba3077e57997c6dc0add8164845a34dc62ff4d8165 +DIST chromium-28.0.1500.71-testdata.tar.xz 141221792 SHA256 3d50da021403b898b939a0dc91653ea2e5148a13d4ebe147052bf7e0f5a477fb SHA512 e87d8caf68f0c2eb15201f673f4b36e8bdbd8599a057d3fecee2857d83507cc9179f097fbe05fd4a8b1e8e30fcf4e5e134dece60fbbe072887a0327e2b1a3ed9 WHIRLPOOL d1923288c4559f9273c4d3926e6345b88d85d0bec3aa26800768dab1af1ecb8805ca84e45ad73c13e0cd9dd0796a6f875d83e1bc322ff94ee6a25a164d806af6 +EBUILD chromium-28.0.1500.71.ebuild 17432 SHA256 08649644d5118fc33d6af8c737c046bdab8170ccb518c22a9f88b89c48dfcaf1 SHA512 09388e0a2ad895ddfe80dc3fc252de69cdb4bd236f703639d9fe4388b12c83f0ab43b6adec71669ef94b96e2ad8c6c5eead8e126f75b9d8baeb6452ba44f764c WHIRLPOOL 56f4a22f849d061dd837da9bb5b658b2a540cc897dac74fcd98c8be2b55cc4f2e6bde1bed3aca7ac252187265d2541afb6ec061520cef1940aae4ba106092d30 diff --git a/www-client/chromium/chromium-28.0.1500.71.ebuild b/www-client/chromium/chromium-28.0.1500.71.ebuild new file mode 100644 index 0000000..2598f5d --- /dev/null +++ b/www-client/chromium/chromium-28.0.1500.71.ebuild @@ -0,0 +1,560 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-28.0.1500.71.ebuild,v 1.6 2013/08/11 23:02:29 aballier Exp $ + +EAPI="5" +PYTHON_COMPAT=( python{2_6,2_7} ) + +CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he + hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt_BR pt_PT ro ru sk sl sr + sv sw ta te th tr uk vi zh_CN zh_TW" + +inherit chromium eutils flag-o-matic multilib \ + pax-utils portability python-any-r1 toolchain-funcs versionator virtualx + +DESCRIPTION="Open-source version of Google Chrome web browser" +HOMEPAGE="http://chromium.org/" +SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}-lite.tar.xz + test? ( https://commondatastorage.googleapis.com/chromium-browser-official/${P}-testdata.tar.xz )" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm x86" +IUSE="bindist cups gnome gnome-keyring gps kerberos pulseaudio selinux +system-ffmpeg system-sqlite tcmalloc" + +# Native Client binaries are compiled with different set of flags, bug #452066. +QA_FLAGS_IGNORED=".*\.nexe" + +RDEPEND="app-accessibility/speech-dispatcher:= + app-arch/bzip2:= + app-arch/snappy:= + system-sqlite? ( dev-db/sqlite:3 ) + cups? ( + dev-libs/libgcrypt:= + >=net-print/cups-1.3.11:= + ) + >=dev-lang/v8-3.17.6:= + =dev-lang/v8-3.18* + >=dev-libs/elfutils-0.149 + dev-libs/expat:= + >=dev-libs/icu-49.1.1-r1:= + >=dev-libs/jsoncpp-0.5.0-r1:= + >=dev-libs/libevent-1.4.13:= + dev-libs/libxml2:=[icu] + dev-libs/libxslt:= + dev-libs/nspr:= + >=dev-libs/nss-3.12.3:= + dev-libs/protobuf:= + dev-libs/re2:= + gnome? ( >=gnome-base/gconf-2.24.0:= ) + gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2:= ) + gps? ( >=sci-geosciences/gpsd-3.7:=[shm] ) + >=media-libs/alsa-lib-1.0.19:= + media-libs/flac:= + media-libs/harfbuzz:=[icu(+)] + >=media-libs/libjpeg-turbo-1.2.0-r1:= + media-libs/libpng:0= + media-libs/libvpx:= + >=media-libs/libwebp-0.2.0_rc1:= + !arm? ( !x86? ( >=media-libs/mesa-9.1:=[gles2] ) ) + media-libs/opus:= + media-libs/speex:= + pulseaudio? ( media-sound/pulseaudio:= ) + system-ffmpeg? ( || ( + >=media-video/ffmpeg-1.0:0=[opus] + >=media-video/libav-9.5:=[opus] + ) ) + sys-apps/dbus:= + sys-apps/pciutils:= + sys-libs/zlib:=[minizip] + virtual/udev + virtual/libusb:1= + x11-libs/gtk+:2= + x11-libs/libXinerama:= + x11-libs/libXScrnSaver:= + x11-libs/libXtst:= + kerberos? ( virtual/krb5 ) + selinux? ( sec-policy/selinux-chromium )" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + !arm? ( + >=dev-lang/nacl-toolchain-newlib-0_p9093 + dev-lang/yasm + ) + dev-lang/perl + dev-python/ply + dev-python/simplejson + >=dev-util/gperf-3.0.3 + sys-apps/hwids + >=sys-devel/bison-2.4.3 + sys-devel/flex + >=sys-devel/make-3.81-r2 + virtual/pkgconfig + test? ( dev-python/pyftpdlib )" +RDEPEND+=" + !=www-client/chromium-9999 + x11-misc/xdg-utils + virtual/ttf-fonts" + +if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then + EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; +fi + +pkg_setup() { + if [[ "${SLOT}" == "0" ]]; then + CHROMIUM_SUFFIX="" + else + CHROMIUM_SUFFIX="-${SLOT}" + fi + CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}" + + # Make sure the build system will use the right python, bug #344367. + python-any-r1_pkg_setup + + chromium_suid_sandbox_check_kernel_config + + if use bindist && ! use system-ffmpeg; then + elog "bindist enabled: H.264 video support will be disabled." + fi + if ! use bindist; then + elog "bindist disabled: Resulting binaries may not be legal to re-distribute." + fi +} + +src_prepare() { + if ! use arm; then + mkdir -p out/Release/obj/gen/sdk/toolchain || die + # Do not preserve SELinux context, bug #460892 . + cp -a --no-preserve=context /usr/$(get_libdir)/nacl-toolchain-newlib \ + out/Release/obj/gen/sdk/toolchain/linux_x86_newlib || die + touch out/Release/obj/gen/sdk/toolchain/linux_x86_newlib/stamp.untar || die + fi + + epatch "${FILESDIR}/${PN}-gpsd-r0.patch" + epatch "${FILESDIR}/${PN}-system-ffmpeg-r5.patch" + + # Fix build with harfbuzz-0.9.18, bug #472416 . + epatch "${FILESDIR}/${PN}-system-harfbuzz-r0.patch" + + epatch "${FILESDIR}/${PN}-nss-3.15.patch" + + epatch "${FILESDIR}/chromium-bug471198.patch" + + epatch_user + + # Remove most bundled libraries. Some are still needed. + find third_party -type f \! -iname '*.gyp*' \ + \! -path 'third_party/WebKit/*' \ + \! -path 'third_party/angle/*' \ + \! -path 'third_party/cacheinvalidation/*' \ + \! -path 'third_party/cld/*' \ + \! -path 'third_party/cros_system_api/*' \ + \! -path 'third_party/ffmpeg/*' \ + \! -path 'third_party/flot/*' \ + \! -path 'third_party/hunspell/*' \ + \! -path 'third_party/hyphen/*' \ + \! -path 'third_party/iccjpeg/*' \ + \! -path 'third_party/jstemplate/*' \ + \! -path 'third_party/khronos/*' \ + \! -path 'third_party/leveldatabase/*' \ + \! -path 'third_party/libjingle/*' \ + \! -path 'third_party/libphonenumber/*' \ + \! -path 'third_party/libsrtp/*' \ + \! -path 'third_party/libxml/chromium/*' \ + \! -path 'third_party/libXNVCtrl/*' \ + \! -path 'third_party/libyuv/*' \ + \! -path 'third_party/lss/*' \ + \! -path 'third_party/mesa/*' \ + \! -path 'third_party/modp_b64/*' \ + \! -path 'third_party/mongoose/*' \ + \! -path 'third_party/mt19937ar/*' \ + \! -path 'third_party/npapi/*' \ + \! -path 'third_party/openmax/*' \ + \! -path 'third_party/ots/*' \ + \! -path 'third_party/pywebsocket/*' \ + \! -path 'third_party/qcms/*' \ + \! -path 'third_party/sfntly/*' \ + \! -path 'third_party/skia/*' \ + \! -path 'third_party/smhasher/*' \ + \! -path 'third_party/sqlite/*' \ + \! -path 'third_party/tcmalloc/*' \ + \! -path 'third_party/tlslite/*' \ + \! -path 'third_party/trace-viewer/*' \ + \! -path 'third_party/undoview/*' \ + \! -path 'third_party/v8-i18n/*' \ + \! -path 'third_party/webdriver/*' \ + \! -path 'third_party/webrtc/*' \ + \! -path 'third_party/widevine/*' \ + \! -path 'third_party/x86inc/*' \ + \! -path 'third_party/zlib/google/*' \ + -delete || die + + # Remove bundled v8. + find v8 -type f \! -iname '*.gyp*' -delete || die +} + +src_configure() { + local myconf="" + + # Never tell the build system to "enable" SSE2, it has a few unexpected + # additions, bug #336871. + myconf+=" -Ddisable_sse2=1" + + # Optional tcmalloc. Note it causes problems with e.g. NVIDIA + # drivers, bug #413637. + myconf+=" $(gyp_use tcmalloc linux_use_tcmalloc)" + + # Disable glibc Native Client toolchain, we don't need it (bug #417019). + myconf+=" -Ddisable_glibc=1" + + # TODO: also build with pnacl + myconf+=" -Ddisable_pnacl=1" + + # It would be awkward for us to tar the toolchain and get it untarred again + # during the build. + myconf+=" -Ddisable_newlib_untar=1" + + # Make it possible to remove third_party/adobe. + echo > "${T}/flapper_version.h" || die + myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h" + + # Use system-provided libraries. + # TODO: use_system_hunspell (upstream changes needed). + # TODO: use_system_libsrtp (bug #459932). + # TODO: use_system_ssl (http://crbug.com/58087). + # TODO: use_system_sqlite (http://crbug.com/22208). + myconf+=" + -Duse_system_bzip2=1 + -Duse_system_flac=1 + -Duse_system_harfbuzz=1 + -Duse_system_icu=1 + -Duse_system_jsoncpp=1 + -Duse_system_libevent=1 + -Duse_system_libjpeg=1 + -Duse_system_libpng=1 + -Duse_system_libusb=1 + -Duse_system_libvpx=1 + -Duse_system_libwebp=1 + -Duse_system_libxml=1 + -Duse_system_libxslt=1 + -Duse_system_minizip=1 + -Duse_system_nspr=1 + -Duse_system_opus=1 + -Duse_system_protobuf=1 + -Duse_system_re2=1 + -Duse_system_snappy=1 + -Duse_system_speex=1 + -Duse_system_v8=1 + -Duse_system_xdg_utils=1 + -Duse_system_zlib=1 + $(gyp_use system-ffmpeg use_system_ffmpeg)" + + # TODO: Use system mesa on x86, bug #457130 . + if ! use x86 && ! use arm; then + myconf+=" + -Duse_system_mesa=1" + fi + + # TODO: patch gyp so that this arm conditional is not needed. + if ! use arm; then + myconf+=" + -Duse_system_yasm=1" + fi + + # TODO: re-enable on vp9 libvpx release (http://crbug.com/174287). + myconf+=" + -Dmedia_use_libvpx=0" + + # Optional dependencies. + # TODO: linux_link_kerberos, bug #381289. + myconf+=" + $(gyp_use cups) + $(gyp_use gnome use_gconf) + $(gyp_use gnome-keyring use_gnome_keyring) + $(gyp_use gnome-keyring linux_link_gnome_keyring) + $(gyp_use gps linux_use_libgps) + $(gyp_use gps linux_link_libgps) + $(gyp_use kerberos) + $(gyp_use pulseaudio)" + + if use system-sqlite; then + elog "Enabling system sqlite. WebSQL - http://www.w3.org/TR/webdatabase/" + elog "will not work. Please report sites broken by this" + elog "to https://bugs.gentoo.org" + myconf+=" + -Duse_system_sqlite=1 + -Denable_sql_database=0" + fi + + # Use explicit library dependencies instead of dlopen. + # This makes breakages easier to detect by revdep-rebuild. + myconf+=" + -Dlinux_link_gsettings=1 + -Dlinux_link_libpci=1 + -Dlinux_link_libspeechd=1" + + if has_version '>=app-accessibility/speech-dispatcher-0.8'; then + myconf+=" -Dlibspeechd_h_prefix=speech-dispatcher/" + else + myconf+=" -Dlibspeechd_h_prefix=" + fi + + # TODO: use the file at run time instead of effectively compiling it in. + myconf+=" + -Dusb_ids_path=/usr/share/misc/usb.ids" + + # Enable SUID sandbox. + myconf+=" + -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox + -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome" + + # Never use bundled gold binary. Disable gold linker flags for now. + myconf+=" + -Dlinux_use_gold_binary=0 + -Dlinux_use_gold_flags=0" + + # Always support proprietary codecs. + myconf+=" -Dproprietary_codecs=1" + + if ! use bindist && ! use system-ffmpeg; then + # Enable H.624 support in bundled ffmpeg. + myconf+=" -Dffmpeg_branding=Chrome" + fi + + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . + # Note: these are for Gentoo use ONLY. For your own distribution, + # please get your own set of keys. Feel free to contact chromium@gentoo.org + # for more info. + myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc + -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com + -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu" + + local myarch="$(tc-arch)" + if [[ $myarch = amd64 ]] ; then + myconf+=" -Dtarget_arch=x64" + elif [[ $myarch = x86 ]] ; then + myconf+=" -Dtarget_arch=ia32" + elif [[ $myarch = arm ]] ; then + # TODO: re-enable NaCl (NativeClient). + myconf+=" -Dtarget_arch=arm + -Dsysroot= + -Darmv7=1 + -Darm_fpu=neon + -Dv8_use_arm_eabi_hardfloat=true + -Darm_float_abi=hard + -Darm_neon=1 + -Ddisable_nacl=1" + else + die "Failed to determine target arch, got '$myarch'." + fi + + # Make sure that -Werror doesn't get added to CFLAGS by the build system. + # Depending on GCC version the warnings are different and we don't want + # the build to fail because of that. + myconf+=" -Dwerror=" + + # Avoid CFLAGS problems, bug #352457, bug #390147. + if ! use custom-cflags; then + replace-flags "-Os" "-O2" + strip-flags + + # Prevent linker from running out of address space, bug #471810 . + if use x86; then + filter-flags "-g*" + fi + fi + + # Make sure the build system will use the right tools, bug #340795. + tc-export AR CC CXX RANLIB + + # Tools for building programs to be executed on the build system, bug #410883. + export AR_host=$(tc-getBUILD_AR) + export CC_host=$(tc-getBUILD_CC) + export CXX_host=$(tc-getBUILD_CXX) + export LD_host=${CXX_host} + + build/linux/unbundle/replace_gyp_files.py ${myconf} || die + egyp_chromium ${myconf} || die +} + +src_compile() { + # TODO: add media_unittests after fixing compile (bug #462546). + local test_targets="" + for x in base cacheinvalidation content crypto \ + googleurl gpu net printing sql; do + test_targets+=" ${x}_unittests" + done + + local make_targets="chrome chrome_sandbox chromedriver" + if use test; then + make_targets+=" $test_targets" + fi + + # See bug #410883 for more info about the .host mess. + emake ${make_targets} BUILDTYPE=Release V=1 || die + + pax-mark m out/Release/chrome + if use test; then + for x in $test_targets; do + pax-mark m out/Release/${x} + done + fi +} + +src_test() { + # For more info see bug #350349. + local mylocale='en_US.utf8' + if ! locale -a | grep -q "$mylocale"; then + eerror "${PN} requires ${mylocale} locale for tests" + eerror "Please read the following guides for more information:" + eerror " http://www.gentoo.org/doc/en/guide-localization.xml" + eerror " http://www.gentoo.org/doc/en/utf-8.xml" + die "locale ${mylocale} is not supported" + fi + + # For more info see bug #370957. + if [[ $UID -eq 0 ]]; then + die "Tests must be run as non-root. Please use FEATURES=userpriv." + fi + + runtest() { + local cmd=$1 + shift + local filter="--gtest_filter=$(IFS=:; echo "-${*}")" + einfo "${cmd}" "${filter}" + LC_ALL="${mylocale}" VIRTUALX_COMMAND="${cmd}" virtualmake "${filter}" + } + + local excluded_base_unittests=( + "ICUStringConversionsTest.*" # bug #350347 + "MessagePumpLibeventTest.*" # bug #398591 + "TimeTest.JsTime" # bug #459614 + "SecurityTest.NewOverflow" # bug #465724 + ) + runtest out/Release/base_unittests "${excluded_base_unittests[@]}" + + runtest out/Release/cacheinvalidation_unittests + + local excluded_content_unittests=( + "RendererDateTimePickerTest.*" # bug #465452 + ) + runtest out/Release/content_unittests "${excluded_content_unittests[@]}" + + runtest out/Release/crypto_unittests + runtest out/Release/googleurl_unittests + runtest out/Release/gpu_unittests + + # TODO: add media_unittests after fixing compile (bug #462546). + # runtest out/Release/media_unittests + + local excluded_net_unittests=( + "NetUtilTest.IDNToUnicode*" # bug 361885 + "NetUtilTest.FormatUrl*" # see above + "DnsConfigServiceTest.GetSystemConfig" # bug #394883 + "CertDatabaseNSSTest.ImportServerCert_SelfSigned" # bug #399269 + "CertDatabaseNSSTest.TrustIntermediateCa*" # http://crbug.com/224612 + "URLFetcher*" # bug #425764 + "HTTPSOCSPTest.*" # bug #426630 + "HTTPSEVCRLSetTest.*" # see above + "HTTPSCRLSetTest.*" # see above + "*SpdyFramerTest.BasicCompression*" # bug #465444 + "CertVerifyProcTest.EVVerification" #474642 + ) + runtest out/Release/net_unittests "${excluded_net_unittests[@]}" + + runtest out/Release/printing_unittests + + local excluded_sql_unittests=( + "SQLiteFeaturesTest.FTS2" # bug #461286 + ) + runtest out/Release/sql_unittests "${excluded_sql_unittests[@]}" +} + +src_install() { + exeinto "${CHROMIUM_HOME}" + doexe out/Release/chrome || die + + doexe out/Release/chrome_sandbox || die + fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox" + + doexe out/Release/chromedriver || die + + if ! use arm; then + doexe out/Release/nacl_helper{,_bootstrap} || die + insinto "${CHROMIUM_HOME}" + doins out/Release/nacl_irt_*.nexe || die + doins out/Release/libppGoogleNaClPluginChrome.so || die + fi + + newexe "${FILESDIR}"/chromium-launcher-r3.sh chromium-launcher.sh || die + if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then + sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" \ + -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die + sed "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" \ + -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die + sed "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" \ + -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die + fi + + # It is important that we name the target "chromium-browser", + # xdg-utils expect it; bug #355517. + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die + # keep the old symlink around for consistency + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die + + # Allow users to override command-line options, bug #357629. + dodir /etc/chromium || die + insinto /etc/chromium + newins "${FILESDIR}/chromium.default" "default" || die + + pushd out/Release/locales > /dev/null || die + chromium_remove_language_paks + popd + + insinto "${CHROMIUM_HOME}" + doins out/Release/*.pak || die + + doins -r out/Release/locales || die + doins -r out/Release/resources || die + + newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die + newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die + + if ! use system-ffmpeg; then + doexe out/Release/libffmpegsumo.so || die + fi + + # Install icons and desktop entry. + local branding size + for size in 16 22 24 32 48 64 128 256 ; do + case ${size} in + 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; + *) branding="chrome/app/theme/chromium" ;; + esac + newicon -s ${size} "${branding}/product_logo_${size}.png" \ + chromium-browser${CHROMIUM_SUFFIX}.png + done + + local mime_types="text/html;text/xml;application/xhtml+xml;" + mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797 + mime_types+="x-scheme-handler/ftp;" # bug #412185 + mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393 + make_desktop_entry \ + chromium-browser${CHROMIUM_SUFFIX} \ + "Chromium${CHROMIUM_SUFFIX}" \ + chromium-browser${CHROMIUM_SUFFIX} \ + "Network;WebBrowser" \ + "MimeType=${mime_types}\nStartupWMClass=chromium-browser" + sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die + + # Install GNOME default application entry (bug #303100). + if use gnome; then + dodir /usr/share/gnome-control-center/default-apps || die + insinto /usr/share/gnome-control-center/default-apps + newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die + if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then + sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \ + "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml + fi + fi +} diff --git a/www-client/chromium/files/chromium-browser.xml b/www-client/chromium/files/chromium-browser.xml new file mode 100644 index 0000000..2c95a55 --- /dev/null +++ b/www-client/chromium/files/chromium-browser.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd"> +<default-apps> + <web-browsers> + <web-browser> + <name>Chromium</name> + <executable>chromium-browser</executable> + <command>chromium-browser %s</command> + <icon-name>chromium-browser</icon-name> + <run-in-terminal>false</run-in-terminal> + </web-browser> + </web-browsers> +</default-apps> diff --git a/www-client/chromium/files/chromium-bug471198.patch b/www-client/chromium/files/chromium-bug471198.patch new file mode 100644 index 0000000..e55f55e --- /dev/null +++ b/www-client/chromium/files/chromium-bug471198.patch @@ -0,0 +1,43 @@ +--- trunk/src/sandbox/linux/services/broker_process.cc 2013/07/09 21:47:01 210650 ++++ trunk/src/sandbox/linux/services/broker_process.cc 2013/07/09 21:47:27 210651 +@@ -53,7 +53,7 @@ + // async signal safe if |file_to_open| is NULL. + // TODO(jln): assert signal safety. + bool GetFileNameInWhitelist(const std::vector<std::string>& allowed_file_names, +- const std::string& requested_filename, ++ const char* requested_filename, + const char** file_to_open) { + if (file_to_open && *file_to_open) { + // Make sure that callers never pass a non-empty string. In case callers +@@ -62,13 +62,17 @@ + RAW_LOG(FATAL, "*file_to_open should be NULL"); + return false; + } ++ ++ // Look for |requested_filename| in |allowed_file_names|. ++ // We don't use ::find() because it takes a std::string and ++ // the conversion allocates memory. + std::vector<std::string>::const_iterator it; +- it = std::find(allowed_file_names.begin(), allowed_file_names.end(), +- requested_filename); +- if (it < allowed_file_names.end()) { // requested_filename was found? +- if (file_to_open) +- *file_to_open = it->c_str(); +- return true; ++ for (it = allowed_file_names.begin(); it != allowed_file_names.end(); it++) { ++ if (strcmp(requested_filename, it->c_str()) == 0) { ++ if (file_to_open) ++ *file_to_open = it->c_str(); ++ return true; ++ } + } + return false; + } +@@ -393,6 +397,7 @@ + const char* file_to_access = NULL; + const bool safe_to_access_file = GetFileNameIfAllowedToAccess( + requested_filename.c_str(), mode, &file_to_access); ++ + if (safe_to_access_file) { + CHECK(file_to_access); + int access_ret = access(file_to_access, mode); diff --git a/www-client/chromium/files/chromium-gpsd-r0.patch b/www-client/chromium/files/chromium-gpsd-r0.patch new file mode 100644 index 0000000..1327ecc --- /dev/null +++ b/www-client/chromium/files/chromium-gpsd-r0.patch @@ -0,0 +1,12 @@ +--- build/linux/system.gyp.orig 2013-01-28 16:03:43.709477316 +0000 ++++ build/linux/system.gyp 2013-01-28 16:06:14.210254835 +0000 +@@ -175,9 +175,6 @@ + 'gps_open', + 'gps_close', + 'gps_read', +- # We don't use gps_shm_read() directly, just to make +- # sure that libgps has the shared memory support. +- 'gps_shm_read', + ], + 'message': 'Generating libgps library loader.', + 'process_outputs_as_sources': 1, diff --git a/www-client/chromium/files/chromium-launcher-r3.sh b/www-client/chromium/files/chromium-launcher-r3.sh new file mode 100644 index 0000000..f2bbedd --- /dev/null +++ b/www-client/chromium/files/chromium-launcher-r3.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Allow the user to override command-line flags, bug #357629. +# This is based on Debian's chromium-browser package, and is intended +# to be consistent with Debian. +for f in /etc/chromium/*; do + [[ -f ${f} ]] && source "${f}" +done + +# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system +# default CHROMIUM_FLAGS (from /etc/chromium/default). +CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"} + +# Let the wrapped binary know that it has been run through the wrapper +export CHROME_WRAPPER=$(readlink -f "$0") + +PROGDIR=${CHROME_WRAPPER%/*} + +case ":$PATH:" in + *:$PROGDIR:*) + # $PATH already contains $PROGDIR + ;; + *) + # Append $PROGDIR to $PATH + export PATH="$PATH:$PROGDIR" + ;; +esac + +# Set the .desktop file name +export CHROME_DESKTOP="chromium-browser-chromium.desktop" + +exec -a "chromium-browser" "$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/nsbrowser/plugins ${CHROMIUM_FLAGS} "$@" diff --git a/www-client/chromium/files/chromium-nss-3.15.patch b/www-client/chromium/files/chromium-nss-3.15.patch new file mode 100644 index 0000000..2a64147 --- /dev/null +++ b/www-client/chromium/files/chromium-nss-3.15.patch @@ -0,0 +1,26 @@ +--- a/net/third_party/nss/ssl/bodge/secitem_array.c ++++ b/net/third_party/nss/ssl/bodge/secitem_array.c +@@ -6,6 +6,7 @@ + * Support routines for SECItemArray data structure. + */ + ++#include "nssutil.h" + #include "seccomon.h" + #include "secitem.h" + #include "secerr.h" +@@ -13,10 +14,15 @@ + ++#define NSSUTIL_VERSION_NUM \ ++ (NSSUTIL_VMAJOR * 10000 + NSSUTIL_VMINOR * 100 + NSSUTIL_VPATCH) ++#if NSSUTIL_VERSION_NUM < 31500 ++// Added in NSS 3.15. + typedef struct SECItemArrayStr SECItemArray; + + struct SECItemArrayStr { + SECItem *items; + unsigned int len; + }; ++#endif + + SECItemArray * + SECITEM_AllocArray(PLArenaPool *arena, SECItemArray *array, unsigned int len) diff --git a/www-client/chromium/files/chromium-system-ffmpeg-r5.patch b/www-client/chromium/files/chromium-system-ffmpeg-r5.patch new file mode 100644 index 0000000..be625ad --- /dev/null +++ b/www-client/chromium/files/chromium-system-ffmpeg-r5.patch @@ -0,0 +1,75 @@ +diff --git a/media/filters/ffmpeg_glue.h b/media/filters/ffmpeg_glue.h +index 17241b9..8a92312 100644 +--- a/media/filters/ffmpeg_glue.h ++++ b/media/filters/ffmpeg_glue.h +@@ -28,9 +28,9 @@ + #include "base/basictypes.h" + #include "base/memory/scoped_ptr.h" + #include "media/base/media_export.h" ++#include "media/ffmpeg/ffmpeg_common.h" + + struct AVFormatContext; +-struct AVIOContext; + + namespace media { + +diff --git a/media/media.gyp b/media/media.gyp +index df217d2..fde3830 100644 +--- a/media/media.gyp ++++ b/media/media.gyp +@@ -363,6 +363,9 @@ + 'dependencies': [ + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], ++ 'export_dependent_settings': [ ++ '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', ++ ], + }, { # media_use_ffmpeg == 0 + # Exclude the sources that depend on ffmpeg. + 'sources!': [ +--- a/media/ffmpeg/ffmpeg_common.cc.orig 2013-01-17 00:07:51.635057013 +0000 ++++ b/media/ffmpeg/ffmpeg_common.cc 2013-01-17 00:15:50.867406811 +0000 +@@ -10,6 +10,8 @@ + #include "media/base/video_frame.h" + #include "media/base/video_util.h" + ++#undef SampleFormat ++ + namespace media { + + // Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are +--- a/media/media.gyp.orig 2013-05-09 18:02:50.958682676 +0000 ++++ b/media/media.gyp 2013-05-09 18:03:45.009023680 +0000 +@@ -530,6 +530,12 @@ + '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' + '--code "#define __STDC_CONSTANT_MACROS\n' + '#include <libavcodec/avcodec.h>\n' ++ 'int test() { return AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL; }" ' ++ '--on-failure -DCHROMIUM_OMIT_AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL=1)', ++ ++ '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' ++ '--code "#define __STDC_CONSTANT_MACROS\n' ++ '#include <libavcodec/avcodec.h>\n' + 'int test() { struct AVFrame frame;\n' + 'return av_frame_get_channels(&frame); }" ' + '--on-failure -DCHROMIUM_NO_AVFRAME_CHANNELS=1)', +--- a/media/filters/ffmpeg_demuxer.cc.orig 2013-05-09 18:04:25.089276403 +0000 ++++ b/media/filters/ffmpeg_demuxer.cc 2013-05-09 18:05:16.289599070 +0000 +@@ -111,12 +111,15 @@ + // Get side data if any. For now, the only type of side_data is VP8 Alpha. We + // keep this generic so that other side_data types in the future can be + // handled the same way as well. +- av_packet_split_side_data(packet.get()); + int side_data_size = 0; +- uint8* side_data = av_packet_get_side_data( ++ uint8* side_data = NULL; ++#ifndef CHROMIUM_OMIT_AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL ++ av_packet_split_side_data(packet.get()); ++ side_data = av_packet_get_side_data( + packet.get(), + AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, + &side_data_size); ++#endif + + // If a packet is returned by FFmpeg's av_parser_parse2() the packet will + // reference inner memory of FFmpeg. As such we should transfer the packet diff --git a/www-client/chromium/files/chromium-system-harfbuzz-r0.patch b/www-client/chromium/files/chromium-system-harfbuzz-r0.patch new file mode 100644 index 0000000..769b673 --- /dev/null +++ b/www-client/chromium/files/chromium-system-harfbuzz-r0.patch @@ -0,0 +1,44 @@ +Index: build/linux/unbundle/harfbuzz.gyp +diff --git a/build/linux/unbundle/harfbuzz.gyp b/build/linux/unbundle/harfbuzz.gyp +index 456dd384df2d5c57d9857cfb775d46ef87add2bc..93b2a69c12d7b7524fa0c2aa67b52136b779196d 100644 +--- a/build/linux/unbundle/harfbuzz.gyp ++++ b/build/linux/unbundle/harfbuzz.gyp +@@ -3,24 +3,34 @@ + # found in the LICENSE file. + + { ++ 'variables': { ++ # Check for presence of harfbuzz-icu library, use it if present. ++ 'harfbuzz_libraries': ++ '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' ++ '--code "int main() { return 0; }" ' ++ '--run-linker ' ++ '--on-success "harfbuzz harfbuzz-icu" ' ++ '--on-failure "harfbuzz" ' ++ '-- -lharfbuzz-icu)', ++ }, + 'targets': [ + { + 'target_name': 'harfbuzz-ng', + 'type': 'none', + 'cflags': [ +- '<!@(pkg-config --cflags harfbuzz)', ++ '<!@(pkg-config --cflags <(harfbuzz_libraries))', + ], + 'direct_dependent_settings': { + 'cflags': [ +- '<!@(pkg-config --cflags harfbuzz)', ++ '<!@(pkg-config --cflags <(harfbuzz_libraries))', + ], + }, + 'link_settings': { + 'ldflags': [ +- '<!@(pkg-config --libs-only-L --libs-only-other harfbuzz)', ++ '<!@(pkg-config --libs-only-L --libs-only-other <(harfbuzz_libraries))', + ], + 'libraries': [ +- '<!@(pkg-config --libs-only-l harfbuzz)', ++ '<!@(pkg-config --libs-only-l <(harfbuzz_libraries))', + ], + }, + }, diff --git a/www-client/chromium/files/chromium.default b/www-client/chromium/files/chromium.default new file mode 100644 index 0000000..c140cde --- /dev/null +++ b/www-client/chromium/files/chromium.default @@ -0,0 +1,5 @@ +# Default settings for chromium. This file is sourced by /bin/bash from +# the chromium launcher. + +# Options to pass to chromium. +#CHROMIUM_FLAGS="" |