forked from mirrors/nixpkgs
netpbm: more clean ups
* Append to config.mk instead of substituting * Remove unused path substitution (rgbpaths.patch was deleted inf6c28984f2
) * -lz in LDFLAGS does not seem to be necessary * Touching the file (introduced in4dd9507b83
) does not seem to be necessary.
This commit is contained in:
parent
9555834399
commit
256f7172ac
|
@ -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 = ''
|
||||
|
|
Loading…
Reference in a new issue