Merge pull request #1926 from tonytheodore/gis-new

GIS related packages - New and updated
This commit is contained in:
Tony Theodore 2017-10-10 15:42:17 +11:00 committed by GitHub
commit 2dafc4dc61
21 changed files with 475 additions and 202 deletions

View File

@ -2,8 +2,8 @@
PKG := make-w32-bin
$(PKG)_IGNORE :=
$(PKG)_VERSION := 4.2
$(PKG)_CHECKSUM := 6cab11301e601996ab0cb7b3b903e5a55d5bd795614946cf6bd025cd61c710c6
$(PKG)_VERSION := 4.2.1
$(PKG)_CHECKSUM := 30641be9602712be76212b99df7209f4f8f518ba764cf564262bc9d6e4047cc7
$(PKG)_SUBDIR := .
$(PKG)_FILE := make-$($(PKG)_VERSION)-without-guile-w32-bin.zip
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/ezwinports/$($(PKG)_FILE)

View File

@ -4,8 +4,8 @@ PKG := armadillo
$(PKG)_WEBSITE := https://arma.sourceforge.io/
$(PKG)_DESCR := Armadillo C++ linear algebra library
$(PKG)_IGNORE :=
$(PKG)_VERSION := 7.800.1
$(PKG)_CHECKSUM := 5ada65a5a610301ae188bb34f0ac6e7fdafbdbcd0450b0adb7715349ae14b8db
$(PKG)_VERSION := 7.960.1
$(PKG)_CHECKSUM := 57de6b9eb547f168e5dd2d2736c75b609bb2d1761120f608ff6530d7247082ff
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/arma/$($(PKG)_FILE)

21
src/freexl-1-fixes.patch Normal file
View File

@ -0,0 +1,21 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Luke Potgieter <fried.roadkill+ght@gmail.com>
Date: Mon, 2 Oct 2017 15:32:20 +0200
Subject: [PATCH] Add static dependency to .pc file
diff --git a/freexl.pc.in b/freexl.pc.in
index 1111111..2222222 100644
--- a/freexl.pc.in
+++ b/freexl.pc.in
@@ -8,5 +8,5 @@ includedir=@includedir@
Name: freexl
Description: a simple library extracting data from .xls (Excel BIFF) files
Version: @VERSION@
-Libs: -L${libdir} -lfreexl -lm
+Libs: -L${libdir} -lfreexl -liconv -lm
Cflags: -I${includedir}

39
src/freexl.mk Normal file
View File

@ -0,0 +1,39 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := freexl
$(PKG)_WEBSITE := https://www.gaia-gis.it/fossil/freexl/index
$(PKG)_DESCR := FreeXL
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.0.3
$(PKG)_CHECKSUM := f8ed29e03a6155454e538fce621e53991a270fcee31120ded339cff2523650a8
$(PKG)_SUBDIR := freexl-$($(PKG)_VERSION)
$(PKG)_FILE := freexl-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://www.gaia-gis.it/gaia-sins/freexl-sources/$($(PKG)_FILE)
$(PKG)_DEPS := gcc libiconv
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://www.gaia-gis.it/gaia-sins/freexl-sources/' | \
$(SED) -n 's,.*freexl-\([0-9][^>]*\)\.tar.*,\1,p' | \
tail -1
endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS)
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS)
$(MAKE) -C '$(BUILD_DIR)' -j 1 $(INSTALL_STRIP_LIB)
# the test program comes from the freexl sources itself (test_xl.c)
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(SOURCE_DIR)/examples/test_xl.c' -o '$(PREFIX)/$(TARGET)/bin/test-freexl.exe' \
`'$(TARGET)-pkg-config' $(PKG) --cflags --libs`
# create a batch file to run the test program (as the test program requires arguments)
(printf 'REM Run the test program against the provided .xls file.\r\n'; \
printf 'test-freexl.exe test-freexl.xls\r\n';) \
> '$(PREFIX)/$(TARGET)/bin/test-freexl.bat'
# copy a test xls file to the target bin directory
cp -f '$(SOURCE_DIR)/tests/testdata/testcase1.xls' '$(PREFIX)/$(TARGET)/bin/test-freexl.xls'
endef

View File

