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
parentmedia-gfx/sane-backends: fix tests w/ gcc 12 (diff)
downloadgentoo-e90cbb5d.tar.gz
gentoo-e90cbb5d.tar.bz2
gentoo-e90cbb5d.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>
-rw-r--r--www-client/qutebrowser/qutebrowser-2.5.2.ebuild12
-rw-r--r--www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild13
-rw-r--r--www-client/qutebrowser/qutebrowser-9999.ebuild12
3 files changed, 25 insertions, 12 deletions
diff --git a/www-client/qutebrowser/qutebrowser-2.5.2.ebuild b/www-client/qutebrowser/qutebrowser-2.5.2.ebuild
index b531a2983052..d3151e4cf8de 100644
--- a/www-client/qutebrowser/qutebrowser-2.5.2.ebuild
+++ b/www-client/qutebrowser/qutebrowser-2.5.2.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"
diff --git a/www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild b/www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild
index 28af4e718008..19f356ecb5d7 100644
--- a/www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild
+++ b/www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild
@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..11} )
-inherit distutils-r1 multiprocessing optfeature xdg
+inherit distutils-r1 multiprocessing xdg
if [[ ${PV} == *9999 ]]; then
inherit git-r3
@@ -22,7 +22,7 @@ HOMEPAGE="https://www.qutebrowser.org/"
LICENSE="GPL-3+"
SLOT="0"
-IUSE="+adblock +qt6 widevine"
+IUSE="+adblock pdf +qt6 widevine"
RDEPEND="
$(python_gen_cond_dep '
@@ -40,6 +40,7 @@ RDEPEND="
$(python_gen_cond_dep '
dev-python/PyQt6[${PYTHON_USEDEP},dbus,gui,network,opengl,printsupport,qml,sql,widgets]
dev-python/PyQt6-WebEngine[${PYTHON_USEDEP},widgets]')
+ pdf? ( www-plugins/pdfjs )
)
!qt6? (
dev-qt/qtcore:5[icu]
@@ -47,6 +48,7 @@ RDEPEND="
$(python_gen_cond_dep '
dev-python/PyQt5[${PYTHON_USEDEP},dbus,declarative,gui,network,opengl,printsupport,sql,widgets]
dev-python/PyQtWebEngine[${PYTHON_USEDEP}]')
+ pdf? ( <www-plugins/pdfjs-3 )
)
widevine? ( www-plugins/chrome-binary-plugins )"
BDEPEND="
@@ -73,6 +75,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
# Qt6 knows Gentoo's, but pass to ensure libdir, EPREFIX, and for Qt5
local widevine=${EPREFIX}/usr/$(get_libdir)/chromium-browser/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
@@ -146,8 +153,6 @@ pkg_preinst() {
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"
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"