From b8d00ac1536e2a083413646aa9fc8baff5dc3488 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Thu, 15 Aug 2013 20:48:14 +0200 Subject: ghostscript: minor update, a little refactoring Builds fine, I tried running some apps depending on it. --- pkgs/misc/ghostscript/default.nix | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'pkgs/misc/ghostscript') diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 24debae860a..f5d82168773 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -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; -- cgit 1.4.1