@ -3,17 +3,57 @@ This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MXE
Date: Sat, 18 Oct 2014 18:25:34 -0400
Subject: [PATCH 1/2] Fix geos detection
From: Luke Potgieter <fried.roadkill+ght@gmail.com>
Date: Tue, 29 Aug 2017 16:31:09 +0200
Subject: [PATCH] Detect spatialite more effectively than just checking for
headers in the system paths. PostgreSQL detection requires -lpthread when
building statically.
diff --git a/configure.ac b/configure.ac
index 1111111..2222222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1124,7 +1124,7 @@ else
AC_MSG_RESULT([yes])
- AC_CHECK_LIB(pq,PQconnectdb,HAVE_PG=yes,HAVE_PG=no,-L`$PG_CONFIG --libdir`)
+ AC_CHECK_LIB(pq,PQconnectdb,HAVE_PG=yes,HAVE_PG=no,-L`$PG_CONFIG --libdir` -lpthread)
if test "${HAVE_PG}" = "yes" ; then
LIBS=-L`$PG_CONFIG --libdir`" -lpq $LIBS"
@@ -3532,16 +3544,21 @@ AC_ARG_WITH(spatialite-soname,
HAVE_SPATIALITE=no
SPATIALITE_AMALGAMATION=no
+HAVE_SPAT_PKG=no
if test -z "$with_spatialite" -o "$with_spatialite" = "no"; then
AC_MSG_RESULT(disabled)
elif test "$with_spatialite" = "yes"; then
AC_CHECK_HEADERS(sqlite3.h)
if test "$ac_cv_header_sqlite3_h" = "yes"; then
- AC_MSG_CHECKING([for spatialite.h in /usr/include or /usr/local/include])
- if test -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then
- AC_MSG_RESULT(found)
+ #AC_MSG_CHECKING([for spatialite.h in /usr/include or /usr/local/include])
+ #if test -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then
+ PKG_CHECK_MODULES(SPATIALITE, spatialite, [HAVE_SPAT_PKG=yes], [HAVE_SPAT_PKG=no])
+ if test "$HAVE_SPAT_PKG" = "yes"; then
+ OLD_LIBS="$LIBS"
+ LIBS="$LIBS -lsqlite3 -lspatialite -lgeos_c -lgeos -lxml2 -liconv -llzma -lproj -lstdc++ -lws2_32 -lm -lz"
AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,)
+ LIBS="$OLD_LIBS"
if test "$SPATIALITE_INIT_FOUND" = "yes"; then
HAVE_SPATIALITE=yes
SPATIALITE_LIBS="-lspatialite -lsqlite3"
diff --git a/m4/geos.m4 b/m4/geos.m4
index 1111111..2222222 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"
@ -31,93 +71,23 @@ index 1111111..2222222 100644
AC_CHECK_LIB([geos_c],
[GEOSversion],
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MXE
Date: Tue, 5 Jul 2016 22:23:16 +0300
Subject: [PATCH 2/2] Use AC_PATH_TOOL for config scripts
From: Luke Potgieter <fried.roadkill+ght@gmail.com>
Date: Tue, 26 Sep 2017 14:56:19 +0200
Subject: [PATCH] Use the new proj dll version number for the latest proj.
diff --git a/configure.in b/configure.in
diff --git a/ogr/ogrct.cpp b/ogr/ogrct.cpp
index 1111111..2222222 100644
--- a/configure.in
+++ b/configure.in
@@ -866,7 +866,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
@@ -2016,7 +2016,7 @@ KEA_CONFIG=no
AC_ARG_WITH(kea,[ --with-kea[=ARG] Include kealib (ARG=path to kea-config) [[default=yes]]],,)
if test "$with_kea" = "yes" -o "x$with_kea" = "x" ; then
- AC_PATH_PROG(KEA_CONFIG, kea-config, no)
+ AC_PATH_TOOL(KEA_CONFIG, kea-config, no)
else
KEA_CONFIG=$with_kea
fi
@@ -2079,10 +2079,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
@@ -2832,7 +2832,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
@@ -3162,7 +3162,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
@@ -3204,7 +3204,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 1111111..2222222 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],
[]
)
--- a/ogr/ogrct.cpp
+++ b/ogr/ogrct.cpp
@@ -96,9 +96,9 @@ static bool bProjLocaleSafe = false;
// build) it can be named either way, so use PROJSO environment variable to
// specify the right library name. By default assume that in Cygwin/MinGW all
// components were built in the same way.
-# define LIBNAME "libproj-9.dll"
+# define LIBNAME "libproj-12.dll"
#elif defined(__CYGWIN__)
-# define LIBNAME "cygproj-9.dll"
+# define LIBNAME "cygproj-12.dll"
#elif defined(__APPLE__)
# define LIBNAME "libproj.dylib"
#else

View File

