Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libspatialite] Update 5.0.0 #15040

Merged
merged 8 commits into from
Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions ports/libspatialite/CONTROL
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Source: libspatialite
Version: 4.3.0a
Port-Version: 7
Version: 5.0.0
Homepage: https://www.gaia-gis.it/gaia-sins/libspatialite-sources
Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.
Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv

Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv, librttopo
58 changes: 0 additions & 58 deletions ports/libspatialite/fix-configure-debug.patch

This file was deleted.

6 changes: 3 additions & 3 deletions ports/libspatialite/fix-latin-literals.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/src/srsinit/epsg_inlined_prussian.c b/src/srsinit/epsg_inlined_prussian.c
index a5c8334..dd75dde 100644
index b9a371239..d5be67ca2 100644
--- a/src/srsinit/epsg_inlined_prussian.c
+++ b/src/srsinit/epsg_inlined_prussian.c
@@ -282,10 +282,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
Expand All @@ -20,7 +20,7 @@ index a5c8334..dd75dde 100644
add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187916\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
- p = add_epsg_def(filter,first,last,187918,"mj10777.de",187918,"DHDN / Soldner 18 Müggelberg 600");
+ p = add_epsg_def(filter,first,last,187918,u8"mj10777.de",187918,"DHDN / Soldner 18 M\u00fcggelberg 600");
+ p = add_epsg_def(filter,first,last,187918,"mj10777.de",187918,u8"DHDN / Soldner 18 M\u00fcggelberg 600");
add_proj4text(p,0,"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 ");
add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs");
- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 18 Müggelberg 600\",");
Expand Down Expand Up @@ -98,7 +98,7 @@ index a5c8334..dd75dde 100644
add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187938\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
- p = add_epsg_def(filter,first,last,187939,"mj10777.de",187939,"DHDN / Soldner 39 Langschoß");
+ p = add_epsg_def(filter,first,last,187939,u8"mj10777.de",187939,"DHDN / Soldner 39 Langscho\u00df");
+ p = add_epsg_def(filter,first,last,187939,"mj10777.de",187939,u8"DHDN / Soldner 39 Langscho\u00df");
add_proj4text(p,0,"+proj=cass +lat_0=50.66738711 +lon_0=6.28935703 ");
add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs");
- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 39 Langschoß\",");
Expand Down
191 changes: 59 additions & 132 deletions ports/libspatialite/fix-linux-configure.patch
Original file line number Diff line number Diff line change
@@ -1,135 +1,62 @@
diff --git a/configure b/configure
index aafdad5..fe46039 100644
--- a/configure
+++ b/configure
@@ -17448,6 +17448,7 @@ fi
# --enable-proj
#
# Check whether --enable-proj was given.
+
if test "${enable_proj+set}" = set; then :
enableval=$enable_proj;
else
@@ -17469,122 +17470,6 @@ fi
diff --git a/configure.ac b/configure.ac
index ead87caff..47abb90f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -302,6 +302,7 @@ if test x"$enable_geos" != "xno"; then
#-----------------------------------------------------------------------
# --with-geosconfig
#
+ if 0; then
AC_ARG_WITH([geosconfig],
[AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])],
[GEOSCONFIG="$withval"], [GEOSCONFIG=""])
@@ -327,6 +328,7 @@ if test x"$enable_geos" != "xno"; then
# Extract the linker and include flags
GEOS_LDFLAGS=`$GEOSCONFIG --ldflags`
GEOS_CFLAGS=-I`$GEOSCONFIG --includes`
+ fi
AC_SUBST([GEOS_LDFLAGS])
AC_SUBST([GEOS_CFLAGS])
# Ensure that we can parse geos_c.h
@@ -335,11 +337,14 @@ if test x"$enable_geos" != "xno"; then
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"
# Ensure we can link against libgeos_c
+ if 0; then
LIBS_SAVE="$LIBS"
LIBS="$GEOS_LDFLAGS"
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"
+ fi
+ LIBS="$LIBS $GEOS_LDFLAGS"

done
#-----------------------------------------------------------------------
# --enable-controlpoints
@@ -358,7 +363,7 @@ if test x"$enable_geos" != "xno"; then
[--enable-geosadvanced], [enables GEOS advanced features [default=yes]])],
[], [enable_geosadvanced=yes])
if test x"$enable_geosadvanced" != "xno"; then
- AC_SEARCH_LIBS(GEOSDelaunayTriangulation,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosadvanced parameter.]))
+ #AC_SEARCH_LIBS(GEOSDelaunayTriangulation,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosadvanced parameter.]))
AC_DEFINE(GEOS_ADVANCED)
fi

- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pj_init_plus" >&5
-$as_echo_n "checking for library containing pj_init_plus... " >&6; }
-if ${ac_cv_search_pj_init_plus+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pj_init_plus ();
-int
-main ()
-{
-return pj_init_plus ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' proj; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_pj_init_plus=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_pj_init_plus+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_pj_init_plus+:} false; then :
-
-else
- ac_cv_search_pj_init_plus=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pj_init_plus" >&5
-$as_echo "$ac_cv_search_pj_init_plus" >&6; }
-ac_res=$ac_cv_search_pj_init_plus
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-else
- as_fn_error $? "'libproj' is required but it doesn't seem to be installed on this system." "$LINENO" 5
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pj_init_ctx" >&5
-$as_echo_n "checking for library containing pj_init_ctx... " >&6; }
-if ${ac_cv_search_pj_init_ctx+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pj_init_ctx ();
-int
-main ()
-{
-return pj_init_ctx ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' proj; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_pj_init_ctx=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_pj_init_ctx+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_pj_init_ctx+:} false; then :
-
-else
- ac_cv_search_pj_init_ctx=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pj_init_ctx" >&5
-$as_echo "$ac_cv_search_pj_init_ctx" >&6; }
-ac_res=$ac_cv_search_pj_init_ctx
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-else
- as_fn_error $? "'libproj' is required but the version on this system does not support the required features (Version 4.8.0 or later is needed)." "$LINENO" 5
-fi
-
else
$as_echo "#define OMIT_PROJ 1" >>confdefs.h
@@ -369,7 +374,7 @@ if test x"$enable_geos" != "xno"; then
[--enable-geosreentrant], [enables GEOS reentrant (fully thread safe) [default=yes]])],
[], [enable_geosreentrant=yes])
if test x"$enable_geosreentrant" != "xno"; then
- AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.5.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosreentrant parameter.]))
+ #AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.5.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosreentrant parameter.]))
AC_DEFINE(GEOS_REENTRANT)
fi

@@ -390,7 +395,7 @@ if test x"$enable_geos" != "xno"; then
[--enable-geos370], [enables GEOS 3.7.0 features [default=yes]])],
[], [enable_geos370=yes])
if test x"$enable_geos370" != "xno"; then
- AC_SEARCH_LIBS(GEOSFrechetDistance_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.7.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geos370 parameter.]))
+ #AC_SEARCH_LIBS(GEOSFrechetDistance_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.7.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geos370 parameter.]))
AC_DEFINE(GEOS_370)
fi

39 changes: 11 additions & 28 deletions ports/libspatialite/fix-makefiles.patch
Original file line number Diff line number Diff line change
@@ -1,51 +1,34 @@
diff --git a/makefile.vc b/makefile.vc
index 9b9e8ee..b524a27 100644
index 120090eba..049c0d0b0 100644
--- a/makefile.vc
+++ b/makefile.vc
@@ -59,7 +59,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
src\versioninfo\version.obj src\virtualtext\virtualtext.obj
@@ -93,7 +93,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
SPATIALITE_DLL = spatialite$(VERSION).dll

-CFLAGS = /nologo -I.\src\headers -I. -IC:\OSGeo4W\include $(OPTFLAGS)
+CFLAGS = /nologo -I.\src\headers -I. -I$(INSTALLED_ROOT)\include $(OPTFLAGS)
CFLAGS = /nologo -I.\src\headers -I.\src\topology \
- -I. -IC:\OSGeo4W\include $(OPTFLAGS)
+ -I. $(OPTFLAGS)

default: all

@@ -73,12 +73,9 @@ spatialite.lib: $(LIBOBJ)
@@ -107,12 +107,9 @@ spatialite.lib: $(LIBOBJ)
$(SPATIALITE_DLL): spatialite_i.lib

spatialite_i.lib: $(LIBOBJ)
- link /debug /dll /out:$(SPATIALITE_DLL) \
- link /dll /out:$(SPATIALITE_DLL) \
+ link $(LINK_FLAGS) /dll /out:$(SPATIALITE_DLL) \
/implib:spatialite_i.lib $(LIBOBJ) \
- C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \
- C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \
- C:\OSGeo4W\lib\sqlite3_i.lib C:\OSGeo4W\lib\zlib.lib \
- C:\OSGeo4W\lib\libxml2.lib
- C:\OSGeo4W\lib\libxml2.lib C:\OSGeo4W\lib\librttopo.lib
+ $(LIBS_ALL)
if exist $(SPATIALITE_DLL).manifest mt -manifest \
$(SPATIALITE_DLL).manifest -outputresource:$(SPATIALITE_DLL);2

@@ -90,16 +87,7 @@ clean:
del *.exp
del *.manifest
del *.lib
- del src\gaiaaux\*.obj
- del src\gaiaexif\*.obj
- del src\gaiageo\*.obj
- del src\spatialite\*.obj
- del src\srsinit\*.obj
- del src\versioninfo\*.obj
- del src\virtualtext\*.obj
- del src\wfs\*.obj
- del src\dxf\*.obj
- del src\md5\*.obj
+ forfiles /m *.obj* /s /c "cmd /c del @path" & exit 0
del *.pdb

install: all
diff --git a/nmake.opt b/nmake.opt
index 0960ec1..276bc84 100644
index c048aa758..be68e21cd 100644
--- a/nmake.opt
+++ b/nmake.opt
@@ -1,8 +1,8 @@
Expand All @@ -54,8 +37,8 @@ index 0960ec1..276bc84 100644
+INSTDIR=$(INST_DIR)

# Uncomment the first for an optimized build, or the second for debug.
-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \
+OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \
-OPTFLAGS= /nologo /Ox /fp:precise /W4 /MD /D_CRT_SECURE_NO_WARNINGS \
+OPTFLAGS= /nologo /fp:precise /W4 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \
/DDLL_EXPORT /DYY_NO_UNISTD_H
#OPTFLAGS= /nologo /Zi /MD /Fdspatialite.pdb /DDLL_EXPORT

32 changes: 0 additions & 32 deletions ports/libspatialite/fix-sources.patch

This file was deleted.

Loading