summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2021-08-07 11:20:08 +0200
committerMichel Zou2021-08-07 11:20:08 +0200
commit18a73766aa93b23fadd6eaa6802168c7fa4e46f4 (patch)
treecd28f12a9ddf904246c43672c3edb4141de99f17
downloadaur-18a73766aa93b23fadd6eaa6802168c7fa4e46f4.tar.gz
5.0.1
-rw-r--r--.SRCINFO30
-rw-r--r--PKGBUILD43
-rw-r--r--libspatialite_geos.patch43
-rw-r--r--libspatialite_macros.patch12
-rw-r--r--libspatialite_mingw.patch36
5 files changed, 164 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e3da45d6a78d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+pkgbase = mingw-w64-libspatialite
+ pkgdesc = SQLite extension to support spatial data types and operations (mingw-w64)
+ pkgver = 5.0.1
+ pkgrel = 1
+ url = https://www.gaia-gis.it/fossil/libspatialite
+ arch = any
+ license = MPL
+ license = GPL
+ license = LGPL
+ makedepends = mingw-w64-configure
+ depends = mingw-w64-geos
+ depends = mingw-w64-libfreexl
+ depends = mingw-w64-librttopo
+ depends = mingw-w64-libxml2
+ depends = mingw-w64-minizip
+ depends = mingw-w64-proj
+ depends = mingw-w64-sqlite
+ options = !buildflags
+ options = staticlibs
+ options = !strip
+ source = https://www.gaia-gis.it/gaia-sins/libspatialite-5.0.1.tar.gz
+ source = libspatialite_geos.patch
+ source = libspatialite_mingw.patch
+ source = libspatialite_macros.patch
+ sha256sums = eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = mingw-w64-libspatialite
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0adc0d16b3d2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+pkgname=mingw-w64-libspatialite
+pkgver=5.0.1
+pkgrel=1
+pkgdesc="SQLite extension to support spatial data types and operations (mingw-w64)"
+arch=('any')
+url="https://www.gaia-gis.it/fossil/libspatialite"
+license=('MPL' 'GPL' 'LGPL')
+depends=('mingw-w64-geos' 'mingw-w64-libfreexl' 'mingw-w64-librttopo' 'mingw-w64-libxml2' 'mingw-w64-minizip' 'mingw-w64-proj' 'mingw-w64-sqlite')
+makedepends=('mingw-w64-configure')
+options=('!buildflags' 'staticlibs' '!strip')
+source=(https://www.gaia-gis.it/gaia-sins/libspatialite-$pkgver.tar.gz libspatialite_geos.patch libspatialite_mingw.patch libspatialite_macros.patch)
+sha256sums=('eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98' SKIP SKIP SKIP)
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "${srcdir}"/libspatialite-$pkgver
+ #sed -i "s|#include <Windows.h>|#include <windows.h>|g" src/gaiageo/gg_shape.c
+ patch -p1 -i "${srcdir}"/libspatialite_geos.patch
+ patch -p1 -i "${srcdir}"/libspatialite_mingw.patch
+ patch -p1 -i "${srcdir}"/libspatialite_macros.patch
+}
+
+build() {
+ cd "${srcdir}"/libspatialite-$pkgver
+ autoreconf -ifv
+ for _arch in ${_architectures}; do
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-configure --enable-geocallbacks ..
+ make
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "$srcdir/libspatialite-${pkgver}/build-${_arch}"
+ make install DESTDIR="$pkgdir"
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}
+
diff --git a/libspatialite_geos.patch b/libspatialite_geos.patch
new file mode 100644
index 000000000000..7d8d2c2e46d7
--- /dev/null
+++ b/libspatialite_geos.patch
@@ -0,0 +1,43 @@
+diff -rupN --no-dereference libspatialite-5.0.1/configure.ac libspatialite-5.0.1-new/configure.ac
+--- libspatialite-5.0.1/configure.ac 2021-03-08 08:57:19.015858195 +0100
++++ libspatialite-5.0.1-new/configure.ac 2021-03-08 08:57:19.017858195 +0100
+@@ -312,35 +312,10 @@ AC_ARG_ENABLE(geos, [AS_HELP_STRING(
+ [], [enable_geos=yes])
+ if test x"$enable_geos" != "xno"; then
+ #-----------------------------------------------------------------------
+- # --with-geosconfig
+- #
+- AC_ARG_WITH([geosconfig],
+- [AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])],
+- [GEOSCONFIG="$withval"], [GEOSCONFIG=""])
+- if test "x$GEOSCONFIG" = "x"; then
+- # GEOSCONFIG was not specified, so search within the current path
+- AC_PATH_PROG([GEOSCONFIG], [geos-config])
+- # If we couldn't find geos-config, display an error
+- if test "x$GEOSCONFIG" = "x"; then
+- AC_MSG_ERROR([could not find geos-config within the current path. You may need to try re-running configure with a --with-geosconfig parameter.])
+- fi
+- else
+- # GEOSCONFIG was specified; display a message to the user
+- if test "x$GEOSCONFIG" = "xyes"; then
+- AC_MSG_ERROR([you must specify a parameter to --with-geosconfig, e.g. --with-geosconfig=/path/to/geos-config])
+- else
+- if test -f $GEOSCONFIG; then
+- AC_MSG_RESULT([Using user-specified geos-config file: $GEOSCONFIG])
+- else
+- AC_MSG_ERROR([the user-specified geos-config file $GEOSCONFIG does not exist])
+- fi
+- fi
+- fi
+- # Extract the linker and include flags
+- GEOS_LDFLAGS=`$GEOSCONFIG --ldflags`
+- GEOS_CFLAGS=-I`$GEOSCONFIG --includes`
+- AC_SUBST([GEOS_LDFLAGS])
+- AC_SUBST([GEOS_CFLAGS])
++ PKG_CHECK_MODULES([GEOS], [geos], , AC_MSG_ERROR(['geos' is required but it doesn't seem to be installed on this system.]))
++ GEOS_LDFLAGS="$GEOS_LIBS"
++ AC_SUBST(GEOS_CFLAGS)
++ AC_SUBST(GEOS_LDFLAGS)
+ # Ensure that we can parse geos_c.h
+ CPPFLAGS_SAVE="$CPPFLAGS"
+ CPPFLAGS="$GEOS_CFLAGS"
diff --git a/libspatialite_macros.patch b/libspatialite_macros.patch
new file mode 100644
index 000000000000..9b71ab7658a2
--- /dev/null
+++ b/libspatialite_macros.patch
@@ -0,0 +1,12 @@
+diff -rupN --no-dereference libspatialite-5.0.1/configure.ac libspatialite-5.0.1-new/configure.ac
+--- libspatialite-5.0.1/configure.ac 2021-03-08 08:57:18.748858216 +0100
++++ libspatialite-5.0.1-new/configure.ac 2021-03-08 08:57:18.751858215 +0100
+@@ -96,7 +96,7 @@ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+ AC_LIBTOOL_WIN32_DLL
+-AC_PROG_LIBTOOL
++LT_INIT
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
diff --git a/libspatialite_mingw.patch b/libspatialite_mingw.patch
new file mode 100644
index 000000000000..47b1d05670c6
--- /dev/null
+++ b/libspatialite_mingw.patch
@@ -0,0 +1,36 @@
+diff -rupN --no-dereference libspatialite-5.0.1/configure.ac libspatialite-5.0.1-new/configure.ac
+--- libspatialite-5.0.1/configure.ac 2021-02-07 16:53:46.000000000 +0100
++++ libspatialite-5.0.1-new/configure.ac 2021-03-08 08:57:18.484858236 +0100
+@@ -489,7 +489,7 @@ AM_CONDITIONAL(MODULE_ONLY, [test x"$ena
+ #-----------------------------------------------------------------------
+
+ # Checking for MinGW
+-AM_CONDITIONAL([MINGW], [test "$target_alias" = "mingw32"])
++AM_CONDITIONAL([MINGW], [[[[ "$target_alias" = *"mingw32" ]]]])
+ # Checking for Mac OsX
+ AM_CONDITIONAL([MACOSX], [test "$target_alias" = "macosx"])
+ # Checking for Android
+diff -rupN --no-dereference libspatialite-5.0.1/src/gaiageo/gg_shape.c libspatialite-5.0.1-new/src/gaiageo/gg_shape.c
+--- libspatialite-5.0.1/src/gaiageo/gg_shape.c 2021-02-07 16:53:46.000000000 +0100
++++ libspatialite-5.0.1-new/src/gaiageo/gg_shape.c 2021-03-08 08:57:18.485858236 +0100
+@@ -58,7 +58,7 @@ the terms of any one of the MPL, the GPL
+ #endif
+
+ #ifdef _WIN32
+-#include <Windows.h>
++#include <windows.h>
+ #endif
+
+ #if OMIT_ICONV == 0 /* if ICONV is disabled no SHP support is available */
+diff -rupN --no-dereference libspatialite-5.0.1/test/scandir4win.h libspatialite-5.0.1-new/test/scandir4win.h
+--- libspatialite-5.0.1/test/scandir4win.h 2021-02-07 16:53:47.000000000 +0100
++++ libspatialite-5.0.1-new/test/scandir4win.h 2021-03-08 08:57:18.485858236 +0100
+@@ -11,7 +11,7 @@ even implied
+
+ #ifdef _WIN32
+
+-#include <Windows.h>
++#include <windows.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+