summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-11-03 21:58:34 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-11-04 00:10:05 -0400
commite90cbb5d089b9d0d9b3033c20a35fa5f936869c0 (patch)
tree3826cf2d90360aac73779699e9523648bbf5fcae /www-client/qutebrowser/qutebrowser-9999.ebuild
parentmedia-gfx/sane-backends: fix tests w/ gcc 12 (diff)
downloadgentoo-e90cbb5d089b9d0d9b3033c20a35fa5f936869c0.tar.gz
gentoo-e90cbb5d089b9d0d9b3033c20a35fa5f936869c0.tar.bz2
gentoo-e90cbb5d089b9d0d9b3033c20a35fa5f936869c0.zip
www-client/qutebrowser: add IUSE=pdf to handle pdfjs
Unfortunately qtwebengine:5 doesn't fare so well with new pdfjs-3, while :6 has no issues. As a optfeature, handling this is rather unintuitive and older pdfjs may get dropped without a dependency check. This is just python and builds quickly, so add IUSE=pdf to control versions and also make content.pdfjs a default if enabled. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'www-client/qutebrowser/qutebrowser-9999.ebuild')
-rw-r--r--www-client/qutebrowser/qutebrowser-9999.ebuild12
1 files changed, 8 insertions, 4 deletions
diff --git a/www-client/qutebrowser/qutebrowser-9999.ebuild b/www-client/qutebrowser/qutebrowser-9999.ebuild
index 9721e0227ee9..0521c244a164 100644
--- a/www-client/qutebrowser/qutebrowser-9999.ebuild
+++ b/www-client/qutebrowser/qutebrowser-9999.ebuild
@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..11} )
-inherit distutils-r1 optfeature xdg
+inherit distutils-r1 xdg
if [[ ${PV} == 9999 ]]; then
inherit git-r3
@@ -21,7 +21,7 @@ HOMEPAGE="https://www.qutebrowser.org/"
LICENSE="GPL-3+"
SLOT="0"
-IUSE="+adblock widevine"
+IUSE="+adblock pdf widevine"
RDEPEND="
dev-qt/qtcore:5[icu]
@@ -37,6 +37,7 @@ RDEPEND="
dev-python/pyyaml[${PYTHON_USEDEP},libyaml(+)]
dev-python/zipp[${PYTHON_USEDEP}]
adblock? ( dev-python/adblock[${PYTHON_USEDEP}] )')
+ pdf? ( <www-plugins/pdfjs-3 )
widevine? ( www-plugins/chrome-binary-plugins )"
BDEPEND="
$(python_gen_cond_dep '
@@ -59,6 +60,11 @@ distutils_enable_tests pytest
src_prepare() {
distutils-r1_src_prepare
+ if use pdf; then
+ sed '/^content.pdfjs:/,+1s/false/true/' \
+ -i ${PN}/config/configdata.yml || die
+ fi
+
if use widevine; then
local widevine=${EPREFIX}/usr/$(get_libdir)/chromium-browser/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
sed "/yield from _qtwebengine_settings_args/a\ yield '--widevine-path=${widevine}'" \
@@ -116,8 +122,6 @@ python_install_all() {
pkg_postinst() {
xdg_pkg_postinst
- optfeature "PDF display support" www-plugins/pdfjs
-
if [[ ! ${REPLACING_VERSIONS} ]]; then
elog "Note that optional scripts in ${EROOT}/usr/share/${PN}/{user,}scripts"
elog "have additional dependencies not covered by this ebuild, for example"