1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python{3_5,3_6} )
7 inherit distutils-r1 eutils gnome2-utils xdg-utils
9 if [[ ${PV} == "9999" ]] ; then
10 EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
13 SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
14 KEYWORDS="~amd64 ~x86"
17 DESCRIPTION="A keyboard-driven, vim-like browser based on PyQt5 and QtWebEngine"
18 HOMEPAGE="https://www.qutebrowser.org/ https://github.com/qutebrowser/qutebrowser"
24 COMMON_DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
25 DEPEND="${COMMON_DEPEND}
27 test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
28 RDEPEND="${COMMON_DEPEND}
29 dev-python/attrs[${PYTHON_USEDEP}]
30 >=dev-python/jinja-2.8[${PYTHON_USEDEP}]
31 >=dev-python/pygments-2.1.3[${PYTHON_USEDEP}]
32 >=dev-python/pypeg2-2.15.2[${PYTHON_USEDEP}]
33 >=dev-python/PyQt5-5.12_pre[${PYTHON_USEDEP},declarative,multimedia,gui,network,opengl,printsupport,sql,widgets]
34 >=dev-python/pyyaml-3.12[${PYTHON_USEDEP},libyaml]
37 # Tests restricted as the deplist (misc/requirements/requirements-tests.txt)
38 # isn't complete and X11 is required in order to start up qutebrowser.
41 python_compile_all() {
42 if [[ ${PV} == "9999" ]]; then
43 "${PYTHON}" scripts/asciidoc2html.py || die "Failed generating docs"
46 a2x -f manpage doc/${PN}.1.asciidoc || die "Failed generating man page"
50 py.test tests || die "Tests failed with ${EPYTHON}"
53 python_install_all() {
55 domenu misc/${PN}.desktop
56 doicon -s scalable icons/${PN}.svg
59 # Install only those userscripts that have an explicit license header
60 exeinto /usr/share/qutebrowser/userscripts/
61 doexe misc/userscripts/dmenu_qutebrowser
62 doexe misc/userscripts/openfeeds
63 doexe misc/userscripts/qute-keepass
64 doexe misc/userscripts/qute-pass
65 doexe misc/userscripts/rss
66 doexe misc/userscripts/tor_identity
69 distutils-r1_python_install_all
73 optfeature "PDF display support" www-plugins/pdfjs
74 xdg_desktop_database_update
75 xdg_mimeinfo_database_update
76 gnome2_icon_cache_update
80 xdg_desktop_database_update
81 xdg_mimeinfo_database_update
82 gnome2_icon_cache_update