@ -4,15 +4,15 @@ PKG := gdal
$(PKG)_WEBSITE := http://www.gdal.org/
$(PKG)_DESCR := GDAL
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.1.3
$(PKG)_CHECKSUM := ae6a0a0dc6eb45a981a46db27e3dfe16c644fcf04732557e2cb315776974074a
$(PKG)_VERSION := 2.2.2
$(PKG)_CHECKSUM := 14c1f78a60f429ad51c08d75cbf49771f1e6b20e7385c6e8379b40e8dfa39544
$(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 armadillo curl expat geos giflib gta hdf4 hdf5 \
jpeg json-c libgeotiff libmysqlclient libpng libxml2 \
netcdf openjpeg postgresql proj sqlite tiff zlib
netcdf openjpeg postgresql proj sqlite tiff zlib spatialite
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://trac.osgeo.org/gdal/wiki/DownloadSource' | \
@ -60,7 +60,6 @@ define $(PKG)_BUILD
--with-oci=no \
--with-odbc=no \
--with-ogdi=no \
--with-ogr \
--with-openjpeg='$(PREFIX)/$(TARGET)' \
--with-pam \
--with-pcidsk=no \
@ -69,15 +68,15 @@ define $(PKG)_BUILD
--with-php=no \
--with-png='$(PREFIX)/$(TARGET)' \
--with-python=no \
--with-ruby=no \
--with-sde=no \
--with-spatialite=no \
--with-spatialite=yes \
--with-sqlite3='$(PREFIX)/$(TARGET)' \
--with-threads=no \
--with-xerces=no \
--with-xml2='$(PREFIX)/$(TARGET)/bin/xml2-config' \
--with-pg='$(PREFIX)/$(TARGET)/bin/pg_config' \
CXXFLAGS='-D_WIN32_WINNT=0x0600' \
LIBS="-ljpeg -lsecur32 -lportablexdr `'$(TARGET)-pkg-config' --libs openssl libtiff-4`"
LIBS="-ljpeg -lsecur32 -lportablexdr `'$(TARGET)-pkg-config' --libs openssl libtiff-4 spatialite freexl armadillo`"
$(MAKE) -C '$(1)' -j '$(JOBS)' lib-target
# gdal doesn't have an install-strip target

View File

@ -1,48 +1,21 @@
This file is part of MXE. See LICENSE.md for licensing information.
From 7966e3a9768f3db85fd93f8e4334ef6b58f0fb92 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Sat, 18 Oct 2014 17:28:27 -0400
Subject: [PATCH 1/2] geos-config: Fix linking to libm and libstdc++ for static
Contains ad hoc patches for cross building.
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Luke Potgieter <fried.roadkill+ght@gmail.com>
Date: Mon, 7 Aug 2017 15:24:32 +0200
Subject: [PATCH] Always link as static (based on the previous patch by Timothy Gu)
diff --git a/tools/geos-config.in b/tools/geos-config.in
index 9b45b5f..f521772 100644
index 1111111..2222222 100644
--- a/tools/geos-config.in
+++ b/tools/geos-config.in
@@ -52,10 +52,10 @@ case $1 in
echo -L${libdir} -lgeos
;;
--static-clibs)
- echo -L${libdir} -lgeos_c -lgeos -m
+ echo -L${libdir} -lgeos_c -lgeos -lstdc++ -lm
;;
--static-cclibs)
- echo -L${libdir} -lgeos -m
+ echo -L${libdir} -lgeos -lstdc++ -lm
;;
--ldflags)
echo -L${libdir}
--
1.9.1
From 22befe6776025838d876c6f36a789f2ba467fbb6 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Sat, 18 Oct 2014 17:29:24 -0400
Subject: [PATCH 2/2] [MXE] geos-config: Always link as static
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
diff --git a/tools/geos-config.in b/tools/geos-config.in
index f521772..4c9a72b 100644
--- a/tools/geos-config.in
+++ b/tools/geos-config.in
@@ -40,21 +40,21 @@ case $1 in
@@ -39,33 +39,22 @@ case $1 in
;;
--cflags)
echo -I${prefix}/include
;;
- ;;
- --libs)
- # TODO: make an alias for --clibs
- # see http://trac.osgeo.org/geos/ticket/497
@ -55,25 +28,32 @@ index f521772..4c9a72b 100644
- echo -L${libdir} -lgeos
- ;;
- --static-clibs)
+# --libs)
+# # TODO: make an alias for --clibs
+# # see http://trac.osgeo.org/geos/ticket/497
+# echo -L${libdir} -lgeos
+# ;;
+# --clibs)
+# echo -L${libdir} -lgeos_c
+# ;;
+# --cclibs)
+# echo -L${libdir} -lgeos
+# ;;
+ --clibs|--static-clibs)
echo -L${libdir} -lgeos_c -lgeos -lstdc++ -lm
;;
- echo -L${libdir} -lgeos_c -lgeos -lm
- ;;
- --static-cclibs)
- echo -L${libdir} -lgeos -lm
- ;;
+ ;;
+ --clibs|--static-clibs)
+ echo -L${libdir} -lgeos_c -lgeos -lstdc++ -lm
+ ;;
+ --libs|--cclibs|--static-cclibs)
echo -L${libdir} -lgeos -lstdc++ -lm
;;
+ echo -L${libdir} -lgeos -lstdc++ -lm
+ ;;
--ldflags)
--
1.9.1
- echo -L${libdir}
- ;;
+ echo -L${libdir}
+ ;;
--includes)
- echo ${prefix}/include
- ;;
+ echo ${prefix}/include
+ ;;
--jtsport)
echo @JTS_PORT@
- ;;
+ ;;
*)
usage 1 1>&2
;;

