mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 21:39:00 +08:00
[gdal] Fix regression due to libmysql upgrade
This commit is contained in:
parent
bae7c95b22
commit
d9abd619fa
@ -1,4 +1,4 @@
|
||||
Source: gdal
|
||||
Version: 2.2.2
|
||||
Version: 2.2.2-1
|
||||
Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data.
|
||||
Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma
|
||||
|
13
ports/gdal/no-my-bool.patch
Normal file
13
ports/gdal/no-my-bool.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
|
||||
index 8733af9..f49d862 100644
|
||||
--- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
|
||||
+++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
|
||||
@@ -259,7 +259,7 @@ int OGRMySQLDataSource::Open( const char * pszNewName, char** papszOpenOptionsIn
|
||||
// Enable automatic reconnection
|
||||
// Must be called after mysql_real_connect() on MySQL < 5.0.19
|
||||
// and at any point on more recent versions.
|
||||
- my_bool reconnect = 1;
|
||||
+ bool reconnect = 1;
|
||||
mysql_options(hConn, MYSQL_OPT_RECONNECT, &reconnect);
|
||||
}
|
||||
|
13
ports/gdal/no-mysql-global-h.patch
Normal file
13
ports/gdal/no-mysql-global-h.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/ogr/ogrsf_frmts/mysql/ogr_mysql.h b/ogr/ogrsf_frmts/mysql/ogr_mysql.h
|
||||
index 76a6762..b2f0fcb 100644
|
||||
--- a/ogr/ogrsf_frmts/mysql/ogr_mysql.h
|
||||
+++ b/ogr/ogrsf_frmts/mysql/ogr_mysql.h
|
||||
@@ -43,7 +43,7 @@
|
||||
#pragma warning( disable : 4211 ) /* nonstandard extension used : redefined extern to static */
|
||||
#endif
|
||||
|
||||
-#include <my_global.h>
|
||||
+/* #include <my_global.h> */ /* Mysql 8+ no longer ships with my_global.h */
|
||||
#include <mysql.h>
|
||||
|
||||
#ifdef _MSC_VER
|
13
ports/gdal/no-mysql-sys-h.patch
Normal file
13
ports/gdal/no-mysql-sys-h.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
|
||||
index e694bbd..8733af9 100644
|
||||
--- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
|
||||
+++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
|
||||
@@ -44,7 +44,7 @@
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wdocumentation"
|
||||
#endif
|
||||
-#include <my_sys.h>
|
||||
+/*#include <my_sys.h> mysql 8.1 no longer ships with my_sys.h*/
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
if (TRIPLET_SYSTEM_ARCH MATCHES "arm")
|
||||
message(FATAL_ERROR " ARM is currently not supported.")
|
||||
message(FATAL_ERROR "ARM is currently not supported.")
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
@ -16,12 +16,13 @@ vcpkg_download_distfile(ARCHIVE
|
||||
SHA512 b886238a7915c97f4acec5920dabe959d1ab15a8be0bc31ba0d05ad69d1d7d96f864faf0aa82921fa1a1b40b733744202b86f2f45ff63d6518cd18a53f3544a8
|
||||
)
|
||||
|
||||
# Extract source into archictecture specific directory, because GDALs' nmake based build currently does not
|
||||
# Extract source into architecture specific directory, because GDALs' nmake based build currently does not
|
||||
# support out of source builds.
|
||||
set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-2.2.2)
|
||||
set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-2.2.2)
|
||||
|
||||
foreach(BUILD_TYPE debug release)
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE})
|
||||
vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE})
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-2.2.2
|
||||
@ -29,6 +30,9 @@ foreach(BUILD_TYPE debug release)
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0003-Fix-openjpeg-include.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/no-mysql-global-h.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/no-mysql-sys-h.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/no-my-bool.patch
|
||||
)
|
||||
endforeach()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user