summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-03-16 18:13:27 -0400
committerIonen Wolkens <ionen@gentoo.org>2023-03-18 19:22:12 -0400
commit43ab677c4f37f3831555251bc2151df77252450d (patch)
treef6821bf7ebe065ab74c0961d57d58923b200476b /www-client/qutebrowser/qutebrowser-9999.ebuild
parentwww-client/qutebrowser: drop 3.0.0_pre9999 (diff)
downloadgentoo-43ab677c4f37f3831555251bc2151df77252450d.tar.gz
gentoo-43ab677c4f37f3831555251bc2151df77252450d.tar.bz2
gentoo-43ab677c4f37f3831555251bc2151df77252450d.zip
www-client/qutebrowser: update live
qt6-v2 was merged in the main branch, so this syncs 9999 with the old 3.0.0_pre9999 ebuild plus a few adjustments 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.ebuild60
1 files changed, 51 insertions, 9 deletions
diff --git a/www-client/qutebrowser/qutebrowser-9999.ebuild b/www-client/qutebrowser/qutebrowser-9999.ebuild
index 7cb5d6ee3504..2a80f2b1aa5d 100644
--- a/www-client/qutebrowser/qutebrowser-9999.ebuild
+++ b/www-client/qutebrowser/qutebrowser-9999.ebuild
@@ -21,12 +21,10 @@ HOMEPAGE="https://www.qutebrowser.org/"
LICENSE="GPL-3+"
SLOT="0"
-IUSE="+adblock pdf widevine"
+IUSE="+adblock pdf +qt6 widevine"
RDEPEND="
$(python_gen_cond_dep '
- dev-python/PyQt5[${PYTHON_USEDEP},dbus,declarative,gui,network,opengl,printsupport,sql,widgets]
- dev-python/PyQtWebEngine[${PYTHON_USEDEP}]
dev-python/colorama[${PYTHON_USEDEP}]
>=dev-python/jinja-3.1.2[${PYTHON_USEDEP}]
>=dev-python/markupsafe-2.1.1[${PYTHON_USEDEP}]
@@ -35,14 +33,27 @@ RDEPEND="
dev-python/zipp[${PYTHON_USEDEP}]
adblock? ( dev-python/adblock[${PYTHON_USEDEP}] )
')
- dev-qt/qtcore:5[icu]
- dev-qt/qtgui:5[png]
- pdf? ( <www-plugins/pdfjs-3 )
+ qt6? (
+ dev-qt/qtbase:6[icu]
+ $(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]
+ dev-qt/qtgui:5[png]
+ $(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="
$(python_gen_cond_dep '
test? (
- dev-python/PyQt5[testlib]
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
dev-python/cheroot[${PYTHON_USEDEP}]
dev-python/flask[${PYTHON_USEDEP}]
@@ -53,6 +64,8 @@ BDEPEND="
dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
dev-python/pytest-xvfb[${PYTHON_USEDEP}]
dev-python/tldextract[${PYTHON_USEDEP}]
+ qt6? ( dev-python/PyQt6[testlib] )
+ !qt6? ( dev-python/PyQt5[testlib] )
)
')"
[[ ${PV} == 9999 ]] && BDEPEND+=" app-text/asciidoc"
@@ -63,6 +76,7 @@ src_prepare() {
distutils-r1_src_prepare
if use pdf; then
+ # doesn't hurt to enable by default if was explicitly requested
sed -e '/^content.pdfjs:/,+1s/false/true/' \
-i ${PN}/config/configdata.yml || die
fi
@@ -74,6 +88,12 @@ src_prepare() {
-i ${PN}/config/qtargs.py || die
fi
+ # default to the requested Qt backend, current default is PyQt5 but
+ # sed unconditionally for safety in 9999 given this is going to change
+ # (note that using sed is the suggested solution by upstream for now)
+ sed -e "/^_DEFAULT_WRAPPER =/s/=.*/= \"PyQt$(usex qt6 6 5)\"/" \
+ -i ${PN}/qt/machinery.py || die
+
# let eclass handle python
sed -i '/setup.py/d' misc/Makefile || die
@@ -85,7 +105,7 @@ src_prepare() {
"${EPYTHON}" scripts/asciidoc2html.py || die
fi
- # disable unnecessary tests/plugins that need extras
+ # disable tests/plugins that are unncessary for us and need extras
sed -e '/pytest-benchmark/d' -e 's/--benchmark[^ ]*//' \
-e '/pytest-instafail/d' -e 's/--instafail//' \
-i pytest.ini || die
@@ -97,7 +117,7 @@ src_prepare() {
}
python_test() {
- local -x PYTEST_QT_API=pyqt5
+ local -x PYTEST_QT_API=pyqt$(usex qt6 6 5)
local EPYTEST_DESELECT=(
# end2end and other IPC tests are broken with "Name error" if
@@ -131,6 +151,12 @@ python_install_all() {
einstalldocs
}
+pkg_preinst() {
+ xdg_pkg_preinst
+
+ has_version "${CATEGORY}/${PN}[qt6]" && QUTEBROWSER_HAD_QT6=
+}
+
pkg_postinst() {
xdg_pkg_postinst
@@ -139,4 +165,20 @@ pkg_postinst() {
elog "have additional dependencies not covered by this ebuild, for example"
elog "view_in_mpv needs media-video/mpv[lua] and net-misc/yt-dlp."
fi
+
+ if [[ ! -v QUTEBROWSER_HAD_QT6 && ${REPLACING_VERSIONS} ]] && use qt6; then
+ ewarn "Be warned that starting the Qt6 version of ${PN} performs a one-way"
+ ewarn "conversion of ~/.local/share/${PN}/webengine to Qt6. There will also"
+ ewarn "be a warning on startup, and may optionally want to backup first."
+ fi
+
+ # only show qt6 warning on arches where USE=qt6 is unmasked
+ # TODO: uncomment after https://github.com/gentoo/gentoo/pull/29181 albeit
+ # may need to comment it out again when stabling if don't stable Qt6 (yet).
+# if use amd64 && use !qt6; then
+# ewarn "USE=qt6 is disabled, be warned that Qt5's WebEngine uses an older"
+# ewarn "chromium version. While it is relatively maintained for security, it may"
+# ewarn "cause issues for sites/features designed with a newer version in mind."
+# ewarn "When Qt6 support is stable enough, ebuild's Qt5 support may get removed."
+# fi
}