sci-geosciences/gdal-grass: 2.1.3 version bump, EAPI-7 bump
authorAndreas Sturmlechner <asturm@gentoo.org>
Thu, 21 Feb 2019 10:23:07 +0000 (11:23 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Thu, 21 Feb 2019 10:29:10 +0000 (11:29 +0100)
Detect grass libdir correctly based on version built against.
Drop bogus DEPENDs - someone has been wrongly using ldd in the past.

Closes: https://bugs.gentoo.org/616952
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
sci-geosciences/gdal-grass/Manifest
sci-geosciences/gdal-grass/gdal-grass-2.1.3.ebuild [new file with mode: 0644]

index 4f0d34f25a15805b08d68d33814ff15cc2d599d4..2a77e7222853f5b156137b3427f8ddd52906b670 100644 (file)
@@ -1,2 +1,3 @@
 DIST gdal-grass-2.0.0.tar.gz 56286 BLAKE2B 191402442bc3c16f3d07f538b9eae266e75c74efbecb235dc11cb3529e4758fc8354ab5e65ec4a8805595c6f1209d70e5f76a7006d546eb3d2e8f9e4966842ff SHA512 cefa60773c2acd5c1627b896e3298d02f51979c12f70ce67b88c0b886a13de2f62821a3d3e50984f5c676ef37819c685795949b06db57004a0edf8039e898d7e
 DIST gdal-grass-2.1.0.tar.gz 54299 BLAKE2B 09b9a408584618cefcc989feebc75431ae3efed2c9f6504e65ccf28bbc02a6e5125cb049accece7fd598aeef0bb1d5cb572067fc5a764a49c99627132d650f65 SHA512 fb06b71839849de413f68beb8f2cd1c2273cc48b5205fe1b255ffc4976f8f913b4b226eba186a24f5b40fe5fbb1ceeab760d06915222e4a4b269a6fbc7bc9417
+DIST gdal-grass-2.1.3.tar.gz 54478 BLAKE2B 172200d8362b12583f0f73316b8c6d34875682c9d76c095745152c8d4fd1da1d9d1e94df5928225f6fda5712e987379c7c3192fa81d02b9cee9145fb577faee1 SHA512 c11776f92e591f1c0136e439ab6c672015171c5b750cb9332c73b49b3173c1d57efb4854b152a1d8e1b438c68a1130b4a46a189e1be0b99af9a8fb931f246e39
diff --git a/sci-geosciences/gdal-grass/gdal-grass-2.1.3.ebuild b/sci-geosciences/gdal-grass/gdal-grass-2.1.3.ebuild
new file mode 100644 (file)
index 0000000..745a05f
--- /dev/null
@@ -0,0 +1,49 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="GDAL plugin to access GRASS data"
+HOMEPAGE="https://www.gdal.org/"
+SRC_URI="https://download.osgeo.org/gdal/${PV}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MIT"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="postgres"
+RDEPEND="
+       >=sci-libs/gdal-2.0.0:=
+       sci-geosciences/grass:=
+"
+DEPEND="${RDEPEND}
+       postgres? ( dev-db/postgresql )"
+
+# these drivers are copied at install from the already installed GRASS
+QA_PREBUILT="/usr/share/gdal/grass/driver/db/*"
+
+src_prepare() {
+       sed -e 's:mkdir ${GRASSTABLES_DIR}$:mkdir -p ${GRASSTABLES_DIR}:' \
+               -i Makefile.in || die
+       default
+}
+
+src_configure() {
+       local grassp=$(best_version sci-geosciences/grass)
+       local grasspv=$(echo ${grassp/%-r[0-9]*/} | rev | cut -d - -f 1 | rev)
+       local grasspm=$(ver_cut 1-2 ${grasspv})
+       local myeconfargs=(
+               --with-grass="/usr/$(get_libdir)/grass$(ver_rs 1 '' ${grasspm})"
+               --with-gdal="/usr/bin/gdal-config"
+               $(use_with postgres postgres-includes "/usr/include/postgresql")
+       )
+       econf "${myeconfargs[@]}"
+}
+
+src_install() {
+       #pass the right variables to 'make install' to prevent a sandbox access violation
+       emake DESTDIR="${D}" \
+               GRASSTABLES_DIR="${D}$(gdal-config --prefix)/share/gdal/grass" \
+               AUTOLOAD_DIR="${D}/usr/$(get_libdir)/gdalplugins" \
+               install
+}