commit:     3fc25a22193c3dc265c9dde733bd50d65dab29a9
Author:     Kalin KOZHUHAROV <me.kalin <AT> gmail <DOT> com>
AuthorDate: Sun Apr 22 19:23:37 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Apr 22 23:11:06 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fc25a22

sci-geosciences/qgis: Fix USE=-python building

Closes: https://bugs.gentoo.org/653712
Closes: https://github.com/gentoo/gentoo/pull/8102

 sci-geosciences/qgis/qgis-3.0.2.ebuild | 11 +++++++----
 sci-geosciences/qgis/qgis-9999.ebuild  | 11 +++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/sci-geosciences/qgis/qgis-3.0.2.ebuild 
b/sci-geosciences/qgis/qgis-3.0.2.ebuild
index cc3eaaa7055..9c686b0dc1a 100644
--- a/sci-geosciences/qgis/qgis-3.0.2.ebuild
+++ b/sci-geosciences/qgis/qgis-3.0.2.ebuild
@@ -26,6 +26,7 @@ SLOT="0"
 IUSE="3d examples georeferencer grass mapserver oracle polar postgres python 
webkit"
 
 REQUIRED_USE="
+       grass? ( python )
        mapserver? ( python )
        python? ( ${PYTHON_REQUIRED_USE} )"
 
@@ -104,7 +105,7 @@ PATCHES=(
 )
 
 pkg_setup() {
-       python-single-r1_pkg_setup
+       use python && python-single-r1_pkg_setup
 }
 
 src_prepare() {
@@ -185,10 +186,12 @@ src_install() {
                docompress -x /usr/share/doc/${PF}/examples
        fi
 
-       python_optimize "${ED%/}"/usr/share/qgis/python
+       if use python; then
+               python_optimize "${ED%/}"/usr/share/qgis/python
 
-       if use grass; then
-               python_fix_shebang "${ED%/}"/usr/share/qgis/grass/scripts
+               if use grass; then
+                       python_fix_shebang 
"${ED%/}"/usr/share/qgis/grass/scripts
+               fi
        fi
 }
 

diff --git a/sci-geosciences/qgis/qgis-9999.ebuild 
b/sci-geosciences/qgis/qgis-9999.ebuild
index cc3eaaa7055..9c686b0dc1a 100644
--- a/sci-geosciences/qgis/qgis-9999.ebuild
+++ b/sci-geosciences/qgis/qgis-9999.ebuild
@@ -26,6 +26,7 @@ SLOT="0"
 IUSE="3d examples georeferencer grass mapserver oracle polar postgres python 
webkit"
 
 REQUIRED_USE="
+       grass? ( python )
        mapserver? ( python )
        python? ( ${PYTHON_REQUIRED_USE} )"
 
@@ -104,7 +105,7 @@ PATCHES=(
 )
 
 pkg_setup() {
-       python-single-r1_pkg_setup
+       use python && python-single-r1_pkg_setup
 }
 
 src_prepare() {
@@ -185,10 +186,12 @@ src_install() {
                docompress -x /usr/share/doc/${PF}/examples
        fi
 
-       python_optimize "${ED%/}"/usr/share/qgis/python
+       if use python; then
+               python_optimize "${ED%/}"/usr/share/qgis/python
 
-       if use grass; then
-               python_fix_shebang "${ED%/}"/usr/share/qgis/grass/scripts
+               if use grass; then
+                       python_fix_shebang 
"${ED%/}"/usr/share/qgis/grass/scripts
+               fi
        fi
 }
 

Reply via email to