early-access version 2853
This commit is contained in:
34
externals/vcpkg/ports/libspatialite/fix-linux-configure.patch
vendored
Executable file
34
externals/vcpkg/ports/libspatialite/fix-linux-configure.patch
vendored
Executable file
@@ -0,0 +1,34 @@
|
||||
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,13 @@ 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
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# --enable-controlpoints
|
44
externals/vcpkg/ports/libspatialite/fix-makefiles.patch
vendored
Executable file
44
externals/vcpkg/ports/libspatialite/fix-makefiles.patch
vendored
Executable file
@@ -0,0 +1,44 @@
|
||||
diff --git a/makefile.vc b/makefile.vc
|
||||
index 120090eba..049c0d0b0 100644
|
||||
--- a/makefile.vc
|
||||
+++ b/makefile.vc
|
||||
@@ -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.\src\topology \
|
||||
- -I. -IC:\OSGeo4W\include $(OPTFLAGS)
|
||||
+ -I. $(OPTFLAGS)
|
||||
|
||||
default: all
|
||||
|
||||
@@ -107,12 +107,9 @@ spatialite.lib: $(LIBOBJ)
|
||||
$(SPATIALITE_DLL): spatialite_i.lib
|
||||
|
||||
spatialite_i.lib: $(LIBOBJ)
|
||||
- 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\librttopo.lib
|
||||
+ $(LIBS_ALL)
|
||||
if exist $(SPATIALITE_DLL).manifest mt -manifest \
|
||||
$(SPATIALITE_DLL).manifest -outputresource:$(SPATIALITE_DLL);2
|
||||
|
||||
|
||||
diff --git a/nmake.opt b/nmake.opt
|
||||
index c048aa758..be68e21cd 100644
|
||||
--- a/nmake.opt
|
||||
+++ b/nmake.opt
|
||||
@@ -1,8 +1,8 @@
|
||||
# Directory tree where SpatiaLite will be installed.
|
||||
-INSTDIR=C:\OSGeo4W
|
||||
+INSTDIR=$(INST_DIR)
|
||||
|
||||
# Uncomment the first for an optimized build, or the second for debug.
|
||||
-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
|
||||
|
31
externals/vcpkg/ports/libspatialite/gaiaconfig-msvc.patch
vendored
Executable file
31
externals/vcpkg/ports/libspatialite/gaiaconfig-msvc.patch
vendored
Executable file
@@ -0,0 +1,31 @@
|
||||
diff --git a/src/headers/spatialite/gaiaconfig-msvc.h b/src/headers/spatialite/gaiaconfig-msvc.h
|
||||
index 37f0bd1..0053258 100644
|
||||
--- a/src/headers/spatialite/gaiaconfig-msvc.h
|
||||
+++ b/src/headers/spatialite/gaiaconfig-msvc.h
|
||||
@@ -2,7 +2,7 @@
|
||||
/* ./src/headers/spatialite/gaiaconfig-msvc.h.in - manually maintained */
|
||||
|
||||
/* Should be defined in order to enable GCP support. */
|
||||
-#define ENABLE_GCP 1
|
||||
+// #define ENABLE_GCP 1
|
||||
|
||||
/* Should be defined in order to enable GeoPackage support. */
|
||||
#define ENABLE_GEOPACKAGE 1
|
||||
@@ -11,7 +11,7 @@
|
||||
#define ENABLE_LIBXML2 1
|
||||
|
||||
/* Should be defined in order to enable RTTOPO support. */
|
||||
-#define ENABLE_RTTOPO 1
|
||||
+// #define ENABLE_RTTOPO 1
|
||||
|
||||
/* Should be defined in order to enable GEOS_370 support. */
|
||||
#define GEOS_370 1
|
||||
@@ -32,7 +32,7 @@
|
||||
/* #undef OMIT_FREEXL */
|
||||
|
||||
/* Should be defined in order to disable GEOCALLBACKS support. */
|
||||
-#define OMIT_GEOCALLBACKS 1
|
||||
+// #define OMIT_GEOCALLBACKS 1
|
||||
|
||||
/* Should be defined in order to disable GEOS support. */
|
||||
/* #undef OMIT_GEOS */
|
243
externals/vcpkg/ports/libspatialite/portfile.cmake
vendored
Executable file
243
externals/vcpkg/ports/libspatialite/portfile.cmake
vendored
Executable file
@@ -0,0 +1,243 @@
|
||||
set(LIBSPATIALITE_VERSION_STR "5.0.1")
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${LIBSPATIALITE_VERSION_STR}.tar.gz"
|
||||
FILENAME "libspatialite-${LIBSPATIALITE_VERSION_STR}.tar.gz"
|
||||
SHA512 c2552994bc30d69d1e80aa274760f048cd384f71e8350a1e48a47cb8222ba71a1554a69c6534eedde9a09dc582c39c089967bcc1c57bf158cc91a3e7b1840ddf
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
PATCHES
|
||||
fix-makefiles.patch
|
||||
fix-linux-configure.patch
|
||||
gaiaconfig-msvc.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS unused
|
||||
FEATURES
|
||||
freexl ENABLE_FREEXL
|
||||
gcp ENABLE_GCP
|
||||
geocallbacks ENABLE_GEOCALLBACKS
|
||||
rttopo ENABLE_RTTOPO
|
||||
)
|
||||
|
||||
set(pkg_config_modules geos libxml-2.0 proj sqlite3 zlib)
|
||||
if(ENABLE_FREEXL)
|
||||
list(APPEND pkg_config_modules freexl)
|
||||
endif()
|
||||
if(ENABLE_RTTOPO)
|
||||
list(APPEND pkg_config_modules rttopo)
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
set(CL_FLAGS "")
|
||||
if(NOT ENABLE_FREEXL)
|
||||
string(APPEND CL_FLAGS " /DOMIT_FREEXL")
|
||||
endif()
|
||||
if(ENABLE_GCP)
|
||||
string(APPEND CL_FLAGS " /DENABLE_GCP")
|
||||
endif()
|
||||
if(NOT ENABLE_GEOCALLBACKS)
|
||||
string(APPEND CL_FLAGS " /DOMIT_GEOCALLBACKS")
|
||||
endif()
|
||||
if(ENABLE_RTTOPO)
|
||||
string(APPEND CL_FLAGS " /DENABLE_RTTOPO")
|
||||
endif()
|
||||
|
||||
x_vcpkg_pkgconfig_get_modules(
|
||||
PREFIX PKGCONFIG
|
||||
MODULES --msvc-syntax ${pkg_config_modules}
|
||||
LIBS
|
||||
CFLAGS
|
||||
)
|
||||
|
||||
set(CL_FLAGS_RELEASE "${CL_FLAGS} ${PKGCONFIG_CFLAGS_RELEASE}")
|
||||
set(CL_FLAGS_DEBUG "${CL_FLAGS} ${PKGCONFIG_CFLAGS_DEBUG}")
|
||||
|
||||
# vcpkg_build_nmake doesn't supply cmake's implicit link libraries
|
||||
if(PKGCONFIG_LIBS_DEBUG MATCHES "libcrypto")
|
||||
string(APPEND PKGCONFIG_LIBS_DEBUG " user32.lib")
|
||||
endif()
|
||||
if(PKGCONFIG_LIBS_RELEASE MATCHES "libcrypto")
|
||||
string(APPEND PKGCONFIG_LIBS_RELEASE " user32.lib")
|
||||
endif()
|
||||
|
||||
string(JOIN " " LIBS_ALL_DEBUG
|
||||
"/LIBPATH:${CURRENT_INSTALLED_DIR}/debug/lib"
|
||||
"${PKGCONFIG_LIBS_DEBUG}"
|
||||
iconv.lib charset.lib
|
||||
)
|
||||
string(JOIN " " LIBS_ALL_RELEASE
|
||||
"/LIBPATH:${CURRENT_INSTALLED_DIR}/lib"
|
||||
"${PKGCONFIG_LIBS_RELEASE}"
|
||||
iconv.lib charset.lib
|
||||
)
|
||||
|
||||
string(REPLACE "/" "\\\\" INST_DIR "${CURRENT_PACKAGES_DIR}")
|
||||
|
||||
if(ENABLE_RTTOPO)
|
||||
list(APPEND pkg_config_modules rttopo)
|
||||
endif()
|
||||
vcpkg_install_nmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS_RELEASE
|
||||
"CL_FLAGS=${CL_FLAGS_RELEASE}"
|
||||
"INST_DIR=${INST_DIR}"
|
||||
"LIBS_ALL=${LIBS_ALL_RELEASE}"
|
||||
OPTIONS_DEBUG
|
||||
"CL_FLAGS=${CL_FLAGS_DEBUG}"
|
||||
"INST_DIR=${INST_DIR}\\debug"
|
||||
"LIBS_ALL=${LIBS_ALL_DEBUG}"
|
||||
"LINK_FLAGS=/debug"
|
||||
)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib")
|
||||
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib")
|
||||
endif()
|
||||
else()
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/spatialite.lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib" "${CURRENT_PACKAGES_DIR}/lib/spatialite.lib")
|
||||
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(infile "${SOURCE_PATH}/spatialite.pc.in")
|
||||
set(VERSION "${LIBSPATIALITE_VERSION_STR}")
|
||||
set(libdir [[${prefix}/lib]])
|
||||
set(exec_prefix [[${prefix}]])
|
||||
list(JOIN pkg_config_modules " " requires_private)
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
set(includedir [[${prefix}/include]])
|
||||
set(outfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/spatialite.pc")
|
||||
configure_file("${infile}" "${outfile}" @ONLY)
|
||||
vcpkg_replace_string("${outfile}" "Libs:" "Requires.private: ${requires_private}\nLibs.private: -liconv -lcharset\nLibs:")
|
||||
vcpkg_replace_string("${outfile}" " -lm" " ")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
set(includedir [[${prefix}/../include]])
|
||||
set(outfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/spatialite.pc")
|
||||
configure_file("${infile}" "${outfile}" @ONLY)
|
||||
vcpkg_replace_string("${outfile}" "Libs:" "Requires.private: ${requires_private}\nLibs.private: -liconv -lcharset\nLibs:")
|
||||
vcpkg_replace_string("${outfile}" " -lm" " ")
|
||||
endif()
|
||||
else()
|
||||
if(ENABLE_FREEXL)
|
||||
set(FREEXL_OPTION "--enable-freexl")
|
||||
else()
|
||||
set(FREEXL_OPTION "--disable-freexl")
|
||||
endif()
|
||||
if(ENABLE_GCP)
|
||||
set(GCP_OPTION "--enable-gcp")
|
||||
else()
|
||||
set(GCP_OPTION "--disable-gcp")
|
||||
endif()
|
||||
if(ENABLE_GEOCALLBACKS)
|
||||
set(GEOCALLBACKS_OPTION "--enable-geocallbacks")
|
||||
else()
|
||||
set(GEOCALLBACKS_OPTION "--disable-geocallbacks")
|
||||
endif()
|
||||
if(ENABLE_RTTOPO)
|
||||
set(RTTOPO_OPTION "--enable-rttopo")
|
||||
else()
|
||||
set(RTTOPO_OPTION "--disable-rttopo")
|
||||
endif()
|
||||
list(REMOVE_ITEM pkg_config_modules libxml2) # handled properly by configure
|
||||
x_vcpkg_pkgconfig_get_modules(
|
||||
PREFIX PKGCONFIG
|
||||
MODULES ${pkg_config_modules}
|
||||
LIBS
|
||||
)
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
# Avoid system libs (as detected by cmake) in exported pc files
|
||||
set(SYSTEM_LIBS "")
|
||||
else()
|
||||
set(SYSTEM_LIBS "\$LIBS")
|
||||
endif()
|
||||
# libspatialite needs some targets literally
|
||||
if(VCPKG_TARGET_IS_ANDROID)
|
||||
set(TARGET_ALIAS "--target=android")
|
||||
elseif(VCPKG_TARGET_IS_MINGW)
|
||||
set(TARGET_ALIAS "--target=mingw32")
|
||||
elseif(VCPKG_TARGET_IS_OSX)
|
||||
set(TARGET_ALIAS "--target=macosx")
|
||||
else()
|
||||
set(TARGET_ALIAS "")
|
||||
endif()
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
OPTIONS
|
||||
${TARGET_ALIAS}
|
||||
${FREEXL_OPTION}
|
||||
${GCP_OPTION}
|
||||
${GEOCALLBACKS_OPTION}
|
||||
${RTTOPO_OPTION}
|
||||
"--disable-examples"
|
||||
"--disable-minizip"
|
||||
OPTIONS_DEBUG
|
||||
"LIBS=${PKGCONFIG_LIBS_DEBUG} ${SYSTEM_LIBS}"
|
||||
OPTIONS_RELEASE
|
||||
"LIBS=${PKGCONFIG_LIBS_RELEASE} ${SYSTEM_LIBS}"
|
||||
)
|
||||
|
||||
# automake adds the basedir of the generated config to `DEFAULT_INCLUDES`,
|
||||
# but libspatialite uses `#include <spatialite/gaiaconfig.h>`.
|
||||
file(GLOB_RECURSE makefiles
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Makefile"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Makefile"
|
||||
)
|
||||
foreach(makefile IN LISTS makefiles)
|
||||
vcpkg_replace_string("${makefile}" " -I$(top_builddir)/./src/headers/spatialite" " -I$(top_builddir)/./src/headers")
|
||||
endforeach()
|
||||
|
||||
vcpkg_install_make()
|
||||
|
||||
if(VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/plugins/${PORT}")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/mod_spatialite.dll" "${CURRENT_PACKAGES_DIR}/plugins/${PORT}/mod_spatialite.dll")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/plugins/${PORT}")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/mod_spatialite.dll" "${CURRENT_PACKAGES_DIR}/debug/plugins/${PORT}/mod_spatialite.dll")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
# Handle copyright
|
||||
set(outfile "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
|
||||
if(NOT ENABLE_GCP AND NOT ENABLE_RTTOPO)
|
||||
file(READ "${SOURCE_PATH}/COPYING" mpl)
|
||||
file(WRITE "${outfile}"
|
||||
"SpatiaLite[${FEATURES}] is licensed under the MPL tri-license terms;\n"
|
||||
"you are free to choose the best-fit license between:\n"
|
||||
"- the MPL 1.1\n"
|
||||
"- the GPL v2.0 or any subsequent version\n"
|
||||
"- the LGPL v2.1 or any subsequent version.\n\n"
|
||||
"# MPL 1.1 (from COPYING)\n\n"
|
||||
"${mpl}\n"
|
||||
)
|
||||
else()
|
||||
file(WRITE "${outfile}"
|
||||
"SpatiaLite[${FEATURES}] is licensed under:\n"
|
||||
"the GPL v2.0 or any subsequent version.\n\n"
|
||||
)
|
||||
endif()
|
||||
file(READ "${SOURCE_PATH}/src/control_points/COPYING" gpl)
|
||||
file(APPEND "${outfile}"
|
||||
"# GPL v2.0 (from src/control_points/COPYING)\n\n"
|
||||
"${gpl}\n"
|
||||
)
|
47
externals/vcpkg/ports/libspatialite/vcpkg.json
vendored
Executable file
47
externals/vcpkg/ports/libspatialite/vcpkg.json
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "libspatialite",
|
||||
"version": "5.0.1",
|
||||
"port-version": 5,
|
||||
"description": "SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.",
|
||||
"homepage": "https://www.gaia-gis.it/gaia-sins/libspatialite-sources",
|
||||
"license": "MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later",
|
||||
"dependencies": [
|
||||
"geos",
|
||||
"libiconv",
|
||||
"libxml2",
|
||||
"proj",
|
||||
{
|
||||
"name": "sqlite3",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"rtree"
|
||||
]
|
||||
},
|
||||
"vcpkg-pkgconfig-get-modules",
|
||||
"zlib"
|
||||
],
|
||||
"default-features": [
|
||||
"freexl",
|
||||
"geocallbacks"
|
||||
],
|
||||
"features": {
|
||||
"freexl": {
|
||||
"description": "FreeXL spreadsheet file support.",
|
||||
"dependencies": [
|
||||
"freexl"
|
||||
]
|
||||
},
|
||||
"gcp": {
|
||||
"description": "Ground control points support. This feature reduces the license options to GPLv2+."
|
||||
},
|
||||
"geocallbacks": {
|
||||
"description": "Geometry callbacks support."
|
||||
},
|
||||
"rttopo": {
|
||||
"description": "RTTOPO support. This feature reduces the license options to GPLv2+.",
|
||||
"dependencies": [
|
||||
"librttopo"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user