Skip to content

Commit

Permalink
vcpkg: update
Browse files Browse the repository at this point in the history
* https://github.com/koordinates/vcpkg/tree/kx-20230421
* fix_vendor_libs: add newly used (libpq) system lib wldap32.dll
* proj: fix windows build issue
  • Loading branch information
rcoup committed Apr 23, 2023
1 parent 2b89c54 commit eb2ac87
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 28 deletions.
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ docutils==0.17.1
# via
# -r requirements.in
# rst2txt
#gdal==3.6.2
#gdal==3.6.3
# via -r vendor-wheels.txt
greenlet==2.0.1 ; os_name != "posix"
# via sqlalchemy
Expand Down
2 changes: 1 addition & 1 deletion requirements/vendor-wheels.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cffi==1.15.1
cryptography==39.0.1
gdal==3.6.2
gdal==3.6.3
psycopg2==2.8.5
pygit2==1.9.0
pyodbc==4.0.32
Expand Down
1 change: 1 addition & 0 deletions vcpkg-vendor/fix_vendor_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
"winhttp.dll",
"ws2_32.dll",
"odbc32.dll",
"wldap32.dll",
"python3.dll",
# python39.dll or similar:
f"python{sysconfig.get_config_var('py_version_nodot')}.dll",
Expand Down
2 changes: 1 addition & 1 deletion vcpkg-vendor/vcpkg
Submodule vcpkg updated from 41ea03 to 1e2a0f
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if(GDAL_USE_WEBP)
find_package(WebP CONFIG REQUIRED)
add_library(WEBP::WebP ALIAS WebP::webp)
set(GDAL_CHECK_PACKAGE_WebP_NAMES WebP CACHE INTERNAL "vcpkg")
set(GDAL_CHECK_PACKAGE_WebP_TARGETS WebP::webp CACHE INTERNAL "vcpkg")
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ index 3807ec0..8059eb4 100644
endif()
endif()
+if(PC_Poppler_FOUND)
+ set(Poppler_INCLUDE_DIR "${PC_Poppler_INCLUDE_DIRS}" CACHE STRING "")
+ find_path(Poppler_INCLUDE_DIR NAMES Object.h PATHS ${PC_Poppler_INCLUDE_DIRS} NO_DEFAULT_PATH)
+ set(Poppler_LIBRARY "${PC_Poppler_LIBRARIES}" CACHE STRING "")
+ if(NOT TARGET Poppler::Poppler)
+ add_library(Poppler::Poppler INTERFACE IMPORTED)
Expand Down
46 changes: 46 additions & 0 deletions vcpkg-vendor/vcpkg-overlay-ports/gdal/libkml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
diff --git a/cmake/modules/packages/FindLibKML.cmake b/cmake/modules/packages/FindLibKML.cmake
index 9418247..589b83d 100644
--- a/cmake/modules/packages/FindLibKML.cmake
+++ b/cmake/modules/packages/FindLibKML.cmake
@@ -56,6 +56,8 @@ find_library(LIBKML_BASE_LIBRARY
HINTS ${PC_LIBKML_LIBRARY_DIRS} )
mark_as_advanced(LIBKML_BASE_LIBRARY)

+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW)
set(libkml_known_components DOM CONVENIENCE ENGINE REGIONATOR)
foreach(_comp IN LISTS libkml_known_components)
if(${_comp} IN_LIST LibKML_FIND_COMPONENTS)
@@ -99,21 +101,20 @@ find_package_handle_standard_args(LibKML
if(LIBKML_FOUND)
set(LIBKML_INCLUDE_DIRS "${LIBKML_INCLUDE_DIR}")
set(LIBKML_LIBRARIES "${LIBKML_BASE_LIBRARY}")
+ find_package(LibKML CONFIG REQUIRED)
if(NOT TARGET LIBKML::LibKML)
- add_library(LIBKML::LibKML UNKNOWN IMPORTED)
+ add_library(LIBKML::LibKML INTERFACE IMPORTED)
set_target_properties(LIBKML::LibKML PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${LIBKML_INCLUDE_DIR}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C++"
- IMPORTED_LOCATION "${LIBKML_BASE_LIBRARY}")
+ INTERFACE_LINK_LIBRARIES kmlbase)
endif()
foreach(_comp IN LISTS libkml_known_components)
if(${_comp} IN_LIST LibKML_FIND_COMPONENTS)
+ string(TOLOWER ${_comp} _name)
list(APPEND LIBKML_LIBRARIES "${LIBKML_${_comp}_LIBRARY}")
if(NOT TARGET LIBKML::${_comp})
- add_library(LIBKML::${_comp} UNKNOWN IMPORTED)
+ add_library(LIBKML::${_comp} INTERFACE IMPORTED)
set_target_properties(LIBKML::${_comp} PROPERTIES
- IMPORTED_LINK_INTERFACE_LANGUAGES "C++"
- IMPORTED_LOCATION "${LIBKML_${_comp}_LIBRARY}")
+ INTERFACE_LINK_LIBRARIES kml${_name})
endif()
endif()
endforeach()
@@ -129,3 +130,4 @@ if(LIBKML_FOUND)
endif()
endforeach()
endif()
+cmake_policy(POP)
15 changes: 6 additions & 9 deletions vcpkg-vendor/vcpkg-overlay-ports/gdal/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OSGeo/gdal
REF "v${VERSION}"
SHA512 65a4cbc14f2a972662435ebf4c3be60355f7d57da251590f75b65ded113dda2c89c4a047e3b337841cbaddcf3966c879f448c832687979017df8ab1aaddfbb88
SHA512 1bbaf3a6731a105241cc666afe9c9a0b82e9d46245435d597a7372f928e6966c0e746e94fdd86a8f24c3277912a8c19e76906ee88e5d946ac1c25dd7dd38fdf2
HEAD_REF master
PATCHES
find-link-libraries.patch
fix-gdal-target-interfaces.patch
libkml.patch
)
# `vcpkg clean` stumbles over one subdir
file(REMOVE_RECURSE "${SOURCE_PATH}/autotest")
Expand All @@ -31,7 +30,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
jpeg GDAL_USE_JPEG
core GDAL_USE_JSONC
lerc GDAL_USE_LERC
libkml GDAL_USE_LIBKML # TODO, needs policy patches to FindLibKML.cmake
libkml GDAL_USE_LIBKML
lzma GDAL_USE_LIBLZMA
libxml2 GDAL_USE_LIBXML2
mysql-libmariadb GDAL_USE_MYSQL
Expand Down Expand Up @@ -89,6 +88,7 @@ vcpkg_cmake_configure(
-DGDAL_CHECK_PACKAGE_QHULL_NAMES=Qhull
"-DGDAL_CHECK_PACKAGE_QHULL_TARGETS=${qhull_target}"
"-DQHULL_LIBRARY=${qhull_target}"
-DCMAKE_PROJECT_INCLUDE="${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
OPTIONS_DEBUG
-DBUILD_APPS=OFF
MAYBE_UNUSED_VARIABLES
Expand All @@ -107,10 +107,6 @@ list(APPEND CMAKE_PROGRAM_PATH \"\${vcpkg_host_prefix}/tools/pkgconf\")"
)

if (BUILD_APPS)
if (NOT WIN32)
set(GDAL_SHELL_SCRIPTS gdal-config)
endif()

vcpkg_copy_tools(
TOOL_NAMES
gdalinfo
Expand Down Expand Up @@ -141,7 +137,6 @@ if (BUILD_APPS)
gdalmdimtranslate
gnmanalyse
gnmmanage
${GDAL_SHELL_SCRIPTS}
AUTO_CLEAN
)
endif()
Expand All @@ -151,6 +146,8 @@ file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/share"
)

