3
0
Fork 0
forked from mirrors/nixpkgs

netpbm: add tiff support

This commit is contained in:
Domen Kozar 2013-07-19 19:42:11 +02:00
parent 4e94dafa4e
commit aeef361b0d

View file

@ -1,4 +1,4 @@
{stdenv, fetchsvn, pkgconfig, libjpeg, libpng, flex, zlib, perl, libxml2, makeWrapper, libX11 }:
{stdenv, fetchsvn, pkgconfig, libjpeg, libpng, flex, zlib, perl, libxml2, makeWrapper, libX11, libtiff }:
let rev = 1742; in
stdenv.mkDerivation {
@ -12,12 +12,19 @@ stdenv.mkDerivation {
NIX_CFLAGS_COMPILE = "-fPIC"; # Gentoo adds this on every platform
buildInputs = [ pkgconfig flex zlib perl libpng libjpeg libxml2 makeWrapper libX11 ];
buildInputs = [ pkgconfig flex zlib perl libpng libjpeg libxml2 makeWrapper libX11 libtiff ];
configurePhase = "cp config.mk.in config.mk";
configurePhase = ''
cp config.mk.in config.mk
substituteInPlace "config.mk" \
--replace "TIFFLIB = NONE" "TIFFLIB = ${libtiff}/lib/libtiff.so" \
--replace "TIFFHDR_DIR =" "TIFFHDR_DIR = ${libtiff}/include" \
--replace "TIFFLIB_NEEDS_JPEG = Y" "TIFFLIB_NEEDS_JPEG = N" \
--replace "TIFFLIB_NEEDS_Z = Y" "TIFFLIB_NEEDS_Z = N"
'';
preBuild = ''
export LDFLAGS=-lz
export LDFLAGS="-lz"
substituteInPlace "pm_config.in.h" \
--subst-var-by "rgbPath1" "$out/lib/rgb.txt" \
--subst-var-by "rgbPath2" "/var/empty/rgb.txt" \