summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Mayo <aklhfex@gmail.com>2020-01-10 19:38:40 +0000
committerAndreas Sturmlechner <asturm@gentoo.org>2020-01-29 22:32:36 +0100
commit1ae8b7c7c3790f0a866e57eb44b06a8c014c3c51 (patch)
tree5100e783151f60e7b0bdbba64036036e58c61be7 /sci-libs/gdal
parentdev-db/mariadb: Version bump for 10.2.31 (diff)
downloadgentoo-1ae8b7c7c3790f0a866e57eb44b06a8c014c3c51.tar.gz
gentoo-1ae8b7c7c3790f0a866e57eb44b06a8c014c3c51.tar.bz2
gentoo-1ae8b7c7c3790f0a866e57eb44b06a8c014c3c51.zip
sci-libs/gdal: version bump 3.0.2
Bug: https://bugs.gentoo.org/686732 Package-Manager: Portage-2.3.79, Repoman-2.3.16 Signed-off-by: Chris Mayo <aklhfex@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/14061 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'sci-libs/gdal')
-rw-r--r--sci-libs/gdal/Manifest1
-rw-r--r--sci-libs/gdal/files/gdal-3.0.2-complete.patch84
-rw-r--r--sci-libs/gdal/files/gdal-3.0.2-datadir.patch69
-rw-r--r--sci-libs/gdal/gdal-3.0.2.ebuild305
4 files changed, 459 insertions, 0 deletions
diff --git a/sci-libs/gdal/Manifest b/sci-libs/gdal/Manifest
index a3f4832ec81..06a7010fbf8 100644
--- a/sci-libs/gdal/Manifest
+++ b/sci-libs/gdal/Manifest
@@ -1,2 +1,3 @@
DIST gdal-2.4.1.tar.gz 14546610 BLAKE2B 92404336339c6f46877f3e6599af6fc67a53714888ff66fc0142efa8ddf185ad34d9ec337dcbad67f059041da31e70073a9e41872a7332fd9977552d79fcbc61 SHA512 b25e49f343986af6f37e0bec6dc3084cbcf1a0080da5cfd91d1a58c1d9ffd2ac355299d66534e63e89358cbb15ecd0f2ae934d91bbd2a3749889dadaf266e483
DIST gdal-2.4.3.tar.gz 14726748 BLAKE2B 104c29912a96b03d0913be40f91a844b2f04f1e972b1ae8764bd277e7d51960b45d4a67a8f9240130de7ce8752f69f4172ca9a54bb11e70635aa55b6c6924cb5 SHA512 e532ce86c92724300ab443c42dd8cec0e74e41411a54d30222f98faa10623b31e616eda44da8f406ed01f3fc3c72c76e8ceb80c1dff733f8efcaa2e2e18132f6
+DIST gdal-3.0.2.tar.gz 14348856 BLAKE2B a52b3c5f1177b85ca991fd5dd27e4238a6ff066fa28842ffbddea8617a3f897d9525035a1cf9237365dbc4657037b3eb0a740cd0e65fe4c83b0c76ffe23c0e56 SHA512 eb35e28106f2f422fd5021261ef44864574f6a6be23e679cc5ae44be910f978769fc24fa15367ad4058fb3170cdd2985a6c4caedc3510dde8a6d163091cf3ab0
diff --git a/sci-libs/gdal/files/gdal-3.0.2-complete.patch b/sci-libs/gdal/files/gdal-3.0.2-complete.patch
new file mode 100644
index 00000000000..5d6716c7280
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-3.0.2-complete.patch
@@ -0,0 +1,84 @@
+diff --git a/GDALmake.opt.in b/GDALmake.opt.in
+index fd8e8f374d..655c004c56 100644
+--- a/GDALmake.opt.in
++++ b/GDALmake.opt.in
+@@ -63,6 +63,7 @@ INST_INCLUDE = @includedir@
+ INST_DATA = @datadir@
+ INST_LIB = @libdir@
+ INST_BIN = @bindir@
++INST_BASH_COMPLETION = @bashcompdir@
+ INST_PYMOD = @pymoddir@
+ INST_DOCS = @exec_prefix@/doc
+ INST_MAN = @mandir@
+diff --git a/GNUmakefile b/GNUmakefile
+index 92467d6cf6..6d5e7d9fc0 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -229,7 +229,9 @@ endif
+ ifneq ($(BINDINGS),)
+ (cd swig; $(MAKE) install)
+ endif
++ifdef INST_BASH_COMPLETION
+ (cd scripts; $(MAKE) install)
++endif
+ for f in LICENSE.TXT data/*.* ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_DATA) ; done
+ $(LIBTOOL_FINISH) $(DESTDIR)$(INST_LIB)
+ $(INSTALL_DIR) $(DESTDIR)$(INST_LIB)/pkgconfig
+diff --git a/configure.ac b/configure.ac
+index 93ddca84d9..5d0e7ab8be 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1187,6 +1187,24 @@ if test "$am_func_iconv" = "yes"; then
+ AC_DEFINE_UNQUOTED(ICONV_CPP_CONST,$ICONV_CPP_CONST, [For.cpp files, define as const if the declaration of iconv() needs const.])
+ fi
+
++dnl ---------------------------------------------------------------------------
++dnl Bash completions
++dnl ---------------------------------------------------------------------------
++
++AC_ARG_WITH([bash-completion],
++ AS_HELP_STRING([--with-bash-completion[=ARG]],
++ [Install Bash completions (ARG=yes or path)]),,)
++
++if test "x$with_bash_completion" = "xno" -o "x$with_bash_completion" = "x"; then
++ AC_MSG_NOTICE([Bash completions not requested])
++elif test "x$with_bash_completion" = "xyes"; then
++ PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], ,
++ bashcompdir="${sysconfdir}/bash_completion.d")
++ AC_SUBST(bashcompdir)
++else
++ AC_SUBST(bashcompdir, $with_bash_completion)
++fi
++
+ dnl ---------------------------------------------------------------------------
+ dnl PROJ.6 related stuff
+ dnl ---------------------------------------------------------------------------
+diff --git a/scripts/GNUmakefile b/scripts/GNUmakefile
+index 8f039e469a..511fbb499c 100644
+--- a/scripts/GNUmakefile
++++ b/scripts/GNUmakefile
+@@ -1,10 +1,20 @@
+ include ../GDALmake.opt
+
++PROGRAMS := gdal2tiles.py gdal2xyz.py gdaladdo gdalbuildvrt gdal_calc.py \
++ gdalchksum.py gdalcompare.py gdal-config gdal_contour gdaldem \
++ gdal_edit.py gdalenhance gdal_fillnodata.py gdal_grid \
++ gdalident.py gdalimport.py gdallocationinfo gdalmanage \
++ gdal_merge.py gdalmove.py gdal_polygonize.py gdal_proximity.py \
++ gdal_rasterize gdal_retile.py gdalserver gdal_sieve.py \
++ gdalsrsinfo gdaltindex gdaltransform gdal_translate gdalwarp \
++ ogr2ogr ogrinfo ogrlineref ogrmerge.py ogrtindex
++
+ completion:
+ PATH=$(GDAL_ROOT)/swig/python/scripts:$(GDAL_ROOT)/apps:$(PATH) python completionFinder.py gdal-bash-completion.sh
+
+ install:
+- if test "x`pkg-config --version 2>/dev/null`" != "x" -a "x`pkg-config --variable=compatdir bash-completion`" != "x"; then \
+- $(INSTALL_DIR) $(DESTDIR)${prefix}`pkg-config --variable=compatdir bash-completion` ; \
+- cp gdal-bash-completion.sh $(DESTDIR)${prefix}`pkg-config --variable=compatdir bash-completion`; \
+- fi
++ $(INSTALL_DIR) $(DESTDIR)$(INST_BASH_COMPLETION) ; \
++ $(INSTALL_DATA) gdal-bash-completion.sh $(DESTDIR)$(INST_BASH_COMPLETION)/gdalinfo; \
++ for p in $(PROGRAMS); do \
++ ln -rs $(DESTDIR)$(INST_BASH_COMPLETION)/gdalinfo $(DESTDIR)$(INST_BASH_COMPLETION)/$$p; \
++ done
diff --git a/sci-libs/gdal/files/gdal-3.0.2-datadir.patch b/sci-libs/gdal/files/gdal-3.0.2-datadir.patch
new file mode 100644
index 00000000000..95c525ca1b8
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-3.0.2-datadir.patch
@@ -0,0 +1,69 @@
+diff --git a/gdal/GDALmake.opt.in b/gdal/GDALmake.opt.in
+index 655c004c56..7d8f3708d6 100644
+--- a/GDALmake.opt.in
++++ b/GDALmake.opt.in
+@@ -56,18 +56,23 @@ GNM_ENABLED = @GNM_ENABLED@
+ OSX_FRAMEWORK_PREFIX = /Library/Frameworks/GDAL.framework
+ OSX_VERSION_FRAMEWORK_PREFIX = ${OSX_FRAMEWORK_PREFIX}/Versions/@GDAL_VERSION_MAJOR@.@GDAL_VERSION_MINOR@
+
++PACKAGE = @PACKAGE@
++
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
++datarootdir = @datarootdir@
++docdir = @docdir@
++htmldir = @htmldir@
+ INST_PREFIX = @exec_prefix@
+ INST_INCLUDE = @includedir@
+-INST_DATA = @datadir@
++INST_DATA = @datadir@/gdal
+ INST_LIB = @libdir@
+ INST_BIN = @bindir@
+ INST_BASH_COMPLETION = @bashcompdir@
+ INST_PYMOD = @pymoddir@
+-INST_DOCS = @exec_prefix@/doc
++INST_DOCS = @htmldir@
+ INST_MAN = @mandir@
+-INST_HTML = $(HOME)/www/gdal
++INST_WEB = $(HOME)/www/gdal
+
+ CPPFLAGS := @CPPFLAGS@ -I$(GDAL_ROOT)/port @EXTRA_INCLUDES@ -DGDAL_COMPILATION
+ CFLAGS = @CFLAGS@ @C_WFLAGS@ $(USER_DEFS)
+diff --git a/gdal/configure.ac b/gdal/configure.ac
+index 5d0e7ab8be..afef88fdbd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,6 +33,7 @@ define([AC_CACHE_SAVE], )
+
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(GDALmake.opt.in)
++AC_SUBST(PACKAGE, gdal)
+ AC_CONFIG_MACRO_DIR(m4)
+ AC_CONFIG_HEADERS([port/cpl_config.h:port/cpl_config.h.in])
+ AH_BOTTOM([#include "cpl_config_extras.h"])
+@@ -5167,25 +5168,6 @@ export BINTRUE
+
+ AC_SUBST(BINTRUE,$BINTRUE)
+
+-dnl ---------------------------------------------------------------------------
+-dnl If datadir is set to @prefix@/share, the modify it to be
+-dnl @prefix@/share/gdal. I wish we could default this.
+-dnl ---------------------------------------------------------------------------
+-if test "$datadir" = '${prefix}/share' ; then
+- datadir='${prefix}/share/gdal'
+-fi
+-
+-if test "$datadir" = '${datarootdir}' \
+- -a "$datarootdir" = '${prefix}/share' ; then
+- datarootdir='${prefix}/share/gdal'
+-fi
+-
+-dnl ---------------------------------------------------------------------------
+-dnl By default mandir is $datarootdir/man which would be
+-dnl /usr/local/share/gdal/man but we want man pages in /usr/local/man.
+-dnl ---------------------------------------------------------------------------
+-mandir='${prefix}/man'
+-
+ dnl ---------------------------------------------------------------------------
+ dnl Capture GDAL_PREFIX for the cpl_config.h include file.
+ dnl ---------------------------------------------------------------------------
diff --git a/sci-libs/gdal/gdal-3.0.2.ebuild b/sci-libs/gdal/gdal-3.0.2.ebuild
new file mode 100644
index 00000000000..bfeb01ef6ac
--- /dev/null
+++ b/sci-libs/gdal/gdal-3.0.2.ebuild
@@ -0,0 +1,305 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+GENTOO_DEPEND_ON_PERL="no"
+PYTHON_COMPAT=( python3_{6,7,8} )
+DISTUTILS_OPTIONAL=1
+inherit autotools bash-completion-r1 perl-module distutils-r1 flag-o-matic java-pkg-opt-2 toolchain-funcs
+
+DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
+HOMEPAGE="https://gdal.org/"
+SRC_URI="https://download.osgeo.org/${PN}/${PV}/${P}.tar.gz"
+
+SLOT="0/2.3"
+LICENSE="BSD Info-ZIP MIT"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="armadillo +aux-xml curl debug doc fits geos gif gml hdf5 java jpeg jpeg2k lzma mdb mysql netcdf odbc ogdi opencl oracle pdf perl png postgres python spatialite sqlite threads webp xls zstd"
+
+REQUIRED_USE="
+ mdb? ( java )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ spatialite? ( sqlite )
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ java? (
+ dev-java/ant-core
+ dev-lang/swig:0
+ >=virtual/jdk-1.7:*
+ )
+ perl? ( dev-lang/swig:0 )
+ python? (
+ dev-lang/swig:0
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )"
+
+DEPEND="
+ dev-libs/expat
+ dev-libs/json-c:=
+ dev-libs/libpcre
+ dev-libs/libxml2:=
+ media-libs/tiff:0=
+ >=sci-libs/libgeotiff-1.5.1-r1:=
+ >=sci-libs/proj-6.0.0
+ sys-libs/zlib:=[minizip(+)]
+ armadillo? ( sci-libs/armadillo:=[lapack] )
+ curl? ( net-misc/curl )
+ fits? ( sci-libs/cfitsio:= )
+ geos? ( >=sci-libs/geos-3.8.0 )
+ gif? ( media-libs/giflib:= )
+ gml? ( >=dev-libs/xerces-c-3.1 )
+ hdf5? ( >=sci-libs/hdf5-1.6.4:=[szip] )
+ jpeg? ( virtual/jpeg:0= )
+ jpeg2k? ( media-libs/openjpeg:2= )
+ lzma? ( || (
+ app-arch/xz-utils
+ app-arch/lzma
+ ) )
+ mdb? ( dev-java/jackcess:1 )
+ mysql? ( virtual/mysql )
+ netcdf? ( sci-libs/netcdf:= )
+ odbc? ( dev-db/unixODBC )
+ ogdi? ( sci-libs/ogdi )
+ opencl? ( virtual/opencl )
+ oracle? ( dev-db/oracle-instantclient:= )
+ pdf? ( app-text/poppler:= )
+ perl? ( dev-lang/perl:= )
+ png? ( media-libs/libpng:0= )
+ postgres? ( >=dev-db/postgresql-8.4:= )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ )
+ spatialite? ( dev-db/spatialite )
+ sqlite? ( dev-db/sqlite:3 )
+ webp? ( media-libs/libwebp:= )
+ xls? ( dev-libs/freexl )
+ zstd? ( app-arch/zstd:= )"
+
+RDEPEND="${DEPEND}
+ java? ( >=virtual/jre-1.7:* )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.2.3-soname.patch"
+ "${FILESDIR}/${PN}-2.3.0-curl.patch" # bug 659840
+ "${FILESDIR}"/${PN}-2.4.1-poppler-0.83-{1,2}.patch # bug 703790
+ "${FILESDIR}/${PN}-3.0.2-complete.patch"
+ "${FILESDIR}/${PN}-3.0.2-datadir.patch"
+)
+
+src_prepare() {
+ default
+
+ sed -e "s: /usr/: \"${EPREFIX}\"/usr/:g" \
+ -i configure.ac || die
+
+ sed -e 's:^ar:$(AR):g' \
+ -i ogr/ogrsf_frmts/sdts/install-libs.sh || die
+
+ # SWIG: Use of the include path to find the input file is deprecated and will not work with ccache.
+ sed -e "s: gdal_array.i: ../include/gdal_array.i:" \
+ -i swig/python/GNUmakefile || die "sed python makefile failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ # bug 619148
+ append-cxxflags -std=c++14
+
+ local myconf=(
+ # charls - not packaged in Gentoo ebuild repository
+ # kakadu, mrsid jp2mrsid - another jpeg2k stuff, ignore
+ # bsb - legal issues
+ # ingres - same story as oracle oci
+ # jasper - disabled because unmaintained and vulnerable; openjpeg will be used as JPEG-2000 provider instead
+ # podofo - we use poppler instead they are exclusive for each other
+ # tiff is a hard dep
+ --includedir="${EPREFIX}"/usr/include/${PN}
+ --disable-lto
+ --disable-static
+ --disable-driver-bsb
+ --disable-driver-mrf
+ --disable-pdf-plugin
+ --enable-shared
+ --enable-driver-grib
+ --with-bash-completion="$(get_bashcompdir)"
+ --with-cryptopp=no
+ --with-expat
+ --with-geotiff
+ --with-gnm
+ --with-hide-internal-symbols
+ --with-libjson-c="${EPREFIX}"/usr/
+ --with-libtiff
+ --with-libtool
+ --with-libz="${EPREFIX}"/usr/
+ --without-charls
+ --without-dods-root
+ --without-ecw
+ --without-epsilon
+ --without-fgdb
+ --without-fme
+ --without-gta
+ --without-grass
+ --without-hdf4
+ --without-idb
+ --without-ingres
+ --without-jasper
+ --without-jp2lura
+ --without-jp2mrsid
+ --without-kakadu
+ --without-kea
+ --without-libkml
+ --without-mongocxx
+ --without-mrsid
+ --without-mrsid_lidar
+ --without-msg
+ --without-rasdaman
+ --without-rasterlite2
+ --without-pcraster
+ --without-pdfium
+ --without-perl
+ --without-podofo
+ --without-python
+ --without-qhull
+ --without-sde
+ --without-sfcgal
+ --without-sosi
+ --without-teigha
+ $(use_enable debug)
+ $(use_with armadillo)
+ $(use_with aux-xml pam)
+ $(use_with curl)
+ $(use_with fits cfitsio)
+ $(use_with geos)
+ $(use_with gif)
+ $(use_with gml xerces)
+ $(use_with hdf5)
+ $(use_with jpeg pcidsk) # pcidsk is internal, because there is no such library released developer by gdal
+ $(use_with jpeg)
+ $(use_with jpeg2k openjpeg)
+ $(use_with lzma liblzma)
+ $(use_with mysql mysql "${EPREFIX}"/usr/bin/mysql_config)
+ $(use_with netcdf)
+ $(use_with oracle oci)
+ $(use_with odbc)
+ $(use_with ogdi ogdi "${EPREFIX}"/usr)
+ $(use_with opencl)
+ $(use_with pdf poppler)
+ $(use_with png)
+ $(use_with postgres pg)
+ $(use_with spatialite)
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with threads)
+ $(use_with webp)
+ $(use_with xls freexl)
+ $(use_with zstd)
+ )
+
+ tc-export AR RANLIB
+
+ if use java; then
+ myconf+=(
+ --with-java=$(java-config --jdk-home 2>/dev/null)
+ --with-jvm-lib=dlopen
+ $(use_with mdb)
+ )
+ else
+ myconf+=( --without-java --without-mdb )
+ fi
+
+ if use sqlite; then
+ append-libs -lsqlite3
+ fi
+
+ # bug #632660
+ if use ogdi; then
+ tc-export PKG_CONFIG
+ append-cflags $(${PKG_CONFIG} --cflags libtirpc)
+ append-cxxflags $(${PKG_CONFIG} --cflags libtirpc)
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # mysql-config puts this in (and boy is it a PITA to get it out)
+ if use mysql; then
+ sed -e "s: -rdynamic : :" \
+ -i GDALmake.opt || die "sed LIBS failed"
+ fi
+}
+
+src_compile() {
+ if use perl; then
+ rm "${S}"/swig/perl/*_wrap.cpp || die
+ emake -C "${S}"/swig/perl generate
+ fi
+
+ # gdal-config needed before generating Python bindings
+ default
+
+ if use java; then
+ pushd "${S}"/swig/java > /dev/null || die
+ emake
+ popd > /dev/null || die
+ fi
+
+ if use perl; then
+ pushd "${S}"/swig/perl > /dev/null || die
+ perl-module_src_configure
+ perl-module_src_compile
+ popd > /dev/null || die
+ fi
+
+ if use python; then
+ rm -f "${S}"/swig/python/*_wrap.cpp || die
+ emake -C "${S}"/swig/python generate
+ pushd "${S}"/swig/python > /dev/null || die
+ distutils-r1_src_compile
+ popd > /dev/null || die
+ fi
+
+ use doc && emake docs
+}
+
+src_install() {
+ local DOCS=( NEWS )
+ use doc && HTML_DOCS=( html/. )
+
+ default
+
+ use java && java-pkg_dojar "${S}"/swig/java/gdal.jar
+
+ if use perl; then
+ pushd "${S}"/swig/perl > /dev/null || die
+ myinst=( DESTDIR="${D}" )
+ perl-module_src_install
+ popd > /dev/null || die
+ perl_delete_localpod
+ fi
+
+ if use python; then
+ # Don't clash with gdal's docs
+ unset DOCS HTML_DOCS
+
+ pushd "${S}"/swig/python > /dev/null || die
+ distutils-r1_src_install
+ popd > /dev/null || die
+
+ newdoc swig/python/README.rst README-python.rst
+
+ insinto /usr/share/${PN}/samples
+ doins -r swig/python/samples/.
+ fi
+
+ doman "${S}"/man/man*/*
+ find "${D}" -name '*.la' -type f -delete || die
+}
+
+pkg_postinst() {
+ elog "Check available image and data formats after building with"
+ elog "gdalinfo and ogrinfo (using the --formats switch)."
+}