mariadb-connector-c: fix locate libdir and plugindir

This commit is contained in:
Izorkin 2023-01-20 16:17:26 +03:00
parent 272b35bc91
commit 611b957c98
No known key found for this signature in database
GPG key ID: 1436C1B3F3679F09

View file

@ -29,8 +29,11 @@ in stdenv.mkDerivation {
postPatch = ''
substituteInPlace mariadb_config/mariadb_config.c.in \
--replace '-I%s/@INSTALL_INCLUDEDIR@' "-I$dev/include" \
--replace '-L%s/@INSTALL_LIBDIR@' "-L$out/lib/mariadb"
--replace '#define INCLUDE "-I%s/@INSTALL_INCLUDEDIR@ -I%s/@INSTALL_INCLUDEDIR@/mysql"' "#define INCLUDE \"-I$dev/include -I$dev/include/mysql\"" \
--replace '#define LIBS "-L%s/@INSTALL_LIBDIR@/ -lmariadb"' "#define LIBS \"-L$out/lib/mariadb -lmariadb\"" \
--replace '#define PKG_LIBDIR "%s/@INSTALL_LIBDIR@"' "#define PKG_LIBDIR \"$out/lib/mariadb\"" \
--replace '#define PLUGIN_DIR "%s/@INSTALL_PLUGINDIR@"' "#define PLUGIN_DIR \"$out/lib/mariadb/plugin\"" \
--replace '#define PKG_PLUGINDIR "%s/@INSTALL_PLUGINDIR@"' "#define PKG_PLUGINDIR \"$out/lib/mariadb/plugin\""
'' + lib.optionalString stdenv.hostPlatform.isStatic ''
# Disables all dynamic plugins
substituteInPlace cmake/plugins.cmake \