From 2e79a3333db1648d85ef6cb12d4be24ccc945b67 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Fri, 25 Dec 2020 10:29:22 +0800 Subject: [PATCH 01/22] update --- ...x-cfitsio.patch => 0004-Fix-cfitsio.patch} | 6 +- ports/gdal/0004-Fix-std-fabs.patch | 12 -- ports/gdal/CONTROL | 3 +- ports/gdal/dependency_win.cmake | 115 ++++++++++++++++++ ports/gdal/portfile.cmake | 11 +- 5 files changed, 124 insertions(+), 23 deletions(-) rename ports/gdal/{0005-Fix-cfitsio.patch => 0004-Fix-cfitsio.patch} (76%) delete mode 100644 ports/gdal/0004-Fix-std-fabs.patch diff --git a/ports/gdal/0005-Fix-cfitsio.patch b/ports/gdal/0004-Fix-cfitsio.patch similarity index 76% rename from ports/gdal/0005-Fix-cfitsio.patch rename to ports/gdal/0004-Fix-cfitsio.patch index 5e3814a3dcbfe3..61616b9d6f8681 100644 --- a/ports/gdal/0005-Fix-cfitsio.patch +++ b/ports/gdal/0004-Fix-cfitsio.patch @@ -1,9 +1,9 @@ diff --git a/frmts/fits/fitsdataset.cpp b/frmts/fits/fitsdataset.cpp -index 4f41a12..723d211 100644 +index bf16c8cd5..cab9f9968 100644 --- a/frmts/fits/fitsdataset.cpp +++ b/frmts/fits/fitsdataset.cpp -@@ -34,7 +34,7 @@ - #include "ogr_spatialref.h" +@@ -35,7 +35,7 @@ + #include "ogrsf_frmts.h" #include -#include diff --git a/ports/gdal/0004-Fix-std-fabs.patch b/ports/gdal/0004-Fix-std-fabs.patch deleted file mode 100644 index 08fb21ce7bffb5..00000000000000 --- a/ports/gdal/0004-Fix-std-fabs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/ogr/ogrlinestring.cpp b/ogr/ogrlinestring.cpp -index 1e16d9f..cf7ced1 100644 ---- a/ogr/ogrlinestring.cpp -+++ b/ogr/ogrlinestring.cpp -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include - - CPL_CVSID("$Id: ogrlinestring.cpp ad9178b63f501e9840d86a3220c9e5100c6e3fa2 2019-10-21 13:19:06 +0200 Even Rouault $") - diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 36944edce4a366..8022dd3dddef7d 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,6 +1,5 @@ Source: gdal -Version: 3.1.3 -Port-Version: 1 +Version: 3.2.0 Homepage: https://gdal.org/ Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib, libgeotiff, cfitsio, json-c (!windows) diff --git a/ports/gdal/dependency_win.cmake b/ports/gdal/dependency_win.cmake index 0d9dfa53368978..5acf3d467abbf4 100644 --- a/ports/gdal/dependency_win.cmake +++ b/ports/gdal/dependency_win.cmake @@ -95,6 +95,121 @@ macro(find_dependency_win) set(ICONV_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/lib/charset.lib" ) set(ICONV_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib" ) + # Setup jpeg libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/jpeg.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" JPEG_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/jpeg.lib" JPEG_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/jpegd.lib" JPEG_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS JPEG_EXTERNAL_LIB=1) + list(APPEND NMAKE_OPTIONS JPEGDIR=${JPEG_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL JPEG_LIB=${JPEG_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG JPEG_LIB=${JPEG_LIBRARY_DBG}) + endif() + + # Setup zstd libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/zstd.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" ZSTD_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/zstd.lib" ZSTD_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/zstdd.lib" ZSTD_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS ZSTD_CFLAGS=-I${ZSTD_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL ZSTD_LIBS=${ZSTD_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG ZSTD_LIBS=${ZSTD_LIBRARY_DBG}) + endif() + + # Setup tiff libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/tiff.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" TIFF_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/tiff.lib" TIFF_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/tiffd.lib" TIFF_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS TIFF_INC=-I${TIFF_INCLUDE}) + list(APPEND NMAKE_OPTIONS TIFF_OPTS=-DBIGTIFF_SUPPORT) + list(APPEND NMAKE_OPTIONS_REL TIFF_LIB=${TIFF_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG TIFF_LIB=${TIFF_LIBRARY_DBG}) + endif() + + # Setup geotiff libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/geotiff_i.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" GEOTIFF_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geotiff_i.lib" GEOTIFF_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geotiff_d_i.lib" GEOTIFF_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS GEOTIFF_INC=-I${GEOTIFF_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL GEOTIFF_LIB=${GEOTIFF_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG GEOTIFF_LIB=${GEOTIFF_LIBRARY_DBG}) + endif() + + # Setup Xerces libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/xerces-c_3.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" XERCES_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" XERCES_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/xerces-c_3.lib" XERCES_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/xerces-c_3D.lib" XERCES_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS ILI_ENABLED=YES) + list(APPEND NMAKE_OPTIONS XERCES_DIR=${XERCES_DIR}) + list(APPEND NMAKE_OPTIONS "XERCES_INCLUDE=-I${XERCES_INCLUDE} -I${XERCES_INCLUDE}/xercesc") + list(APPEND NMAKE_OPTIONS_REL XERCES_LIB=${XERCES_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG XERCES_LIB=${XERCES_LIBRARY_DBG}) + endif() + + # Setup freexl libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/freexl.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" FREEXL_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/freexl.lib" FREEXL_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib" FREEXL_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS FREEXL_CFLAGS=-I${FREEXL_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL FREEXL_LIBS=${FREEXL_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG FREEXL_LIBS=${FREEXL_LIBRARY_DBG}) + endif() + + # Setup Cryptopp libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/cryptopp-static.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" CRYPTOPP_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/cryptopp-static.lib" CRYPTOPP_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/cryptopp-static.lib" CRYPTOPP_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS CRYPTOPP_INC=-I${CRYPTOPP_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL CRYPTOPP_LIB=${CRYPTOPP_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG CRYPTOPP_LIB=${CRYPTOPP_LIBRARY_DBG}) + endif() + + # Setup netcdf libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/netcdf.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" NETCDF_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/netcdf.lib" NETCDF_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/netcdf.lib" NETCDF_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS NETCDF_PLUGIN=NO) + list(APPEND NMAKE_OPTIONS NETCDF_SETTING=yes) + list(APPEND NMAKE_OPTIONS NETCDF_INC_DIR=${NETCDF_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL NETCDF_LIB=${NETCDF_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG NETCDF_LIB=${NETCDF_LIBRARY_DBG}) + endif() + + # Setup libkml libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/kmlbase.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" LIBKML_DIR) + list(APPEND NMAKE_OPTIONS LIBKML_DIR=${LIBKML_DIR}) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" LIBKML_INCLUDE) + list(APPEND NMAKE_OPTIONS LIBKML_INCLUDE=-I${LIBKML_INCLUDE}) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlbase.lib" KMLBASE_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlbase.lib" KMLBASE_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlconvenience.lib" KMLCONVENIENCE_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlconvenience.lib" KMLCONVENIENCE_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmldom.lib" KMLDOM_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmldom.lib" KMLDOM_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlengine.lib" KMLENGINE_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlengine.lib" KMLENGINE_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlregionator.lib" KMLREGIONATOR_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlregionator.lib" KMLREGIONATOR_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlxsd.lib" KMLXSD_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlxsd.lib" KMLXSD_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/bz2.lib" BZIP2_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/bz2d.lib" BZIP2_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/minizip.lib" MINIZIP_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/minizip.lib" MINIZIP_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/uriparser.lib" URIPARSER_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/uriparser.lib" URIPARSER_DBG) + list(APPEND NMAKE_OPTIONS_REL "LIBKML_LIBS=${KMLBASE_REL} ${KMLCONVENIENCE_REL} ${KMLDOM_REL} ${KMLENGINE_REL} ${KMLREGIONATOR_REL} ${KMLXSD_REL} ${BZIP2_REL} ${MINIZIP_REL} ${URIPARSER_REL} ${EXPAT_LIBRARY_REL} ${ZLIB_LIBRARY_REL}") + list(APPEND NMAKE_OPTIONS_DBG "LIBKML_LIBS=${KMLBASE_DBG} ${KMLCONVENIENCE_DBG} ${KMLDOM_DBG} ${KMLENGINE_DBG} ${KMLREGIONATOR_DBG} ${KMLXSD_DBG} ${BZIP2_DBG} ${MINIZIP_DBG} ${URIPARSER_DBG} ${EXPAT_LIBRARY_DBG} ${ZLIB_LIBRARY_DBG}") + endif() + if("mysql-libmysql" IN_LIST FEATURES OR "mysql-libmariadb" IN_LIST FEATURES) # Setup MySQL libraries + include path if("mysql-libmysql" IN_LIST FEATURES) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index c1fca47a81e6c0..0d62bac3c0c2c5 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -4,10 +4,10 @@ include(${CMAKE_CURRENT_LIST_DIR}/dependency_win.cmake) vcpkg_fail_port_install(ON_ARCH "arm") # NOTE: update the version and checksum for new GDAL release -set(GDAL_VERSION_STR "3.1.3") -set(GDAL_VERSION_PKG "313") +set(GDAL_VERSION_STR "3.2.0") +set(GDAL_VERSION_PKG "320") set(GDAL_VERSION_LIB "204") -set(GDAL_PACKAGE_SUM "a6dad37813eecb5e0c888ec940cf7f83c5096e69e4f33a3e5a5557542e7f656b9726e470e1b5d3d035de53df065510931a436a8c889f1366abd630c1cf5dfb49") +set(GDAL_PACKAGE_SUM "2b278ae533b94857bfe0ffc9122535a384d5d374623bc17a41260d372ed7a9629a3648a93768ab484d83127fa80bb2057f3d4664c87ac4a14036d4a6df19f8b3") vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/gdal/${GDAL_VERSION_STR}/gdal${GDAL_VERSION_PKG}.zip" @@ -19,7 +19,7 @@ set(GDAL_PATCHES 0001-Fix-debug-crt-flags.patch 0002-Fix-build.patch) if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") list(APPEND GDAL_PATCHES 0003-Fix-static-build.patch) endif() -list(APPEND GDAL_PATCHES 0004-Fix-std-fabs.patch 0005-Fix-cfitsio.patch) +list(APPEND GDAL_PATCHES 0004-Fix-cfitsio.patch) vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} @@ -136,6 +136,7 @@ if (VCPKG_TARGET_IS_WINDOWS) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) list(APPEND GDAL_EXES gdal_contour + gdal_create gdal_grid gdal_rasterize gdal_translate @@ -149,7 +150,6 @@ if (VCPKG_TARGET_IS_WINDOWS) gdalmanage gdalmdiminfo gdalmdimtranslate - gdalserver gdalsrsinfo gdaltindex gdaltransform @@ -186,7 +186,6 @@ else() set(CONF_OPTS --enable-shared=${BUILD_DYNAMIC} --enable-static=${BUILD_STATIC}) list(APPEND CONF_OPTS --with-proj=${CURRENT_INSTALLED_DIR} --with-libjson-c=${CURRENT_INSTALLED_DIR}) - list(APPEND CONF_OPTS --without-jasper) vcpkg_configure_make( SOURCE_PATH ${SOURCE_PATH} From e2f15294a9b727b0fff5ff2454912dc2f4251abe Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Mon, 28 Dec 2020 11:20:21 +0800 Subject: [PATCH 02/22] update --- ports/gdal/0005-Fix-configure.patch | 78 +++++++++++++++++++++++++++++ ports/gdal/dependency_win.cmake | 20 ++++---- ports/gdal/portfile.cmake | 3 +- 3 files changed, 91 insertions(+), 10 deletions(-) create mode 100644 ports/gdal/0005-Fix-configure.patch diff --git a/ports/gdal/0005-Fix-configure.patch b/ports/gdal/0005-Fix-configure.patch new file mode 100644 index 00000000000000..eb9da3201724a4 --- /dev/null +++ b/ports/gdal/0005-Fix-configure.patch @@ -0,0 +1,78 @@ +diff --git a/m4/ax_lib_sqlite3.m4 b/m4/ax_lib_sqlite3.m4 +index e53a4a967..440e2c5ed 100644 +--- a/m4/ax_lib_sqlite3.m4 ++++ b/m4/ax_lib_sqlite3.m4 +@@ -76,23 +76,22 @@ AC_DEFUN([AX_LIB_SQLITE3], + + unset ac_cv_lib_sqlite3_sqlite3_open + saved_LIBS="$LIBS" +- LIBS="" + AC_CHECK_LIB(sqlite3,sqlite3_open,LIB_SQLITE3_FOUND=yes,LIB_SQLITE3_FOUND=no,-L$ac_sqlite3_path/lib) + LIBS="$saved_LIBS" + if test "$LIB_SQLITE3_FOUND" = "yes"; then + ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib" + fi + ++ ac_sqlite3_include_path="$ac_sqlite3_path/include" + ac_sqlite3_cppflags="-I$ac_sqlite3_path/include" + else +- for ac_sqlite3_path_tmp in /usr /usr/local /opt ; do +- if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \ +- && test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then ++ for ac_sqlite3_path_tmp in $prefix /usr /usr/local /opt; do ++ if (test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \ ++ && test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header") || (test -f "$ac_sqlite3_path_tmp/../include/$ac_sqlite3_header" && test -r "$ac_sqlite3_path_tmp/../include/$ac_sqlite3_header"); then + ac_sqlite3_path=$ac_sqlite3_path_tmp + + unset ac_cv_lib_sqlite3_sqlite3_open + saved_LIBS="$LIBS" +- LIBS="" + AC_CHECK_LIB(sqlite3,sqlite3_open,LIB_SQLITE3_FOUND=yes,LIB_SQLITE3_FOUND=no,) + LIBS="$saved_LIBS" + if test "$LIB_SQLITE3_FOUND" = "yes"; then +@@ -100,7 +99,6 @@ AC_DEFUN([AX_LIB_SQLITE3], + else + unset ac_cv_lib_sqlite3_sqlite3_open + saved_LIBS="$LIBS" +- LIBS="" + AC_CHECK_LIB(sqlite3,sqlite3_open,LIB_SQLITE3_FOUND=yes,LIB_SQLITE3_FOUND=no,-L$ac_sqlite3_path_tmp/lib) + LIBS="$saved_LIBS" + if test "$LIB_SQLITE3_FOUND" = "yes"; then +@@ -108,7 +106,12 @@ AC_DEFUN([AX_LIB_SQLITE3], + fi + fi + +- ac_sqlite3_cppflags="-I$ac_sqlite3_path_tmp/include" ++ if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" && test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then ++ ac_sqlite3_include_path="$ac_sqlite3_path_tmp/include" ++ else ++ ac_sqlite3_include_path="$ac_sqlite3_path_tmp/../include" ++ fi ++ ac_sqlite3_cppflags="-I$ac_sqlite3_include_path" + break; + fi + done +@@ -122,7 +125,6 @@ AC_DEFUN([AX_LIB_SQLITE3], + AC_MSG_CHECKING([for SQLite3 library >= $sqlite3_version_req]) + + if test "x$WANT_SQLITE3" = "xyes"; then +- + ac_sqlite3_ldflags="$ac_sqlite3_ldflags -lsqlite3" + + saved_CPPFLAGS="$CPPFLAGS" +@@ -161,7 +163,7 @@ AC_DEFUN([AX_LIB_SQLITE3], + SQLITE3_CFLAGS="$ac_sqlite3_cppflags" + SQLITE3_LDFLAGS="$ac_sqlite3_ldflags" + +- ac_sqlite3_header_path="$ac_sqlite3_path/include/$ac_sqlite3_header" ++ ac_sqlite3_header_path="$ac_sqlite3_include_path/$ac_sqlite3_header" + + dnl Retrieve SQLite release version + if test "x$ac_sqlite3_header_path" != "x"; then +@@ -184,5 +186,6 @@ AC_DEFUN([AX_LIB_SQLITE3], + else + AC_MSG_RESULT([disabled]) + fi ++ unset ac_sqlite3_include_path + ]) + diff --git a/ports/gdal/dependency_win.cmake b/ports/gdal/dependency_win.cmake index 5acf3d467abbf4..a922b8020de26c 100644 --- a/ports/gdal/dependency_win.cmake +++ b/ports/gdal/dependency_win.cmake @@ -171,15 +171,17 @@ macro(find_dependency_win) endif() # Setup netcdf libraries - if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/netcdf.lib") - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" NETCDF_INCLUDE) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/netcdf.lib" NETCDF_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/netcdf.lib" NETCDF_LIBRARY_DBG) - list(APPEND NMAKE_OPTIONS NETCDF_PLUGIN=NO) - list(APPEND NMAKE_OPTIONS NETCDF_SETTING=yes) - list(APPEND NMAKE_OPTIONS NETCDF_INC_DIR=${NETCDF_INCLUDE}) - list(APPEND NMAKE_OPTIONS_REL NETCDF_LIB=${NETCDF_LIBRARY_REL}) - list(APPEND NMAKE_OPTIONS_DBG NETCDF_LIB=${NETCDF_LIBRARY_DBG}) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/netcdf.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" NETCDF_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/netcdf.lib" NETCDF_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/netcdf.lib" NETCDF_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS NETCDF_PLUGIN=NO) + list(APPEND NMAKE_OPTIONS NETCDF_SETTING=yes) + list(APPEND NMAKE_OPTIONS NETCDF_INC_DIR=${NETCDF_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL NETCDF_LIB=${NETCDF_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG NETCDF_LIB=${NETCDF_LIBRARY_DBG}) + endif() endif() # Setup libkml libraries diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 0d62bac3c0c2c5..8d89477e1a6bf1 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_download_distfile(ARCHIVE SHA512 ${GDAL_PACKAGE_SUM} ) -set(GDAL_PATCHES 0001-Fix-debug-crt-flags.patch 0002-Fix-build.patch) +set(GDAL_PATCHES 0001-Fix-debug-crt-flags.patch 0002-Fix-build.patch 0005-Fix-configure.patch) if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") list(APPEND GDAL_PATCHES 0003-Fix-static-build.patch) endif() @@ -186,6 +186,7 @@ else() set(CONF_OPTS --enable-shared=${BUILD_DYNAMIC} --enable-static=${BUILD_STATIC}) list(APPEND CONF_OPTS --with-proj=${CURRENT_INSTALLED_DIR} --with-libjson-c=${CURRENT_INSTALLED_DIR}) + list(APPEND CONF_OPTS --without-jasper) vcpkg_configure_make( SOURCE_PATH ${SOURCE_PATH} From 931ab3977b71d3638442b313560313177839791a Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Mon, 4 Jan 2021 10:58:03 +0800 Subject: [PATCH 03/22] update --- ports/gdal/0005-Fix-configure.patch | 104 ++++++++++++++++++++++++++++ ports/gdal/CONTROL | 2 +- ports/gdal/portfile.cmake | 31 +++++++-- 3 files changed, 130 insertions(+), 7 deletions(-) diff --git a/ports/gdal/0005-Fix-configure.patch b/ports/gdal/0005-Fix-configure.patch index eb9da3201724a4..3313fe4310511b 100644 --- a/ports/gdal/0005-Fix-configure.patch +++ b/ports/gdal/0005-Fix-configure.patch @@ -1,3 +1,94 @@ +diff --git a/configure.ac b/configure.ac +index bd85e0616..5023a6724 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1298,6 +1298,7 @@ elif test "x${with_libtiff}" = "xinternal" ; then + else + + TIFF_SETTING=external ++ if 0; then + if test -r "$with_libtiff/tiff.h" ; then + LIBS="-L$with_libtiff -ltiff $LIBS" + EXTRA_INCLUDES="-I$with_libtiff $EXTRA_INCLUDES" +@@ -1305,11 +1306,12 @@ else + LIBS="-L$with_libtiff/lib -ltiff $LIBS" + EXTRA_INCLUDES="-I$with_libtiff/include $EXTRA_INCLUDES" + fi ++ fi + + AC_MSG_RESULT([using libtiff from ${with_libtiff}.]) + + dnl Check for the BigTIFF enabled library (libtiff >= 4.0) +- AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,) ++ AC_SEARCH_LIBS(TIFFScanlineSize64,[tiff tiffd],HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,) + + fi + +@@ -1338,18 +1340,19 @@ if test "`basename xx/$with_curl`" = "curl-config" ; then + elif test "$with_curl" = "no" ; then + LIBCURL_CONFIG=no + else +- AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no) ++ LIBCURL_CONFIG=yes + fi + + if test "$LIBCURL_CONFIG" != "no" ; then +- ++ if 0; then + CURL_VERNUM=`$LIBCURL_CONFIG --vernum` + CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'` + + AC_MSG_RESULT([ found libcurl version $CURL_VER]) + + AC_CHECK_LIB(curl,curl_global_init,CURL_SETTING=yes,CURL_SETTING=no,`$LIBCURL_CONFIG --libs`) +- ++ fi ++ CURL_SETTING=yes + fi + + AC_SUBST(CURL_SETTING,$CURL_SETTING) +@@ -1570,12 +1573,10 @@ dnl --------------------------------------------------------------------------- + AC_ARG_WITH(liblzma,[ --with-liblzma[=ARG] Include liblzma support (ARG=yes/no)],,) + + if test "$with_liblzma" = "yes" ; then +- AC_CHECK_LIB(lzma,lzma_code,LIBLZMA_SETTING=yes,LIBLZMA_SETTING=no,) ++ AC_SEARCH_LIBS(lzma_code,[lzma lzmad],LIBLZMA_SETTING=yes,LIBLZMA_SETTING=no,) + AC_CHECK_HEADERS(lzma.h) + +- if test "$LIBLZMA_SETTING" = "yes" -a "$ac_cv_header_lzma_h" = "yes" ; then +- LIBS="-llzma $LIBS" +- else ++ if test "$ac_cv_header_lzma_h" != "yes" ; then + LIBLZMA_SETTING=no + fi + else +@@ -1891,7 +1892,7 @@ else + PG_LIB="${PQ_LIBS}" + PG_INC="${PQ_CFLAGS}" + SAVED_LIBS="${LIBS}" +- LIBS="${PG_LIB}" ++ LIBS="${PG_LIB} ${LIBS}" + AC_CHECK_LIB(pq,PQconnectdb,HAVE_PG=yes,HAVE_PG=no) + LIBS="${SAVED_LIBS}" + if test "${HAVE_PG}" = "yes" ; then +@@ -4281,6 +4282,7 @@ AC_ARG_WITH(xml2, + + if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then + ++ if 0; then + PKG_PROG_PKG_CONFIG([0.21]) + PKG_CHECK_MODULES(LIBXML2,[libxml-2.0], [HAVE_LIBXML2=yes], [HAVE_LIBXML2=no]) + +@@ -4299,6 +4301,8 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then + AC_MSG_ERROR([--with-xml2 was requested, but libxml2 is not available]) + fi + fi ++ fi ++ HAVE_LIBXML2=yes + elif test "x$with_xml2" != "xno"; then + AC_MSG_ERROR([Only --with-xml2=yes/no supported]) + fi + diff --git a/m4/ax_lib_sqlite3.m4 b/m4/ax_lib_sqlite3.m4 index e53a4a967..440e2c5ed 100644 --- a/m4/ax_lib_sqlite3.m4 @@ -76,3 +167,16 @@ index e53a4a967..440e2c5ed 100644 + unset ac_sqlite3_include_path ]) + +diff --git a/m4/geos.m4 b/m4/geos.m4 +index a410673b4..c16e1f33a 100644 +--- a/m4/geos.m4 ++++ b/m4/geos.m4 +@@ -60,6 +60,7 @@ AC_DEFUN([GEOS_INIT],[ + + AC_PATH_PROG(GEOS_CONFIG, geos-config, no) + ac_geos_config_auto=yes ++ HAVE_GEOS="yes" + + else + diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 8022dd3dddef7d..8c3a167ba5a40c 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -2,7 +2,7 @@ Source: gdal Version: 3.2.0 Homepage: https://gdal.org/ Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. -Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib, libgeotiff, cfitsio, json-c (!windows) +Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib, libgeotiff, cfitsio, json-c (!windows), qhull (!windows) Supports: !arm Feature: mysql-libmariadb diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 8d89477e1a6bf1..f7ccc2df8d3fed 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -183,21 +183,40 @@ else() set(BUILD_DYNAMIC no) set(BUILD_STATIC yes) endif() - + set(CONF_OPTS --enable-shared=${BUILD_DYNAMIC} --enable-static=${BUILD_STATIC}) - list(APPEND CONF_OPTS --with-proj=${CURRENT_INSTALLED_DIR} --with-libjson-c=${CURRENT_INSTALLED_DIR}) - list(APPEND CONF_OPTS --without-jasper) - + list(APPEND CONF_OPTS --with-proj=${CURRENT_INSTALLED_DIR} --with-libjson-c=${CURRENT_INSTALLED_DIR} --with-spatialite=${CURRENT_INSTALLED_DIR}) + list(APPEND CONF_OPTS --with-libtiff=${CURRENT_INSTALLED_DIR} --with-geotiff=${CURRENT_INSTALLED_DIR}) + list(APPEND CONF_OPTS --with-pg=yes --with-liblzma=yes) + + if(VCPKG_TARGET_IS_LINUX) + set(STDLIB stdc++) + else() + set(STDLIB c++) + endif() + + list(APPEND OPTIONS_RELEASE + "LIBS=-pthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lrttopo -lxml2 -lfreexl -llzma -lz -lszip" + ) + list(APPEND OPTIONS_DEBUG + "LIBS=-pthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lrttopo -lxml2 -lfreexl -llzmad -lz -lszip_debug" + ) + vcpkg_configure_make( SOURCE_PATH ${SOURCE_PATH} AUTOCONFIG COPY_SOURCE - OPTIONS ${CONF_OPTS} + OPTIONS + ${CONF_OPTS} + "GEOS_VERSION=3.8.1" + OPTIONS_RELEASE + ${OPTIONS_RELEASE} OPTIONS_DEBUG --enable-debug --without-fit # Disable cfitsio temporary + ${OPTIONS_DEBUG} ) - + vcpkg_install_make(MAKEFILE GNUmakefile) file(REMOVE_RECURSE From de7a113ac8942420203f3fa5f5061ad99a057826 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Mon, 4 Jan 2021 13:49:30 +0800 Subject: [PATCH 04/22] Update portfile.cmake --- ports/gdal/portfile.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index f7ccc2df8d3fed..f9685af103df94 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -196,10 +196,10 @@ else() endif() list(APPEND OPTIONS_RELEASE - "LIBS=-pthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lrttopo -lxml2 -lfreexl -llzma -lz -lszip" + "LIBS=-lpthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lrttopo -lxml2 -lfreexl -llzma -lz -lszip" ) list(APPEND OPTIONS_DEBUG - "LIBS=-pthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lrttopo -lxml2 -lfreexl -llzmad -lz -lszip_debug" + "LIBS=-lpthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lrttopo -lxml2 -lfreexl -llzmad -lz -lszip_debug" ) vcpkg_configure_make( @@ -213,7 +213,6 @@ else() ${OPTIONS_RELEASE} OPTIONS_DEBUG --enable-debug - --without-fit # Disable cfitsio temporary ${OPTIONS_DEBUG} ) From 103cc600cfee1c20544db11459811e1edffbc98e Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Mon, 4 Jan 2021 14:44:45 +0800 Subject: [PATCH 05/22] update --- ports/gdal/portfile.cmake | 4 ++-- scripts/cmake/vcpkg_execute_required_process.cmake | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index f9685af103df94..7a796934cd2d03 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -196,10 +196,10 @@ else() endif() list(APPEND OPTIONS_RELEASE - "LIBS=-lpthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lrttopo -lxml2 -lfreexl -llzma -lz -lszip" + "LIBS=-pthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lrttopo -lxml2 -lfreexl -llzma -lz -lszip" ) list(APPEND OPTIONS_DEBUG - "LIBS=-lpthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lrttopo -lxml2 -lfreexl -llzmad -lz -lszip_debug" + "LIBS=-pthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lrttopo -lxml2 -lfreexl -llzmad -lz -lszip_debug" ) vcpkg_configure_make( diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake index 4b8d24761683d1..c96d5dc72ed52c 100644 --- a/scripts/cmake/vcpkg_execute_required_process.cmake +++ b/scripts/cmake/vcpkg_execute_required_process.cmake @@ -105,6 +105,9 @@ Halting portfile execution. list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") endforeach() vcpkg_prettify_command(vcpkg_execute_required_process_COMMAND vcpkg_execute_required_process_COMMAND_PRETTY) + if(EXISTS "${vcpkg_execute_required_process_WORKING_DIRECTORY}/config.log") + file(RENAME "${vcpkg_execute_required_process_WORKING_DIRECTORY}/config.log" "${CURRENT_BUILDTREES_DIR}/config.log-${vcpkg_execute_required_process_LOGNAME}.log") + endif() message(FATAL_ERROR " Command failed: ${vcpkg_execute_required_process_COMMAND_PRETTY}\n" " Working Directory: ${vcpkg_execute_required_process_WORKING_DIRECTORY}\n" From 14a36e7cc97f7fdc8a26f60b595ec1ceb0dd7821 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Tue, 5 Jan 2021 08:30:56 +0800 Subject: [PATCH 06/22] Revert "update" This reverts commit 103cc600cfee1c20544db11459811e1edffbc98e. --- ports/gdal/portfile.cmake | 4 ++-- scripts/cmake/vcpkg_execute_required_process.cmake | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 7a796934cd2d03..f9685af103df94 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -196,10 +196,10 @@ else() endif() list(APPEND OPTIONS_RELEASE - "LIBS=-pthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lrttopo -lxml2 -lfreexl -llzma -lz -lszip" + "LIBS=-lpthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lrttopo -lxml2 -lfreexl -llzma -lz -lszip" ) list(APPEND OPTIONS_DEBUG - "LIBS=-pthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lrttopo -lxml2 -lfreexl -llzmad -lz -lszip_debug" + "LIBS=-lpthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lrttopo -lxml2 -lfreexl -llzmad -lz -lszip_debug" ) vcpkg_configure_make( diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake index c96d5dc72ed52c..4b8d24761683d1 100644 --- a/scripts/cmake/vcpkg_execute_required_process.cmake +++ b/scripts/cmake/vcpkg_execute_required_process.cmake @@ -105,9 +105,6 @@ Halting portfile execution. list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") endforeach() vcpkg_prettify_command(vcpkg_execute_required_process_COMMAND vcpkg_execute_required_process_COMMAND_PRETTY) - if(EXISTS "${vcpkg_execute_required_process_WORKING_DIRECTORY}/config.log") - file(RENAME "${vcpkg_execute_required_process_WORKING_DIRECTORY}/config.log" "${CURRENT_BUILDTREES_DIR}/config.log-${vcpkg_execute_required_process_LOGNAME}.log") - endif() message(FATAL_ERROR " Command failed: ${vcpkg_execute_required_process_COMMAND_PRETTY}\n" " Working Directory: ${vcpkg_execute_required_process_WORKING_DIRECTORY}\n" From 74ea04ebff01256e434b4e8917813313b2c91226 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Tue, 5 Jan 2021 08:35:54 +0800 Subject: [PATCH 07/22] update --- ports/gdal/CONTROL | 2 +- ports/gdal/portfile.cmake | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 8c3a167ba5a40c..8022dd3dddef7d 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -2,7 +2,7 @@ Source: gdal Version: 3.2.0 Homepage: https://gdal.org/ Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. -Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib, libgeotiff, cfitsio, json-c (!windows), qhull (!windows) +Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib, libgeotiff, cfitsio, json-c (!windows) Supports: !arm Feature: mysql-libmariadb diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index f9685af103df94..6677b0c72517b2 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -185,10 +185,20 @@ else() endif() set(CONF_OPTS --enable-shared=${BUILD_DYNAMIC} --enable-static=${BUILD_STATIC}) - list(APPEND CONF_OPTS --with-proj=${CURRENT_INSTALLED_DIR} --with-libjson-c=${CURRENT_INSTALLED_DIR} --with-spatialite=${CURRENT_INSTALLED_DIR}) + list(APPEND CONF_OPTS --with-proj=${CURRENT_INSTALLED_DIR} --with-libjson-c=${CURRENT_INSTALLED_DIR}) list(APPEND CONF_OPTS --with-libtiff=${CURRENT_INSTALLED_DIR} --with-geotiff=${CURRENT_INSTALLED_DIR}) list(APPEND CONF_OPTS --with-pg=yes --with-liblzma=yes) + if ("libspatialite" IN_LIST FEATURES) + list(APPEND CONF_OPTS --with-spatialite=${CURRENT_INSTALLED_DIR}) + list(APPEND DEPENDENCY_LIBS_RELEASE + "-lrttopo -lfreexl" + ) + list(APPEND DEPENDENCY_LIBS_DEBUG + "-lrttopo -lfreexl" + ) + endif() + if(VCPKG_TARGET_IS_LINUX) set(STDLIB stdc++) else() @@ -196,10 +206,10 @@ else() endif() list(APPEND OPTIONS_RELEASE - "LIBS=-lpthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lrttopo -lxml2 -lfreexl -llzma -lz -lszip" + "LIBS=-lpthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lxml2 ${DEPENDENCY_LIBS_RELEASE} -llzma -lz -lszip" ) list(APPEND OPTIONS_DEBUG - "LIBS=-lpthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lrttopo -lxml2 -lfreexl -llzmad -lz -lszip_debug" + "LIBS=-lpthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lxml2 ${DEPENDENCY_LIBS_DEBUG} -llzmad -lz -lszip_debug" ) vcpkg_configure_make( From 99cbeb4ff729138556f67ff8086c90a590abaa3f Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Tue, 5 Jan 2021 08:49:33 +0800 Subject: [PATCH 08/22] Update portfile.cmake --- ports/gdal/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 6677b0c72517b2..a4d6fda126b9e3 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -206,10 +206,10 @@ else() endif() list(APPEND OPTIONS_RELEASE - "LIBS=-lpthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lxml2 ${DEPENDENCY_LIBS_RELEASE} -llzma -lz -lszip" + "LIBS=-pthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lxml2 ${DEPENDENCY_LIBS_RELEASE} -llzma -lz -lszip" ) list(APPEND OPTIONS_DEBUG - "LIBS=-lpthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lxml2 ${DEPENDENCY_LIBS_DEBUG} -llzmad -lz -lszip_debug" + "LIBS=-pthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lxml2 ${DEPENDENCY_LIBS_DEBUG} -llzmad -lz -lszip_debug" ) vcpkg_configure_make( From 8907be44f10536bb661840c93e4bffaec6e63445 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Sat, 20 Feb 2021 17:22:55 +0800 Subject: [PATCH 09/22] update --- ports/gdal/0004-Fix-cfitsio.patch | 6 +- ports/gdal/0005-Fix-configure.patch | 140 ++++++++++++++++------------ ports/gdal/CONTROL | 19 ---- ports/gdal/dependency_win.cmake | 20 +++- ports/gdal/portfile.cmake | 29 +++--- ports/gdal/vcpkg.json | 44 +++++++++ 6 files changed, 156 insertions(+), 102 deletions(-) delete mode 100644 ports/gdal/CONTROL create mode 100644 ports/gdal/vcpkg.json diff --git a/ports/gdal/0004-Fix-cfitsio.patch b/ports/gdal/0004-Fix-cfitsio.patch index 61616b9d6f8681..0a878c07b56335 100644 --- a/ports/gdal/0004-Fix-cfitsio.patch +++ b/ports/gdal/0004-Fix-cfitsio.patch @@ -1,13 +1,13 @@ diff --git a/frmts/fits/fitsdataset.cpp b/frmts/fits/fitsdataset.cpp -index bf16c8cd5..cab9f9968 100644 +index c3f4a4e1f..eb29a92b1 100644 --- a/frmts/fits/fitsdataset.cpp +++ b/frmts/fits/fitsdataset.cpp -@@ -35,7 +35,7 @@ +@@ -38,7 +38,7 @@ #include "ogrsf_frmts.h" #include -#include +#include + #include #include - #include diff --git a/ports/gdal/0005-Fix-configure.patch b/ports/gdal/0005-Fix-configure.patch index 3313fe4310511b..6bfe48af98941c 100644 --- a/ports/gdal/0005-Fix-configure.patch +++ b/ports/gdal/0005-Fix-configure.patch @@ -1,30 +1,21 @@ diff --git a/configure.ac b/configure.ac -index bd85e0616..5023a6724 100644 +index bd85e0616..23d1d2f79 100644 --- a/configure.ac +++ b/configure.ac -@@ -1298,6 +1298,7 @@ elif test "x${with_libtiff}" = "xinternal" ; then - else - - TIFF_SETTING=external -+ if 0; then - if test -r "$with_libtiff/tiff.h" ; then - LIBS="-L$with_libtiff -ltiff $LIBS" - EXTRA_INCLUDES="-I$with_libtiff $EXTRA_INCLUDES" -@@ -1305,11 +1306,12 @@ else - LIBS="-L$with_libtiff/lib -ltiff $LIBS" - EXTRA_INCLUDES="-I$with_libtiff/include $EXTRA_INCLUDES" - fi -+ fi - - AC_MSG_RESULT([using libtiff from ${with_libtiff}.]) +@@ -1275,10 +1275,10 @@ AC_MSG_CHECKING([for libtiff]) + if test "x${with_libtiff}" = "xyes" -o "x${with_libtiff}" = "x" ; then - dnl Check for the BigTIFF enabled library (libtiff >= 4.0) -- AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,) -+ AC_SEARCH_LIBS(TIFFScanlineSize64,[tiff tiffd],HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,) + dnl Only automatically pick up the external libtiff if it is >= 4.0. +- AC_CHECK_LIB(tiff,TIFFScanlineSize64,TIFF_SETTING=external HAVE_BIGTIFF=yes,TIFF_SETTING=internal HAVE_BIGTIFF=yes,) ++ AC_SEARCH_LIBS(TIFFScanlineSize64,[tiffd tiff],TIFF_SETTING=external HAVE_BIGTIFF=yes,TIFF_SETTING=internal HAVE_BIGTIFF=yes,-ljpeg) - fi - -@@ -1338,18 +1340,19 @@ if test "`basename xx/$with_curl`" = "curl-config" ; then + if test "$TIFF_SETTING" = "external" ; then +- LIBS="-ltiff $LIBS" ++ LIBS="-ljpeg $LIBS" + AC_MSG_RESULT([using pre-installed libtiff.]) + else + AC_MSG_RESULT([using internal TIFF code.]) +@@ -1338,18 +1338,12 @@ if test "`basename xx/$with_curl`" = "curl-config" ; then elif test "$with_curl" = "no" ; then LIBCURL_CONFIG=no else @@ -33,61 +24,92 @@ index bd85e0616..5023a6724 100644 fi if test "$LIBCURL_CONFIG" != "no" ; then -- -+ if 0; then - CURL_VERNUM=`$LIBCURL_CONFIG --vernum` - CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'` - - AC_MSG_RESULT([ found libcurl version $CURL_VER]) - AC_CHECK_LIB(curl,curl_global_init,CURL_SETTING=yes,CURL_SETTING=no,`$LIBCURL_CONFIG --libs`) +- CURL_VERNUM=`$LIBCURL_CONFIG --vernum` +- CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'` +- +- AC_MSG_RESULT([ found libcurl version $CURL_VER]) - -+ fi -+ CURL_SETTING=yes +- AC_CHECK_LIB(curl,curl_global_init,CURL_SETTING=yes,CURL_SETTING=no,`$LIBCURL_CONFIG --libs`) +- ++ AC_SEARCH_LIBS(curl_global_init,[curl-d curl],CURL_SETTING=yes,CURL_SETTING=no,) fi AC_SUBST(CURL_SETTING,$CURL_SETTING) -@@ -1570,12 +1573,10 @@ dnl --------------------------------------------------------------------------- +@@ -1512,12 +1506,12 @@ elif test "$with_spatialite" = "yes"; then + AC_CHECK_HEADERS(sqlite3.h) + if test "$ac_cv_header_sqlite3_h" = "yes"; then + AC_MSG_CHECKING([for spatialite.h in /usr/include or /usr/local/include]) +- if test -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then ++ if test -f "$prefix/../include/spatialite.h" -o -f "$prefix/include/spatialite.h" -o -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then + AC_MSG_RESULT(found) +- AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,-lsqlite3) ++ AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,-lsqlite3 -lrttopo -lfreexl -lgeos_c -lgeos) + if test "$SPATIALITE_INIT_FOUND" = "yes"; then + HAVE_SPATIALITE=yes +- SPATIALITE_LIBS="-lspatialite -lsqlite3" ++ SPATIALITE_LIBS="-lspatialite -lsqlite3 -lrttopo -lfreexl -lgeos_c -lgeos" + LIBS="$LIBS $SPATIALITE_LIBS" + HAVE_SQLITE3=yes + fi +@@ -1570,12 +1564,12 @@ dnl --------------------------------------------------------------------------- AC_ARG_WITH(liblzma,[ --with-liblzma[=ARG] Include liblzma support (ARG=yes/no)],,) if test "$with_liblzma" = "yes" ; then - AC_CHECK_LIB(lzma,lzma_code,LIBLZMA_SETTING=yes,LIBLZMA_SETTING=no,) -+ AC_SEARCH_LIBS(lzma_code,[lzma lzmad],LIBLZMA_SETTING=yes,LIBLZMA_SETTING=no,) ++ SAVED_LIBS="${LIBS}" ++ AC_SEARCH_LIBS(lzma_code,[lzmad lzma],LIBLZMA_SETTING=yes,LIBLZMA_SETTING=no,) AC_CHECK_HEADERS(lzma.h) - if test "$LIBLZMA_SETTING" = "yes" -a "$ac_cv_header_lzma_h" = "yes" ; then - LIBS="-llzma $LIBS" - else -+ if test "$ac_cv_header_lzma_h" != "yes" ; then ++ if test "$LIBLZMA_SETTING" != "yes" -o "$ac_cv_header_lzma_h" != "yes" ; then ++ LIBS="$SAVED_LIBS" LIBLZMA_SETTING=no fi else -@@ -1891,7 +1892,7 @@ else - PG_LIB="${PQ_LIBS}" - PG_INC="${PQ_CFLAGS}" - SAVED_LIBS="${LIBS}" -- LIBS="${PG_LIB}" -+ LIBS="${PG_LIB} ${LIBS}" - AC_CHECK_LIB(pq,PQconnectdb,HAVE_PG=yes,HAVE_PG=no) - LIBS="${SAVED_LIBS}" - if test "${HAVE_PG}" = "yes" ; then -@@ -4281,6 +4282,7 @@ AC_ARG_WITH(xml2, +@@ -1592,11 +1586,9 @@ dnl --------------------------------------------------------------------------- + AC_ARG_WITH(zstd,[ --with-zstd[=ARG] Include zstd support (ARG=yes/no/installation_prefix)],,) - if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then + if test "$with_zstd" = "" -o "$with_zstd" = "yes" ; then +- AC_CHECK_LIB(zstd,ZSTD_decompressStream,ZSTD_SETTING=yes,ZSTD_SETTING=no,) ++ AC_SEARCH_LIBS(ZSTD_decompressStream,[zstdd zstd],ZSTD_SETTING=yes,ZSTD_SETTING=no,) -+ if 0; then - PKG_PROG_PKG_CONFIG([0.21]) - PKG_CHECK_MODULES(LIBXML2,[libxml-2.0], [HAVE_LIBXML2=yes], [HAVE_LIBXML2=no]) +- if test "$ZSTD_SETTING" = "yes" ; then +- LIBS="-lzstd $LIBS" +- else ++ if test "$ZSTD_SETTING" != "yes" ; then + if test "$with_zstd" = "yes" ; then + AC_MSG_ERROR([libzstd not found]) + else +@@ -1820,8 +1812,6 @@ fi -@@ -4299,6 +4301,8 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then - AC_MSG_ERROR([--with-xml2 was requested, but libxml2 is not available]) - fi + if test "$CURL_SETTING" = "yes" ; then + +- CURL_INC=`$LIBCURL_CONFIG --cflags` +- CURL_LIB=`$LIBCURL_CONFIG --libs` + m4_foreach_w([frmt],CURL_FORMATS,[ + driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) + if test "x$driver_enabled" = "xyes"; then +@@ -1888,7 +1878,7 @@ else + PKG_CHECK_MODULES([PQ],[libpq > 9.1], [HAVE_PG=yes], [HAVE_PG=no]) + + if test "${HAVE_PG}" = "yes" ; then +- PG_LIB="${PQ_LIBS}" ++ PG_LIB="${PQ_LIBS} -lpgcommon -lpgport" + PG_INC="${PQ_CFLAGS}" + SAVED_LIBS="${LIBS}" + LIBS="${PG_LIB}" +@@ -4286,7 +4276,7 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then + + if test "${HAVE_LIBXML2}" = "yes"; then + SAVED_LIBS="${LIBS}" +- LIBS="${LIBXML2_LIBS}" ++ LIBS="${LIBXML2_LIBS} ${LIBS}" + AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) + LIBS="${SAVED_LIBS}" fi -+ fi -+ HAVE_LIBXML2=yes - elif test "x$with_xml2" != "xno"; then - AC_MSG_ERROR([Only --with-xml2=yes/no supported]) - fi diff --git a/m4/ax_lib_sqlite3.m4 b/m4/ax_lib_sqlite3.m4 index e53a4a967..440e2c5ed 100644 @@ -169,14 +191,16 @@ index e53a4a967..440e2c5ed 100644 diff --git a/m4/geos.m4 b/m4/geos.m4 -index a410673b4..c16e1f33a 100644 +index a410673b4..793d3803c 100644 --- a/m4/geos.m4 +++ b/m4/geos.m4 -@@ -60,6 +60,7 @@ AC_DEFUN([GEOS_INIT],[ +@@ -60,6 +60,9 @@ AC_DEFUN([GEOS_INIT],[ AC_PATH_PROG(GEOS_CONFIG, geos-config, no) ac_geos_config_auto=yes + HAVE_GEOS="yes" ++ GEOS_LIBS="-lgeos_c -lgeos -lm" ++ GEOS_VERSION="3.9.0" else diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL deleted file mode 100644 index 9b511bebabaf1d..00000000000000 --- a/ports/gdal/CONTROL +++ /dev/null @@ -1,19 +0,0 @@ -Source: gdal -<<<<<<< HEAD -Version: 3.2.0 -======= -Version: 3.1.3 -Port-Version: 2 ->>>>>>> 1bb5ea10a3ff03783b37369eb5180a50557f3b0f -Homepage: https://gdal.org/ -Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. -Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib, libgeotiff, cfitsio, json-c (!windows) -Supports: !arm - -Feature: mysql-libmariadb -Build-Depends: libmariadb -Description: Add mysql support using libmariadb - -Feature: libspatialite -Build-Depends: libspatialite -Description: Create or update SpatiaLite databases using libspatialite diff --git a/ports/gdal/dependency_win.cmake b/ports/gdal/dependency_win.cmake index 7979595e11fb12..d51e3911469864 100644 --- a/ports/gdal/dependency_win.cmake +++ b/ports/gdal/dependency_win.cmake @@ -22,8 +22,13 @@ macro(find_dependency_win) # Setup expat libraries + include path set(EXPAT_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(EXPAT_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libexpatMD.lib" ) - set(EXPAT_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatdMD.lib" ) + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(EXPAT_SUFFIX "MT") + else() + set(EXPAT_SUFFIX "MD") + endif() + set(EXPAT_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libexpat${EXPAT_SUFFIX}.lib" ) + set(EXPAT_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd${EXPAT_SUFFIX}.lib" ) else() set(EXPAT_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libexpat.lib" ) set(EXPAT_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd.lib" ) @@ -225,8 +230,13 @@ macro(find_dependency_win) if ("libspatialite" IN_LIST FEATURES) # Setup spatialite libraries + include path set(SPATIALITE_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/spatialite" ) - set(SPATIALITE_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/spatialite.lib" ) - set(SPATIALITE_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/spatialite.lib" ) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(SPATIALITE_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/librttopo.lib" "${CURRENT_INSTALLED_DIR}/lib/spatialite.lib") + set(SPATIALITE_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/librttopo.lib" "${CURRENT_INSTALLED_DIR}/debug/lib/spatialite.lib") + else() + set(SPATIALITE_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/spatialite.lib" ) + set(SPATIALITE_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/spatialite.lib" ) + endif() set(HAVE_SPATIALITE "-DHAVE_SPATIALITE") endif() -endmacro() +endmacro() \ No newline at end of file diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index a4d6fda126b9e3..24419f96a9ba7f 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -4,10 +4,10 @@ include(${CMAKE_CURRENT_LIST_DIR}/dependency_win.cmake) vcpkg_fail_port_install(ON_ARCH "arm") # NOTE: update the version and checksum for new GDAL release -set(GDAL_VERSION_STR "3.2.0") -set(GDAL_VERSION_PKG "320") +set(GDAL_VERSION_STR "3.2.1") +set(GDAL_VERSION_PKG "321") set(GDAL_VERSION_LIB "204") -set(GDAL_PACKAGE_SUM "2b278ae533b94857bfe0ffc9122535a384d5d374623bc17a41260d372ed7a9629a3648a93768ab484d83127fa80bb2057f3d4664c87ac4a14036d4a6df19f8b3") +set(GDAL_PACKAGE_SUM "3c650f570f0561067fa404e5287e78ec1fb4158aa0f1d87226e92dc3adf706b0bac023fee788b816d4dc339bbce41c05ed4b14ab363cb9f98d7b43a3e8140490") vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/gdal/${GDAL_VERSION_STR}/gdal${GDAL_VERSION_PKG}.zip" @@ -185,31 +185,27 @@ else() endif() set(CONF_OPTS --enable-shared=${BUILD_DYNAMIC} --enable-static=${BUILD_STATIC}) - list(APPEND CONF_OPTS --with-proj=${CURRENT_INSTALLED_DIR} --with-libjson-c=${CURRENT_INSTALLED_DIR}) - list(APPEND CONF_OPTS --with-libtiff=${CURRENT_INSTALLED_DIR} --with-geotiff=${CURRENT_INSTALLED_DIR}) + list(APPEND CONF_OPTS --with-proj=yes --with-libjson-c=${CURRENT_INSTALLED_DIR}) + list(APPEND CONF_OPTS --with-libtiff=yes --with-geotiff=yes) list(APPEND CONF_OPTS --with-pg=yes --with-liblzma=yes) if ("libspatialite" IN_LIST FEATURES) - list(APPEND CONF_OPTS --with-spatialite=${CURRENT_INSTALLED_DIR}) - list(APPEND DEPENDENCY_LIBS_RELEASE - "-lrttopo -lfreexl" - ) - list(APPEND DEPENDENCY_LIBS_DEBUG - "-lrttopo -lfreexl" - ) + list(APPEND CONF_OPTS --with-spatialite=yes) + else() + list(APPEND CONF_OPTS --with-spatialite=no) endif() if(VCPKG_TARGET_IS_LINUX) - set(STDLIB stdc++) + set(DEPENDLIBS "-lstdc++ -lssl -lcrypto") else() - set(STDLIB c++) + set(DEPENDLIBS "-lc++ -llber -lldap -framework CoreFoundation -framework Security") endif() list(APPEND OPTIONS_RELEASE - "LIBS=-pthread -l${STDLIB} -ltiff -ljpeg -lpq -lpgcommon -lpgport -lcurl -lssl -lcrypto -lgeos_c -lgeos -lxml2 ${DEPENDENCY_LIBS_RELEASE} -llzma -lz -lszip" + "LIBS=-pthread ${DEPENDLIBS} -lz -lm -lszip -llzma -lzstd -liconv" ) list(APPEND OPTIONS_DEBUG - "LIBS=-pthread -l${STDLIB} -ltiffd -ljpeg -lpq -lpgcommon -lpgport -lcurl-d -lssl -lcrypto -lgeos_cd -lgeosd -lxml2 ${DEPENDENCY_LIBS_DEBUG} -llzmad -lz -lszip_debug" + "LIBS=-pthread ${DEPENDLIBS} -lz -lm -lszip_debug -llzmad -lzstdd -liconv" ) vcpkg_configure_make( @@ -218,7 +214,6 @@ else() COPY_SOURCE OPTIONS ${CONF_OPTS} - "GEOS_VERSION=3.8.1" OPTIONS_RELEASE ${OPTIONS_RELEASE} OPTIONS_DEBUG diff --git a/ports/gdal/vcpkg.json b/ports/gdal/vcpkg.json new file mode 100644 index 00000000000000..b9fac2f513e358 --- /dev/null +++ b/ports/gdal/vcpkg.json @@ -0,0 +1,44 @@ +{ + "name": "gdal", + "version": "3.2.1", + "description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data", + "homepage": "https://gdal.org", + "supports": "!arm", + "dependencies": [ + "proj4", + "libpng", + "geos", + "sqlite3", + "curl", + "expat", + "libpq", + "openjpeg", + "libwebp", + "libxml2", + "liblzma", + "netcdf-c", + "hdf5", + "zlib", + "libgeotiff", + "cfitsio", + "zstd", + { + "name": "json-c", + "platform": "!windows" + } + ], + "features": { + "mysql-libmariadb": { + "description": "Add mysql support using libmariadb", + "dependencies": [ + "libmariadb" + ] + }, + "libspatialite": { + "description": "Create or update SpatiaLite databases using libspatialite", + "dependencies": [ + "libspatialite" + ] + } + } +} From f2cae880cde78d2b677ba2a0fa51b3a9735e5529 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Mon, 22 Feb 2021 09:08:20 +0800 Subject: [PATCH 10/22] update --- ports/gdal/portfile.cmake | 6 +++--- ports/gdal/vcpkg.json | 40 +++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 24419f96a9ba7f..960d7b781f250f 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -196,16 +196,16 @@ else() endif() if(VCPKG_TARGET_IS_LINUX) - set(DEPENDLIBS "-lstdc++ -lssl -lcrypto") + set(DEPENDLIBS "-lstdc++") else() set(DEPENDLIBS "-lc++ -llber -lldap -framework CoreFoundation -framework Security") endif() list(APPEND OPTIONS_RELEASE - "LIBS=-pthread ${DEPENDLIBS} -lz -lm -lszip -llzma -lzstd -liconv" + "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lz -lm -lszip -llzma -lzstd -liconv" ) list(APPEND OPTIONS_DEBUG - "LIBS=-pthread ${DEPENDLIBS} -lz -lm -lszip_debug -llzmad -lzstdd -liconv" + "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lz -lm -lszip_debug -llzmad -lzstdd -liconv" ) vcpkg_configure_make( diff --git a/ports/gdal/vcpkg.json b/ports/gdal/vcpkg.json index b9fac2f513e358..9089e11af85cc8 100644 --- a/ports/gdal/vcpkg.json +++ b/ports/gdal/vcpkg.json @@ -5,40 +5,40 @@ "homepage": "https://gdal.org", "supports": "!arm", "dependencies": [ - "proj4", - "libpng", - "geos", - "sqlite3", + "cfitsio", "curl", "expat", + "geos", + "hdf5", + { + "name": "json-c", + "platform": "!windows" + }, + "libgeotiff", + "liblzma", + "libpng", "libpq", - "openjpeg", "libwebp", "libxml2", - "liblzma", "netcdf-c", - "hdf5", + "openjpeg", + "proj4", + "sqlite3", "zlib", - "libgeotiff", - "cfitsio", - "zstd", - { - "name": "json-c", - "platform": "!windows" - } + "zstd" ], "features": { - "mysql-libmariadb": { - "description": "Add mysql support using libmariadb", - "dependencies": [ - "libmariadb" - ] - }, "libspatialite": { "description": "Create or update SpatiaLite databases using libspatialite", "dependencies": [ "libspatialite" ] + }, + "mysql-libmariadb": { + "description": "Add mysql support using libmariadb", + "dependencies": [ + "libmariadb" + ] } } } From 8aeaf0a1e8278a3c688cc61878c8fd2c846b2ac2 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Mon, 22 Feb 2021 13:34:08 +0800 Subject: [PATCH 11/22] update --- ports/gdal/0001-Fix-debug-crt-flags.patch | 19 +++++++++++++++++-- ports/gdal/portfile.cmake | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ports/gdal/0001-Fix-debug-crt-flags.patch b/ports/gdal/0001-Fix-debug-crt-flags.patch index 1580051f5c7610..4640cf7f04d022 100644 --- a/ports/gdal/0001-Fix-debug-crt-flags.patch +++ b/ports/gdal/0001-Fix-debug-crt-flags.patch @@ -1,8 +1,14 @@ diff --git a/nmake.opt b/nmake.opt -index 88e197c..308eddd 100644 +index 468d2ba1a..e75a081f7 100644 --- a/nmake.opt +++ b/nmake.opt -@@ -147,11 +147,21 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_PDB) +@@ -148,16 +148,26 @@ GDAL_PDB = $(GDAL_ROOT)\gdal$(VERSION)$(POSTFIX).pdb + !ENDIF + + !IFDEF WITH_PDB +-CXX_PDB_FLAGS=/Zi /Fd$(GDAL_PDB) ++CXX_PDB_FLAGS=/Z7 /Fd$(GDAL_PDB) + !ELSE CXX_PDB_FLAGS= !ENDIF @@ -26,3 +32,12 @@ index 88e197c..308eddd 100644 !ENDIF !ENDIF # OPTFLAGS +@@ -175,7 +185,7 @@ OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) /MDd /EH + # 4351: new behavior: elements of array 'array' will be default initialized (needed for https://trac.osgeo.org/gdal/changeset/35593) + # 4611: interaction between '_setjmp' and C++ object destruction is non-portable + # +-WARNFLAGS = /W4 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4351 /wd4611 ++WARNFLAGS = /W3 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4351 /wd4611 + + !ENDIF + diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 960d7b781f250f..1bb8e4c1dadfc4 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -40,6 +40,7 @@ if (VCPKG_TARGET_IS_WINDOWS) endif() list(APPEND NMAKE_OPTIONS + VERSION=${GDAL_VERSION_LIB} DATADIR=${NATIVE_DATA_DIR} HTMLDIR=${NATIVE_HTML_DIR} GEOS_DIR=${GEOS_INCLUDE_DIR} From ba8d10257f274e26991133b0a9bc783c614406f4 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Mon, 22 Feb 2021 16:20:27 +0800 Subject: [PATCH 12/22] update --- ports/gdal/dependency_win.cmake | 9 ++------- ports/gdal/portfile.cmake | 6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/ports/gdal/dependency_win.cmake b/ports/gdal/dependency_win.cmake index d51e3911469864..faa5d173d2b981 100644 --- a/ports/gdal/dependency_win.cmake +++ b/ports/gdal/dependency_win.cmake @@ -22,13 +22,8 @@ macro(find_dependency_win) # Setup expat libraries + include path set(EXPAT_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - if (VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(EXPAT_SUFFIX "MT") - else() - set(EXPAT_SUFFIX "MD") - endif() - set(EXPAT_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libexpat${EXPAT_SUFFIX}.lib" ) - set(EXPAT_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd${EXPAT_SUFFIX}.lib" ) + set(EXPAT_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libexpatMD.lib" ) + set(EXPAT_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatdMD.lib" ) else() set(EXPAT_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libexpat.lib" ) set(EXPAT_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd.lib" ) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 1bb8e4c1dadfc4..eef927961c1b12 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -199,14 +199,14 @@ else() if(VCPKG_TARGET_IS_LINUX) set(DEPENDLIBS "-lstdc++") else() - set(DEPENDLIBS "-lc++ -llber -lldap -framework CoreFoundation -framework Security") + set(DEPENDLIBS "-lc++ -liconv -llber -lldap -framework CoreFoundation -framework Security") endif() list(APPEND OPTIONS_RELEASE - "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lz -lm -lszip -llzma -lzstd -liconv" + "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lz -lm -lszip -llzma -lzstd" ) list(APPEND OPTIONS_DEBUG - "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lz -lm -lszip_debug -llzmad -lzstdd -liconv" + "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lz -lm -lszip_debug -llzmad -lzstdd" ) vcpkg_configure_make( From 1ecac8118641f8be02d7b271b04dbf6b4f2fc4c6 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Mon, 22 Feb 2021 16:47:23 +0800 Subject: [PATCH 13/22] update --- ports/gdal/portfile.cmake | 4 ++-- versions/baseline.json | 4 ++-- versions/g-/gdal.json | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index eef927961c1b12..0c3f3344573138 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -203,10 +203,10 @@ else() endif() list(APPEND OPTIONS_RELEASE - "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lz -lm -lszip -llzma -lzstd" + "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lxml2 -llzma -lz -lszip -lm" ) list(APPEND OPTIONS_DEBUG - "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lz -lm -lszip_debug -llzmad -lzstdd" + "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lxml2 -llzmad -lz -lszip_debug -lm" ) vcpkg_configure_make( diff --git a/versions/baseline.json b/versions/baseline.json index e0a25ac7df8276..fc5420dc19ed74 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2121,8 +2121,8 @@ "port-version": 0 }, "gdal": { - "baseline": "3.1.3", - "port-version": 2 + "baseline": "3.2.1", + "port-version": 0 }, "gdcm": { "baseline": "3.0.7", diff --git a/versions/g-/gdal.json b/versions/g-/gdal.json index 8ed4f63496b4ad..7e645d0ec368c9 100644 --- a/versions/g-/gdal.json +++ b/versions/g-/gdal.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "cdee4c21d5d34b32b5a87df070bd1ca63151a8df", + "version": "3.2.1", + "port-version": 0 + }, { "git-tree": "162ae61cb64d9bb9a485e611cca106ade9062c1a", "version-string": "3.1.3", From a5cbcc17f2646538c8599d3803389a846a0a411b Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Mon, 22 Feb 2021 17:43:38 +0800 Subject: [PATCH 14/22] update --- ports/gdal/0005-Fix-configure.patch | 12 +++++++++++- ports/gdal/portfile.cmake | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ports/gdal/0005-Fix-configure.patch b/ports/gdal/0005-Fix-configure.patch index 6bfe48af98941c..1ede21680726a0 100644 --- a/ports/gdal/0005-Fix-configure.patch +++ b/ports/gdal/0005-Fix-configure.patch @@ -1,5 +1,5 @@ diff --git a/configure.ac b/configure.ac -index bd85e0616..23d1d2f79 100644 +index bd85e0616..2b03e0713 100644 --- a/configure.ac +++ b/configure.ac @@ -1275,10 +1275,10 @@ AC_MSG_CHECKING([for libtiff]) @@ -110,6 +110,16 @@ index bd85e0616..23d1d2f79 100644 AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) LIBS="${SAVED_LIBS}" fi +@@ -4817,8 +4807,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs + elif test "$with_libjson_c" = "internal" ; then + LIBJSONC_SETTING=internal + elif test "$with_libjson_c" != "no"; then +- LIBS="-L$with_libjson_c/lib $LIBS" +- AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,-L$with_libjson_c/lib) ++ AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,) + else + AC_MSG_ERROR([libjson-c (internal or external) is required]) + fi diff --git a/m4/ax_lib_sqlite3.m4 b/m4/ax_lib_sqlite3.m4 index e53a4a967..440e2c5ed 100644 diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 0c3f3344573138..39573c6bd4fcc3 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -203,10 +203,10 @@ else() endif() list(APPEND OPTIONS_RELEASE - "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lxml2 -llzma -lz -lszip -lm" + "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -llzma -lszip" ) list(APPEND OPTIONS_DEBUG - "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lxml2 -llzmad -lz -lszip_debug -lm" + "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -llzmad -lszip_debug" ) vcpkg_configure_make( From d0ea1bd06202178750940f6ebdac5d06228aa7fb Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Tue, 23 Feb 2021 09:27:18 +0800 Subject: [PATCH 15/22] update --- ports/gdal/0005-Fix-configure.patch | 10 ++++------ ports/gdal/portfile.cmake | 5 +++-- versions/g-/gdal.json | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ports/gdal/0005-Fix-configure.patch b/ports/gdal/0005-Fix-configure.patch index 1ede21680726a0..98a57b1ccf9b54 100644 --- a/ports/gdal/0005-Fix-configure.patch +++ b/ports/gdal/0005-Fix-configure.patch @@ -44,11 +44,11 @@ index bd85e0616..2b03e0713 100644 + if test -f "$prefix/../include/spatialite.h" -o -f "$prefix/include/spatialite.h" -o -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then AC_MSG_RESULT(found) - AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,-lsqlite3) -+ AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,-lsqlite3 -lrttopo -lfreexl -lgeos_c -lgeos) ++ AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,-lsqlite3 -lrttopo -lfreexl) if test "$SPATIALITE_INIT_FOUND" = "yes"; then HAVE_SPATIALITE=yes - SPATIALITE_LIBS="-lspatialite -lsqlite3" -+ SPATIALITE_LIBS="-lspatialite -lsqlite3 -lrttopo -lfreexl -lgeos_c -lgeos" ++ SPATIALITE_LIBS="-lspatialite -lsqlite3 -lrttopo -lfreexl" LIBS="$LIBS $SPATIALITE_LIBS" HAVE_SQLITE3=yes fi @@ -201,16 +201,14 @@ index e53a4a967..440e2c5ed 100644 diff --git a/m4/geos.m4 b/m4/geos.m4 -index a410673b4..793d3803c 100644 +index a410673b4..c16e1f33a 100644 --- a/m4/geos.m4 +++ b/m4/geos.m4 -@@ -60,6 +60,9 @@ AC_DEFUN([GEOS_INIT],[ +@@ -60,6 +60,7 @@ AC_DEFUN([GEOS_INIT],[ AC_PATH_PROG(GEOS_CONFIG, geos-config, no) ac_geos_config_auto=yes + HAVE_GEOS="yes" -+ GEOS_LIBS="-lgeos_c -lgeos -lm" -+ GEOS_VERSION="3.9.0" else diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 39573c6bd4fcc3..6f87dfab803f54 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -203,10 +203,10 @@ else() endif() list(APPEND OPTIONS_RELEASE - "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -llzma -lszip" + "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lgeos_c -lgeos -llzma -lszip" ) list(APPEND OPTIONS_DEBUG - "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -llzmad -lszip_debug" + "LIBS=-pthread ${DEPENDLIBS} -lssl -lcrypto -lgeos_cd -lgeosd -llzmad -lszip_debug" ) vcpkg_configure_make( @@ -215,6 +215,7 @@ else() COPY_SOURCE OPTIONS ${CONF_OPTS} + "GEOS_VERSION=3.9.0" OPTIONS_RELEASE ${OPTIONS_RELEASE} OPTIONS_DEBUG diff --git a/versions/g-/gdal.json b/versions/g-/gdal.json index 7e645d0ec368c9..5f0d75b126e719 100644 --- a/versions/g-/gdal.json +++ b/versions/g-/gdal.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "cdee4c21d5d34b32b5a87df070bd1ca63151a8df", + "git-tree": "08fe778d9487e971fc922929f7b55f58d97ccf1e", "version": "3.2.1", "port-version": 0 }, From 22958b19e8895acadf8b999d1a9f184b106df978 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Tue, 23 Feb 2021 10:10:01 +0800 Subject: [PATCH 16/22] fix linux build --- ports/gdal/0005-Fix-configure.patch | 12 ++++++++++-- versions/g-/gdal.json | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ports/gdal/0005-Fix-configure.patch b/ports/gdal/0005-Fix-configure.patch index 98a57b1ccf9b54..2d93b4e9e41946 100644 --- a/ports/gdal/0005-Fix-configure.patch +++ b/ports/gdal/0005-Fix-configure.patch @@ -1,5 +1,5 @@ diff --git a/configure.ac b/configure.ac -index bd85e0616..2b03e0713 100644 +index bd85e0616..cabce7350 100644 --- a/configure.ac +++ b/configure.ac @@ -1275,10 +1275,10 @@ AC_MSG_CHECKING([for libtiff]) @@ -110,7 +110,15 @@ index bd85e0616..2b03e0713 100644 AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) LIBS="${SAVED_LIBS}" fi -@@ -4817,8 +4807,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs +@@ -4294,6 +4284,7 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then + if test "${HAVE_LIBXML2}" = "yes"; then + LIBXML2_INC="${LIBXML2_CFLAGS}" + LIBXML2_LIB="${LIBXML2_LIBS}" ++ LIBS="${LIBXML2_LIBS} ${LIBS}" + else + if test "x$with_xml2" = "xyes"; then + AC_MSG_ERROR([--with-xml2 was requested, but libxml2 is not available]) +@@ -4817,8 +4808,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs elif test "$with_libjson_c" = "internal" ; then LIBJSONC_SETTING=internal elif test "$with_libjson_c" != "no"; then diff --git a/versions/g-/gdal.json b/versions/g-/gdal.json index 5f0d75b126e719..3419cea457e47a 100644 --- a/versions/g-/gdal.json +++ b/versions/g-/gdal.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "08fe778d9487e971fc922929f7b55f58d97ccf1e", + "git-tree": "7518186f4a723b9dbd8997eda0e5827e188447eb", "version": "3.2.1", "port-version": 0 }, From ab9d65dae2ddfb8c8ed742df6e194669f0fdf000 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Tue, 23 Feb 2021 13:50:36 +0800 Subject: [PATCH 17/22] fix linux libxml2 error --- ports/gdal/0005-Fix-configure.patch | 40 ++++++++++++++--------------- ports/gdal/vcpkg.json | 1 + versions/g-/gdal.json | 2 +- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/ports/gdal/0005-Fix-configure.patch b/ports/gdal/0005-Fix-configure.patch index 2d93b4e9e41946..3883ed96bd9370 100644 --- a/ports/gdal/0005-Fix-configure.patch +++ b/ports/gdal/0005-Fix-configure.patch @@ -1,5 +1,5 @@ diff --git a/configure.ac b/configure.ac -index bd85e0616..cabce7350 100644 +index bd85e0616..c45b0f74a 100644 --- a/configure.ac +++ b/configure.ac @@ -1275,10 +1275,10 @@ AC_MSG_CHECKING([for libtiff]) @@ -52,24 +52,25 @@ index bd85e0616..cabce7350 100644 LIBS="$LIBS $SPATIALITE_LIBS" HAVE_SQLITE3=yes fi -@@ -1570,12 +1564,12 @@ dnl --------------------------------------------------------------------------- +@@ -1570,11 +1564,15 @@ dnl --------------------------------------------------------------------------- AC_ARG_WITH(liblzma,[ --with-liblzma[=ARG] Include liblzma support (ARG=yes/no)],,) if test "$with_liblzma" = "yes" ; then - AC_CHECK_LIB(lzma,lzma_code,LIBLZMA_SETTING=yes,LIBLZMA_SETTING=no,) -+ SAVED_LIBS="${LIBS}" ++ SAVED_LIBS="$LIBS" ++ LIBS="" + AC_SEARCH_LIBS(lzma_code,[lzmad lzma],LIBLZMA_SETTING=yes,LIBLZMA_SETTING=no,) AC_CHECK_HEADERS(lzma.h) ++ LZMA_LIBS="$LIBS" ++ LIBS="$SAVED_LIBS" -- if test "$LIBLZMA_SETTING" = "yes" -a "$ac_cv_header_lzma_h" = "yes" ; then + if test "$LIBLZMA_SETTING" = "yes" -a "$ac_cv_header_lzma_h" = "yes" ; then - LIBS="-llzma $LIBS" -- else -+ if test "$LIBLZMA_SETTING" != "yes" -o "$ac_cv_header_lzma_h" != "yes" ; then -+ LIBS="$SAVED_LIBS" ++ LIBS="$LZMA_LIBS $LIBS" + else LIBLZMA_SETTING=no fi - else -@@ -1592,11 +1586,9 @@ dnl --------------------------------------------------------------------------- +@@ -1592,11 +1590,9 @@ dnl --------------------------------------------------------------------------- AC_ARG_WITH(zstd,[ --with-zstd[=ARG] Include zstd support (ARG=yes/no/installation_prefix)],,) if test "$with_zstd" = "" -o "$with_zstd" = "yes" ; then @@ -83,7 +84,7 @@ index bd85e0616..cabce7350 100644 if test "$with_zstd" = "yes" ; then AC_MSG_ERROR([libzstd not found]) else -@@ -1820,8 +1812,6 @@ fi +@@ -1820,8 +1816,6 @@ fi if test "$CURL_SETTING" = "yes" ; then @@ -92,7 +93,7 @@ index bd85e0616..cabce7350 100644 m4_foreach_w([frmt],CURL_FORMATS,[ driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) if test "x$driver_enabled" = "xyes"; then -@@ -1888,7 +1878,7 @@ else +@@ -1888,7 +1882,7 @@ else PKG_CHECK_MODULES([PQ],[libpq > 9.1], [HAVE_PG=yes], [HAVE_PG=no]) if test "${HAVE_PG}" = "yes" ; then @@ -101,24 +102,23 @@ index bd85e0616..cabce7350 100644 PG_INC="${PQ_CFLAGS}" SAVED_LIBS="${LIBS}" LIBS="${PG_LIB}" -@@ -4286,7 +4276,7 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then - +@@ -4287,13 +4281,13 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then if test "${HAVE_LIBXML2}" = "yes"; then SAVED_LIBS="${LIBS}" -- LIBS="${LIBXML2_LIBS}" -+ LIBS="${LIBXML2_LIBS} ${LIBS}" - AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) + LIBS="${LIBXML2_LIBS}" +- AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) ++ AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no,-lz -lm $LZMA_LIBS) LIBS="${SAVED_LIBS}" fi -@@ -4294,6 +4284,7 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then + if test "${HAVE_LIBXML2}" = "yes"; then LIBXML2_INC="${LIBXML2_CFLAGS}" - LIBXML2_LIB="${LIBXML2_LIBS}" -+ LIBS="${LIBXML2_LIBS} ${LIBS}" +- LIBXML2_LIB="${LIBXML2_LIBS}" ++ LIBXML2_LIB="${LIBXML2_LIBS} -lz -lm $LZMA_LIBS" else if test "x$with_xml2" = "xyes"; then AC_MSG_ERROR([--with-xml2 was requested, but libxml2 is not available]) -@@ -4817,8 +4808,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs +@@ -4817,8 +4811,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs elif test "$with_libjson_c" = "internal" ; then LIBJSONC_SETTING=internal elif test "$with_libjson_c" != "no"; then diff --git a/ports/gdal/vcpkg.json b/ports/gdal/vcpkg.json index 9089e11af85cc8..3855f4c24b3623 100644 --- a/ports/gdal/vcpkg.json +++ b/ports/gdal/vcpkg.json @@ -9,6 +9,7 @@ "curl", "expat", "geos", + "giflib", "hdf5", { "name": "json-c", diff --git a/versions/g-/gdal.json b/versions/g-/gdal.json index 3419cea457e47a..b4c2ef0d915ae1 100644 --- a/versions/g-/gdal.json +++ b/versions/g-/gdal.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7518186f4a723b9dbd8997eda0e5827e188447eb", + "git-tree": "4fbaf69af380922f4377c0ef92f7f3791d8df067", "version": "3.2.1", "port-version": 0 }, From e3ac55dff19b6c40e514c704d7766d3fa8df7466 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Tue, 23 Feb 2021 14:34:47 +0800 Subject: [PATCH 18/22] Update gdal.json --- versions/g-/gdal.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/g-/gdal.json b/versions/g-/gdal.json index b4c2ef0d915ae1..caa75310821b9a 100644 --- a/versions/g-/gdal.json +++ b/versions/g-/gdal.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "4fbaf69af380922f4377c0ef92f7f3791d8df067", + "git-tree": "105b037114b9badbd13bd46ded7fd6cd71d57d88", "version": "3.2.1", "port-version": 0 }, From a5730f1b6418e83a14885797353c7cba79a7632f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Tue, 23 Feb 2021 22:56:42 -0800 Subject: [PATCH 19/22] Update ports/gdal/vcpkg.json --- ports/gdal/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gdal/vcpkg.json b/ports/gdal/vcpkg.json index 3855f4c24b3623..c4620e4df2accf 100644 --- a/ports/gdal/vcpkg.json +++ b/ports/gdal/vcpkg.json @@ -1,6 +1,6 @@ { "name": "gdal", - "version": "3.2.1", + "version-semver": "3.2.1", "description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data", "homepage": "https://gdal.org", "supports": "!arm", From 8c2e7b3b34e30ad85a709391200092fd1bba4a65 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 24 Feb 2021 01:09:26 -0800 Subject: [PATCH 20/22] update version record --- versions/g-/gdal.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/g-/gdal.json b/versions/g-/gdal.json index caa75310821b9a..7afb4646ca464d 100644 --- a/versions/g-/gdal.json +++ b/versions/g-/gdal.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "105b037114b9badbd13bd46ded7fd6cd71d57d88", - "version": "3.2.1", + "git-tree": "39177782473d77a65fa2e6b42645af84b1b7ac8b", + "version-semver": "3.2.1", "port-version": 0 }, { From 50adf3f14eaa1d2fb562df1f00a5420f9409c29d Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Wed, 14 Apr 2021 15:38:32 +0800 Subject: [PATCH 21/22] update gdal to 3.2.2 --- ports/gdal/dependency_win.cmake | 4 ++-- ports/gdal/portfile.cmake | 8 ++++---- ports/gdal/vcpkg.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/gdal/dependency_win.cmake b/ports/gdal/dependency_win.cmake index faa5d173d2b981..6bb6202d2f04d2 100644 --- a/ports/gdal/dependency_win.cmake +++ b/ports/gdal/dependency_win.cmake @@ -16,8 +16,8 @@ macro(find_dependency_win) # Setup geos libraries + include path set(GEOS_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) - set(GEOS_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib" ) - set(GEOS_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib" ) + set(GEOS_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib ${CURRENT_INSTALLED_DIR}/lib/geos.lib" ) + set(GEOS_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/geosd.lib" ) # Setup expat libraries + include path set(EXPAT_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index d3386fac8258a3..f2a102a20c2b88 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -4,10 +4,10 @@ include(${CMAKE_CURRENT_LIST_DIR}/dependency_win.cmake) vcpkg_fail_port_install(ON_ARCH "arm") # NOTE: update the version and checksum for new GDAL release -set(GDAL_VERSION_STR "3.2.1") -set(GDAL_VERSION_PKG "321") +set(GDAL_VERSION_STR "3.2.2") +set(GDAL_VERSION_PKG "322") set(GDAL_VERSION_LIB "204") -set(GDAL_PACKAGE_SUM "3c650f570f0561067fa404e5287e78ec1fb4158aa0f1d87226e92dc3adf706b0bac023fee788b816d4dc339bbce41c05ed4b14ab363cb9f98d7b43a3e8140490") +set(GDAL_PACKAGE_SUM "ce319e06c78bd076228b3710c127cdbd37c7d6fb23966b47df7287eaffe86a05d4ddcc78494c8bfcaf4db98a71f2ed50a01fb3ca2fe1c10cf0d2e812683c8e53") vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/gdal/${GDAL_VERSION_STR}/gdal${GDAL_VERSION_PKG}.zip" @@ -40,7 +40,7 @@ if (VCPKG_TARGET_IS_WINDOWS) endif() list(APPEND NMAKE_OPTIONS - VERSION=${GDAL_VERSION_LIB} + # VERSION=${GDAL_VERSION_LIB} DATADIR=${NATIVE_DATA_DIR} HTMLDIR=${NATIVE_HTML_DIR} GEOS_DIR=${GEOS_INCLUDE_DIR} diff --git a/ports/gdal/vcpkg.json b/ports/gdal/vcpkg.json index c4620e4df2accf..971e9b205f3b74 100644 --- a/ports/gdal/vcpkg.json +++ b/ports/gdal/vcpkg.json @@ -1,6 +1,6 @@ { "name": "gdal", - "version-semver": "3.2.1", + "version-semver": "3.2.2", "description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data", "homepage": "https://gdal.org", "supports": "!arm", From 31e946d545e5d4ab5cdbca0fc0243138c92f26e4 Mon Sep 17 00:00:00 2001 From: Long Huan <8551701+longhuan2018@users.noreply.github.com> Date: Thu, 15 Apr 2021 10:58:29 +0800 Subject: [PATCH 22/22] update version --- versions/baseline.json | 4 ++-- versions/g-/gdal.json | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 8ec59ecb7fabce..565f2f8f683c12 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2149,8 +2149,8 @@ "port-version": 0 }, "gdal": { - "baseline": "3.1.3", - "port-version": 4 + "baseline": "3.2.2", + "port-version": 0 }, "gdcm": { "baseline": "3.0.7", diff --git a/versions/g-/gdal.json b/versions/g-/gdal.json index f53bc429fad139..09828f5022f661 100644 --- a/versions/g-/gdal.json +++ b/versions/g-/gdal.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "bb182d21db781421272dccf7c43273c746480c05", + "version-semver": "3.2.2", + "port-version": 0 + }, { "git-tree": "b503a5dd67c0251115346ebfc05551bc8f36c06f", "version-string": "3.1.3",