From 584363263d25451302b85e28135bbff231d21479 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sat, 18 Oct 2014 18:52:10 -0400 Subject: gdal: Fix library detection Also add libxml2 support Signed-off-by: Timothy Gu --- src/gdal-1-fixes.patch | 121 +++++++++++++++++++++++++++++++++++++++++++++++++ src/gdal.mk | 8 ++-- 2 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 src/gdal-1-fixes.patch diff --git a/src/gdal-1-fixes.patch b/src/gdal-1-fixes.patch new file mode 100644 index 0000000..4544444 --- /dev/null +++ b/src/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 +Date: Sat, 18 Oct 2014 18:25:34 -0400 +Subject: [PATCH 1/2] Fix geos detection + +Signed-off-by: Timothy Gu + +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 +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 + +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/src/gdal.mk b/src/gdal.mk index 60c75fe..689b04f 100644 --- a/src/gdal.mk +++ b/src/gdal.mk @@ -9,7 +9,9 @@ $(PKG)_SUBDIR := gdal-$($(PKG)_VERSION) $(PKG)_FILE := gdal-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://download.osgeo.org/gdal/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_URL_2 := ftp://ftp.remotesensing.org/gdal/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc proj zlib libpng tiff libgeotiff jpeg jasper giflib expat sqlite curl geos postgresql gta hdf4 hdf5 json-c netcdf +$(PKG)_DEPS := gcc proj zlib libpng libxml2 tiff libgeotiff jpeg jasper \ + giflib expat sqlite curl geos postgresql gta hdf4 hdf5 \ + json-c netcdf define $(PKG)_UPDATE $(WGET) -q -O- 'http://trac.osgeo.org/gdal/wiki/DownloadSource' | \ @@ -18,6 +20,7 @@ define $(PKG)_UPDATE endef define $(PKG)_CONFIGURE + cd '$(1)' && autoreconf -fi # The option '--without-threads' means native win32 threading without pthread. cd '$(1)' && ./configure \ --host='$(TARGET)' \ @@ -40,9 +43,6 @@ define $(PKG)_CONFIGURE --with-gif='$(PREFIX)/$(TARGET)' \ --with-expat='$(PREFIX)/$(TARGET)' \ --with-sqlite3='$(PREFIX)/$(TARGET)' \ - --with-curl='$(PREFIX)/bin/$(TARGET)-curl-config' \ - --with-geos='$(PREFIX)/bin/$(TARGET)-geos-config' \ - --with-pg='$(PREFIX)/bin/$(TARGET)-pg_config' \ --with-gta='$(PREFIX)/$(TARGET)' \ --with-hdf5='$(PREFIX)/$(TARGET)' \ --with-libjson-c='$(PREFIX)/$(TARGET)' \ -- cgit v0.12