diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-03-17 20:01:13 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-03-18 04:17:26 -0700 |
| commit | d9abd619fabb6aa6faab08d53ef08bf7f706390e (patch) | |
| tree | 233d4734fd9627f07fecadef948fd468c3f3ef5d | |
| parent | bae7c95b22cff9ef667ce1780b839f1a386ed2d5 (diff) | |
| download | vcpkg-d9abd619fabb6aa6faab08d53ef08bf7f706390e.tar.gz vcpkg-d9abd619fabb6aa6faab08d53ef08bf7f706390e.zip | |
[gdal] Fix regression due to libmysql upgrade
| -rw-r--r-- | ports/gdal/CONTROL | 2 | ||||
| -rw-r--r-- | ports/gdal/no-my-bool.patch | 13 | ||||
| -rw-r--r-- | ports/gdal/no-mysql-global-h.patch | 13 | ||||
| -rw-r--r-- | ports/gdal/no-mysql-sys-h.patch | 13 | ||||
| -rw-r--r-- | ports/gdal/portfile.cmake | 8 |
5 files changed, 46 insertions, 3 deletions
diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index b84dc29e1..c958ac671 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -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 diff --git a/ports/gdal/no-my-bool.patch b/ports/gdal/no-my-bool.patch new file mode 100644 index 000000000..1ed0279ee --- /dev/null +++ b/ports/gdal/no-my-bool.patch @@ -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);
+ }
+
diff --git a/ports/gdal/no-mysql-global-h.patch b/ports/gdal/no-mysql-global-h.patch new file mode 100644 index 000000000..57ff89ce3 --- /dev/null +++ b/ports/gdal/no-mysql-global-h.patch @@ -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
diff --git a/ports/gdal/no-mysql-sys-h.patch b/ports/gdal/no-mysql-sys-h.patch new file mode 100644 index 000000000..951425386 --- /dev/null +++ b/ports/gdal/no-mysql-sys-h.patch @@ -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
diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 5ee981d6c..10e2ceab8 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -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() |
