Author: simons
Date: Tue Jan 3 17:50:10 2012
New Revision: 31247
URL: https://nixos.org/websvn/nix/?rev=31247&sc=1
Log:
Updated GNU ghostscript to version 9.04.1.
- Merged the builder.sh file into the expression itself.
- Need to force "-lz" flag to fix linker errors. This is probably a bug
in the build system, so further updates may not need that hack.
- Need to force "-rpath=${freetype}/lib" flag to fix run-time errors
because gs can't find the libfreetype.so.6 library. I don't quite
understand why that path isn't hard-coded to begin with.
Deleted:
nixpkgs/trunk/pkgs/misc/ghostscript/builder.sh
nixpkgs/trunk/pkgs/misc/ghostscript/pstoraster.patch
Modified:
nixpkgs/trunk/pkgs/misc/ghostscript/default.nix
Modified: nixpkgs/trunk/pkgs/misc/ghostscript/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/misc/ghostscript/default.nix Tue Jan 3 17:29:20
2012 (r31246)
+++ nixpkgs/trunk/pkgs/misc/ghostscript/default.nix Tue Jan 3 17:50:10
2012 (r31247)
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libjpeg, libpng, libtiff, zlib, pkgconfig, fontconfig,
openssl
+{ stdenv, fetchurl, libjpeg, libpng, libtiff, zlib, pkgconfig, fontconfig,
openssl, lcms, freetype
, x11Support, x11 ? null
, cupsSupport ? false, cups ? null
, gnuFork ? true
@@ -28,10 +28,10 @@
};
gnuForkData = rec {
- name = "ghostscript-8.71.1";
+ name = "ghostscript-9.04.1";
src = fetchurl {
url = "mirror://gnu/ghostscript/gnu-${name}.tar.bz2";
- sha256 = "0vab9905h6sl5s5miai4vhhwdacjlkxqmykfr42x32sr25wjqgvl";
+ sha256 = "0zqa6ggbkdqiszsywgrra4ij0sddlmrfa50bx2mh568qid4ga0a2";
};
inherit meta;
@@ -56,8 +56,6 @@
stdenv.mkDerivation rec {
inherit (variant) name src meta;
- builder = ./builder.sh;
-
fonts = [
(fetchurl {
url = mirror://gnu/ghostscript/gnu-gs-fonts-std-6.0.tar.gz;
@@ -70,17 +68,30 @@
# ... add other fonts here
];
- buildInputs = [libjpeg libpng libtiff zlib pkgconfig fontconfig openssl]
- ++ stdenv.lib.optional x11Support x11
+ buildInputs = [libjpeg libpng libtiff zlib pkgconfig fontconfig openssl lcms]
+ ++ stdenv.lib.optionals x11Support [x11 freetype]
++ stdenv.lib.optional cupsSupport cups;
- configureFlags =
- if x11Support then [ "--with-x" ] else [ "--without-x" ];
-
CFLAGS = "-fPIC";
+ NIX_LDFLAGS = "-lz -rpath=${freetype}/lib";
+
+ patches = [ ./purity.patch ./urw-font-files.patch ];
- patches = [ ./purity.patch ./urw-font-files.patch ]
- ++ stdenv.lib.optional gnuFork ./pstoraster.patch;
+ preConfigure = ''
+ # "ijs" is impure: it contains symlinks to /usr/share/automake etc.!
+ rm -rf ijs/ltmain.sh
+
+ # Don't install stuff in the Cups store path.
+ makeFlagsArray=(CUPSSERVERBIN=$out/lib/cups CUPSSERVERROOT=$out/etc/cups
CUPSDATA=$out/share/cups)
+ '';
+
+ configureFlags = if x11Support then [ "--with-x" ] else [ "--without-x" ];
doCheck = true;
+
+ postInstall = ''
+ for i in $fonts; do
+ (cd $out/share/ghostscript && tar xvfz $i)
+ done
+ '';
}
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits