From 483cd039af062966981f6e8e292fa371810d78bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 17 Jul 2008 19:37:18 +0000 Subject: [PATCH] GNU Ghostscript 8.62.0. In addition, install `libgs.so' and its header files, as well as the man pages and HTML documentation. Use the GS fonts provided at ftp.gnu.org under the `ghostscript' directory. svn path=/nixpkgs/trunk/; revision=12374 --- pkgs/misc/ghostscript/builder.sh | 5 +++ pkgs/misc/ghostscript/default.nix | 48 +++++++++++++++++++----- pkgs/misc/ghostscript/mkromfs-zlib.patch | 13 +++++++ 3 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 pkgs/misc/ghostscript/mkromfs-zlib.patch diff --git a/pkgs/misc/ghostscript/builder.sh b/pkgs/misc/ghostscript/builder.sh index 734738140d8..41b07112682 100644 --- a/pkgs/misc/ghostscript/builder.sh +++ b/pkgs/misc/ghostscript/builder.sh @@ -6,6 +6,11 @@ preConfigure() { rm -rf ijs/ltmain.sh } +installPhase=installPhase +installPhase() { + make install install-so install-data install-doc install-man +} + postInstall=postInstall postInstall() { for i in $fonts; do diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 62ed5ef526b..c3120d04bb7 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -4,19 +4,23 @@ assert x11Support -> x11 != null; -stdenv.mkDerivation { - name = "ghostscript-8.56"; +stdenv.mkDerivation rec { + name = "ghostscript-8.62.0"; builder = ./builder.sh; src = fetchurl { - url = mirror://gnu/ghostscript/gnu-ghostscript-8.56.0.tar.bz2; - sha256 = "0pfcf59jfl6h8bhwypzxw0zwljssja14d3jc6gczbkab37d33c1x"; + url = "mirror://gnu/ghostscript/gnu-${name}.tar.bz2"; + sha256 = "0zgvmhrxzdxc3lp7im7qcdmv0jlmbnp1fk0zs0hr3fqa943ywyg2"; }; fonts = [ (fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/ghostscript-fonts-std-8.11.tar.gz; - md5 = "6865682b095f8c4500c54b285ff05ef6"; + url = mirror://gnu/ghostscript/gnu-gs-fonts-std-6.0.tar.gz; + sha256 = "1lxr1y52r26qjif8kdqkfhsb5llakdcx3f5b9ppdyn59bb83ivsc"; + }) + (fetchurl { + url = mirror://gnu/ghostscript/gnu-gs-fonts-other-6.0.tar.gz; + sha256 = "1cxaah3r52qq152bbkiyj2f7dx1rf38vsihlhjmrvzlr8v6cqil1"; }) # ... add other fonts here ]; @@ -30,8 +34,32 @@ stdenv.mkDerivation { ${if x11Support then "--with-x" else "--without-x"} "; - # This patch is required to make Ghostscript at least build in a pure - # environment (like NixOS). Ghostscript's build process performs - # various tests for the existence of files in /usr/include. - patches = [ ./purity.patch ]; + patches = [ + + # This patch is required to make Ghostscript at least build in a + # pure environment (like NixOS). Ghostscript's build process + # performs various tests for the existence of files in + # /usr/include. + ./purity.patch + + ./mkromfs-zlib.patch + ]; + + doCheck = true; + + meta = { + homepage = http://www.gnu.org/software/ghostscript/; + description = "GNU Ghostscript, an PostScript interpreter"; + + longDescription = '' + Ghostscript is the name of a set of tools that provides (i) an + interpreter for the PostScript language and the PDF file format, + (ii) a set of C procedures (the Ghostscript library) that + implement the graphics capabilities that appear as primitive + operations in the PostScript language, and (iii) a wide variety + of output drivers for various file formats and printers. + ''; + + license = "GPLv2"; + }; } diff --git a/pkgs/misc/ghostscript/mkromfs-zlib.patch b/pkgs/misc/ghostscript/mkromfs-zlib.patch new file mode 100644 index 00000000000..8614652b575 --- /dev/null +++ b/pkgs/misc/ghostscript/mkromfs-zlib.patch @@ -0,0 +1,13 @@ +Current makefiles stupidly omit `-lz' when building `mkromfs'. + +--- gnu-ghostscript-8.62.0/src/unix-aux.mak 2008-05-04 16:34:47.000000000 +0200 ++++ gnu-ghostscript-8.62.0/src/unix-aux.mak 2008-07-17 17:58:20.000000000 +0200 +@@ -97,7 +97,7 @@ MKROMFS_OBJS= $(MKROMFS_ZLIB_OBJS) $(GLO + endif + + $(MKROMFS_XE): $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS) +- $(CCAUX) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE) $(MKROMFS_OBJS) -lm $(EXTRALIBS) ++ $(CCAUX) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE) $(MKROMFS_OBJS) -lm $(EXTRALIBS) -lz + + # Query the environment to construct gconfig_.h. + # The "else true;" is required because Ultrix's implementation of sh -e