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: Thu, 26 May 2022 15:00:31
Message-Id: 1653577005.97cfd790df200459afe91022d962c1abc62ea18e.ionen@gentoo
1 commit: 97cfd790df200459afe91022d962c1abc62ea18e
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 26 14:38:27 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Thu May 26 14:56:45 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97cfd790
7
8 www-client/qutebrowser: add 2.5.1
9
10 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
11
12 www-client/qutebrowser/Manifest | 1 +
13 www-client/qutebrowser/qutebrowser-2.5.1.ebuild | 122 ++++++++++++++++++++++++
14 2 files changed, 123 insertions(+)
15
16 diff --git a/www-client/qutebrowser/Manifest b/www-client/qutebrowser/Manifest
17 index 35bedaf766a8..3dde123518cc 100644
18 --- a/www-client/qutebrowser/Manifest
19 +++ b/www-client/qutebrowser/Manifest
20 @@ -1 +1,2 @@
21 DIST qutebrowser-2.5.0.tar.gz 6086105 BLAKE2B c95afbbdfeebe4352e461cef78d499e9efa9de2e4acc2cedf350904bd617a4f238c34042369655030e53433f941288ff676f8ffd873683939ddd38ff01604aa1 SHA512 41ab6f6d2b72c94e0f66ba0a80999d820748d0f86dbec92583a2be88725f1ebd7517dd75edbaa0ce60bc029ed4dc0dd3e30a1cb25ab4ef940b968c87b4df2472
22 +DIST qutebrowser-2.5.1.tar.gz 6089389 BLAKE2B e26be42742795b22c34d131a5c9046e0223cef2fd461d8aa3c656a8182bf0127e17e55a7e0a79e1ade76c883094d841a822864e995365b0217ef1b422272e6e0 SHA512 27eca3e987e4c2a662fc863840d3ea697da65f55c7b9180e892466aeb5a2753f1eca424bbf8705670fe8cd9363e3297e03f9f9cc0d4f85f0198a4e3312d32f3c
23
24 diff --git a/www-client/qutebrowser/qutebrowser-2.5.1.ebuild b/www-client/qutebrowser/qutebrowser-2.5.1.ebuild
25 new file mode 100644
26 index 000000000000..2d84333f9a0e
27 --- /dev/null
28 +++ b/www-client/qutebrowser/qutebrowser-2.5.1.ebuild
29 @@ -0,0 +1,122 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +DISTUTILS_SINGLE_IMPL=1
36 +DISTUTILS_USE_PEP517=setuptools
37 +PYTHON_COMPAT=( python3_{8..10} )
38 +inherit distutils-r1 optfeature xdg
39 +
40 +if [[ ${PV} == 9999 ]]; then
41 + inherit git-r3
42 + EGIT_REPO_URI="https://github.com/qutebrowser/qutebrowser.git"
43 +else
44 + SRC_URI="https://github.com/qutebrowser/qutebrowser/releases/download/v${PV}/${P}.tar.gz"
45 + KEYWORDS="~amd64 ~arm64 ~x86"
46 +fi
47 +
48 +DESCRIPTION="Keyboard-driven, vim-like browser based on PyQt5 and QtWebEngine"
49 +HOMEPAGE="https://www.qutebrowser.org/"
50 +
51 +LICENSE="GPL-3+"
52 +SLOT="0"
53 +IUSE="+adblock widevine"
54 +
55 +RDEPEND="
56 + dev-qt/qtcore:5[icu]
57 + dev-qt/qtgui:5[png]
58 + $(python_gen_cond_dep 'dev-python/importlib_resources[${PYTHON_USEDEP}]' 3.8)
59 + $(python_gen_cond_dep '
60 + dev-python/colorama[${PYTHON_USEDEP}]
61 + >=dev-python/jinja-3.0.2[${PYTHON_USEDEP}]
62 + >=dev-python/markupsafe-2.0.1[${PYTHON_USEDEP}]
63 + dev-python/pygments[${PYTHON_USEDEP}]
64 + dev-python/PyQt5[${PYTHON_USEDEP},dbus,declarative,multimedia,gui,network,opengl,printsupport,sql,widgets]
65 + dev-python/PyQtWebEngine[${PYTHON_USEDEP}]
66 + dev-python/pyyaml[${PYTHON_USEDEP},libyaml(+)]
67 + dev-python/zipp[${PYTHON_USEDEP}]
68 + adblock? ( dev-python/adblock[${PYTHON_USEDEP}] )')
69 + widevine? ( www-plugins/chrome-binary-plugins )"
70 +BDEPEND="
71 + $(python_gen_cond_dep '
72 + test? (
73 + dev-python/beautifulsoup4[${PYTHON_USEDEP}]
74 + dev-python/cheroot[${PYTHON_USEDEP}]
75 + dev-python/flask[${PYTHON_USEDEP}]
76 + dev-python/hypothesis[${PYTHON_USEDEP}]
77 + dev-python/pytest-bdd[${PYTHON_USEDEP}]
78 + dev-python/pytest-mock[${PYTHON_USEDEP}]
79 + dev-python/pytest-qt[${PYTHON_USEDEP}]
80 + dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
81 + dev-python/pytest-xvfb[${PYTHON_USEDEP}]
82 + dev-python/tldextract[${PYTHON_USEDEP}]
83 + )')"
84 +[[ ${PV} != 9999 ]] || BDEPEND+=" app-text/asciidoc"
85 +
86 +distutils_enable_tests pytest
87 +
88 +src_prepare() {
89 + distutils-r1_src_prepare
90 +
91 + if use widevine; then
92 + local widevine=${EPREFIX}/usr/$(get_libdir)/chromium-browser/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
93 + sed "/yield from _qtwebengine_settings_args/a\ yield '--widevine-path=${widevine}'" \
94 + -i ${PN}/config/qtargs.py || die
95 + fi
96 +
97 + # let eclass handle python
98 + sed -i '/setup.py/d' misc/Makefile || die
99 +
100 + [[ ${PV} != 9999 ]] || ${EPYTHON} scripts/asciidoc2html.py || die
101 +
102 + # these plugins/tests are unnecessary here and have extra dependencies
103 + sed -e '/pytest-benchmark/d;s/--benchmark[^ ]*//' \
104 + -e '/pytest-instafail/d;s/--instafail//' \
105 + -i pytest.ini || die
106 + [[ ${PV} == 9999 ]] || rm tests/unit/scripts/test_problemmatchers.py || die
107 + [[ ${PV} != 9999 ]] || rm tests/unit/scripts/test_run_vulture.py || die
108 +}
109 +
110 +python_test() {
111 + local EPYTEST_DESELECT=(
112 + # end2end and other IPC tests are broken with "Name error" if
113 + # socket path is over 104 characters (=124 in /var/tmp/portage)
114 + # https://github.com/qutebrowser/qutebrowser/issues/888 (not just OSX)
115 + tests/end2end
116 + tests/unit/misc/test_ipc.py
117 + # tests that don't know about our newer qtwebengine
118 + tests/unit/browser/webengine/test_webenginedownloads.py::TestDataUrlWorkaround
119 + tests/unit/utils/test_version.py::TestChromiumVersion
120 + # may misbehave depending on installed old python versions
121 + tests/unit/misc/test_checkpyver.py::test_old_python
122 + # bug 819393
123 + tests/unit/commands/test_userscripts.py::test_custom_env[_POSIXUserscriptRunner]
124 + )
125 + use widevine && EPYTEST_DESELECT+=( tests/unit/config/test_qtargs.py )
126 +
127 + # skip benchmarks (incl. _tree), and warning tests broken by -Wdefault
128 + epytest -k 'not _bench and not _matches_tree and not _warning'
129 +}
130 +
131 +python_install_all() {
132 + emake -f misc/Makefile DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
133 +
134 + rm "${ED}"/usr/share/${PN}/scripts/{mkvenv,utils}.py || die
135 + fperms -x /usr/share/${PN}/{scripts/cycle-inputs.js,userscripts/README.md}
136 + python_fix_shebang "${ED}"/usr/share/${PN}
137 +
138 + einstalldocs
139 +}
140 +
141 +pkg_postinst() {
142 + xdg_pkg_postinst
143 +
144 + optfeature "PDF display support" www-plugins/pdfjs
145 +
146 + if [[ ! ${REPLACING_VERSIONS} ]]; then
147 + elog "Note that optional scripts in ${EROOT}/usr/share/${PN}/{user,}scripts"
148 + elog "have additional dependencies not covered by this ebuild, for example"
149 + elog "view_in_mpv needs media-video/mpv[lua] and net-misc/yt-dlp."
150 + fi
151 +}