git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit4b1ffa0b00ec1d45df523b720786e2ae78de210c authorMichael Roitzsch <reactorcontrol@icloud.com> dateTue 25 Sep 2018, 22:11 (8 years ago) parentf4adfea
1 file changed+8−1
pkgs/development/libraries/podofo/default.nix+8−1
pkgs/development/libraries/podofo/default.nix+8−1
@@ -4,7 +4,8 @@
44}:
55
66stdenv.mkDerivation rec {
7− name = "podofo-0.9.6";
7+ version = "0.9.6";
8+ name = "podofo-${version}";
89
910 src = fetchurl {
1011 url = "mirror://sourceforge/podofo/${name}.tar.gz";
@@ -30,6 +31,12 @@ stdenv.mkDerivation rec {
3031
3132 cmakeFlags = "-DPODOFO_BUILD_SHARED=ON -DPODOFO_BUILD_STATIC=OFF";
3233
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+ '';
39+
3340 meta = {
3441 homepage = http://podofo.sourceforge.net;
3542 description = "A library to work with the PDF file format";