gdk-pixbuf: patch library rpath references on darwin

A bunch of the libraries like libpixbufloader-png link against libgdk_pixbuf,
however the install_name is not correct at this point yet since meson tries to use rpaths.
This commit is contained in:
Daiderd Jordan 2018-05-30 01:13:59 +02:00
parent 7cadf50be2
commit 6bb08e881d
No known key found for this signature in database
GPG Key ID: D02435D05B810C96

View File

@ -82,10 +82,14 @@ stdenv.mkDerivation rec {
$dev/bin/gdk-pixbuf-query-loaders --update-cache
'';
# The fixDarwinDylibNames hook doesn't patch binaries.
# The fixDarwinDylibNames hook doesn't patch library references or binaries.
preFixup = stdenv.lib.optionalString stdenv.isDarwin ''
for f in $(find $out/lib -name '*.dylib'); do
install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f
done
for f in $out/bin/* $dev/bin/*; do
install_name_tool -change "@rpath/libgdk_pixbuf-2.0.0.dylib" "$out/lib/libgdk_pixbuf-2.0.0.dylib" $f
install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f
done
'';