View File

@ -4,8 +4,8 @@ PKG := geos
$(PKG)_WEBSITE := https://trac.osgeo.org/geos/
$(PKG)_DESCR := GEOS
$(PKG)_IGNORE :=
$(PKG)_VERSION := 3.4.2
$(PKG)_CHECKSUM := 15e8bfdf7e29087a957b56ac543ea9a80321481cef4d4f63a7b268953ad26c53
$(PKG)_VERSION := 3.6.2
$(PKG)_CHECKSUM := 045a13df84d605a866602f6020fc6cbf8bf4c42fb50de237a08926e1d7d7652a
$(PKG)_SUBDIR := geos-$($(PKG)_VERSION)
$(PKG)_FILE := geos-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://download.osgeo.org/geos/$($(PKG)_FILE)
@ -13,9 +13,9 @@ $(PKG)_URL_2 := ftp://ftp.remotesensing.org/geos/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://geos.refractions.net/' | \
$(WGET) -q -O- 'http://download.osgeo.org/geos/' | \
$(SED) -n 's,.*geos-\([0-9][^>]*\)\.tar.*,\1,p' | \
head -1
tail -1
endef
define $(PKG)_BUILD

View File

@ -3,8 +3,8 @@
PKG := gta
$(PKG)_WEBSITE := http://www.nongnu.org/gta/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.0.7
$(PKG)_CHECKSUM := 85763f6b1a223d89e4ac000f5048d1d5bcd39b315192bca4e123fd89c24a0db5
$(PKG)_VERSION := 1.0.8
$(PKG)_CHECKSUM := 1d2ff713955eee28310de082a8fd8e236403c27dee3716ba1238c56e6643e4fb
$(PKG)_SUBDIR := libgta-$($(PKG)_VERSION)
$(PKG)_FILE := libgta-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://download.savannah.gnu.org/releases/gta/$($(PKG)_FILE)
@ -15,6 +15,7 @@ define $(PKG)_UPDATE
grep '<a class="list subject"' | \
$(SED) -n 's,.*<a[^>]*>libgta-\([0-9.]*\)<.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
@ -29,4 +30,3 @@ define $(PKG)_BUILD
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gta.exe' \
`'$(TARGET)-pkg-config' gta --cflags --libs`
endef

View File

@ -3,8 +3,8 @@
PKG := json-c
$(PKG)_WEBSITE := https://github.com/json-c/json-c/wiki
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.12
$(PKG)_CHECKSUM := 6fd6d2311d610b279e1bcdd5c6d4f699700159d3e0786de8306af7b4bc94fb35
$(PKG)_VERSION := 0.12.1
$(PKG)_CHECKSUM := 5a617da9aade997938197ef0f8aabd7f97b670c216dc173977e1d56eef9e1291
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION)-nodoc.tar.gz
$(PKG)_URL := https://s3.amazonaws.com/$(PKG)_releases/releases/$($(PKG)_FILE)

View File

@ -1,7 +1,18 @@
diff -burN libgeotiff-1.4.0.orig/configure.ac libgeotiff-1.4.0/configure.ac
--- libgeotiff-1.4.0.orig/configure.ac 2015-06-21 03:50:03.341076086 +0200
+++ libgeotiff-1.4.0/configure.ac 2015-06-21 03:50:39.741125191 +0200
@@ -280,7 +280,7 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Luke Potgieter <fried.roadkill+ght@gmail.com>
Date: Tue, 1 Aug 2017 10:20:44 +0200
Subject: [PATCH] Patch template definitions
diff --git a/configure.ac b/configure.ac
index 1111111..2222222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -281,7 +281,7 @@ elif test "$PROJ_LIB" != "" -a "$PROJ_INC" != "" ; then
PROJ_INC=-I$PROJ_INC
AC_SUBST(PROJ_INC,$PROJ_INC)
@ -10,3 +21,12 @@ diff -burN libgeotiff-1.4.0.orig/configure.ac libgeotiff-1.4.0/configure.ac
AC_DEFINE(HAVE_LIBPROJ)
AC_SUBST([HAVE_LIBPROJ])
PROJ_CONFIG="yes"
@@ -317,7 +317,7 @@ fi
AM_CONDITIONAL([CSV_IS_CONFIG], [test ! x$CSV_CONFIG = xno])
-AC_ARG_ENABLE(towgs84, [ --disable-towgs84 Disable WGS84 parameters for binary compatibility with pre-1.4.1], AC_DEFINE(GEO_NORMALIZE_DISABLE_TOWGS84))
+AC_ARG_ENABLE(towgs84, [ --disable-towgs84 Disable WGS84 parameters for binary compatibility with pre-1.4.1], AC_DEFINE([GEO_NORMALIZE_DISABLE_TOWGS84], [], [Description]))
dnl #########################################################################
dnl Doxygen settings

