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:47
Message-Id: 1679181732.43ab677c4f37f3831555251bc2151df77252450d.ionen@gentoo
1 commit: 43ab677c4f37f3831555251bc2151df77252450d
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 16 22:13:27 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=43ab677c
7
8 www-client/qutebrowser: update live
9
10 qt6-v2 was merged in the main branch, so this syncs 9999 with
11 the old 3.0.0_pre9999 ebuild plus a few adjustments
12
13 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
14
15 www-client/qutebrowser/qutebrowser-9999.ebuild | 60 ++++++++++++++++++++++----
16 1 file changed, 51 insertions(+), 9 deletions(-)
17
18 diff --git a/www-client/qutebrowser/qutebrowser-9999.ebuild b/www-client/qutebrowser/qutebrowser-9999.ebuild
19 index 7cb5d6ee3504..2a80f2b1aa5d 100644
20 --- a/www-client/qutebrowser/qutebrowser-9999.ebuild
21 +++ b/www-client/qutebrowser/qutebrowser-9999.ebuild
22 @@ -21,12 +21,10 @@ HOMEPAGE="https://www.qutebrowser.org/"
23
24 LICENSE="GPL-3+"
25 SLOT="0"
26 -IUSE="+adblock pdf widevine"
27 +IUSE="+adblock pdf +qt6 widevine"
28
29 RDEPEND="
30 $(python_gen_cond_dep '
31 - dev-python/PyQt5[${PYTHON_USEDEP},dbus,declarative,gui,network,opengl,printsupport,sql,widgets]
32 - dev-python/PyQtWebEngine[${PYTHON_USEDEP}]
33 dev-python/colorama[${PYTHON_USEDEP}]
34 >=dev-python/jinja-3.1.2[${PYTHON_USEDEP}]
35 >=dev-python/markupsafe-2.1.1[${PYTHON_USEDEP}]
36 @@ -35,14 +33,27 @@ RDEPEND="
37 dev-python/zipp[${PYTHON_USEDEP}]
38 adblock? ( dev-python/adblock[${PYTHON_USEDEP}] )
39 ')
40 - dev-qt/qtcore:5[icu]
41 - dev-qt/qtgui:5[png]
42 - pdf? ( <www-plugins/pdfjs-3 )
43 + qt6? (
44 + dev-qt/qtbase:6[icu]
45 + $(python_gen_cond_dep '
46 + dev-python/PyQt6[${PYTHON_USEDEP},dbus,gui,network,opengl,printsupport,qml,sql,widgets]
47 + dev-python/PyQt6-WebEngine[${PYTHON_USEDEP},widgets]
48 + ')
49 + pdf? ( www-plugins/pdfjs )
50 + )
51 + !qt6? (
52 + dev-qt/qtcore:5[icu]
53 + dev-qt/qtgui:5[png]
54 + $(python_gen_cond_dep '
55 + dev-python/PyQt5[${PYTHON_USEDEP},dbus,declarative,gui,network,opengl,printsupport,sql,widgets]
56 + dev-python/PyQtWebEngine[${PYTHON_USEDEP}]
57 + ')
58 + pdf? ( <www-plugins/pdfjs-3 )
59 + )
60 widevine? ( www-plugins/chrome-binary-plugins )"
61 BDEPEND="
62 $(python_gen_cond_dep '
63 test? (
64 - dev-python/PyQt5[testlib]
65 dev-python/beautifulsoup4[${PYTHON_USEDEP}]
66 dev-python/cheroot[${PYTHON_USEDEP}]
67 dev-python/flask[${PYTHON_USEDEP}]
68 @@ -53,6 +64,8 @@ BDEPEND="
69 dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
70 dev-python/pytest-xvfb[${PYTHON_USEDEP}]
71 dev-python/tldextract[${PYTHON_USEDEP}]
72 + qt6? ( dev-python/PyQt6[testlib] )
73 + !qt6? ( dev-python/PyQt5[testlib] )
74 )
75 ')"
76 [[ ${PV} == 9999 ]] && BDEPEND+=" app-text/asciidoc"
77 @@ -63,6 +76,7 @@ src_prepare() {
78 distutils-r1_src_prepare
79
80 if use pdf; then
81 + # doesn't hurt to enable by default if was explicitly requested
82 sed -e '/^content.pdfjs:/,+1s/false/true/' \
83 -i ${PN}/config/configdata.yml || die
84 fi
85 @@ -74,6 +88,12 @@ src_prepare() {
86 -i ${PN}/config/qtargs.py || die
87 fi
88
89 + # default to the requested Qt backend, current default is PyQt5 but
90 + # sed unconditionally for safety in 9999 given this is going to change
91 + # (note that using sed is the suggested solution by upstream for now)
92 + sed -e "/^_DEFAULT_WRAPPER =/s/=.*/= \"PyQt$(usex qt6 6 5)\"/" \
93 + -i ${PN}/qt/machinery.py || die
94 +
95 # let eclass handle python
96 sed -i '/setup.py/d' misc/Makefile || die
97
98 @@ -85,7 +105,7 @@ src_prepare() {
99 "${EPYTHON}" scripts/asciidoc2html.py || die
100 fi
101
102 - # disable unnecessary tests/plugins that need extras
103 + # disable tests/plugins that are unncessary for us and need extras
104 sed -e '/pytest-benchmark/d' -e 's/--benchmark[^ ]*//' \
105 -e '/pytest-instafail/d' -e 's/--instafail//' \
106 -i pytest.ini || die
107 @@ -97,7 +117,7 @@ src_prepare() {
108 }
109
110 python_test() {
111 - local -x PYTEST_QT_API=pyqt5
112 + local -x PYTEST_QT_API=pyqt$(usex qt6 6 5)
113
114 local EPYTEST_DESELECT=(
115 # end2end and other IPC tests are broken with "Name error" if
116 @@ -131,6 +151,12 @@ python_install_all() {
117 einstalldocs
118 }
119
120 +pkg_preinst() {
121 + xdg_pkg_preinst
122 +
123 + has_version "${CATEGORY}/${PN}[qt6]" && QUTEBROWSER_HAD_QT6=
124 +}
125 +
126 pkg_postinst() {
127 xdg_pkg_postinst
128
129 @@ -139,4 +165,20 @@ pkg_postinst() {
130 elog "have additional dependencies not covered by this ebuild, for example"
131 elog "view_in_mpv needs media-video/mpv[lua] and net-misc/yt-dlp."
132 fi
133 +
134 + if [[ ! -v QUTEBROWSER_HAD_QT6 && ${REPLACING_VERSIONS} ]] && use qt6; then
135 + ewarn "Be warned that starting the Qt6 version of ${PN} performs a one-way"
136 + ewarn "conversion of ~/.local/share/${PN}/webengine to Qt6. There will also"
137 + ewarn "be a warning on startup, and may optionally want to backup first."
138 + fi
139 +
140 + # only show qt6 warning on arches where USE=qt6 is unmasked
141 + # TODO: uncomment after https://github.com/gentoo/gentoo/pull/29181 albeit
142 + # may need to comment it out again when stabling if don't stable Qt6 (yet).
143 +# if use amd64 && use !qt6; then
144 +# ewarn "USE=qt6 is disabled, be warned that Qt5's WebEngine uses an older"
145 +# ewarn "chromium version. While it is relatively maintained for security, it may"
146 +# ewarn "cause issues for sites/features designed with a newer version in mind."
147 +# ewarn "When Qt6 support is stable enough, ebuild's Qt5 support may get removed."
148 +# fi
149 }