diff options
author | Sam James <sam@gentoo.org> | 2022-03-20 02:43:08 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-03-20 03:23:26 +0000 |
commit | 6dfc79c76daecabfe0c69870c86e57aa361d1743 (patch) | |
tree | 91b6d596140056ea4086f203bfbf0d59131826e3 /sci-geosciences/qgis | |
parent | app-metrics/elasticsearch_exporter: drop 1.1.0 (diff) | |
download | gentoo-6dfc79c76daecabfe0c69870c86e57aa361d1743.tar.gz gentoo-6dfc79c76daecabfe0c69870c86e57aa361d1743.tar.bz2 gentoo-6dfc79c76daecabfe0c69870c86e57aa361d1743.zip |
sci-geosciences/qgis: add 3.22.5
Almost supports GRASS 8, but not yet, due to a bug in GRASS.
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.)
Bug: https://github.com/OSGeo/grass/pull/2269
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-geosciences/qgis')
-rw-r--r-- | sci-geosciences/qgis/Manifest | 1 | ||||
-rw-r--r-- | sci-geosciences/qgis/files/qgis-3.22.5-install-grass8-scripts.patch | 17 | ||||
-rw-r--r-- | sci-geosciences/qgis/qgis-3.22.5.ebuild | 254 | ||||
-rw-r--r-- | sci-geosciences/qgis/qgis-9999.ebuild | 49 |
4 files changed, 318 insertions, 3 deletions
diff --git a/sci-geosciences/qgis/Manifest b/sci-geosciences/qgis/Manifest index 9e380ed22b73..11bc127abd83 100644 --- a/sci-geosciences/qgis/Manifest +++ b/sci-geosciences/qgis/Manifest @@ -4,4 +4,5 @@ DIST qgis-3.22.1.tar.bz2 136772144 BLAKE2B ba3a5d9db2a487ff10800da0ab12de4b6d3c1 DIST qgis-3.22.2.tar.bz2 136903329 BLAKE2B b1991944c05a9035dc91ea3fcc252a43da435199cb37c8a03647666f15dfd2367f2990bdddb2a124559993405ff61b4a110e6fa31da10d33411e24b756b9eb30 SHA512 6d893217d54483018ab5de06cc11da5da3faf24fb863da57a608429a75f3e1c4647dd809ae1bc0a7034e28296a116c8ebcb528b4886b2714e75654415b2f4c74 DIST qgis-3.22.3.tar.bz2 136876983 BLAKE2B 3b57af74829ca35802a09a8d83f4638ccd4d56674151d45e81f0d2af5544a6d59f20c3a68e5508f5bb5e32f5e98bf7f64f2c9f2d72e09a5137be63e4cbcaa1c0 SHA512 8918ee725f4f8d12c4cab009c446e137513b931583bf843356238122e22267211fffee9fd20382fbcb9b613be6d7af22bc0250d9e166ba53dd621e827aafda28 DIST qgis-3.22.4.tar.bz2 137701974 BLAKE2B f1e7c35ace59b427a29c96eb6304c2e03ef6ad5304832d679f4a51fcca2c4868bd68058aa224be82e0cdef7b4f44fa310daa51e8c207c16de90b4e6536935f54 SHA512 423ba679618876fd4e3d308ad47903b47bfe758e78c01160e9d490121a863b83f5a60f6210fbfea090fb6dac9e42749d2b92777fa2756938bb6ab41fe75377e5 +DIST qgis-3.22.5.tar.bz2 137731586 BLAKE2B d5cad96ca7fadab58e2f680493469496d8c5e06141ac646a09cc1f5fa607b860a0e15e5b6257debb9e787d294d2183bd0b007e96e839aca7e9fb87d81001edd7 SHA512 d47bcd743a0c621b3a5a90923d98844056260f396e683b0874625e341cdf84d075505e909130cfc473fc550de37bc078fc5ebb54b437e582572d930e12411dcb DIST qgis_sample_data-2.8.14.tar.gz 22119181 BLAKE2B 2d0565e91ec8119382bc9ab8e262dc04227fe8289146794891759ff5a32012245270614ba1119a6329fc45cf56852830c2079589309aa3467873f71f5c608eac SHA512 6b2653d5b57ffc2c2317639dac212429840984ac917ca3e452b39aabb99ea106d1a77c1c1dd967244ef16ede9deae751b170affdf08b72239eafed5b8977da3d diff --git a/sci-geosciences/qgis/files/qgis-3.22.5-install-grass8-scripts.patch b/sci-geosciences/qgis/files/qgis-3.22.5-install-grass8-scripts.patch new file mode 100644 index 000000000000..5c801f23fe8c --- /dev/null +++ b/sci-geosciences/qgis/files/qgis-3.22.5-install-grass8-scripts.patch @@ -0,0 +1,17 @@ +https://github.com/qgis/QGIS/pull/47881 +https://github.com/qgis/QGIS/pull/47456 +https://github.com/qgis/QGIS/pull/47456/commits/84e574dcc043e03bb1682d1dfc5bd3b9fbf87b3d + +From 84e574dcc043e03bb1682d1dfc5bd3b9fbf87b3d Mon Sep 17 00:00:00 2001 +From: Bas Couwenberg <sebastic@xs4all.nl> +Date: Fri, 18 Mar 2022 18:04:01 +0100 +Subject: [PATCH] Also install scripts for GRASS 8. + +--- a/src/plugins/grass/scripts/CMakeLists.txt ++++ b/src/plugins/grass/scripts/CMakeLists.txt +@@ -1,4 +1,4 @@ +-if (GRASS_NUM_VERSION6 GREATER 60300 OR GRASS_NUM_VERSION7 GREATER 60300) ++if (GRASS_NUM_VERSION6 GREATER 60300 OR GRASS_NUM_VERSION7 GREATER 60300 OR GRASS_NUM_VERSION8 GREATER 60300) + file (GLOB MODULE_FILES *.py ) + install (FILES ${MODULE_FILES} + DESTINATION ${QGIS_DATA_DIR}/grass/scripts diff --git a/sci-geosciences/qgis/qgis-3.22.5.ebuild b/sci-geosciences/qgis/qgis-3.22.5.ebuild new file mode 100644 index 000000000000..7aca973d344b --- /dev/null +++ b/sci-geosciences/qgis/qgis-3.22.5.ebuild @@ -0,0 +1,254 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8,9,10} ) +PYTHON_REQ_USE="sqlite" + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/${PN}/${PN^^}.git" + inherit git-r3 +else + SRC_URI="https://qgis.org/downloads/${P}.tar.bz2 + examples? ( https://qgis.org/downloads/data/qgis_sample_data.tar.gz -> qgis_sample_data-2.8.14.tar.gz )" + KEYWORDS="~amd64 ~x86" +fi +inherit cmake python-single-r1 xdg + +DESCRIPTION="User friendly Geographic Information System" +HOMEPAGE="https://www.qgis.org/" + +LICENSE="GPL-2+ GPL-3+" +SLOT="0" +IUSE="3d examples georeferencer grass hdf5 mapserver netcdf opencl oracle pdal polar postgres python qml serial" + +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 + dev-db/sqlite:3 + dev-libs/expat + dev-libs/libzip:= + dev-libs/protobuf:= + dev-libs/qtkeychain[qt5(+)] + dev-qt/designer:5 + dev-qt/qtconcurrent:5 + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5[ssl] + dev-qt/qtpositioning:5 + dev-qt/qtprintsupport:5 + dev-qt/qtsvg:5 + dev-qt/qtsql:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + media-gfx/exiv2:= + >=sci-libs/gdal-3.0.4:=[geos] + sci-libs/geos + sci-libs/libspatialindex:= + sys-libs/zlib + >=sci-libs/proj-4.9.3:= + >=x11-libs/qscintilla-2.10.1:=[qt5(+)] + >=x11-libs/qwt-6.1.2:6=[qt5(+),svg] + 3d? ( dev-qt/qt3d:5 ) + georeferencer? ( sci-libs/gsl:= ) + grass? ( =sci-geosciences/grass-7*:= ) + hdf5? ( sci-libs/hdf5:= ) + mapserver? ( dev-libs/fcgi ) + netcdf? ( sci-libs/netcdf:= ) + opencl? ( virtual/opencl ) + oracle? ( + dev-db/oracle-instantclient:= + sci-libs/gdal:=[oracle] + ) + pdal? ( sci-libs/pdal:= ) + polar? ( >=x11-libs/qwtpolar-1.1.1-r1[qt5(+)] ) + postgres? ( dev-db/postgresql:= ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/future[${PYTHON_USEDEP}] + dev-python/httplib2[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/markupsafe[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/owslib[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + dev-python/PyQt5[designer,gui,network,positioning,printsupport,sql,svg,widgets,${PYTHON_USEDEP}] + dev-python/python-dateutil[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + >=dev-python/qscintilla-python-2.10.1[qt5(+),${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + <dev-python/sip-5:=[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + >=sci-libs/gdal-2.2.3[python,${PYTHON_USEDEP}] + postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] ) + ') + ) + qml? ( dev-qt/qtdeclarative:5 ) + serial? ( dev-qt/qtserialport:5 ) +" +DEPEND="${COMMON_DEPEND} + dev-qt/qttest:5 + python? ( ${PYTHON_DEPS} ) +" +RDEPEND="${COMMON_DEPEND} + sci-geosciences/gpsbabel +" +BDEPEND=" + ${PYTHON_DEPS} + dev-qt/linguist-tools:5 + sys-devel/bison + sys-devel/flex +" + +PATCHES=( + "${FILESDIR}"/${P}-install-grass8-scripts.patch +) + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_prepare() { + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DQGIS_MANUAL_SUBDIR=share/man/ + -DQGIS_LIB_SUBDIR=$(get_libdir) + -DQGIS_PLUGIN_SUBDIR=$(get_libdir)/qgis + -DQWT_INCLUDE_DIR=/usr/include/qwt6 + -DQWT_LIBRARY=/usr/$(get_libdir)/libqwt6-qt5.so + -DQGIS_QML_SUBDIR=/usr/$(get_libdir)/qt5/qml + -DPEDANTIC=OFF + -DUSE_CCACHE=OFF + -DWITH_ANALYSIS=ON + -DWITH_APIDOC=OFF + -DWITH_GUI=ON + -DWITH_INTERNAL_MDAL=ON # not packaged, bug 684538 + -DWITH_QSPATIALITE=ON + -DENABLE_TESTS=OFF + -DWITH_3D=$(usex 3d) + -DWITH_GSL=$(usex georeferencer) + $(cmake_use_find_package hdf5 HDF5) + -DWITH_SERVER=$(usex mapserver) + $(cmake_use_find_package netcdf NetCDF) + -DUSE_OPENCL=$(usex opencl) + -DWITH_ORACLE=$(usex oracle) + -DWITH_QWTPOLAR=$(usex polar) + -DWITH_PDAL=$(usex pdal) + -DWITH_POSTGRESQL=$(usex postgres) + -DWITH_BINDINGS=$(usex python) + -DWITH_CUSTOM_WIDGETS=$(usex python) + -DWITH_QUICK=$(usex qml) + -DWITH_QT5SERIALPORT=$(usex serial) + -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} + + 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 ) || + mycmakeargs+=( -DWITH_QGIS_PROCESS=OFF ) # FIXME upstream issue #39973 + + # bugs 612956, 648726 + addpredict /dev/dri/renderD128 + addpredict /dev/dri/renderD129 + + cmake_src_configure +} + +src_install() { + cmake_src_install + + insinto /usr/share/mime/packages + doins debian/qgis.xml + + if use examples; then + docinto examples + dodoc -r "${WORKDIR}"/qgis_sample_data/. + docompress -x /usr/share/doc/${PF}/examples + fi + + if use python; then + python_optimize + python_optimize "${ED}"/usr/share/qgis/python + fi + + if use grass; then + python_fix_shebang "${ED}"/usr/share/qgis/grass/scripts + fi +} + +pkg_postinst() { + if use postgres; then + elog "If you don't intend to use an external PostGIS server" + elog "you should install:" + elog " dev-db/postgis" + elif use python; then + elog "Support of PostgreSQL is disabled." + elog "But some installed python-plugins import the psycopg2 module." + elog "If you do not need these plugins just disable them" + elog "in the Plugins menu, else you need to set USE=\"postgres\"" + fi + + xdg_pkg_postinst +} 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 ) || |