[libspatialite] Update 5.0.0 (#15040)

* update to 5.0.0

* update

* update

* fix static build failed

* remove fix-latin-literals.patch

* Update portfile.cmake
This commit is contained in:
Long Huan 2020-12-22 00:56:24 +08:00 committed by GitHub
parent 66bac12e4e
commit 05e79e9377
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 179 additions and 729 deletions

View File

@ -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

View File

@ -1,58 +0,0 @@
diff --git a/configure b/configure
index aafdad55b..11dde35fa 100644
--- a/configure
+++ b/configure
@@ -18089,7 +18089,7 @@ return GEOSCoveredBy ();
return 0;
}
_ACEOF
-for ac_lib in '' geos_c; do
+for ac_lib in '' geos_cd; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -18124,7 +18124,7 @@ else
fi
LIBS="$LIBS_SAVE"
- LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c"
+ LIBS="$LIBS $GEOS_LDFLAGS -lgeos_cd"
#-----------------------------------------------------------------------
# --enable-controlpoints
@@ -18176,7 +18176,7 @@ return GEOSDelaunayTriangulation ();
return 0;
}
_ACEOF
-for ac_lib in '' geos_c; do
+for ac_lib in '' geos_cd; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -18240,7 +18240,7 @@ fi
done
_save_libs="$LIBS"
- LIBS=$LIBS' -llwgeom -lgeos_c'
+ LIBS=$LIBS' -llwgeom -lgeos_cd'
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main() { return lwgeom_make_valid(); return 0; }
@@ -18255,7 +18255,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$_save_libs"
- LIBS=$LIBS' -llwgeom -lgeos_c'
+ LIBS=$LIBS' -llwgeom -lgeos_cd'
#
# testing for PostGIS 2.1 - lwgeom_set_handlers
#
@@ -18283,7 +18283,7 @@ return lwgeom_set_handlers ();
return 0;
}
_ACEOF
-for ac_lib in '' geos_c; do
+for ac_lib in '' geos_cd; do
if test -z "$ac_lib"; then
ac_res="none required"
else

View File

@ -1,108 +0,0 @@
diff --git a/src/srsinit/epsg_inlined_prussian.c b/src/srsinit/epsg_inlined_prussian.c
index a5c8334..dd75dde 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 *
add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",17.11233917],");
add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187913\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
- p = add_epsg_def(filter,first,last,187914,"mj10777.de",187914,"DHDN / Soldner 14 Gröditzberg I");
+ p = add_epsg_def(filter,first,last,187914,"mj10777.de",187914,u8"DHDN / Soldner 14 Gr\u00f6ditzberg I");
add_proj4text(p,0,"+proj=cass +lat_0=51.17819342 +lon_0=15.76127086 ");
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 14 Gröditzberg I\",");
+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 14 Gr\u00f6ditzberg I\",");
add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
@@ -346,10 +346,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",14.70144539],");
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");
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\",");
+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 18 M\u00fcggelberg 600\",");
add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
@@ -362,10 +362,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",13.62720366666667],");
add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187918\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
- p = add_epsg_def(filter,first,last,187919,"mj10777.de",187919,"DHDN / Soldner 19 Götzer Berg 650");
+ p = add_epsg_def(filter,first,last,187919,"mj10777.de",187919,u8"DHDN / Soldner 19 G\u00f6tzer Berg 650");
add_proj4text(p,0,"+proj=cass +lat_0=52.43725961111112 +lon_0=12.72882972222223 ");
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 19 Götzer Berg 650\",");
+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 19 G\u00f6tzer Berg 650\",");
add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
@@ -458,10 +458,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",9.23411097],");
add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187924\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
- p = add_epsg_def(filter,first,last,187925,"mj10777.de",187925,"DHDN / Soldner 25 Rathkrügen");
+ p = add_epsg_def(filter,first,last,187925,"mj10777.de",187925,u8"DHDN / Soldner 25 Rathkr\u00fcgen");
add_proj4text(p,0,"+proj=cass +lat_0=53.81839364 +lon_0=10.04220189 ");
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 25 Rathkrügen\",");
+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 25 Rathkr\u00fcgen\",");
add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
@@ -570,10 +570,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",8.84051853],");
add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187931\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
- p = add_epsg_def(filter,first,last,187932,"mj10777.de",187932,"DHDN / Soldner 32 Münster");
+ p = add_epsg_def(filter,first,last,187932,"mj10777.de",187932,u8"DHDN / Soldner 32 M\u00fcnster");
add_proj4text(p,0,"+proj=cass +lat_0=51.96547642 +lon_0=7.62334994 ");
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 32 Münster\",");
+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 32 M\u00fcnster\",");
add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
@@ -634,10 +634,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",9.50203072],");
add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187935\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
- p = add_epsg_def(filter,first,last,187936,"mj10777.de",187936,"DHDN / Soldner 36 Schaumburg, Schloßturm");
+ p = add_epsg_def(filter,first,last,187936,"mj10777.de",187936,u8"DHDN / Soldner 36 Schaumburg, Schlo\u00dfturm");
add_proj4text(p,0,"+proj=cass +lat_0=50.34048964 +lon_0=7.97808156 ");
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 36 Schaumburg, Schloßturm\",");
+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 36 Schaumburg, Schlo\u00dfturm\",");
add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
@@ -666,10 +666,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",7.60594289],");
add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187937\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
- p = add_epsg_def(filter,first,last,187938,"mj10777.de",187938,"DHDN / Soldner 38 Cöln, Dom");
+ p = add_epsg_def(filter,first,last,187938,"mj10777.de",187938,u8"DHDN / Soldner 38 C\u00f6ln, Dom");
add_proj4text(p,0,"+proj=cass +lat_0=50.94257242 +lon_0=6.95897600 ");
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 38 Cöln, Dom\",");
+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 38 C\u00f6ln, Dom\",");
add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
@@ -682,10 +682,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",6.95897600],");
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");
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ß\",");
+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 39 Langscho\u00df\",");
add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");

