diff options
-rw-r--r-- | development/mysql-workbench/gdal-2.2.0.patch | 63 | ||||
-rw-r--r-- | development/mysql-workbench/mysql-workbench.SlackBuild | 8 |
2 files changed, 70 insertions, 1 deletions
diff --git a/development/mysql-workbench/gdal-2.2.0.patch b/development/mysql-workbench/gdal-2.2.0.patch new file mode 100644 index 0000000000..666184753c --- /dev/null +++ b/development/mysql-workbench/gdal-2.2.0.patch @@ -0,0 +1,63 @@ +From 97d26e5edfccead3fe3a10b732de51caa427eb60 Mon Sep 17 00:00:00 2001 +From: Christian Hesse <mail@eworm.de> +Date: Tue, 16 May 2017 09:31:39 +0200 +Subject: [PATCH 1/1] gdal: use CPLFree() + +OGRFree() is deprecated as of gdal 2.2.0, so use CPLFree() instead. + +Signed-off-by: Christian Hesse <mail@eworm.de> +--- + backend/wbpublic/grt/spatial_handler.cpp | 4 ++-- + backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp | 6 +++--- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/backend/wbpublic/grt/spatial_handler.cpp b/backend/wbpublic/grt/spatial_handler.cpp +index 9b357603..ee36fa03 100644 +--- a/backend/wbpublic/grt/spatial_handler.cpp ++++ b/backend/wbpublic/grt/spatial_handler.cpp +@@ -443,7 +443,7 @@ spatial::Importer::Importer() : _geometry(NULL), _interrupt(false), _srid(0) { + + spatial::Importer::~Importer() { + if (_geometry != NULL) +- OGRFree(_geometry); ++ CPLFree(_geometry); + } + + OGRGeometry *spatial::Importer::steal_data() { +@@ -495,7 +495,7 @@ std::string spatial::Importer::as_wkt() { + logError("Error exporting data to WKT (%i)\n", err); + } else { + std::string tmp(data); +- OGRFree(data); ++ CPLFree(data); + return tmp; + } + } +diff --git a/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp b/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp +index d2eb8495..7a7948bf 100644 +--- a/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp ++++ b/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp +@@ -47,7 +47,7 @@ static grt::StringRef getGeoRepresentation(grt::StringRef data, bool outputAsJso + OGRGeometryFactory::createFromWkb((unsigned char *)const_cast<char *>(&(*((*data).begin() + 4))), NULL, &geometry); + if (ret_val != OGRERR_NONE) { + if (geometry) +- OGRFree(geometry); ++ CPLFree(geometry); + throw std::exception(); + } + +@@ -61,8 +61,8 @@ static grt::StringRef getGeoRepresentation(grt::StringRef data, bool outputAsJso + + if (err == OGRERR_NONE && data != NULL) { + grt::StringRef tmp(data); +- OGRFree(data); +- OGRFree(geometry); ++ CPLFree(data); ++ CPLFree(geometry); + return tmp; + } else + throw std::runtime_error("Conversion of OGR geometry data failed"); +-- +2.13.0 + + diff --git a/development/mysql-workbench/mysql-workbench.SlackBuild b/development/mysql-workbench/mysql-workbench.SlackBuild index 1584f201a5..9f2fe32c2a 100644 --- a/development/mysql-workbench/mysql-workbench.SlackBuild +++ b/development/mysql-workbench/mysql-workbench.SlackBuild @@ -27,7 +27,7 @@ PRGNAM=mysql-workbench PRGNAM2=antlr VERSION=${VERSION:-6.3.9} ANTLRVER=3.4 -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} SRCVERSION=$VERSION-src @@ -112,6 +112,12 @@ install -D $CWD/$PRGNAM2-$ANTLRVER-complete.jar $TMP/linux-res/bin/$PRGNAM2-$ANT # make cmake happy with mariadb sed -i '/^find_package(MySQL /c find_package(MySQL REQUIRED)' CMakeLists.txt +# save this for GCC 7.0 +#sed -i "s|std=c++11|std=c++11 -Wno-error=implicit-fallthrough -Wno-error=strict-aliasing -Wno-error=format-overflow|" CMakeLists.txt + +# patch for gdal 2.2.0 +patch -p1 < $CWD/gdal-2.2.0.patch + mkdir -p wb-build cd wb-build cmake \ |