sci-geosciences/qgis: Always depend on python
authorAndreas Sturmlechner <asturm@gentoo.org>
Sun, 24 Jun 2018 10:48:54 +0000 (12:48 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 24 Jun 2018 13:18:02 +0000 (15:18 +0200)
Reported-by: Sławomir Nizio <slawomir.nizio@sabayon.org>
Thanks-to: Kalin KOZHUHAROV <kalin@ThinRope.net>
Closes: https://bugs.gentoo.org/658250
Package-Manager: Portage-2.3.40, Repoman-2.3.9

sci-geosciences/qgis/qgis-9999.ebuild

index 0b888637f800effc91cc0e0866657039d0e49d81..a64e21fa38a943e2269f41c20b377245b19d6fe3 100644 (file)
@@ -25,10 +25,7 @@ LICENSE="GPL-2+ GPL-3+"
 SLOT="0"
 IUSE="3d examples georeferencer grass mapserver oracle polar postgres python webkit"
 
-REQUIRED_USE="
-       grass? ( python )
-       mapserver? ( python )
-       python? ( ${PYTHON_REQUIRED_USE} )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE} mapserver? ( python )"
 
 COMMON_DEPEND="
        app-crypt/qca:2[qt5(+),ssl]
@@ -48,7 +45,7 @@ COMMON_DEPEND="
        >=dev-qt/qtsql-${QT_MIN_VER}:5
        >=dev-qt/qtwidgets-${QT_MIN_VER}:5
        >=dev-qt/qtxml-${QT_MIN_VER}:5
-       >=sci-libs/gdal-2.2.3:=[geos,python?,${PYTHON_USEDEP}]
+       >=sci-libs/gdal-2.2.3:=[geos]
        sci-libs/geos
        sci-libs/libspatialindex:=
        sci-libs/proj
@@ -64,7 +61,8 @@ COMMON_DEPEND="
        )
        polar? ( >=x11-libs/qwtpolar-1.1.1-r1[qt5(+)] )
        postgres? ( dev-db/postgresql:= )
-       python? ( ${PYTHON_DEPS}
+       python? (
+               ${PYTHON_DEPS}
                dev-python/future[${PYTHON_USEDEP}]
                dev-python/httplib2[${PYTHON_USEDEP}]
                dev-python/jinja[${PYTHON_USEDEP}]
@@ -79,6 +77,7 @@ COMMON_DEPEND="
                dev-python/requests[${PYTHON_USEDEP}]
                dev-python/sip:=[${PYTHON_USEDEP}]
                dev-python/six[${PYTHON_USEDEP}]
+               >=sci-libs/gdal-2.2.3[python,${PYTHON_USEDEP}]
                postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] )
        )
        webkit? ( >=dev-qt/qtwebkit-5.9.1:5 )
@@ -89,6 +88,7 @@ DEPEND="${COMMON_DEPEND}
        >=dev-qt/qtxmlpatterns-${QT_MIN_VER}:5
        sys-devel/bison
        sys-devel/flex
+       python? ( ${PYTHON_DEPS} )
 "
 RDEPEND="${COMMON_DEPEND}
        sci-geosciences/gpsbabel
@@ -105,7 +105,7 @@ PATCHES=(
 )
 
 pkg_setup() {
-       use python && python-single-r1_pkg_setup
+       python-single-r1_pkg_setup
 }
 
 src_prepare() {
@@ -187,10 +187,10 @@ src_install() {
 
        if use python; then
                python_optimize "${ED%/}"/usr/share/qgis/python
+       fi
 
-               if use grass; then
-                       python_fix_shebang "${ED%/}"/usr/share/qgis/grass/scripts
-               fi
+       if use grass; then
+               python_fix_shebang "${ED%/}"/usr/share/qgis/grass/scripts
        fi
 }