--- a/chromium-44.0.2403.52.ebuild 2015-06-08 19:17:33.000000000 -0700 +++ b/chromium-44.0.2403.52.ebuild 2015-06-20 14:29:26.867231197 -0700 @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-44.0.2403.30.ebuild,v 1.1 2015/06/09 02:17:33 floppym Exp $ +# $Header: $ EAPI="5" PYTHON_COMPAT=( python2_7 ) @@ -19,7 +19,7 @@ SRC_URI="https://commondatastorage.googl LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~arm ~x86" -IUSE="cups gnome gnome-keyring hidpi kerberos neon pic +proprietary-codecs pulseaudio selinux +tcmalloc" +IUSE="cups gnome gnome-keyring hidpi kerberos neon pic +proprietary-codecs pulseaudio selinux +tcmalloc widevine" RESTRICT="proprietary-codecs? ( bindist )" # Native Client binaries are compiled with different set of flags, bug #452066. @@ -91,7 +91,8 @@ DEPEND="${RDEPEND} sys-apps/hwids[usb(+)] >=sys-devel/bison-2.4.3 sys-devel/flex - virtual/pkgconfig" + virtual/pkgconfig + widevine? ( www-plugins/chrome-binary-plugins[widevine] )" # For nvidia-drivers blocker, see bug #413637 . RDEPEND+=" @@ -187,6 +188,22 @@ src_prepare() { # fi epatch "${FILESDIR}/${PN}-system-jinja-r7.patch" + epatch "${FILESDIR}/${PN}-backport-blink-r195908.patch" + epatch "${FILESDIR}/${PN}-backport-webrtc-7272a2ba.patch" + + if use widevine; then + local WIDEVINE_VERSION="$(< "${ROOT}/usr/$(get_libdir)/chromium-browser/widevine.version")" + [[ -z $WIDEVINE_VERSION ]] && die "Could not determine Widevine version." + local sedscript='$i#include "third_party/widevine/cdm/widevine_cdm_common.h"\n' + sedscript+='#define WIDEVINE_CDM_AVAILABLE\n' + sedscript+="#define WIDEVINE_CDM_VERSION_STRING \"${WIDEVINE_VERSION}\"\\n" + sed -e "${sedscript}" -i third_party/widevine/cdm/widevine_cdm_version.h || die + fi + + # build widevine_cdm as appropriate (even though it's "unsupported") + # but don't build the license-server test ever. + sed -e '1,/widevine_test_license_server/ s/"Chrome"/"Chromium"/g' \ + -i third_party/widevine/cdm/widevine_cdm.gyp || die epatch_user @@ -289,6 +306,18 @@ src_prepare() { } src_configure() { + + if use widevine; then + local WIDEVINE_SUPPORTED_ARCHS="x64 ia32" + local arch + for arch in $WIDEVINE_SUPPORTED_ARCHS; do + mkdir -p third_party/widevine/cdm/linux/$arch + cp "${ROOT}/usr/$(get_libdir)/chromium-browser/libwidevinecdm.so" \ + third_party/widevine/cdm/widevine_cdm_*.h \ + third_party/widevine/cdm/linux/$arch/ \ + || die "Could not copy headers for Widevine." + done + fi local myconf="" # Never tell the build system to "enable" SSE2, it has a few unexpected @@ -582,6 +611,10 @@ src_install() { doexe out/Release/libffmpegsumo.so || die + if use widevine; then + doexe out/Release/libwidevinecdmadapter.so || die + fi + # Install icons and desktop entry. local branding size for size in 16 22 24 32 48 64 128 256 ; do