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/PyQtWebEngine-5.12[${PYTHON_USEDEP},widgets]
35 >=dev-python/pyyaml-3.12[${PYTHON_USEDEP},libyaml]
38 # Tests restricted as the deplist (misc/requirements/requirements-tests.txt)
39 # isn't complete and X11 is required in order to start up qutebrowser.
42 python_compile_all() {
43 if [[ ${PV} == "9999" ]]; then
44 "${PYTHON}" scripts/asciidoc2html.py || die "Failed generating docs"
47 a2x -f manpage doc/${PN}.1.asciidoc || die "Failed generating man page"
51 py.test tests || die "Tests failed with ${EPYTHON}"
54 python_install_all() {
56 domenu misc/${PN}.desktop
57 doicon -s scalable icons/${PN}.svg
60 # Install only those userscripts that have an explicit license header
61 exeinto /usr/share/qutebrowser/userscripts/
62 doexe misc/userscripts/dmenu_qutebrowser
63 doexe misc/userscripts/openfeeds
64 doexe misc/userscripts/qute-keepass
65 doexe misc/userscripts/qute-pass
66 doexe misc/userscripts/rss
67 doexe misc/userscripts/tor_identity
70 distutils-r1_python_install_all
74 optfeature "PDF display support" www-plugins/pdfjs
75 xdg_desktop_database_update
76 xdg_mimeinfo_database_update
77 gnome2_icon_cache_update
81 xdg_desktop_database_update
82 xdg_mimeinfo_database_update
83 gnome2_icon_cache_update