summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxantares2015-06-08 22:48:00 +0200
committerxantares2015-06-08 22:48:00 +0200
commit9a8379e2300d2078f0bf485e7c04c00620dff331 (patch)
tree4c9dd3872ef25242ea5ebf737dd9b445210bb4a6
downloadaur-9a8379e2300d2078f0bf485e7c04c00620dff331.tar.gz
Initial import
-rw-r--r--.SRCINFO33
-rw-r--r--PKGBUILD106
-rw-r--r--gdal-1-fixes.patch121
-rw-r--r--gdal-sqlite-3.8.7.patch17
4 files changed, 277 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..dd6bc540cf2c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = mingw-w64-gdal
+ pkgdesc = A translator library for raster geospatial data formats (mingw-w64)
+ pkgver = 1.11.2
+ pkgrel = 1
+ url = http://www.gdal.org/
+ arch = any
+ license = custom
+ makedepends = perl
+ makedepends = mingw-w64-configure
+ depends = mingw-w64-curl
+ depends = mingw-w64-jasper
+ depends = mingw-w64-giflib
+ depends = mingw-w64-hdf5
+ depends = mingw-w64-netcdf
+ depends = mingw-w64-libgeotiff
+ depends = mingw-w64-libfreexl
+ depends = mingw-w64-libjpeg
+ depends = mingw-w64-libpng
+ depends = mingw-w64-libtiff
+ depends = mingw-w64-sqlite
+ depends = mingw-w64-postgresql-libs
+ options = !buildflags
+ options = !strip
+ options = staticlibs
+ source = http://download.osgeo.org/gdal/1.11.2/gdal-1.11.2.tar.gz
+ source = gdal-sqlite-3.8.7.patch
+ source = gdal-1-fixes.patch
+ sha256sums = 66bc8192d24e314a66ed69285186d46e6999beb44fc97eeb9c76d82a117c0845
+ sha256sums = 2c1546f3303c27b5b9476192fd1f75fad0824380e711699ab09c2dd2f42d53c0
+ sha256sums = SKIP
+
+pkgname = mingw-w64-gdal
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..decfa13a2d8b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,106 @@
+
+pkgname=mingw-w64-gdal
+pkgver=1.11.2
+pkgrel=1
+pkgdesc="A translator library for raster geospatial data formats (mingw-w64)"
+arch=('any')
+url="http://www.gdal.org/"
+license=('custom')
+depends=('mingw-w64-curl' 'mingw-w64-jasper' 'mingw-w64-giflib' 'mingw-w64-hdf5' 'mingw-w64-netcdf' 'mingw-w64-libgeotiff' 'mingw-w64-libfreexl' 'mingw-w64-libjpeg' 'mingw-w64-libpng' 'mingw-w64-libtiff' 'mingw-w64-sqlite' 'mingw-w64-postgresql-libs')
+makedepends=('perl' 'mingw-w64-configure')
+options=('!buildflags' '!strip' 'staticlibs')
+source=("http://download.osgeo.org/gdal/${pkgver}/gdal-${pkgver}.tar.gz"
+ gdal-sqlite-3.8.7.patch gdal-1-fixes.patch)
+sha256sums=('66bc8192d24e314a66ed69285186d46e6999beb44fc97eeb9c76d82a117c0845'
+ '2c1546f3303c27b5b9476192fd1f75fad0824380e711699ab09c2dd2f42d53c0' SKIP)
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "${srcdir}"/gdal-$pkgver
+ patch -Np2 -i "${srcdir}"/gdal-sqlite-3.8.7.patch
+ patch -Np1 -i "${srcdir}"/gdal-1-fixes.patch
+ autoreconf -vi
+}
+
+build() {
+ cd "${srcdir}"
+ cd gdal-${pkgver}
+ for _arch in ${_architectures}; do
+ rm -rf build-${_arch}
+ mkdir -p build-${_arch}
+# && pushd build-${_arch}
+ cp aclocal.m4 autogen.sh COMMITERS config.guess config.sub configure configure.in Doxyfile GDALmake.opt.in build-${_arch}
+ cp gdalnightlysvn.sh gdal.pc.in GNUmakefile HOWTO-RELEASE install-sh LICENSE.TXT ltmain.sh makefile.vc makegdal_gen.bat build-${_arch}
+ cp MIGRATION_GUIDE.TXT mkbindist.sh mkgdaldist.sh mktestdist.sh NEWS nmake.opt nmake-wince.opt PROVENANCE.TXT build-${_arch}
+ cp submake.bat svnkeywords.sh update_copyright.py Vagrantfile VERSION build-${_arch}
+ cp -r alg apps bridge data doc frmts gcore html m4 man ogr port scripts swig vb6 wince build-${_arch}
+ pushd build-${_arch}
+ export LIBXML2_CONFIG=/usr/${_arch}/bin/xml2-config
+ export CURL_CONFIG=/usr/${_arch}/bin/curl-config
+ export PG_CONFIG=no
+ ${_arch}-configure \
+ --with-bsb \
+ --with-grib \
+ --with-ogr \
+ --with-pam \
+ --without-threads \
+ --with-static-proj4 \
+ --with-libz=/usr/${_arch} \
+ --with-png=/usr/${_arch} \
+ --with-geotiff=/usr/${_arch} \
+ --with-libtiff=/usr/${_arch} \
+ --with-jpeg=/usr/${_arch} \
+ --with-jasper=/usr/${_arch} \
+ --with-gif=/usr/${_arch} \
+ --with-expat=/usr/${_arch} \
+ --with-sqlite3=/usr/${_arch} \
+ --with-hdf5=/usr/${_arch} \
+ --with-libjson-c=/usr/${_arch} \
+ --with-netcdf=/usr/${_arch} \
+ --without-pg \
+ --with-geos=/usr/${_arch} \
+ --with-xml2=/usr/${_arch} \
+ --with-curl=/usr/${_arch} \
+ --without-odbc \
+ --without-xerces \
+ --without-grass \
+ --without-libgrass \
+ --without-spatialite \
+ --without-cfitsio \
+ --without-pcraster \
+ --without-pcidsk \
+ --without-ogdi \
+ --without-fme \
+ --without-ecw \
+ --without-kakadu \
+ --without-mrsid \
+ --without-jp2mrsid \
+ --without-msg \
+ --without-oci \
+ --without-mysql \
+ --without-ingres \
+ --without-dods-root \
+ --without-dwgdirect \
+ --without-idb \
+ --without-sde \
+ --without-epsilon \
+ --without-perl \
+ --without-php \
+ --without-ruby \
+ --without-python
+ make
+ popd
+ done
+}
+
+package () {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/gdal-${pkgver}/build-${_arch}"
+ make DESTDIR="${pkgdir}" install
+ rm "$pkgdir"/usr/${_arch}/bin/*.exe
+ rm "$pkgdir"/usr/${_arch}/share
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}
diff --git a/gdal-1-fixes.patch b/gdal-1-fixes.patch
new file mode 100644
index 000000000000..4544444acb41
--- /dev/null
+++ b/gdal-1-fixes.patch
@@ -0,0 +1,121 @@
+This file is part of MXE.
+See index.html for further information.
+
+From ffcbf5c48eb8d8ae6a1c20e1496f1866d7903af8 Mon Sep 17 00:00:00 2001
+From: Timothy Gu <timothygu99@gmail.com>
+Date: Sat, 18 Oct 2014 18:25:34 -0400
+Subject: [PATCH 1/2] Fix geos detection
+
+Signed-off-by: Timothy Gu <timothygu99@gmail.com>
+
+diff --git a/m4/geos.m4 b/m4/geos.m4
+index 386a2c8..cda1510 100644
+--- a/m4/geos.m4
++++ b/m4/geos.m4
+@@ -121,14 +121,14 @@ AC_DEFUN([GEOS_INIT],[
+
+ HAVE_GEOS="no"
+
+- GEOS_LIBS="`${GEOS_CONFIG} --ldflags` -lgeos_c"
++ GEOS_LIBS="`${GEOS_CONFIG} --clibs`"
+ GEOS_CFLAGS="`${GEOS_CONFIG} --cflags`"
+ GEOS_VERSION="`${GEOS_CONFIG} --version`"
+
+ ax_save_LIBS="${LIBS}"
+- LIBS=${GEOS_LIBS}
++ LIBS="${LIBS} ${GEOS_LIBS}"
+ ax_save_CFLAGS="${CFLAGS}"
+- CFLAGS="${GEOS_CFLAGS}"
++ CFLAGS="${CFLAGS} ${GEOS_CFLAGS}"
+
+ AC_CHECK_LIB([geos_c],
+ [GEOSversion],
+--
+1.9.1
+
+
+From 3c60ec35bec710dc9e8fd6f0606abb7646b4f8eb Mon Sep 17 00:00:00 2001
+From: Timothy Gu <timothygu99@gmail.com>
+Date: Sat, 18 Oct 2014 18:33:43 -0400
+Subject: [PATCH 2/2] Use AC_PATH_TOOL for config scripts
+
+Signed-off-by: Timothy Gu <timothygu99@gmail.com>
+
+diff --git a/configure.in b/configure.in
+index a0cf595..8ab4b5a 100644
+--- a/configure.in
++++ b/configure.in
+@@ -640,7 +640,7 @@ AC_ARG_WITH(pg,
+ [Include PostgreSQL GDAL/OGR Support (ARG=path to pg_config)]),,)
+
+ if test "x$with_pg" = "xyes" -o "x$with_pg" = "x" ; then
+- AC_PATH_PROG(PG_CONFIG, pg_config, no)
++ AC_PATH_TOOL(PG_CONFIG, pg_config, no)
+ else
+ PG_CONFIG=$with_pg
+ fi
+@@ -1719,10 +1719,10 @@ else
+ dnl find nc-config location
+ unset ac_cv_path_NETCDF_NCCONFIG
+ if test "$with_netcdf" = "yes" -o "$with_netcdf" = "" ; then
+- AC_PATH_PROG(NETCDF_NCCONFIG, nc-config, no)
++ AC_PATH_TOOL(NETCDF_NCCONFIG, nc-config, no)
+ else
+ tmp_path="$with_netcdf/bin$PATH_SEPARATOR$with_netcdf"
+- AC_PATH_PROG(NETCDF_NCCONFIG, nc-config, no, $tmp_path)
++ AC_PATH_TOOL(NETCDF_NCCONFIG, nc-config, no, $tmp_path)
+ fi
+
+ dnl test nc-config
+@@ -2447,7 +2447,7 @@ MYSQL_CONFIG=no
+ AC_ARG_WITH(mysql,[ --with-mysql[=ARG] Include MySQL (ARG=path to mysql_config) [[default=no]]],,)
+
+ if test "$with_mysql" = "yes" ; then
+- AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no)
++ AC_PATH_TOOL(MYSQL_CONFIG, mysql_config, no)
+ else
+ if test "x$with_mysql" != "x" ; then
+ MYSQL_CONFIG=$with_mysql
+@@ -2756,7 +2756,7 @@ if test "`basename xx/$with_curl`" = "curl-config" ; then
+ elif test "$with_curl" = "no" ; then
+ LIBCURL_CONFIG=no
+ else
+- AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no)
++ AC_PATH_TOOL(LIBCURL_CONFIG, curl-config, no)
+ fi
+
+ if test "$LIBCURL_CONFIG" != "no" ; then
+@@ -2798,7 +2798,7 @@ if test "`basename xx/$with_xml2`" = "xml2-config" ; then
+ elif test "$with_xml2" = "no" ; then
+ LIBXML2_CONFIG=no
+ else
+- AC_PATH_PROG(LIBXML2_CONFIG, xml2-config, no)
++ AC_PATH_TOOL(LIBXML2_CONFIG, xml2-config, no)
+ fi
+
+ if test "$LIBXML2_CONFIG" != "no" ; then
+diff --git a/m4/geos.m4 b/m4/geos.m4
+index cda1510..3fb4490 100644
+--- a/m4/geos.m4
++++ b/m4/geos.m4
+@@ -58,7 +58,7 @@ AC_DEFUN([GEOS_INIT],[
+
+ elif test x"$with_geos" = x"yes" -o x"$with_geos" = x"" ; then
+
+- AC_PATH_PROG(GEOS_CONFIG, geos-config, no)
++ AC_PATH_TOOL(GEOS_CONFIG, geos-config, no)
+ ac_geos_config_auto=yes
+
+ else
+@@ -133,7 +133,7 @@ AC_DEFUN([GEOS_INIT],[
+ AC_CHECK_LIB([geos_c],
+ [GEOSversion],
+ [HAVE_GEOS="yes"],
+- [HAVE_GEOS="no"],
++ [HAVE_GEOS="no" && echo "$GEOS_LIBS" && exit 1],
+ []
+ )
+
+--
+1.9.1
+
diff --git a/gdal-sqlite-3.8.7.patch b/gdal-sqlite-3.8.7.patch
new file mode 100644
index 000000000000..308cf7a95c1f
--- /dev/null
+++ b/gdal-sqlite-3.8.7.patch
@@ -0,0 +1,17 @@
+diff --git a/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp b/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp
+index a30b452..d45f3ff 100644
+--- a/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp
++++ b/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp
+@@ -2451,6 +2451,12 @@ int OGR2SQLITE_static_register (sqlite3 * hDB, char **pzErrMsg,
+ /* OGR2SQLITE_Register() */
+ /************************************************************************/
+
++#ifdef sqlite3_auto_extension
++// Sqlite 3.8.7 defines sqlite3_auto_extension via sqlite3_api
++// which is not initialized at this moment
++#undef sqlite3_auto_extension
++#endif
++
+ /* We call this function so that each time a db is created, */
+ /* OGR2SQLITE_static_register is called, to initialize the sqlite3_api */
+ /* structure with the right pointers. */