mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
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
|
runHook preConfigure
|
||||||
|
|
||||||
cp config.mk.in config.mk
|
cp config.mk.in config.mk
|
||||||
echo "STATICLIB_TOO = n" >> config.mk
|
|
||||||
substituteInPlace "config.mk" \
|
# Disable building static library
|
||||||
--replace "TIFFLIB = NONE" "TIFFLIB = ${libtiff.out}/lib/libtiff.so" \
|
echo "STATICLIB_TOO = N" >> config.mk
|
||||||
--replace "TIFFHDR_DIR =" "TIFFHDR_DIR = ${libtiff.dev}/include" \
|
|
||||||
--replace "TIFFLIB_NEEDS_JPEG = Y" "TIFFLIB_NEEDS_JPEG = N" \
|
# Use libraries from Nixpkgs
|
||||||
--replace "TIFFLIB_NEEDS_Z = Y" "TIFFLIB_NEEDS_Z = N" \
|
echo "TIFFLIB = libtiff.so" >> config.mk
|
||||||
--replace "JPEGLIB = NONE" "JPEGLIB = ${libjpeg.out}/lib/libjpeg.so" \
|
echo "TIFFLIB_NEEDS_JPEG = N" >> config.mk
|
||||||
--replace "JPEGHDR_DIR =" "JPEGHDR_DIR = ${libjpeg.dev}/include"
|
echo "TIFFLIB_NEEDS_Z = N" >> config.mk
|
||||||
|
echo "JPEGLIB = libjpeg.so" >> config.mk
|
||||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
echo "LDSHLIB=-dynamiclib -install_name $out/lib/libnetpbm.\$(MAJ).dylib" >> config.mk
|
echo "LDSHLIB=-dynamiclib -install_name $out/lib/libnetpbm.\$(MAJ).dylib" >> config.mk
|
||||||
echo "NETPBMLIBTYPE = dylib" >> config.mk
|
echo "NETPBMLIBTYPE = dylib" >> config.mk
|
||||||
@ -72,15 +73,6 @@ stdenv.mkDerivation {
|
|||||||
runHook postConfigure
|
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;
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user