Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 405766 Details for
Bug 547630
www-client/chromium-44.0.2376.0 Fails to Compile with +widevine
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
chromium-widevine-ebuild-r10.patch
chromium-widevine-ebuild-r10.patch (text/plain), 7.79 KB, created by
Greg Turner
on 2015-06-26 02:28:52 UTC
(
hide
)
Description:
chromium-widevine-ebuild-r10.patch
Filename:
MIME Type:
Creator:
Greg Turner
Created:
2015-06-26 02:28:52 UTC
Size:
7.79 KB
patch
obsolete
>This WIP patch brings the widevine useflag back to >Gentoo's chromium ebuild. See bug #547630: > > https://547630.bugs.gentoo.org/ > >The patch isn't ready for prime-time yet, due to its ugly >flag-conditional patching of .gyp files during src_prepare. >Current tentative plans are to unconditionally patch the >.gyp files to do the right thing (for Gentoo) depending on >the value of the enable_widevine gyp define. > >Perhaps you don't care what happens during src_prepare? >You just want your FlixOfNets back? This should do it for >you. Just follow the recipe below or something like it. > >Quick and dirty "how to try this" recipe >________________________________________ > >(Warning: much of the following is untested and unlikely to be bug-free, so >don't just copy-paste all this wholesale; please take everything with a grain >of salt.) > >First, save this patch as > > /tmp/chromium-ebuild-widevine.patch > >Set the widevine useflag as you want it in /etc/portage/make.conf (or wherever). > >Now, as root, run something like the following sequence of commands in bash: > ># Gentoo-x86 (typically "/usr/portage") >_GX86=$( portageq get_repo_path / gentoo ) > ># The destination where the new ebuilds go. For a very quick ># and dirty hack, you can just use ${_GX86}, i.e.:... ># >_OVL=${_GX86} ># ># ... although it would be way better to use an overlay if you have one. ># (the following code is all designed to accomodate either scenario). > ># Download the gyp patch from bugzilla and install it into ${FILESDIR} >wget 'https://547630.bugs.gentoo.org/attachment.cgi?id=405762' -O \ > "${_OVL}"/www-client/chromium/files/chromium-widevine-2403.patch > ># Iff [[ ${_OVL} != ${_GX86} ]], copy everything over from gentoo-x86's ># www-plugins/chrome-binary-plugins and www-client/chromium directories to ># the overlay. ># >if [[ ${_GX86} != ${_OVL} ]]; then > mkdir -p ${_OVL}/www-plugins > cp -nrv ${_GX86}/www-plugins/chrome-binary-plugins ${_OVL}/www-plugins/ > mkdir -p ${_OVL}/www-client > cp -nrv ${_GX86}/www-client/chromium ${_OVL}/www-client/ >fi ># ># ---- <NB> ---- ># The above won't overwrite existing files, as a safety precaution. If you are using ># an overlay and have previously run this code or something like it, it may ># therefore fail to copy some stuff. So, if (and only if!!) you are not maintaining ># those overlay files by hand, you could just deep-six the whole thing before running ># the above. ># ># That way, the subsequent steps below would effectively "rebase" against the ># latest and greatest ebuilds in ${_GX86}, as if you started from scratch: ># ># [[ ${_GX86} != ${_OVL} ]] && \ ># echo rm -rvf "${_OVL}"/www-{plugins/chrome-binary-plugins,client/chromium} ># ># (Once you'd sanity-checked the results, of course, you'd run that again, without ># the "echo", and then you'd run the un-commented block of code, above, to clone a ># fresh copy of the ${_GX86} directories into your overlay. But, please, be careful! ># Running "rm -rvf ${any_scriptey_bash_gobbldeygook}" as root is some serious ># "without a net" tightrope-shit, as you may know from bitter past experience). ># ---- </NB> ---- ># > ># identify best gx86 ebuilds to use as basis >_chrome_binary_plugins=$( portageq pquery www-plugins/chrome-binary-plugins:beta::gentoo | tail -n 1) >_chrome_binary_plugins="${_GX86}/www-plugins/chrome-binary-plugins/${_chrome_binary_plugins#www-plugins/}.ebuild" >_chromium=$( portageq pquery '=www-client/chromium-44*::gentoo' | tail -n 1 ) >_chromium="${_GX86}/www-client/chromium/${_chromium#www-client/}.ebuild" > ># revbump/upgrade chrome-binary-plugins >cd "${_OVL}/www-plugins/chrome-binary-plugins" >cp -v "${_chrome_binary_plugins}" ./chrome-binary-plugins-44.0.2403.61_beta1.ebuild >ebuild chrome-binary-plugins-44.0.2403.61_beta1.ebuild digest clean merge > ># revbump/patch chromium ebuild >cd "${_OVL}/www-client/chromium" >cp -v "${_chromium}" ./chromium-44.0.2403.61.ebuild >patch -p1 < /tmp/chromium-ebuild-widevine.patch >ebuild chromium-44.0.2403.61.ebuild digest > ># build it >ebuild chromium-44.0.2403.61.ebuild clean install > ># wait ... for ... it ... > ># merge (optional) >ebuild chromium-44.0.2403.61.ebuild merge > >enjoy > >-gmt > >--- a/chromium-44.0.2403.61.ebuild 2015-06-22 19:01:19.000000000 -0700 >+++ b/chromium-44.0.2403.61.ebuild 2015-06-25 15:54:30.288889574 -0700 >@@ -19,7 +19,7 @@ SRC_URI="https://commondatastorage.googl > LICENSE="BSD hotwording? ( no-source-code )" > SLOT="0" > KEYWORDS="~amd64 ~arm ~x86" >-IUSE="cups gnome gnome-keyring hidpi hotwording kerberos neon pic +proprietary-codecs pulseaudio selinux +tcmalloc" >+IUSE="cups gnome gnome-keyring hidpi hotwording 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+=" >@@ -122,6 +123,9 @@ if ! has chromium_pkg_die ${EBUILD_DEATH > EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; > fi > >+# TODO: flag-mask widevine in non-intel profiles >+REQUIRED_USE="|| ( x86 amd64 !widevine )" >+ > DISABLE_AUTOFORMATTING="yes" > DOC_CONTENTS=" > Some web pages may require additional fonts to display properly. >@@ -189,6 +193,30 @@ src_prepare() { > epatch "${FILESDIR}/${PN}-system-jinja-r7.patch" > epatch "${FILESDIR}/${PN}-hotwording-2403.patch" > >+ # When building non-Chrome-branded linux targets, >+ # build a full widevine cdm if requested (#547630) >+ epatch "${FILESDIR}/${PN}-widevine-2403.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." >+ >+ # to build the full widevine cdm, we must provide some versioning constants: >+ local header_lines=( >+ "#include \"third_party/widevine/cdm/widevine_cdm_common.h\"" >+ "#define WIDEVINE_CDM_AVAILABLE" >+ "#define WINEVINE_CDM_VERSION_STRING \"${WIDEVINE_VERSION}\"" >+ ) >+ >+ # inject just above widevine_cdm_version.h's last line >+ local header_line sedscript='$i' >+ for header_line in "${header_lines[@]}"; do >+ sedscript+=${header_line} >+ sedscript+='\n' >+ done >+ sed -e "${sedscript}" -i third_party/widevine/cdm/widevine_cdm_version.h || die >+ fi >+ > epatch_user > > # Remove most bundled libraries. Some are still needed. >@@ -286,10 +314,23 @@ src_prepare() { > 'v8/src/third_party/fdlibm' \ > 'v8/src/third_party/kernel' \ > 'v8/src/third_party/valgrind' \ >+ 'third_party/devscripts' \ > --do-remove || die > } > > 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 >@@ -362,7 +403,8 @@ src_configure() { > $(gyp_use hotwording enable_hotwording) > $(gyp_use kerberos) > $(gyp_use pulseaudio) >- $(gyp_use tcmalloc use_allocator tcmalloc none)" >+ $(gyp_use tcmalloc use_allocator tcmalloc none) >+ $(gyp_use widevine enable_widevine)" > > # Use explicit library dependencies instead of dlopen. > # This makes breakages easier to detect by revdep-rebuild. >@@ -582,7 +624,9 @@ src_install() { > newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die > newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die > >- 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 547630
:
401940
|
401942
|
401944
|
401946
|
401948
|
402664
|
405394
|
405396
|
405446
|
405448
|
405450
|
405704
|
405706
|
405714
|
405762
|
405764
|
405766
|
405820
|
407634
|
407854
|
407862
|
407864
|
408270