Skip to content

Commit

Permalink
update to 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
longhuan2018 committed Dec 10, 2020
1 parent 1d8728a commit c9069aa
Show file tree
Hide file tree
Showing 4 changed files with 240 additions and 109 deletions.
5 changes: 2 additions & 3 deletions ports/spatialite-tools/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Source: spatialite-tools
Version: 4.3.0
Port-Version: 6
Version: 5.0.0
Homepage: https://www.gaia-gis.it/fossil/spatialite-tools/index
Description: Contains spatialite.exe and other command line tools to work with SpatiaLite databases (import, export, SQL queries)
Build-Depends: sqlite3, libspatialite, geos, readosm, proj4, zlib, libiconv, expat
Build-Depends: sqlite3, libspatialite, geos, readosm, proj4, zlib, libiconv, expat, librttopo
100 changes: 100 additions & 0 deletions ports/spatialite-tools/fix-linux-configure.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
diff --git a/configure.ac b/configure.ac
index ff15f2922..cc9d5e385 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,6 +17,8 @@ AH_TEMPLATE([OMIT_FREEXL],
[Should be defined in order to disable FREEXL support.])
AH_TEMPLATE([OMIT_READOSM],
[Should be defined in order to disable ReadOSM support.])
+AH_TEMPLATE([OMIT_ICONV],
+ [Should be defined in order to disable ICONV support.])
AH_TEMPLATE([ENABLE_LIBXML2],
[Should be defined in order to enable LIBXML2 support.])
AH_TEMPLATE([ENABLE_MINIZIP],
@@ -142,28 +144,28 @@ fi
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
+#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_CPPFLAGS=-I`$GEOSCONFIG --includes`
+#GEOS_LDFLAGS=`$GEOSCONFIG --ldflags`
+#GEOS_CPPFLAGS=-I`$GEOSCONFIG --includes`
AC_SUBST([GEOS_LDFLAGS])
AC_SUBST([GEOS_CPPFLAGS])
# Ensure that we can parse geos_c.h
@@ -174,9 +176,9 @@ CPPFLAGS="$CPPFLAGS_SAVE"
# Ensure we can link against libgeos_c
LIBS_SAVE="$LIBS"
LIBS="$GEOS_LDFLAGS"
-AC_SEARCH_LIBS(GEOSTopologyPreserveSimplify,geos_c,,AC_MSG_ERROR([could not find libgeos_c - you may need to specify the directory of a geos-config file using --with-geosconfig]))
+#AC_SEARCH_LIBS(GEOSTopologyPreserveSimplify,geos_c,,AC_MSG_ERROR([could not find libgeos_c - 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

PKG_CHECK_MODULES([LIBSPATIALITE], [spatialite], , AC_MSG_ERROR(['libspatialite' is required but it doesn't seem to be installed on this system.]))
AC_SUBST(LIBSPATIALITE_CFLAGS)
@@ -218,6 +220,24 @@ fi

AM_CONDITIONAL([NO_READOSM], [test "$NOREADOSM" = "true"])

+#-----------------------------------------------------------------------
+# --enable-iconv
+#
+AC_ARG_ENABLE(iconv, [AS_HELP_STRING(
+ [--enable-iconv], [enables ICONV inclusion [default=yes]])],
+ [], [enable_iconv=yes])
+if test x"$enable_iconv" != "xno"; then
+ AC_CHECK_HEADERS(iconv.h,, [AC_MSG_ERROR([cannot find iconv.h, bailing out])])
+# on some systems "iconv()" lives in libc. On others it lives in libiconv
+# on older systems "libiconv()" lives in libiconv
+ AC_SEARCH_LIBS(iconv,iconv,,
+ AC_SEARCH_LIBS(libiconv,iconv,,AC_MSG_ERROR(['libiconv' is required but it doesn't seem to be installed on this system.]),))
+ AC_SEARCH_LIBS(locale_charset,charset,,
+ AC_SEARCH_LIBS(nl_langinfo,c,,AC_MSG_ERROR(['libcharset' is required but it doesn't seem to be installed on this system.]),))
+else
+ AC_DEFINE(OMIT_ICONV)
+fi
+
#-----------------------------------------------------------------------
# --enable-libxml2
#
37 changes: 23 additions & 14 deletions ports/spatialite-tools/fix-makefiles.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/makefile.vc b/makefile.vc
index 33c85d2..c811e7d 100644
index 53ef75197..d48fb02db 100644
--- a/makefile.vc
+++ b/makefile.vc
@@ -15,7 +15,7 @@ SPATIALITE_OSM_RAW_EXE = spatialite_osm_raw.exe
@@ -16,7 +16,7 @@ SPATIALITE_OSM_RAW_EXE = spatialite_osm_raw.exe
SPATIALITE_OSM_FILTER_EXE = spatialite_osm_filter.exe
SPATIALITE_GML_EXE = spatialite_gml.exe

Expand All @@ -11,8 +11,8 @@ index 33c85d2..c811e7d 100644

default: all

@@ -26,89 +26,58 @@ all: $(SPATIALITE_EXE) $(SHP_DOCTOR_EXE) $(SPATIALITE_TOOL_EXE) \
$(SPATIALITE_OSM_FILTER_EXE)
@@ -27,96 +27,63 @@ all: $(SPATIALITE_EXE) $(SHP_DOCTOR_EXE) $(SPATIALITE_TOOL_EXE) \
$(SPATIALITE_OSM_FILTER_EXE) $(SHP_SANITIZE_EXE)

$(SPATIALITE_EXE): shell.obj
- cl shell.obj C:\OSGeo4W\lib\proj_i.lib \
Expand All @@ -27,23 +27,31 @@ index 33c85d2..c811e7d 100644
- cl exif_loader.obj C:\OSGeo4W\lib\proj_i.lib \
- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
+ cl exif_loader.obj $(LIBS_ALL)
+ cl exif_loader.obj $(LIBS_ALL)
if exist $(EXIF_LOADER_EXE).manifest mt -manifest \
$(EXIF_LOADER_EXE).manifest -outputresource:$(EXIF_LOADER_EXE);1

$(SHP_DOCTOR_EXE): shp_doctor.obj
- cl shp_doctor.obj C:\OSGeo4W\lib\proj_i.lib \
- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
+ cl shp_doctor.obj $(LIBS_ALL)
+ cl shp_doctor.obj $(LIBS_ALL)
if exist $(SHP_DOCTOR_EXE).manifest mt -manifest \
$(SHP_DOCTOR_EXE).manifest -outputresource:$(SHP_DOCTOR_EXE);1

$(SHP_SANITIZE_EXE): shp_sanitize.obj
- cl shp_sanitize.obj C:\OSGeo4W\lib\proj_i.lib \
- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
+ cl shp_sanitize.obj $(LIBS_ALL)
if exist $(SHP_SANITIZE_EXE).manifest mt -manifest \
$(SHP_SANITIZE_EXE).manifest -outputresource:$(SHP_SANITIZE_EXE);1

$(SPATIALITE_NETWORK_EXE): spatialite_network.obj
- cl spatialite_network.obj C:\OSGeo4W\lib\proj_i.lib \
- C:\OSGeo4W\lib\iconv.lib \
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
+ cl spatialite_network.obj $(LIBS_ALL)
+ cl spatialite_network.obj $(LIBS_ALL)
if exist $(SPATIALITE_NETWORK_EXE).manifest mt -manifest \
$(SPATIALITE_TOOL_EXE).manifest \
-outputresource:$(SPATIALITE_TOOL_EXE);1
Expand All @@ -52,7 +60,7 @@ index 33c85d2..c811e7d 100644
- cl spatialite_tool.obj C:\OSGeo4W\lib\proj_i.lib \
- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
+ cl spatialite_tool.obj $(LIBS_ALL)
+ cl spatialite_tool.obj $(LIBS_ALL)
if exist $(SPATIALITE_TOOL_EXE).manifest mt -manifest \
$(SPATIALITE_TOOL_EXE).manifest \
-outputresource:$(SPATIALITE_TOOL_EXE);1
Expand All @@ -64,7 +72,7 @@ index 33c85d2..c811e7d 100644
- C:\OSGeo4W\lib\libexpat.lib \
- C:\OSGeo4W\lib\zlib.lib \
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
+ cl spatialite_osm_net.obj $(LIBS_ALL)
+ cl spatialite_osm_net.obj $(LIBS_ALL)
if exist $(SPATIALITE_OSM_EXE).manifest mt -manifest \
$(SPATIALITE_OSM_EXE).manifest \
-outputresource:$(SPATIALITE_OSM_NET_EXE);1
Expand All @@ -76,7 +84,7 @@ index 33c85d2..c811e7d 100644
- C:\OSGeo4W\lib\libexpat.lib \
- C:\OSGeo4W\lib\zlib.lib \
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
+ cl spatialite_osm_map.obj $(LIBS_ALL)
+ cl spatialite_osm_map.obj $(LIBS_ALL)
if exist $(SPATIALITE_OSM_MAP_EXE).manifest mt -manifest \
$(SPATIALITE_OSM_MAP_EXE).manifest \
-outputresource:$(SPATIALITE_OSM_MAP_EXE);1
Expand All @@ -86,7 +94,7 @@ index 33c85d2..c811e7d 100644
- C:\OSGeo4W\lib\iconv.lib \
- C:\OSGeo4W\lib\libexpat.lib \
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
+ cl spatialite_gml.obj $(LIBS_ALL)
+ cl spatialite_gml.obj $(LIBS_ALL)
if exist $(SPATIALITE_GML_EXE).manifest mt -manifest \
$(SPATIALITE_GML_EXE).manifest \
-outputresource:$(SPATIALITE_GML_EXE);1
Expand All @@ -98,7 +106,7 @@ index 33c85d2..c811e7d 100644
- C:\OSGeo4W\lib\libexpat.lib \
- C:\OSGeo4W\lib\zlib.lib \
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
+ cl spatialite_osm_raw.obj $(LIBS_ALL)
+ cl spatialite_osm_raw.obj $(LIBS_ALL)
if exist $(SPATIALITE_OSM_RAW_EXE).manifest mt -manifest \
$(SPATIALITE_OSM_RAW_EXE).manifest \
-outputresource:$(SPATIALITE_OSM_RAW_EXE);1
Expand All @@ -107,12 +115,13 @@ index 33c85d2..c811e7d 100644
- cl spatialite_osm_filter.obj C:\OSGeo4W\lib\proj_i.lib \
- C:\OSGeo4W\lib\iconv.lib \
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
+ cl spatialite_osm_filter.obj $(LIBS_ALL)
+ cl spatialite_osm_filter.obj $(LIBS_ALL)
if exist $(SPATIALITE_OSM_FILTER_EXE).manifest mt -manifest \
$(SPATIALITE_OSM_FILTER_EXE).manifest \
-outputresource:$(SPATIALITE_OSM_FILTER_EXE);1

diff --git a/nmake.opt b/nmake.opt
index 4f4a953..d9efecf 100644
index 4f4a9538e..d9efecf7b 100644
--- a/nmake.opt
+++ b/nmake.opt
@@ -1,8 +1,8 @@
Expand Down
Loading

0 comments on commit c9069aa

Please sign in to comment.