www-client/qutebrowser: Add scripts use flag
authorMaximilian Friedersdorff <max@friedersdorff.com>
Thu, 14 Feb 2019 10:55:15 +0000 (10:55 +0000)
committerJustin Bronder <jsbronder@gentoo.org>
Mon, 11 Mar 2019 14:10:24 +0000 (10:10 -0400)
Closes: https://bugs.gentoo.org/622980
Package-Manager: Portage-2.3.60, Repoman-2.3.12
Signed-off-by: Maximilian Friedersdorff <max@friedersdorff.com>
Signed-off-by: Justin Bronder <jsbronder@gentoo.org>
www-client/qutebrowser/metadata.xml
www-client/qutebrowser/qutebrowser-1.5.2-r1.ebuild
www-client/qutebrowser/qutebrowser-1.6.0.ebuild
www-client/qutebrowser/qutebrowser-9999.ebuild

index 7623d04971cf79b75625954e12e7d55866cde793..3c4b9436adf904ed6e986245f0644df1e21623f7 100644 (file)
@@ -12,4 +12,8 @@
        <upstream>
                <remote-id type="github">qutebrowser/qutebrowser</remote-id>
        </upstream>
+       <use>
+               <flag name="scripts">Installs userscripts from the misc/userscripts
+                       directory to /usr/share/qutebrowser/userscripts.</flag>
+       </use>
 </pkgmetadata>
index 9870584a71be3858149d22d9c06d2334d4a95702..a464d065fdc3fcd53099f05686cd36845c0cd5cd 100644 (file)
@@ -19,7 +19,7 @@ HOMEPAGE="https://www.qutebrowser.org/ https://github.com/qutebrowser/qutebrowse
 
 LICENSE="GPL-3"
 SLOT="0"
-IUSE="test"
+IUSE="scripts test"
 
 COMMON_DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 DEPEND="${COMMON_DEPEND}
@@ -55,6 +55,17 @@ python_install_all() {
        domenu misc/${PN}.desktop
        doicon -s scalable icons/${PN}.svg
 
+       if use scripts; then
+               # Install only those userscripts that have an explicit license header
+               exeinto /usr/share/qutebrowser/userscripts/
+               doexe misc/userscripts/dmenu_qutebrowser
+               doexe misc/userscripts/openfeeds
+               doexe misc/userscripts/qute-keepass
+               doexe misc/userscripts/qute-pass
+               doexe misc/userscripts/rss
+               doexe misc/userscripts/tor_identity
+       fi
+
        distutils-r1_python_install_all
 }
 
index 9870584a71be3858149d22d9c06d2334d4a95702..a464d065fdc3fcd53099f05686cd36845c0cd5cd 100644 (file)
@@ -19,7 +19,7 @@ HOMEPAGE="https://www.qutebrowser.org/ https://github.com/qutebrowser/qutebrowse
 
 LICENSE="GPL-3"
 SLOT="0"
-IUSE="test"
+IUSE="scripts test"
 
 COMMON_DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 DEPEND="${COMMON_DEPEND}
@@ -55,6 +55,17 @@ python_install_all() {
        domenu misc/${PN}.desktop
        doicon -s scalable icons/${PN}.svg
 
+       if use scripts; then
+               # Install only those userscripts that have an explicit license header
+               exeinto /usr/share/qutebrowser/userscripts/
+               doexe misc/userscripts/dmenu_qutebrowser
+               doexe misc/userscripts/openfeeds
+               doexe misc/userscripts/qute-keepass
+               doexe misc/userscripts/qute-pass
+               doexe misc/userscripts/rss
+               doexe misc/userscripts/tor_identity
+       fi
+
        distutils-r1_python_install_all
 }
 
index 106757922792d6298eca953a132cd286ca47c4ac..67471c02f62935346d7f4188d36a8a7d74848f98 100644 (file)
@@ -19,7 +19,7 @@ HOMEPAGE="https://www.qutebrowser.org/ https://github.com/qutebrowser/qutebrowse
 
 LICENSE="GPL-3"
 SLOT="0"
-IUSE="test"
+IUSE="scripts test"
 
 COMMON_DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 DEPEND="${COMMON_DEPEND}
@@ -55,6 +55,17 @@ python_install_all() {
        domenu misc/org.${PN}.${PN}.desktop
        doicon -s scalable icons/${PN}.svg
 
+       if use scripts; then
+               # Install only those userscripts that have an explicit license header
+               exeinto /usr/share/qutebrowser/userscripts/
+               doexe misc/userscripts/dmenu_qutebrowser
+               doexe misc/userscripts/openfeeds
+               doexe misc/userscripts/qute-keepass
+               doexe misc/userscripts/qute-pass
+               doexe misc/userscripts/rss
+               doexe misc/userscripts/tor_identity
+       fi
+
        distutils-r1_python_install_all
 }