netpbm: Fix tiff support

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: https://github.com/NixOS/nixpkgs/issues/75156
This commit is contained in:
Jan Tojnar
2020-02-26 00:14:24 +01:00
parent aa1aefd06a
commit 90180905a2

View File

@@ -58,6 +58,8 @@ stdenv.mkDerivation {
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 ''