summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2020-11-20 22:07:02 +0000
committerJames Le Cuirot <chewi@gentoo.org>2020-11-20 22:21:08 +0000
commit6820eedb820d48207ddc90be02f276662401e7a1 (patch)
treead01888c1a0f69389bb82714d2d85f314f255f51 /www-client/vivaldi-snapshot
parentprofiles: Mask widevine USE flag against Vivaldi on applicable arches (diff)
downloadgentoo-6820eedb820d48207ddc90be02f276662401e7a1.tar.gz
gentoo-6820eedb820d48207ddc90be02f276662401e7a1.tar.bz2
gentoo-6820eedb820d48207ddc90be02f276662401e7a1.zip
www-client/vivaldi-snapshot: Add proprietary-codecs and widevine flags
This also removes the upstream "update" scripts that are most likely to just break thing. Bug: https://bugs.gentoo.org/647738 Bug: https://bugs.gentoo.org/653448 Bug: https://bugs.gentoo.org/733904 Bug: https://bugs.gentoo.org/753973 Package-Manager: Portage-3.0.9, Repoman-3.0.1 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'www-client/vivaldi-snapshot')
-rw-r--r--www-client/vivaldi-snapshot/metadata.xml4
-rw-r--r--www-client/vivaldi-snapshot/vivaldi-snapshot-3.5.2110.3.ebuild18
2 files changed, 22 insertions, 0 deletions
diff --git a/www-client/vivaldi-snapshot/metadata.xml b/www-client/vivaldi-snapshot/metadata.xml
index 3b94165dd3d1..91c75704fe9c 100644
--- a/www-client/vivaldi-snapshot/metadata.xml
+++ b/www-client/vivaldi-snapshot/metadata.xml
@@ -5,4 +5,8 @@
<email>chewi@gentoo.org</email>
<name>James Le Cuirot</name>
</maintainer>
+ <use>
+ <flag name="proprietary-codecs">Use system <pkg>media-video/ffmpeg</pkg> to support patent-encumbered media codecs</flag>
+ <flag name="widevine">Unsupported closed-source DRM capability (required by Netflix VOD)</flag>
+ </use>
</pkgmetadata>
diff --git a/www-client/vivaldi-snapshot/vivaldi-snapshot-3.5.2110.3.ebuild b/www-client/vivaldi-snapshot/vivaldi-snapshot-3.5.2110.3.ebuild
index 2884f5b97122..0041affa320a 100644
--- a/www-client/vivaldi-snapshot/vivaldi-snapshot-3.5.2110.3.ebuild
+++ b/www-client/vivaldi-snapshot/vivaldi-snapshot-3.5.2110.3.ebuild
@@ -32,6 +32,7 @@ SRC_URI="
LICENSE="Vivaldi"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm ~arm64 ~x86"
+IUSE="proprietary-codecs widevine"
RESTRICT="bindist mirror"
DEPEND="
@@ -64,6 +65,8 @@ RDEPEND="
x11-libs/libXrender
x11-libs/libXtst
x11-libs/pango[X]
+ proprietary-codecs? ( media-video/ffmpeg:0/56.58.58[chromium(-)] )
+ widevine? ( www-plugins/chrome-binary-plugins )
"
QA_PREBUILT="*"
S=${WORKDIR}
@@ -98,6 +101,9 @@ src_prepare() {
usr/share/icons/hicolor/${d}x${d}/apps/${PN}.png || die
done
+ # Remove scripts that will most likely break things.
+ rm ${VIVALDI_HOME}/update-{ffmpeg,widevine} || die
+
pushd "${VIVALDI_HOME}/locales" > /dev/null || die
chromium_remove_language_paks
popd > /dev/null || die
@@ -111,4 +117,16 @@ src_install() {
dosym /${VIVALDI_HOME}/${PN} /usr/bin/${PN}
fperms 4711 /${VIVALDI_HOME}/vivaldi-sandbox
+
+ if use proprietary-codecs; then
+ dosym ../../../usr/$(get_libdir)/chromium/libffmpeg.so \
+ /${VIVALDI_HOME}/lib/libffmpeg.so
+ fi
+
+ if use widevine; then
+ dosym ../../usr/$(get_libdir)/chromium-browser/WidevineCdm \
+ /${VIVALDI_HOME}/WidevineCdm
+ else
+ rm "${ED}"/${VIVALDI_HOME}/WidevineCdm || die
+ fi
}