View File

@ -4,8 +4,8 @@ PKG := libgeotiff
$(PKG)_WEBSITE := https://trac.osgeo.org/geotiff/
$(PKG)_DESCR := GeoTiff
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.4.0
$(PKG)_CHECKSUM := d0acb8d341fd6a8f2c673456e09fdb8f50f91e3166ac934719fe05b30d328329
$(PKG)_VERSION := 1.4.2
$(PKG)_CHECKSUM := ad87048adb91167b07f34974a8e53e4ec356494c29f1748de95252e8f81a5e6e
$(PKG)_SUBDIR := libgeotiff-$($(PKG)_VERSION)
$(PKG)_FILE := libgeotiff-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://download.osgeo.org/geotiff/libgeotiff/$($(PKG)_FILE)
@ -18,6 +18,8 @@ define $(PKG)_UPDATE
head -1
endef
# Note: towgs84 is set to disabled for binary compatibility to < 1.4.2
# Enabling towgs84 *may* require some work.
define $(PKG)_BUILD
$(SED) -i 's,/usr/local,@prefix@,' '$(1)/bin/Makefile.in'
touch '$(1)/configure'
@ -26,6 +28,7 @@ define $(PKG)_BUILD
$(MXE_CONFIGURE_OPTS) \
--with-jpeg \
--with-zlib \
--disable-towgs84 \
LIBS="`'$(TARGET)-pkg-config' --libs libtiff-4` -ljpeg -lz"
$(MAKE) -C '$(1)' -j 1 all install \
LDFLAGS=-no-undefined \

View File

