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: Sat, 18 Mar 2023 23:22:46
Message-Id: 1679181732.3d8762f07bd8ae6779b5011f34b0f497c4947c58.ionen@gentoo
1 commit: 3d8762f07bd8ae6779b5011f34b0f497c4947c58
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 16 22:10:33 2023 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 18 23:22:12 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d8762f0
7
8 www-client/qutebrowser: drop 3.0.0_pre9999
9
10 The qt6-v2 branch was merged in the main branch making this
11 obsolete. Use normal 9999 if want USE=qt6 (or at least until
12 3.0.0 is released).
13
14 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
15
16 .../qutebrowser/qutebrowser-3.0.0_pre9999.ebuild | 187 ---------------------
17 1 file changed, 187 deletions(-)
18
19 diff --git a/www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild b/www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild
20 deleted file mode 100644
21 index 0de37e2649d8..000000000000
22 --- a/www-client/qutebrowser/qutebrowser-3.0.0_pre9999.ebuild
23 +++ /dev/null
24 @@ -1,187 +0,0 @@
25 -# Copyright 1999-2023 Gentoo Authors
26 -# Distributed under the terms of the GNU General Public License v2
27 -
28 -EAPI=8
29 -
30 -DISTUTILS_SINGLE_IMPL=1
31 -DISTUTILS_USE_PEP517=setuptools
32 -PYTHON_COMPAT=( python3_{9..11} )
33 -inherit distutils-r1 xdg
34 -
35 -if [[ ${PV} == *9999 ]]; then
36 - inherit git-r3
37 - EGIT_REPO_URI="https://github.com/qutebrowser/qutebrowser.git"
38 - EGIT_BRANCH="qt6-v2"
39 -else
40 - SRC_URI="https://github.com/qutebrowser/qutebrowser/releases/download/v${PV}/${P}.tar.gz"
41 - KEYWORDS="~amd64 ~arm64 ~x86"
42 -fi
43 -
44 -DESCRIPTION="Keyboard-driven, vim-like browser based on Python and Qt"
45 -HOMEPAGE="https://www.qutebrowser.org/"
46 -
47 -LICENSE="GPL-3+"
48 -SLOT="0"
49 -IUSE="+adblock pdf +qt6 widevine"
50 -
51 -RDEPEND="
52 - $(python_gen_cond_dep '
53 - dev-python/colorama[${PYTHON_USEDEP}]
54 - >=dev-python/jinja-3.1.2[${PYTHON_USEDEP}]
55 - >=dev-python/markupsafe-2.1.1[${PYTHON_USEDEP}]
56 - dev-python/pygments[${PYTHON_USEDEP}]
57 - dev-python/pyyaml[${PYTHON_USEDEP}]
58 - dev-python/zipp[${PYTHON_USEDEP}]
59 - adblock? ( dev-python/adblock[${PYTHON_USEDEP}] )
60 - ')
61 - qt6? (
62 - dev-qt/qtbase:6[icu]
63 - $(python_gen_cond_dep '
64 - dev-python/PyQt6[${PYTHON_USEDEP},dbus,gui,network,opengl,printsupport,qml,sql,widgets]
65 - dev-python/PyQt6-WebEngine[${PYTHON_USEDEP},widgets]
66 - ')
67 - pdf? ( www-plugins/pdfjs )
68 - )
69 - !qt6? (
70 - dev-qt/qtcore:5[icu]
71 - dev-qt/qtgui:5[png]
72 - $(python_gen_cond_dep '
73 - dev-python/PyQt5[${PYTHON_USEDEP},dbus,declarative,gui,network,opengl,printsupport,sql,widgets]
74 - dev-python/PyQtWebEngine[${PYTHON_USEDEP}]
75 - ')
76 - pdf? ( <www-plugins/pdfjs-3 )
77 - )
78 - widevine? ( www-plugins/chrome-binary-plugins )"
79 -BDEPEND="
80 - $(python_gen_cond_dep '
81 - test? (
82 - dev-python/beautifulsoup4[${PYTHON_USEDEP}]
83 - dev-python/cheroot[${PYTHON_USEDEP}]
84 - dev-python/flask[${PYTHON_USEDEP}]
85 - dev-python/hypothesis[${PYTHON_USEDEP}]
86 - dev-python/pytest-bdd[${PYTHON_USEDEP}]
87 - dev-python/pytest-mock[${PYTHON_USEDEP}]
88 - dev-python/pytest-qt[${PYTHON_USEDEP}]
89 - dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
90 - dev-python/pytest-xvfb[${PYTHON_USEDEP}]
91 - dev-python/tldextract[${PYTHON_USEDEP}]
92 - qt6? ( dev-python/PyQt6[testlib] )
93 - !qt6? ( dev-python/PyQt5[testlib] )
94 - )
95 - ')"
96 -[[ ${PV} == *9999 ]] && BDEPEND+=" app-text/asciidoc"
97 -
98 -distutils_enable_tests pytest
99 -
100 -src_prepare() {
101 - distutils-r1_src_prepare
102 -
103 - if use pdf; then
104 - sed -e '/^content.pdfjs:/,+1s/false/true/' \
105 - -i ${PN}/config/configdata.yml || die
106 - fi
107 -
108 - if use widevine && use prefix; then
109 - # hack: QtWebEngine knows Gentoo's widevine, but not with ${EPREFIX}
110 - local widevine=${EPREFIX}/usr/$(get_libdir)/chromium-browser/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
111 - sed -e "/yield from _qtwebengine_settings_args/a\ yield '--widevine-path=${widevine}'" \
112 - -i ${PN}/config/qtargs.py || die
113 - fi
114 -
115 - # ensure run the requested Qt backend
116 - sed -e '/^_WRAPPERS = /,/^]/c\_WRAPPERS = [ "PyQt'$(usex qt6 6 5)'" ]' \
117 - -i ${PN}/qt/machinery.py || die
118 -
119 - # let eclass handle python
120 - sed -i '/setup.py/d' misc/Makefile || die
121 -
122 - if [[ ${PV} == *9999 ]]; then
123 - # call asciidoc(1) rather than the single target python module
124 - sed -e '/cmdline = /s/= .*/= ["asciidoc"]/' \
125 - -i scripts/asciidoc2html.py || die
126 -
127 - "${EPYTHON}" scripts/asciidoc2html.py || die
128 - fi
129 -
130 - # disable unnecessary tests/plugins that need extras
131 - sed -e '/pytest-benchmark/d' -e 's/--benchmark[^ ]*//' \
132 - -e '/pytest-instafail/d' -e 's/--instafail//' \
133 - -i pytest.ini || die
134 - if [[ ${PV} == *9999 ]]; then
135 - rm tests/unit/scripts/test_run_vulture.py || die
136 - else
137 - rm tests/unit/scripts/test_problemmatchers.py || die
138 - fi
139 -}
140 -
141 -python_test() {
142 - local -x PYTEST_QT_API=pyqt$(usex qt6 6 5)
143 -
144 - local EPYTEST_DESELECT=(
145 - # end2end and other IPC tests are broken with "Name error" if
146 - # socket path is over ~104 characters (=124 in /var/tmp/portage)
147 - # https://github.com/qutebrowser/qutebrowser/issues/888 (not just OSX)
148 - tests/end2end
149 - tests/unit/misc/test_ipc.py
150 - # calls eclass' python2 "failure" wrapper
151 - tests/unit/misc/test_checkpyver.py::test_old_python
152 - # not worth running dbus over
153 - tests/unit/browser/test_notification.py::TestDBus
154 - # bug 819393
155 - tests/unit/commands/test_userscripts.py::test_custom_env[_POSIXUserscriptRunner]
156 - # tests that don't know about our newer qtwebengine:5
157 - tests/unit/browser/webengine/test_webenginedownloads.py::TestDataUrlWorkaround
158 - )
159 - # qtargs are mangled with widevine+prefix
160 - use widevine && use prefix && EPYTEST_DESELECT+=( tests/unit/config/test_qtargs.py )
161 -
162 - # skip benchmarks (incl. _tree), and warning tests broken by -Wdefault
163 - epytest -p xvfb -n ${jobs} -k 'not _bench and not _matches_tree and not _warning'
164 -}
165 -
166 -python_install_all() {
167 - emake -f misc/Makefile DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
168 -
169 - rm "${ED}"/usr/share/${PN}/scripts/{mkvenv,utils}.py || die
170 - fperms -x /usr/share/${PN}/{scripts/cycle-inputs.js,userscripts/README.md}
171 - python_fix_shebang "${ED}"/usr/share/${PN}
172 -
173 - einstalldocs
174 -}
175 -
176 -pkg_preinst() {
177 - xdg_pkg_preinst
178 -
179 - has_version "${CATEGORY}/${PN}[qt6]" && QUTEBROWSER_HAD_QT6=
180 -}
181 -
182 -pkg_postinst() {
183 - xdg_pkg_postinst
184 -
185 - if [[ ! ${REPLACING_VERSIONS} ]]; then
186 - elog "Note that optional scripts in ${EROOT}/usr/share/${PN}/{user,}scripts"
187 - elog "have additional dependencies not covered by this ebuild, for example"
188 - elog "view_in_mpv needs media-video/mpv[lua] and net-misc/yt-dlp."
189 - fi
190 -
191 - if [[ ! -v QUTEBROWSER_HAD_QT6 ]] && use qt6; then
192 - elog "USE=qt6 is enabled using the qt6-v2 branch, it is work-in-progress"
193 - elog "and some issues may be expected. Can follow upstream progress at:"
194 - elog " https://github.com/qutebrowser/qutebrowser/issues/7202 [qt6 general]"
195 - elog " https://github.com/qutebrowser/qutebrowser/tree/qt6-v2 [used branch]"
196 - if [[ ${REPLACING_VERSIONS} ]]; then
197 - elog
198 - elog "You may optionally want to backup your ~/.local/share/${PN} before"
199 - elog "it is converted to use Qt6 WebEngine (one-way conversion). ${PN}"
200 - elog "will also warn about this on launch for a last chance to abort."
201 - fi
202 - fi
203 -
204 - # only show qt6 warning on arches where USE=qt6 is unmasked
205 - if use amd64 && use !qt6; then
206 - ewarn "USE=qt6 is disabled, be warned that Qt5's WebEngine uses an older"
207 - ewarn "chromium version. While it is relatively maintained for security, it may"
208 - ewarn "cause issues for sites/features designed with a newer version in mind."
209 - ewarn "When Qt6 support is stable enough, ebuild's Qt5 support may get removed."
210 - fi
211 -}