sci-geosciences/qgis: Fix USE=-python building
authorKalin KOZHUHAROV <me.kalin@gmail.com>
Sun, 22 Apr 2018 19:23:37 +0000 (21:23 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 22 Apr 2018 23:11:06 +0000 (01:11 +0200)
Closes: https://bugs.gentoo.org/653712
Closes: https://github.com/gentoo/gentoo/pull/8102

sci-geosciences/qgis/qgis-3.0.2.ebuild
sci-geosciences/qgis/qgis-9999.ebuild

index cc3eaaa70558cfde4da9f6045f34d388ae48bcfd..9c686b0dc1a51a45c9d534197e32e1281cf020f4 100644 (file)
@@ -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
 }
 
index cc3eaaa70558cfde4da9f6045f34d388ae48bcfd..9c686b0dc1a51a45c9d534197e32e1281cf020f4 100644 (file)
@@ -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
 }