Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

podofo: fix library linkage on Darwin (#47214)

* podofo: fix library linkage on Darwin

Because the library is not yet installed when the tools are build, it does not contain its final store path as its install name. Linking the tools picks up this incorrect install name and needs to be fixed after installing.

authored by

Michael Roitzsch and committed by
Daiderd Jordan
4b1ffa0b f4adfea5

+8 -1
+8 -1
pkgs/development/libraries/podofo/default.nix
··· 4 4 }: 5 5 6 6 stdenv.mkDerivation rec { 7 - name = "podofo-0.9.6"; 7 + version = "0.9.6"; 8 + name = "podofo-${version}"; 8 9 9 10 src = fetchurl { 10 11 url = "mirror://sourceforge/podofo/${name}.tar.gz"; ··· 29 30 buildInputs = [ lua5 ] ++ stdenv.lib.optional stdenv.isLinux stdenv.cc.libc; 30 31 31 32 cmakeFlags = "-DPODOFO_BUILD_SHARED=ON -DPODOFO_BUILD_STATIC=OFF"; 33 + 34 + postFixup = stdenv.lib.optionalString stdenv.isDarwin '' 35 + for i in $out/bin/* ; do 36 + install_name_tool -change libpodofo.${version}.dylib $out/lib/libpodofo.${version}.dylib "$i" 37 + done 38 + ''; 32 39 33 40 meta = { 34 41 homepage = http://podofo.sourceforge.net;