imagemagick: fix ghostscript reference in .la files

This commit is contained in:
Luca Bruno 2015-09-03 11:52:13 +02:00
parent 126d8dba96
commit 5c014feb0a

View File

@ -40,7 +40,13 @@ stdenv.mkDerivation rec {
propagatedBuildInputs =
[ bzip2 freetype libjpeg libX11 libXext libXt lcms2 ];
postInstall = ''(cd "$out/include" && ln -s ImageMagick* ImageMagick)'';
postInstall = ''
(cd "$out/include" && ln -s ImageMagick* ImageMagick)
'' + lib.optionalString (ghostscript != null) ''
for la in $out/lib/*.la; do
sed 's|-lgs|-L${ghostscript}/lib -lgs|' -i $la
done
'';
meta = with stdenv.lib; {
homepage = http://www.imagemagick.org/;