View File

@ -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

View File

@ -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 @@
@ -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

View File

@ -1,32 +0,0 @@
diff --git a/config-msvc.h b/config-msvc.h
index 9c7f477..a812546 100644
--- a/config-msvc.h
+++ b/config-msvc.h
@@ -143,7 +143,7 @@
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
+#undef HAVE_UNISTD_H
/* Define to 1 if you have the <zlib.h> header file. */
#define HAVE_ZLIB_H 1
diff --git a/src/gaiageo/gg_extras.c b/src/gaiageo/gg_extras.c
index ff3dd7c..49ec986 100644
--- a/src/gaiageo/gg_extras.c
+++ b/src/gaiageo/gg_extras.c
@@ -59,14 +59,6 @@ the terms of any one of the MPL, the GPL or the LGPL.
#include <spatialite/sqlite.h>
#include <spatialite/gaiageo.h>
-#if defined(_WIN32) && !defined(__MINGW32__)
-static double
-rint (double x)
-{
- return floor (x + 0.5);
-}
-#endif
-
static void
auxGridSnapPoint (int dimension_model, gaiaPointPtr pt, gaiaGeomCollPtr result,
double origin_x, double origin_y, double origin_z,

View File

@ -1,75 +0,0 @@
#!/bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
usage()
{
cat <<EOF
Usage: geos-config [OPTIONS]
Options:
[--prefix]
[--version]
[--libs]
[--clibs]
[--cclibs]
[--static-clibs]
[--static-cclibs]
[--cflags]
[--ldflags]
[--includes]
[--jtsport]
EOF
exit $1
}
if test $# -eq 0; then
usage 1 1>&2
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix)
echo ${prefix}
;;
--version)
echo 3.6.3
;;
--cflags)
echo -I${prefix}/include
;;
--libs)
# TODO: make an alias for --clibs
# see http://trac.osgeo.org/geos/ticket/497
echo -L${libdir} -lgeosd
;;
--clibs)
echo -L${libdir} -lgeos_cd
;;
--cclibs)
echo -L${libdir} -lgeosd
;;
--static-clibs)
echo -L${libdir} -lgeos_cd -lgeosd -lm
;;
--static-cclibs)
echo -L${libdir} -lgeosd -lm
;;
--ldflags)
echo -L${libdir} -lgeos_cd -lgeosd -lstdc++ -lm
;;
--includes)
echo ${prefix}/include
;;
--jtsport)
echo 1.13.0
;;
*)
usage 1 1>&2
;;
esac
shift
done

View File

@ -1,75 +0,0 @@
#!/bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
usage()
{
cat <<EOF
Usage: geos-config [OPTIONS]
Options:
[--prefix]
[--version]
[--libs]
[--clibs]
[--cclibs]
[--static-clibs]
[--static-cclibs]
[--cflags]
[--ldflags]
[--includes]
[--jtsport]
EOF
exit $1
}
if test $# -eq 0; then
usage 1 1>&2
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix)
echo ${prefix}
;;
--version)
echo 3.6.3
;;
--cflags)
echo -I${prefix}/include
;;
--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
;;
--static-clibs)
echo -L${libdir} -lgeos_c -lgeos -lm
;;
--static-cclibs)
echo -L${libdir} -lgeos -lm
;;
--ldflags)
echo -L${libdir} -lgeos_c -lgeos -lstdc++ -lm
;;
--includes)
echo ${prefix}/include
;;
--jtsport)
echo 1.13.0
;;
*)
usage 1 1>&2
;;
esac
shift
done

