Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/qutebrowser/
Date: Fri, 04 Nov 2022 04:14:50
Message-Id: 1667535005.e90cbb5d089b9d0d9b3033c20a35fa5f936869c0.ionen@gentoo
1 commit: e90cbb5d089b9d0d9b3033c20a35fa5f936869c0
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 4 01:58:34 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 4 04:10:05 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e90cbb5d
7
8 www-client/qutebrowser: add IUSE=pdf to handle pdfjs
9
10 Unfortunately qtwebengine:5 doesn't fare so well with new pdfjs-3,
11 while :6 has no issues. As a optfeature, handling this is rather
12 unintuitive and older pdfjs may get dropped without a dependency check.
13
14 This is just python and builds quickly, so add IUSE=pdf to control
15 versions and also make content.pdfjs a default if enabled.
16
17 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
18
19 www-client/qutebrowser/qutebrowser-2.5.2.ebuild | 12 ++++++++----
20 www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild | 13 +++++++++----
21 www-client/qutebrowser/qutebrowser-9999.ebuild | 12 ++++++++----
22 3 files changed, 25 insertions(+), 12 deletions(-)
23
24 diff --git a/www-client/qutebrowser/qutebrowser-2.5.2.ebuild b/www-client/qutebrowser/qutebrowser-2.5.2.ebuild
25 index b531a2983052..d3151e4cf8de 100644
26 --- a/www-client/qutebrowser/qutebrowser-2.5.2.ebuild
27 +++ b/www-client/qutebrowser/qutebrowser-2.5.2.ebuild
28 @@ -6,7 +6,7 @@ EAPI=8
29 DISTUTILS_SINGLE_IMPL=1
30 DISTUTILS_USE_PEP517=setuptools
31 PYTHON_COMPAT=( python3_{8..11} )
32 -inherit distutils-r1 optfeature xdg
33 +inherit distutils-r1 xdg
34
35 if [[ ${PV} == 9999 ]]; then
36 inherit git-r3
37 @@ -21,7 +21,7 @@ HOMEPAGE="https://www.qutebrowser.org/"
38
39 LICENSE="GPL-3+"
40 SLOT="0"
41 -IUSE="+adblock widevine"
42 +IUSE="+adblock pdf widevine"
43
44 RDEPEND="
45 dev-qt/qtcore:5[icu]
46 @@ -37,6 +37,7 @@ RDEPEND="
47 dev-python/pyyaml[${PYTHON_USEDEP},libyaml(+)]
48 dev-python/zipp[${PYTHON_USEDEP}]
49 adblock? ( dev-python/adblock[${PYTHON_USEDEP}] )')
50 + pdf? ( <www-plugins/pdfjs-3 )
51 widevine? ( www-plugins/chrome-binary-plugins )"
52 BDEPEND="
53 $(python_gen_cond_dep '
54 @@ -59,6 +60,11 @@ distutils_enable_tests pytest
55 src_prepare() {
56 distutils-r1_src_prepare
57
58 + if use pdf; then
59 + sed '/^content.pdfjs:/,+1s/false/true/' \
60 + -i ${PN}/config/configdata.yml || die
61 + fi
62 +
63 if use widevine; then
64 local widevine=${EPREFIX}/usr/$(get_libdir)/chromium-browser/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
65 sed "/yield from _qtwebengine_settings_args/a\ yield '--widevine-path=${widevine}'" \
66 @@ -116,8 +122,6 @@ python_install_all() {
67 pkg_postinst() {
68 xdg_pkg_postinst
69
70 - optfeature "PDF display support" www-plugins/pdfjs
71 -
72 if [[ ! ${REPLACING_VERSIONS} ]]; then
73 elog "Note that optional scripts in ${EROOT}/usr/share/${PN}/{user,}scripts"
74 elog "have additional dependencies not covered by this ebuild, for example"
75
76 diff --git a/www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild b/www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild
77 index 28af4e718008..19f356ecb5d7 100644
78 --- a/www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild
79 +++ b/www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild
80 @@ -6,7 +6,7 @@ EAPI=8
81 DISTUTILS_SINGLE_IMPL=1
82 DISTUTILS_USE_PEP517=setuptools
83 PYTHON_COMPAT=( python3_{8..11} )
84 -inherit distutils-r1 multiprocessing optfeature xdg
85 +inherit distutils-r1 multiprocessing xdg
86
87 if [[ ${PV} == *9999 ]]; then
88 inherit git-r3
89 @@ -22,7 +22,7 @@ HOMEPAGE="https://www.qutebrowser.org/"
90
91 LICENSE="GPL-3+"
92 SLOT="0"
93 -IUSE="+adblock +qt6 widevine"
94 +IUSE="+adblock pdf +qt6 widevine"
95
96 RDEPEND="
97 $(python_gen_cond_dep '
98 @@ -40,6 +40,7 @@ RDEPEND="
99 $(python_gen_cond_dep '
100 dev-python/PyQt6[${PYTHON_USEDEP},dbus,gui,network,opengl,printsupport,qml,sql,widgets]
101 dev-python/PyQt6-WebEngine[${PYTHON_USEDEP},widgets]')
102 + pdf? ( www-plugins/pdfjs )
103 )
104 !qt6? (
105 dev-qt/qtcore:5[icu]
106 @@ -47,6 +48,7 @@ RDEPEND="
107 $(python_gen_cond_dep '
108 dev-python/PyQt5[${PYTHON_USEDEP},dbus,declarative,gui,network,opengl,printsupport,sql,widgets]
109 dev-python/PyQtWebEngine[${PYTHON_USEDEP}]')
110 + pdf? ( <www-plugins/pdfjs-3 )
111 )
112 widevine? ( www-plugins/chrome-binary-plugins )"
113 BDEPEND="
114 @@ -73,6 +75,11 @@ distutils_enable_tests pytest
115 src_prepare() {
116 distutils-r1_src_prepare
117
118 + if use pdf; then
119 + sed '/^content.pdfjs:/,+1s/false/true/' \
120 + -i ${PN}/config/configdata.yml || die
121 + fi
122 +
123 if use widevine; then
124 # Qt6 knows Gentoo's, but pass to ensure libdir, EPREFIX, and for Qt5
125 local widevine=${EPREFIX}/usr/$(get_libdir)/chromium-browser/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
126 @@ -146,8 +153,6 @@ pkg_preinst() {
127 pkg_postinst() {
128 xdg_pkg_postinst
129
130 - optfeature "PDF display support" www-plugins/pdfjs
131 -
132 if [[ ! ${REPLACING_VERSIONS} ]]; then
133 elog "Note that optional scripts in ${EROOT}/usr/share/${PN}/{user,}scripts"
134 elog "have additional dependencies not covered by this ebuild, for example"
135
136 diff --git a/www-client/qutebrowser/qutebrowser-9999.ebuild b/www-client/qutebrowser/qutebrowser-9999.ebuild
137 index 9721e0227ee9..0521c244a164 100644
138 --- a/www-client/qutebrowser/qutebrowser-9999.ebuild
139 +++ b/www-client/qutebrowser/qutebrowser-9999.ebuild
140 @@ -6,7 +6,7 @@ EAPI=8
141 DISTUTILS_SINGLE_IMPL=1
142 DISTUTILS_USE_PEP517=setuptools
143 PYTHON_COMPAT=( python3_{8..11} )
144 -inherit distutils-r1 optfeature xdg
145 +inherit distutils-r1 xdg
146
147 if [[ ${PV} == 9999 ]]; then
148 inherit git-r3
149 @@ -21,7 +21,7 @@ HOMEPAGE="https://www.qutebrowser.org/"
150
151 LICENSE="GPL-3+"
152 SLOT="0"
153 -IUSE="+adblock widevine"
154 +IUSE="+adblock pdf widevine"
155
156 RDEPEND="
157 dev-qt/qtcore:5[icu]
158 @@ -37,6 +37,7 @@ RDEPEND="
159 dev-python/pyyaml[${PYTHON_USEDEP},libyaml(+)]
160 dev-python/zipp[${PYTHON_USEDEP}]
161 adblock? ( dev-python/adblock[${PYTHON_USEDEP}] )')
162 + pdf? ( <www-plugins/pdfjs-3 )
163 widevine? ( www-plugins/chrome-binary-plugins )"
164 BDEPEND="
165 $(python_gen_cond_dep '
166 @@ -59,6 +60,11 @@ distutils_enable_tests pytest
167 src_prepare() {
168 distutils-r1_src_prepare
169
170 + if use pdf; then
171 + sed '/^content.pdfjs:/,+1s/false/true/' \
172 + -i ${PN}/config/configdata.yml || die
173 + fi
174 +
175 if use widevine; then
176 local widevine=${EPREFIX}/usr/$(get_libdir)/chromium-browser/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
177 sed "/yield from _qtwebengine_settings_args/a\ yield '--widevine-path=${widevine}'" \
178 @@ -116,8 +122,6 @@ python_install_all() {
179 pkg_postinst() {
180 xdg_pkg_postinst
181
182 - optfeature "PDF display support" www-plugins/pdfjs
183 -
184 if [[ ! ${REPLACING_VERSIONS} ]]; then
185 elog "Note that optional scripts in ${EROOT}/usr/share/${PN}/{user,}scripts"
186 elog "have additional dependencies not covered by this ebuild, for example"