Skip to content

Commit

Permalink
Revert "Update libspatialite overlay port from 2024.04.26"
Browse files Browse the repository at this point in the history
This reverts commit e6867e8.
  • Loading branch information
rcoup committed May 30, 2024
1 parent bbec101 commit 80e5b8a
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 6 deletions.
2 changes: 1 addition & 1 deletion vcpkg-vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ function(find_mod_spatialite)
find_file(
SPATIALITE_EXTENSION
NAMES mod_spatialite.dll REQUIRED
PATHS "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/plugins/libspatialite"
PATHS "${CURRENT_PACKAGES_DIR}/bin"
NO_DEFAULT_PATH)
else()
set(CMAKE_FIND_LIBRARY_PREFIXES "") # otherwise it looks for `libmod_spatialite`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
diff --git a/makefile_mod.vc b/makefile_mod.vc
index 4815377..dbdbede 100644
--- a/makefile_mod.vc
+++ b/makefile_mod.vc
@@ -93,7 +93,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
MOD_SPATIALITE_DLL = mod_spatialite$(VERSION).dll

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

default: all

@@ -107,12 +107,9 @@ mod_spatialite.lib: $(LIBOBJ)
$(MOD_SPATIALITE_DLL): mod_spatialite_i.lib

mod_spatialite_i.lib: $(LIBOBJ)
- link /dll /out:$(MOD_SPATIALITE_DLL) \
+ link $(LINK_FLAGS) /dll /out:$(MOD_SPATIALITE_DLL) \
/implib:mod_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 $(MOD_SPATIALITE_DLL).manifest mt -manifest \
$(MOD_SPATIALITE_DLL).manifest -outputresource:$(MOD_SPATIALITE_DLL);2

diff --git a/nmake_mod.opt b/nmake_mod.opt
index 7772853..df6ec25 100644
--- a/nmake_mod.opt
+++ b/nmake_mod.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 /DLOADABLE_EXTENSION /DYY_NO_UNISTD_H
#OPTFLAGS= /nologo /Zi /MD /Fdmod_spatialite.pdb /DDLL_EXPORT

24 changes: 23 additions & 1 deletion vcpkg-vendor/vcpkg-overlay-ports/libspatialite/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ vcpkg_extract_source_archive(
ARCHIVE "${ARCHIVE}"
PATCHES
fix-makefiles.patch
fix-makefile-mod.patch
fix-linux-configure.patch
gaiaconfig-msvc.patch
fix-mingw.patch
Expand All @@ -20,6 +21,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS unused
FEATURES
freexl ENABLE_FREEXL
gcp ENABLE_GCP
geocallbacks ENABLE_GEOCALLBACKS
rttopo ENABLE_RTTOPO
)

Expand All @@ -39,6 +41,9 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
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()
Expand Down Expand Up @@ -92,6 +97,22 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
"LINK_FLAGS=/debug"
)

vcpkg_install_nmake(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_NAME makefile_mod.vc
PREFER_JOM
CL_LANGUAGE C
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")
Expand Down Expand Up @@ -181,10 +202,11 @@ else()
${TARGET_ALIAS}
${FREEXL_OPTION}
${GCP_OPTION}
${GEOCALLBACKS_OPTION}
${RTTOPO_OPTION}
"--disable-examples"
"--disable-minizip"
"cross_compiling=yes" # avoid conftest rpath trouble
"--disable-proj"
OPTIONS_DEBUG
"LIBS=${PKGCONFIG_LIBS_DEBUG} ${SYSTEM_LIBS}"
OPTIONS_RELEASE
Expand Down
10 changes: 6 additions & 4 deletions vcpkg-vendor/vcpkg-overlay-ports/libspatialite/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{
"name": "libspatialite",
"version": "5.1.0",
"port-version": 1,
"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/fossil/libspatialite/index",
"homepage": "https://www.gaia-gis.it/gaia-sins/libspatialite-sources",
"license": null,
"dependencies": [
"geos",
"libiconv",
{
"name": "libxml2",
"default-features": false,
"features": [
"http"
]
Expand All @@ -30,7 +28,8 @@
"zlib"
],
"default-features": [
"freexl"
"freexl",
"geocallbacks"
],
"features": {
"freexl": {
Expand All @@ -42,6 +41,9 @@
"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": [
Expand Down

0 comments on commit 80e5b8a

Please sign in to comment.