summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-geosciences/qgis/qgis-9999.ebuild')
-rw-r--r--sci-geosciences/qgis/qgis-9999.ebuild49
1 files changed, 46 insertions, 3 deletions
diff --git a/sci-geosciences/qgis/qgis-9999.ebuild b/sci-geosciences/qgis/qgis-9999.ebuild
index 12e8cd68f1e8..157d86c11aaf 100644
--- a/sci-geosciences/qgis/qgis-9999.ebuild
+++ b/sci-geosciences/qgis/qgis-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
PYTHON_COMPAT=( python3_{8,9,10} )
PYTHON_REQ_USE="sqlite"
@@ -28,6 +28,12 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE} mapserver? ( python )"
# Disabling test suite because upstream disallow running from install path
RESTRICT="test"
+# 3.22.5+ *does* support GRASS 8 but we can't enable it yet because of
+# https://github.com/OSGeo/grass/pull/2269 (=> unresolved SONAME dependencies)
+# Keep an eye on that bug / a fixed GRASS release and readd support
+# by unrestricting the dep in ${COMMON_DEPEND} once it's fixed!
+# (No need to change the supported GRASS versions in src_configure b/c
+# it won't find GRASS 8 with this dependency set.)
COMMON_DEPEND="
app-crypt/qca:2[qt5(+),ssl]
>=dev-db/spatialite-4.2.0
@@ -134,7 +140,6 @@ src_configure() {
-DENABLE_TESTS=OFF
-DWITH_3D=$(usex 3d)
-DWITH_GSL=$(usex georeferencer)
- -DWITH_GRASS7=$(usex grass)
$(cmake_use_find_package hdf5 HDF5)
-DWITH_SERVER=$(usex mapserver)
$(cmake_use_find_package netcdf NetCDF)
@@ -150,13 +155,51 @@ src_configure() {
-DWITH_QTWEBKIT=OFF
)
+ # We list all supported versions *by upstream for this version*
+ # here, even if we're not allowing it (e.g. bugs for now), so
+ # we enable/disable all the right versions. This is so qgis doesn't
+ # try to automatically use a version the build system knows about.
+ local supported_grass_versions=( 7 8 )
if use grass; then
+ # We can do this because we have a := dep on grass &
+ # it changes subslot (ABI) when major versions change, so
+ # the logic here doesn't end up becoming stale.
readarray -d'-' -t f <<<"$(best_version sci-geosciences/grass)"
readarray -d'.' -t v <<<"${f[2]}"
grassdir="grass${v[0]}${v[1]}"
GRASSDIR=/usr/$(get_libdir)/${grassdir}
- mycmakeargs+=( -DGRASS_PREFIX7=${GRASSDIR} )
+
+ einfo "Supported versions: ${supported_grass_versions[@]}"
+ einfo "Found GRASS version: ${v[0]}*"
+
+ local known_grass_version
+ # GRASS isn't slotted (in Gentoo, anyway) so we pick
+ # the best version we can to build against, and disable the others.
+ for known_grass_version in "${supported_grass_versions[@]}" ; do
+ case "${known_grass_version}" in
+ "${v[0]}")
+ einfo "GRASS version ${known_grass_version} is supported. Enabling."
+ mycmakeargs+=(
+ "-DGRASS_PREFIX${known_grass_version}=${GRASSDIR}"
+ "-DWITH_GRASS${known_grass_version}=ON"
+ )
+ ;;
+ *)
+ einfo "GRASS version ${known_grass_version} is not supported or not latest found. Disabling."
+ mycmakeargs+=(
+ "-DWITH_GRASS${known_grass_version}=OFF"
+ )
+ ;;
+ esac
+ done
+ else
+ local known_grass_version
+ for known_grass_version in "${supported_grass_versions[@]}" ; do
+ mycmakeargs+=(
+ "-DWITH_GRASS${known_grass_version}=OFF"
+ )
+ done
fi
use python && mycmakeargs+=( -DBINDINGS_GLOBAL_INSTALL=ON ) ||