View File

@ -1,237 +1,127 @@
set(LIBSPATIALITE_VERSION_STR "4.3.0a")
set(LIBSPATIALITE_VERSION_STR "5.0.0")
vcpkg_download_distfile(ARCHIVE
URLS "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${LIBSPATIALITE_VERSION_STR}.tar.gz"
FILENAME "libspatialite-${LIBSPATIALITE_VERSION_STR}.tar.gz"
SHA512 adfd63e8dde0f370b07e4e7bb557647d2bfb5549205b60bdcaaca69ff81298a3d885e7c1ca515ef56dd0aca152ae940df8b5dbcb65bb61ae0a9337499895c3c0
SHA512 df72a3434d6e49f8836a9de2340f343a53f0673d0d17693cdb0f4971928b7c8bf40df44b21c0861945a9c81058e939acd1714b0b426ce9aa2ff7b0e8e6b196a7
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
fix-makefiles.patch
fix-linux-configure.patch
)
if (VCPKG_TARGET_IS_WINDOWS)
find_program(NMAKE nmake)
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib")
set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib")
set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib")
set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib")
set(LIBRTTOPO_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/librttopo.lib")
set(LIBRTTOPO_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/librttopo.lib")
else()
set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib ${CURRENT_INSTALLED_DIR}/lib/geos.lib")
set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/geosd.lib")
set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib")
set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib ws2_32.lib")
set(LIBRTTOPO_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/librttopo.lib")
set(LIBRTTOPO_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/librttopo.lib")
endif()
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
fix-makefiles.patch
fix-sources.patch
fix-latin-literals.patch
)
set(LIBS_ALL_DBG
"${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib \
${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib \
${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib \
${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib \
${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib \
${LIBXML2_LIBS_DBG} \
${GEOS_LIBS_DBG} \
${LIBRTTOPO_LIBS_DBG} \
${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib ole32.lib shell32.lib"
)
set(LIBS_ALL_REL
"${CURRENT_INSTALLED_DIR}/lib/iconv.lib \
${CURRENT_INSTALLED_DIR}/lib/charset.lib \
${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib \
${CURRENT_INSTALLED_DIR}/lib/freexl.lib \
${CURRENT_INSTALLED_DIR}/lib/zlib.lib \
${LIBXML2_LIBS_REL} \
${GEOS_LIBS_REL} \
${LIBRTTOPO_LIBS_REL} \
${CURRENT_INSTALLED_DIR}/lib/proj.lib ole32.lib shell32.lib"
)
# fix most of the problems when spacebar is in the path
set(CURRENT_INSTALLED_DIR "\"${CURRENT_INSTALLED_DIR}\"")
string(REPLACE "/" "\\\\" INST_DIR ${CURRENT_PACKAGES_DIR})
list(APPEND OPTIONS_RELEASE
"INST_DIR=${INST_DIR}" "LIBS_ALL=${LIBS_ALL_REL}"
)
list(APPEND OPTIONS_DEBUG
"LINK_FLAGS=/debug" "INST_DIR=${INST_DIR}\\debug" "LIBS_ALL=${LIBS_ALL_DBG}"
)
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
set(CL_FLAGS_DBG "/MDd /Zi /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H")
set(CL_FLAGS_REL "/MD /Ox /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H")
set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib")
set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib")
set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib")
set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib")
else()
set(CL_FLAGS_DBG "/MTd /Zi /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H")
set(CL_FLAGS_REL "/MT /Ox /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H")
set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib ${CURRENT_INSTALLED_DIR}/lib/geos.lib")
set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/geosd.lib")
set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib")
set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib ws2_32.lib")
endif()
vcpkg_install_nmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
"CL_FLAGS=/DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
OPTIONS_RELEASE
${OPTIONS_RELEASE}
OPTIONS_DEBUG
${OPTIONS_DEBUG}
)
set(LIBS_ALL_DBG
"${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib \
${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib \
${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib \
${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib \
${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib \
${LIBXML2_LIBS_DBG} \
${GEOS_LIBS_DBG} \
${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib ole32.lib shell32.lib"
)
set(LIBS_ALL_REL
"${CURRENT_INSTALLED_DIR}/lib/iconv.lib \
${CURRENT_INSTALLED_DIR}/lib/charset.lib \
${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib \
${CURRENT_INSTALLED_DIR}/lib/freexl.lib \
${CURRENT_INSTALLED_DIR}/lib/zlib.lib \
${LIBXML2_LIBS_REL} \
${GEOS_LIBS_REL} \
${CURRENT_INSTALLED_DIR}/lib/proj.lib ole32.lib shell32.lib"
)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
################
# Debug build
################
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG)
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f makefile.vc clean install
"INST_DIR=\"${INST_DIR_DBG}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}"
WORKING_DIRECTORY ${SOURCE_PATH}
LOGNAME nmake-build-${TARGET_TRIPLET}-debug
)
message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
vcpkg_copy_pdbs()
endif()
################
# Release build
################
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
message(STATUS "Building ${TARGET_TRIPLET}-rel")
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL)
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f makefile.vc clean install
"INST_DIR=\"${INST_DIR_REL}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}"
WORKING_DIRECTORY ${SOURCE_PATH}
LOGNAME nmake-build-${TARGET_TRIPLET}-release
)
message(STATUS "Building ${TARGET_TRIPLET}-rel done")
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libspatialite RENAME copyright)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib)
else()
else()
file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/spatialite.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib)
endif()
endif()
message(STATUS "Packaging ${TARGET_TRIPLET} done")
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib)
endif()
elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) # Build in UNIX
# Check build system first
find_program(MAKE make)
if (NOT MAKE)
message(FATAL_ERROR "MAKE not found")
if(VCPKG_TARGET_IS_LINUX)
set(STDLIB stdc++)
else()
set(STDLIB c++)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
################
# Release build
################
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH_RELEASE
ARCHIVE ${ARCHIVE}
REF release
PATCHES
fix-sources.patch
fix-latin-literals.patch
fix-linux-configure.patch
)
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
set(OUT_PATH_RELEASE ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-release)
file(REMOVE_RECURSE ${OUT_PATH_RELEASE})
file(MAKE_DIRECTORY ${OUT_PATH_RELEASE})
set(prefix ${CURRENT_INSTALLED_DIR})
set(exec_prefix ${prefix}/bin)
set(includedir ${prefix}/include)
set(libdir ${prefix}/lib)
configure_file(${CMAKE_CURRENT_LIST_DIR}/geos-config.in
${SOURCE_PATH_RELEASE}/geos-config @ONLY)
vcpkg_execute_required_process(
COMMAND chmod -R 777 ${SOURCE_PATH_RELEASE}/geos-config
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
LOGNAME config-${TARGET_TRIPLET}-rel
)
vcpkg_execute_required_process(
COMMAND "${SOURCE_PATH_RELEASE}/configure" --prefix=${OUT_PATH_RELEASE} "CFLAGS=-I${includedir} ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" "LDFLAGS=-L${libdir}" "LIBS=-lpthread -ldl -lproj" "--with-geosconfig=${SOURCE_PATH_RELEASE}/geos-config" "LIBXML2_LIBS=-lxml2 -llzma" "LIBXML2_CFLAGS=${includedir}"
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
LOGNAME config-${TARGET_TRIPLET}-rel
)
list(APPEND OPTIONS_RELEASE
"LIBXML2_LIBS=-lxml2 -llzma"
"GEOS_LDFLAGS=-lgeos_c -lgeos -l${STDLIB}"
)
list(APPEND OPTIONS_DEBUG
"LIBXML2_LIBS=-lxml2 -llzmad"
"GEOS_LDFLAGS=-lgeos_cd -lgeosd -l${STDLIB}"
)
message(STATUS "Building ${TARGET_TRIPLET}-rel")
vcpkg_execute_build_process(
COMMAND make -j ${VCPKG_CONCURRENCY}
NO_PARALLEL_COMMAND make
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
LOGNAME make-build-${TARGET_TRIPLET}-release
)
vcpkg_configure_make(
SOURCE_PATH ${SOURCE_PATH}
AUTOCONFIG
OPTIONS
"CFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
"LIBS=-lpthread -ldl -lm -l${STDLIB}"
"LIBXML2_CFLAGS=-I\"${CURRENT_INSTALLED_DIR}/include\""
"--enable-rttopo"
"--enable-gcp"
"--enable-geocallbacks"
"--disable-examples"
"--disable-minizip"
OPTIONS_DEBUG
${OPTIONS_DEBUG}
OPTIONS_RELEASE
${OPTIONS_RELEASE}
)
message(STATUS "Installing ${TARGET_TRIPLET}-rel")
vcpkg_execute_required_process(
COMMAND make install
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
LOGNAME make-install-${TARGET_TRIPLET}-release
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
endif()
set(VERSION ${LIBSPATIALITE_VERSION_STR})
configure_file(${SOURCE_PATH_RELEASE}/spatialite.pc.in
${OUT_PATH_RELEASE}/lib/pkgconfig/spatialite.pc @ONLY)
file(COPY ${OUT_PATH_RELEASE}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
file(COPY ${OUT_PATH_RELEASE}/include DESTINATION ${CURRENT_PACKAGES_DIR})
file(INSTALL ${SOURCE_PATH_RELEASE}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libspatialite RENAME copyright)
message(STATUS "Installing ${TARGET_TRIPLET}-rel done")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
################
# Debug build
################
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH_DEBUG
ARCHIVE ${ARCHIVE}
REF debug
PATCHES
fix-sources.patch
fix-latin-literals.patch
fix-configure-debug.patch
fix-linux-configure.patch
)
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
set(OUT_PATH_DEBUG ${SOURCE_PATH_DEBUG}/../../make-build-${TARGET_TRIPLET}-debug)
file(REMOVE_RECURSE ${OUT_PATH_DEBUG})
file(MAKE_DIRECTORY ${OUT_PATH_DEBUG})
set(prefix ${CURRENT_INSTALLED_DIR})
set(exec_prefix ${prefix}/debug/bin)
set(includedir ${prefix}/include)
set(libdir ${prefix}/debug/lib)
configure_file(${CMAKE_CURRENT_LIST_DIR}/geos-config-debug.in
${SOURCE_PATH_DEBUG}/geos-config @ONLY)
vcpkg_execute_required_process(
COMMAND chmod -R 777 ${SOURCE_PATH_DEBUG}/geos-config
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
LOGNAME config-${TARGET_TRIPLET}-debug
)
vcpkg_execute_required_process(
COMMAND "${SOURCE_PATH_DEBUG}/configure" --prefix=${OUT_PATH_DEBUG} "CFLAGS=-I${includedir} ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" "LDFLAGS=-L${libdir}" "LIBS=-lpthread -ldl -lproj" "--with-geosconfig=${SOURCE_PATH_DEBUG}/geos-config" "LIBXML2_LIBS=-lxml2 -llzmad" "LIBXML2_CFLAGS=${includedir}"
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
LOGNAME config-${TARGET_TRIPLET}-debug
)
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
vcpkg_execute_build_process(
COMMAND make -j ${VCPKG_CONCURRENCY}
NO_PARALLEL_COMMAND make
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
LOGNAME make-build-${TARGET_TRIPLET}-debug
)
message(STATUS "Installing ${TARGET_TRIPLET}-dbg")
vcpkg_execute_required_process(
COMMAND make -j install
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
LOGNAME make-install-${TARGET_TRIPLET}-debug
)
set(VERSION ${LIBSPATIALITE_VERSION_STR})
configure_file(${SOURCE_PATH_DEBUG}/spatialite.pc.in
${OUT_PATH_DEBUG}/lib/pkgconfig/spatialite.pc @ONLY)
file(COPY ${OUT_PATH_DEBUG}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
message(STATUS "Installing ${TARGET_TRIPLET}-dbg done")
endif()
else() # Other build system
message(FATAL_ERROR "Unsupport build system.")
endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,6 +1,6 @@
Source: spatialite-tools
Version: 4.3.0
Port-Version: 6
Port-Version: 7
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

View File

@ -37,8 +37,8 @@ else()
set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_cd.lib ${LDIR}/debug/lib/geosd.lib")
set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib ${LDIR}/lib/lzma.lib ws2_32.lib")
set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib ${LDIR}/debug/lib/lzmad.lib ws2_32.lib")
set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib ${LDIR}/lib/freexl.lib")
set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib ${LDIR}/debug/lib/freexl.lib")
set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib ${LDIR}/lib/freexl.lib ${LDIR}/lib/librttopo.lib")
set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib ${LDIR}/debug/lib/freexl.lib ${LDIR}/debug/lib/librttopo.lib")
set(ICONV_LIBS_REL "${LDIR}/lib/iconv.lib ${LDIR}/lib/charset.lib")
set(ICONV_LIBS_DBG "${LDIR}/debug/lib/iconv.lib ${LDIR}/debug/lib/charset.lib ")
set(EXPAT_LIBS_REL "${LDIR}/lib/libexpatMD.lib")