diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2020-03-01 14:57:51 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2020-03-01 15:27:35 +0100 |
commit | 256f7172ac1e59721c3aaf2498b57f2f651803e3 (patch) | |
tree | 2fa261d68e8f5e801184782d84156c8957b88bf7 /pkgs/tools/graphics/netpbm | |
parent | 95558343993bcae045b955dfc96737ba733e1c69 (diff) |
netpbm: more clean ups
* Append to config.mk instead of substituting * Remove unused path substitution (rgbpaths.patch was deleted in https://github.com/NixOS/nixpkgs/commit/f6c28984f2568e3eee4ce988364075a31636b4f3) * -lz in LDFLAGS does not seem to be necessary * Touching the file (introduced in https://github.com/NixOS/nixpkgs/commit/4dd9507b835fd0b8ff556a1c547601a9ac1857ae) does not seem to be necessary.
Diffstat (limited to 'pkgs/tools/graphics/netpbm')
-rw-r--r-- | pkgs/tools/graphics/netpbm/default.nix | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/pkgs/tools/graphics/netpbm/default.nix b/pkgs/tools/graphics/netpbm/default.nix index f50b9d63f0025..792173473810c 100644 --- a/pkgs/tools/graphics/netpbm/default.nix +++ b/pkgs/tools/graphics/netpbm/default.nix @@ -56,14 +56,15 @@ stdenv.mkDerivation { runHook preConfigure cp config.mk.in config.mk - echo "STATICLIB_TOO = n" >> config.mk - substituteInPlace "config.mk" \ - --replace "TIFFLIB = NONE" "TIFFLIB = ${libtiff.out}/lib/libtiff.so" \ - --replace "TIFFHDR_DIR =" "TIFFHDR_DIR = ${libtiff.dev}/include" \ - --replace "TIFFLIB_NEEDS_JPEG = Y" "TIFFLIB_NEEDS_JPEG = N" \ - --replace "TIFFLIB_NEEDS_Z = Y" "TIFFLIB_NEEDS_Z = N" \ - --replace "JPEGLIB = NONE" "JPEGLIB = ${libjpeg.out}/lib/libjpeg.so" \ - --replace "JPEGHDR_DIR =" "JPEGHDR_DIR = ${libjpeg.dev}/include" + + # Disable building static library + echo "STATICLIB_TOO = N" >> config.mk + + # Use libraries from Nixpkgs + echo "TIFFLIB = libtiff.so" >> config.mk + echo "TIFFLIB_NEEDS_JPEG = N" >> config.mk + echo "TIFFLIB_NEEDS_Z = N" >> config.mk + echo "JPEGLIB = libjpeg.so" >> config.mk '' + stdenv.lib.optionalString stdenv.isDarwin '' echo "LDSHLIB=-dynamiclib -install_name $out/lib/libnetpbm.\$(MAJ).dylib" >> config.mk echo "NETPBMLIBTYPE = dylib" >> config.mk @@ -72,15 +73,6 @@ stdenv.mkDerivation { runHook postConfigure ''; - preBuild = '' - export LDFLAGS="-lz" - substituteInPlace "pm_config.in.h" \ - --subst-var-by "rgbPath1" "$out/lib/rgb.txt" \ - --subst-var-by "rgbPath2" "/var/empty/rgb.txt" \ - --subst-var-by "rgbPath3" "/var/empty/rgb.txt" - touch lib/standardppmdfont.c - ''; - enableParallelBuilding = false; installPhase = '' |