Skip to content

Commit

Permalink
netpbm: Fix tiff support
Browse files Browse the repository at this point in the history
The build script check whether JPEGLIB and ZLIB are not set to NONE.
We did not set the latter as pkg-config handles zlib requirement
for libpng dependency and the comment in config.mk only talks about
zlib being needed for libpng.

Since libtiff only needs libz for static linking, we turn TIFFLIB_NEEDS_ZLIB
off instead of pointlessly setting ZLIB value.

Closes: NixOS#75156
(cherry picked from commit 9018090)
  • Loading branch information
jtojnar authored and dtzWill committed Mar 3, 2020
1 parent 5da6930 commit da9729a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/tools/graphics/netpbm/default.nix
Expand Up @@ -58,6 +58,8 @@ stdenv.mkDerivation rec {
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"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
Expand Down

0 comments on commit da9729a

Please sign in to comment.