Merge pull request #214045 from wegank/gdal-override

gdal: allow overriding libmysqlclient with mysql80
This commit is contained in:
Weijia Wang 2023-02-02 02:05:13 +01:00 committed by GitHub
commit 2bec9c73e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -140,8 +140,13 @@ in stdenv.mkDerivation rec {
patchShebangs tools/get_wb_version.sh
'';
# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
NIX_CFLAGS_COMPILE = toString ([
# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
"-Wno-error=deprecated-declarations"
] ++ lib.optionals stdenv.isAarch64 [
# error: narrowing conversion of '-1' from 'int' to 'char'
"-Wno-error=narrowing"
]);
cmakeFlags = [
"-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config"

View File

@ -86,7 +86,7 @@ stdenv.mkDerivation rec {
"-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include"
"-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}"
"-DMYSQL_INCLUDE_DIR=${lib.getDev libmysqlclient}/include/mysql"
"-DMYSQL_LIBRARY=${lib.getLib libmysqlclient}/lib/mysql/libmysqlclient${stdenv.hostPlatform.extensions.sharedLibrary}"
"-DMYSQL_LIBRARY=${lib.getLib libmysqlclient}/lib/${lib.optionalString (libmysqlclient.pname != "mysql") "mysql/"}libmysqlclient${stdenv.hostPlatform.extensions.sharedLibrary}"
] ++ lib.optionals (!stdenv.isDarwin) [
"-DCMAKE_SKIP_BUILD_RPATH=ON" # without, libgdal.so can't find libmariadb.so
] ++ lib.optionals stdenv.isDarwin [