forked from mirrors/nixpkgs
mariadb-connector-c: fix static build (#147166)
This commit is contained in:
parent
07e3b29217
commit
b47648f6c8
|
@ -31,6 +31,13 @@ stdenv.mkDerivation {
|
|||
substituteInPlace mariadb_config/mariadb_config.c.in \
|
||||
--replace '-I%s/@INSTALL_INCLUDEDIR@' "-I$dev/include" \
|
||||
--replace '-L%s/@INSTALL_LIBDIR@' "-L$out/lib/mariadb"
|
||||
'' + lib.optionalString stdenv.hostPlatform.isStatic ''
|
||||
# Disables all dynamic plugins
|
||||
substituteInPlace cmake/plugins.cmake \
|
||||
--replace 'if(''${CC_PLUGIN_DEFAULT} STREQUAL "DYNAMIC")' 'if(''${CC_PLUGIN_DEFAULT} STREQUAL "INVALID")'
|
||||
# Force building static libraries
|
||||
substituteInPlace libmariadb/CMakeLists.txt \
|
||||
--replace 'libmariadb SHARED' 'libmariadb STATIC'
|
||||
'';
|
||||
|
||||
# The cmake setup-hook uses $out/lib by default, this is not the case here.
|
||||
|
|
Loading…
Reference in a new issue