ghostscript: minor update, a little refactoring

Builds fine, I tried running some apps depending on it.
This commit is contained in:
Vladimír Čunát 2013-08-15 20:48:14 +02:00
parent 504a68f821
commit b8d00ac153
2 changed files with 15 additions and 13 deletions

View file

@ -1,6 +1,7 @@
{ stdenv, fetchurl, libjpeg, libpng, libtiff, zlib, pkgconfig, fontconfig, openssl
, lcms, freetype, libpaper, jbig2dec, expat, libiconvOrEmpty
, x11Support, x11 ? null
{ stdenv, fetchurl, pkgconfig, zlib, expat, openssl
, libjpeg, libpng, libtiff, freetype, fontconfig, lcms2, libpaper, jbig2dec
, libiconvOrEmpty
, x11Support ? false, x11 ? null
, cupsSupport ? false, cups ? null
, gnuFork ? true
}:
@ -40,10 +41,10 @@ let
};
mainlineSrc = rec {
name = "ghostscript-9.06";
name = "ghostscript-9.08";
src = fetchurl {
url = "http://downloads.ghostscript.com/public/${name}.tar.bz2";
sha256 = "014f10rxn4ihvcr1frby4szd1jvkrwvmdhnbivpp55c9fssx3b05";
sha256 = "0k1rvnvmiz456hiixfm130p3irbp1ddd0ycf7rf6bx7nzkp6sxb1";
};
meta = meta_common // {
homepage = "http://www.ghostscript.com/";
@ -51,7 +52,7 @@ let
};
preConfigure = ''
rm -R libpng jpeg lcms{,2} tiff freetype jbig2dec expat jasper openjpeg
rm -R libpng jpeg lcms{,2} tiff freetype jbig2dec expat openjpeg
substituteInPlace base/unix-aux.mak --replace "INCLUDE=/usr/include" "INCLUDE=/no-such-path"
sed "s@if ( test -f \$(INCLUDE)[^ ]* )@if ( true )@" -i base/unix-aux.mak
@ -79,9 +80,9 @@ stdenv.mkDerivation rec {
];
buildInputs = [
libjpeg libpng libtiff zlib pkgconfig fontconfig openssl lcms
libpaper jbig2dec expat
] ++ stdenv.lib.optionals x11Support [x11 freetype]
pkgconfig zlib expat openssl
libjpeg libpng libtiff freetype fontconfig lcms2 libpaper jbig2dec
] ++ stdenv.lib.optional x11Support x11
++ stdenv.lib.optional cupsSupport cups
++ libiconvOrEmpty
# [] # maybe sometimes jpeg2000 support
@ -101,9 +102,11 @@ stdenv.mkDerivation rec {
makeFlagsArray=(CUPSSERVERBIN=$out/lib/cups CUPSSERVERROOT=$out/etc/cups CUPSDATA=$out/share/cups)
'' + stdenv.lib.optionalString (variant ? preConfigure) variant.preConfigure;
configureFlags = [ "--with-system-libtiff" ] ++
(if x11Support then [ "--with-x" ] else [ "--without-x" ]) ++
(if cupsSupport then [ "--enable-cups" "--with-install-cups" ] else [ "--disable-cups" ]);
configureFlags = [
"--with-system-libtiff"
(if x11Support then "--with-x" else "--without-x")
(if cupsSupport then "--enable-cups" else "--disable-cups")
];
doCheck = true;

View file

@ -9606,7 +9606,6 @@ let
gensgs = callPackage_i686 ../misc/emulators/gens-gs { };
ghostscript = callPackage ../misc/ghostscript {
lcms = lcms2;
x11Support = false;
cupsSupport = config.ghostscript.cups or true;
gnuFork = config.ghostscript.gnu or false;