@ -0,0 +1,23 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Luke Potgieter <fried.roadkill+ght@gmail.com>
Date: Thu, 24 Aug 2017 10:53:39 +0200
Subject: [PATCH] Remove explicit header check - mingw does not ship with this header.
diff --git a/configure.ac b/configure.ac
index 1111111..2222222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,7 @@ AC_CHECK_HEADERS(pthread.h, [
LIBS="$LIBS -lpthread"
#endif])
-AC_CHECK_HEADERS(sys/resource.h,, [AC_MSG_ERROR([cannot find sys/resource.h, bailing out])])
+#AC_CHECK_HEADERS(sys/resource.h,, [AC_MSG_ERROR([cannot find sys/resource.h, bailing out])])
AC_CHECK_HEADERS(sys/time.h,, [AC_MSG_ERROR([cannot find sys/time.h, bailing out])])
AC_CHECK_HEADERS(stdint.h,, [AC_MSG_ERROR([cannot find stdint.h, bailing out])])
AC_CHECK_HEADERS(features.h)

32
src/libspatialindex.mk Normal file
View File

@ -0,0 +1,32 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := libspatialindex
$(PKG)_WEBSITE := https://libspatialindex.github.io/
$(PKG)_DESCR := libspatialindex
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.8.5
$(PKG)_CHECKSUM := 31ec0a9305c3bd6b4ad60a5261cba5402366dd7d1969a8846099717778e9a50a
$(PKG)_SUBDIR := spatialindex-src-$($(PKG)_VERSION)
$(PKG)_FILE := spatialindex-src-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://download.osgeo.org/libspatialindex/$($(PKG)_FILE)
$(PKG)_DEPS := gcc pthreads
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://download.osgeo.org/libspatialindex/' | \
$(SED) -n 's,.*spatialindex-src-\([0-9][^>]*\)\.tar.*,\1,p' | \
tail -1
endef
define $(PKG)_BUILD
cd '$(1)' && autoreconf -fi
cd '$(1)' && ./configure $(MXE_CONFIGURE_OPTS)
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' -j 1 '$(INSTALL_STRIP_LIB)'
# the test program will return 0 on success; -1 on error (with an error message)
'$(TARGET)-gcc' \
-W -Wall -ansi -pedantic \
'$(1)/test/geometry/Intersection.cc' -o '$(PREFIX)/$(TARGET)/bin/test-libspatialindex.exe'\
`'$(TARGET)-pkg-config' libspatialindex --cflags --libs` \
-lspatialindex_c -lspatialindex -lstdc++ -pthread
endef

54
src/ossim-1-fixes.patch Normal file
View File

@ -0,0 +1,54 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Tue, 10 Oct 2017 13:15:27 +1100
Subject: [PATCH] fix deprecated WIN32 definition
taken from:
https://github.com/ossimlabs/ossim/issues/153
diff --git a/src/util/ossimBatchTest.cpp b/src/util/ossimBatchTest.cpp
index 1111111..2222222 100644
--- a/src/util/ossimBatchTest.cpp
+++ b/src/util/ossimBatchTest.cpp
@@ -72,7 +72,7 @@ bool ossimBatchTest::initialize(ossimArgumentParser& ap)
}
// Initialize environment:
-#if defined(WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__)
+#if defined(_WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__)
_putenv("DEL_CMD=del /Q"); // For backwards compatiblity.
_putenv("DIFF_CMD=fc /W");
_putenv("COPY_CMD=copy /Y");
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Tue, 10 Oct 2017 13:26:49 +1100
Subject: [PATCH] set windows shared/static defs using cmake options
taken from:
https://github.com/ossimlabs/ossim/issues/153
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1111111..2222222 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -34,7 +34,14 @@ ELSE (OSSIM_HAS_HDF5)
message( STATUS "HDF5 components are being excluded from the build." )
ENDIF (OSSIM_HAS_HDF5)
-ADD_DEFINITIONS("-DOSSIMMAKINGDLL")
+IF (WIN32)
+ IF (BUILD_SHARED)
+ ADD_DEFINITIONS("-DOSSIMMAKINGDLL")
+ ELSE (BUILD_SHARED)
+ ADD_DEFINITIONS("-DOSSIM_STATIC")
+ ENDIF (BUILD_SHARED)
+ENDIF (WIN32)
+
############################### GRAB HEADERS #####################################
FILE(GLOB ossim_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../include/ossim/*.h")
FILE(GLOB ossim_base_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../include/ossim/base/*.h")

View File

@ -4,31 +4,21 @@ PKG := ossim
$(PKG)_WEBSITE := https://trac.osgeo.org/ossim
$(PKG)_DESCR := OSSIM
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.8.20
$(PKG)_CHECKSUM := d7981d0d7e84bdbc26d5bda9e5b80c583d806164e4d6e5fab276c9255a2b407c
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)-3
$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz
$(PKG)_URL := http://download.osgeo.org/ossim/source/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc freetype geos jpeg libgeotiff libpng openthreads proj tiff zlib
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://download.osgeo.org/ossim/source/latest/' | \
$(SED) -n 's,.*ossim-\([0-9][^>]*\)\.tar.*,\1,p' | \
head -1
endef
$(PKG)_VERSION := 43a071a
$(PKG)_CHECKSUM := 1796994c8586e62ef799724969e3bef57178194fafe056db3de41dd6ee0dc931
# releases have unpredictable names and are based on master branch
$(PKG)_GH_CONF := ossimlabs/ossim/master
$(PKG)_DEPS := gcc freetype geos jpeg hdf5 libgeotiff libpng openthreads proj tiff zlib
define $(PKG)_BUILD
mkdir '$(1).build'
cd '$(1).build' && '$(TARGET)-cmake' \
cd '$(BUILD_DIR)' && '$(TARGET)-cmake' '$(SOURCE_DIR)' \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DPKG_CONFIG_EXECUTABLE='$(PREFIX)/bin/$(TARGET)-pkg-config' \
-DCMAKE_MODULE_PATH='$(1)/ossim_package_support/cmake/CMakeModules' \
-DBUILD_OSSIM_FREETYPE_SUPPORT=TRUE \
-DBUILD_OSSIM_CURL_APPS=FALSE \
-DBUILD_OSSIM_TEST_APPS=FALSE \
-DBUILD_OSSIM_TESTS=FALSE \
-DBUILD_OSSIM_APPS=FALSE \
-DCMAKE_CXX_FLAGS='-DGEOS_INLINE=1' \
'$(1)/ossim'
-DCMAKE_CXX_FLAGS='-DGEOS_INLINE=1'
$(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' VERBOSE=1
$(MAKE) -C '$(BUILD_DIR)' -j 1 install VERBOSE=1
endef

View File

@ -12,7 +12,7 @@ $(PKG)_URL_2 := ftp://ftp.remotesensing.org/proj/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://trac.osgeo.org/proj/' | \
$(WGET) -q -O- 'http://proj4.org/download.html' | \
$(SED) -n 's,.*proj-\([0-9][^>]*\)\.tar.*,\1,p' | \
head -1
endef

View File

@ -4,19 +4,19 @@ PKG := qscintilla2
$(PKG)_WEBSITE := https://www.riverbankcomputing.com/software/qscintilla/intro
$(PKG)_DESCR := QScintilla2
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.8.4
$(PKG)_CHECKSUM := 9b7b2d7440cc39736bbe937b853506b3bd218af3b79095d4f710cccb0fabe80f
$(PKG)_SUBDIR := QScintilla-gpl-$($(PKG)_VERSION)
$(PKG)_FILE := QScintilla-gpl-$($(PKG)_VERSION).tar.gz
$(PKG)_VERSION := 2.10.1
$(PKG)_CHECKSUM := 97f98a9d91f908db6ce37fecc6d241d955b388a1c487173b60726cba9a3dfa64
$(PKG)_SUBDIR := QScintilla_gpl-$($(PKG)_VERSION)
$(PKG)_FILE := QScintilla_gpl-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/pyqt/QScintilla2/QScintilla-$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc qtbase
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://www.riverbankcomputing.com/software/qscintilla/download' | \
grep QScintilla-gpl | \
head -n 1 | \
$(SED) -n 's,.*QScintilla-gpl-\([0-9][^>]*\)\.zip.*,\1,p'
grep QScintilla_gpl | \
head -n 1 | \
$(SED) -n 's,.*QScintilla_gpl-\([0-9][^>]*\)\.tar.*,\1,p'
endef
define $(PKG)_BUILD
@ -27,6 +27,6 @@ define $(PKG)_BUILD
'$(TARGET)-g++' \
-W -Wall -Werror -std=c++0x -pedantic \
`'$(TARGET)-pkg-config' Qt5Widgets --cflags` \
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-qscintilla2.exe' -lqscintilla2 \
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-qscintilla2.exe' -lqscintilla2_qt5 \
`'$(TARGET)-pkg-config' Qt5Widgets --libs`
endef

44
src/qtkeychain.mk Normal file
View File

@ -0,0 +1,44 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := qtkeychain
$(PKG)_WEBSITE := https://github.com/frankosterfeld/qtkeychain
$(PKG)_DESCR := QtKeychain
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.8.0
$(PKG)_CHECKSUM := b492f603197538bc04b2714105b1ab2b327a9a98d400d53d9a7cb70edd2db12f
$(PKG)_FILE := qtkeychain-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://github.com/frankosterfeld/qtkeychain/archive/v$($(PKG)_VERSION).tar.gz
$(PKG)_DEPS := gcc qttools
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://github.com/frankosterfeld/qtkeychain/releases' | \
grep '<a href="/frankosterfeld/qtkeychain/archive/' | \
$(SED) -n 's,.*href="/frankosterfeld/qtkeychain/archive/v\([0-9][^"]*\)\.tar.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)$(PKG)-$($(PKG)_VERSION)' \
$(if $(BUILD_STATIC),-DQTKEYCHAIN_STATIC=ON)
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
'$(TARGET)-g++' \
-W -Wall -Werror -ansi -pedantic -std=c++11 \
'$(SOURCE_DIR)$(PKG)-$($(PKG)_VERSION)/testclient.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-qt5keychain.exe' \
`'$(TARGET)-pkg-config' Qt5Core --cflags --libs` \
'-I$(PREFIX)/$(TARGET)/include/qt5keychain' -lqt5keychain
# create a batch file to run the test (as the test program requires arguments)
# Note: the keychain uses APIs that are only available on Windows7 and newer.
(printf 'REM Run the common actions against the test program.\r\n'; \
printf 'REM First add a new user to the keychain, with the password badpass\r\n'; \
printf 'test-qt5keychain.exe store username badpass\r\n'; \
printf 'REM The result of the next command should read badpass\r\n'; \
printf 'test-qt5keychain.exe restore username\r\n'; \
printf 'REM Now we delete the user from the keychain\r\n'; \
printf 'test-qt5keychain.exe delete username\r\n'; \
printf 'REM The result of the next command should fail as the user has been removed from the keychain\r\n'; \
printf 'test-qt5keychain.exe delete username\r\n';) \
> '$(PREFIX)/$(TARGET)/bin/test-qt5keychain.bat'
endef

View File

@ -0,0 +1,56 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Luke Potgieter <fried.roadkill+ght@gmail.com>
Date: Wed, 23 Aug 2017 12:51:27 +0200
Subject: [PATCH] Patch: Makes sure to link against all of geos' libs as well
as the stdc++ lib
diff --git a/configure.ac b/configure.ac
index 1111111..2222222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -293,18 +293,18 @@ if test x"$enable_geos" != "xno"; then
GEOS_LDFLAGS=`$GEOSCONFIG --ldflags`
GEOS_CFLAGS=-I`$GEOSCONFIG --includes`
AC_SUBST([GEOS_LDFLAGS])
- AC_SUBST([GEOS_CFLAGS])
+ AC_SUBST([GEOS_CFLAGS])
# Ensure that we can parse geos_c.h
CPPFLAGS_SAVE="$CPPFLAGS"
CPPFLAGS="$GEOS_CFLAGS"
AC_CHECK_HEADERS([geos_c.h],, [AC_MSG_ERROR([could not find geos_c.h - you may need to specify the directory of a geos-config file using --with-geosconfig])])
- CPPFLAGS="$CPPFLAGS_SAVE"
+ CPPFLAGS="$CPPFLAGS_SAVE -I`$GEOSCONFIG --includes`"
# Ensure we can link against libgeos_c
LIBS_SAVE="$LIBS"
- LIBS="$GEOS_LDFLAGS"
+ LIBS="$GEOS_LDFLAGS `$GEOSCONFIG --clibs`"
AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.3.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig]))
LIBS="$LIBS_SAVE"
- LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c"
+ LIBS="$LIBS $GEOS_LDFLAGS `$GEOSCONFIG --clibs`"
#-----------------------------------------------------------------------
# --enable-controlpoints
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Luke Potgieter <fried.roadkill+ght@gmail.com>
Date: Mon, 2 Oct 2017 11:27:24 +0200
Subject: [PATCH] Add static dependency to .pc file
diff --git a/spatialite.pc.in b/spatialite.pc.in
index 1111111..2222222 100644
--- a/spatialite.pc.in
+++ b/spatialite.pc.in
@@ -8,5 +8,5 @@ includedir=@includedir@
Name: spatialite
Description: Spatial SQL database engine based on SQLite
Version: @VERSION@
-Libs: -L${libdir} -lspatialite
+Libs: -L${libdir} -lspatialite -lgeos_c -lgeos -lxml2 -lws2_32 -lstdc++ -lm
Cflags: -I${includedir}

42
src/spatialite.mk Normal file
View File

@ -0,0 +1,42 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := spatialite
$(PKG)_WEBSITE := https://www.gaia-gis.it/fossil/libspatialite/index
$(PKG)_DESCR := SpatiaLite
$(PKG)_IGNORE :=
$(PKG)_VERSION := 4.4.0-RC1
$(PKG)_CHECKSUM := 80f7fff0a147044c5eb197e565f598ac1f137d86d0a548cbc8f52fb7ff7cac68
$(PKG)_SUBDIR := libspatialite-$($(PKG)_VERSION)
$(PKG)_FILE := libspatialite-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://www.gaia-gis.it/gaia-sins/libspatialite-sources/$($(PKG)_FILE)
$(PKG)_DEPS := gcc dlfcn-win32 freexl geos sqlite zlib proj libiconv libxml2
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://www.gaia-gis.it/gaia-sins/libspatialite-sources/' | \
$(SED) -n 's,.*libspatialite-\([0-9][^>]*\)\.tar.*,\1,p' | \
tail -1
endef
define $(PKG)_BUILD
# freeXL support is only necessary if you want to be able to parse .xls files.
# If you disable freexl support, remove freexl from the test program below.
cd '$(SOURCE_DIR)' && autoreconf -fi -I ./m4
cd '$(SOURCE_DIR)' && ./configure \
$(MXE_CONFIGURE_OPTS) \
--enable-freexl=yes \
--with-geosconfig='$(PREFIX)/$(TARGET)/bin/geos-config'
$(MAKE) -C '$(SOURCE_DIR)' -j '$(JOBS)' $(if $(BUILD_SHARED), LDFLAGS='-no-undefined')
$(MAKE) -C '$(SOURCE_DIR)' -j 1 $(INSTALL_STRIP_LIB)
# compile one of the demo programs
'$(TARGET)-gcc' $(if $(BUILD_SHARED), -Wno-undefined) \
-W -Wall -ansi -pedantic \
'$(SOURCE_DIR)/examples/demo4.c' -o '$(PREFIX)/$(TARGET)/bin/test-spatialite.exe' \
`'$(TARGET)-pkg-config' $(PKG) sqlite3 freexl proj zlib liblzma --cflags --libs`
# create a batch file to run the test program (as the program requires arguments)
(printf 'REM run against a database that should not exist, but will be removed afterward to save space.\r\n'; \
printf 'test-spatialite.exe test-db.sqlite\r\n'; \
printf 'del test-db.sqlite\r\n';) \
> '$(PREFIX)/$(TARGET)/bin/test-spatialite.bat'
endef