file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/gdal-config" "${CURRENT_PACKAGES_DIR}/debug/bin/gdal-config")

file(GLOB bin_files "${CURRENT_PACKAGES_DIR}/bin/*")
if(NOT bin_files)
file(REMOVE_RECURSE
Expand Down
10 changes: 9 additions & 1 deletion vcpkg-vendor/vcpkg-overlay-ports/gdal/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "gdal",
"version-semver": "3.6.2",
"version-semver": "3.6.3",
"port-version": 1,
"description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data",
"homepage": "https://gdal.org",
"license": null,
Expand Down Expand Up @@ -62,6 +63,7 @@
"features": [
"gif",
"iconv",
"libkml",
"libxml2",
"lzma",
"openjpeg",
Expand Down Expand Up @@ -146,6 +148,12 @@
"lerc"
]
},
"libkml": {
"description": "Enable the LibKML driver",
"dependencies": [
"libkml"
]
},
"libspatialite": {
"description": "Create or update SpatiaLite databases using libspatialite",
"dependencies": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,15 @@ index ead87caff..47abb90f0 100644
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])
@@ -327,14 +328,17 @@ if test x"$enable_geos" != "xno"; then
# Ensure that we can parse geos_c.h
@@ -335,11 +337,13 @@ if test x"$enable_geos" != "xno"; then
CPPFLAGS_SAVE="$CPPFLAGS"
CPPFLAGS="$GEOS_CFLAGS"
+ fi
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])])
+ if 0; then
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]))
Expand Down
8 changes: 6 additions & 2 deletions vcpkg-vendor/vcpkg-overlay-ports/libspatialite/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ vcpkg_download_distfile(ARCHIVE
SHA512 c2552994bc30d69d1e80aa274760f048cd384f71e8350a1e48a47cb8222ba71a1554a69c6534eedde9a09dc582c39c089967bcc1c57bf158cc91a3e7b1840ddf
)

vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES
fix-makefiles.patch
Expand Down Expand Up @@ -83,6 +83,8 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
endif()
vcpkg_install_nmake(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_JOM
CL_LANGUAGE C
OPTIONS_RELEASE
"CL_FLAGS=${CL_FLAGS_RELEASE}"
"INST_DIR=${INST_DIR}"
Expand All @@ -97,6 +99,8 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
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}"
Expand Down
9 changes: 7 additions & 2 deletions vcpkg-vendor/vcpkg-overlay-ports/libspatialite/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
"name": "libspatialite",
"version": "5.0.1",
"port-version": 8,
"port-version": 12,
"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": null,
"dependencies": [
"geos",
"libiconv",
"libxml2",
{
"name": "libxml2",
"features": [
"http"
]
},
"proj",
{
"name": "sqlite3",
Expand Down
2 changes: 1 addition & 1 deletion vcpkg-vendor/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kart-vendor",
"version-string": "0.1.2",
"builtin-baseline": "41ea03f7700a30f2f136806dabe0cd179bb581f0",
"builtin-baseline": "1e2a0f54808575de8ac947f2b0df2758c889fe5f",
"dependencies": [
{
"name": "sqlite3",
Expand Down

0 comments on commit eb2ac87

Please sign in to comment.