You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

237 lines
9.0 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages ghostscript)
  19. #:use-module (gnu packages)
  20. #:use-module (gnu packages compression)
  21. #:use-module (gnu packages fontutils)
  22. #:use-module (gnu packages libjpeg)
  23. #:use-module (gnu packages libpng)
  24. #:use-module (gnu packages libtiff)
  25. #:use-module (gnu packages perl)
  26. #:use-module (gnu packages pkg-config)
  27. #:use-module (gnu packages python)
  28. #:use-module (gnu packages tcl)
  29. #:use-module ((guix licenses) #:renamer (symbol-prefix-proc 'license:))
  30. #:use-module (guix packages)
  31. #:use-module (guix download)
  32. #:use-module (guix build-system gnu))
  33. (define-public lcms
  34. (package
  35. (name "lcms")
  36. (version "2.4")
  37. (source (origin
  38. (method url-fetch)
  39. (uri (string-append
  40. "http://downloads.sourceforge.net/project/lcms/lcms/"
  41. version "/lcms2-" version ".tar.gz"))
  42. (sha256 (base32
  43. "1s1ppvqaydf2yqc72mw6zfviwxccb311a6hrbi802sgjxw84sl9a"))))
  44. (build-system gnu-build-system)
  45. (inputs `(("libjpeg-8" ,libjpeg-8)
  46. ("libtiff" ,libtiff)
  47. ("zlib" ,zlib)))
  48. (synopsis "Little CMS, a small-footprint colour management engine")
  49. (description
  50. "Little CMS is a small-footprint colour management engine, with special
  51. focus on accuracy and performance. It uses the International Color
  52. Consortium standard (ICC), approved as ISO 15076-1.")
  53. (license license:x11)
  54. (home-page "http://www.littlecms.com/")))
  55. (define-public libpaper
  56. (package
  57. (name "libpaper")
  58. (version "1.1.24")
  59. (source (origin
  60. (method url-fetch)
  61. (uri (string-append
  62. "http://ftp.de.debian.org/debian/pool/main/libp/libpaper/libpaper_"
  63. version ".tar.gz"))
  64. (sha256 (base32
  65. "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q"))))
  66. (build-system gnu-build-system)
  67. (synopsis "libpaper, a library for handling paper sizes")
  68. (description
  69. "The paper library and accompanying files are intended to provide a simple
  70. way for applications to take actions based on a system- or user-specified
  71. paper size.")
  72. (license license:gpl2)
  73. (home-page "http://packages.qa.debian.org/libp/libpaper.html")))
  74. (define-public psutils
  75. (package
  76. (name "psutils")
  77. (version "17")
  78. (source (origin
  79. (method url-fetch)
  80. (uri "ftp://ftp.knackered.org/pub/psutils/psutils.tar.gz")
  81. (sha256 (base32
  82. "1r4ab1fvgganm02kmm70b2r1azwzbav2am41gbigpa2bb1wynlrq"))))
  83. (build-system gnu-build-system)
  84. (inputs `(("perl" ,perl)))
  85. (arguments
  86. `(#:tests? #f ; none provided
  87. #:phases
  88. (alist-replace
  89. 'configure
  90. (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
  91. (let ((perl (assoc-ref inputs "perl"))
  92. (out (assoc-ref outputs "out")))
  93. (copy-file "Makefile.unix" "Makefile")
  94. (substitute* "Makefile"
  95. (("/usr/local/bin/perl") (string-append perl "/bin/perl")))
  96. (substitute* "Makefile"
  97. (("/usr/local") out))
  98. ;; for the install phase
  99. (substitute* "Makefile"
  100. (("-mkdir") "mkdir -p"))
  101. ;; drop installation of non-free files
  102. (substitute* "Makefile"
  103. ((" install.include") ""))))
  104. %standard-phases)))
  105. (synopsis "psutils, a collection of utilities for manipulating PostScript documents")
  106. (description
  107. "PSUtils is a collection of utilities for manipulating PostScript
  108. documents. Programs included are psnup, for placing out several logical pages
  109. on a single sheet of paper, psselect, for selecting pages from a document,
  110. pstops, for general imposition, psbook, for signature generation for booklet
  111. printing, and psresize, for adjusting page sizes.")
  112. (license (license:bsd-style "file://LICENSE"
  113. "See LICENSE in the distribution."))
  114. (home-page "http://knackered.org/angus/psutils/")))
  115. (define-public ghostscript
  116. (package
  117. (name "ghostscript")
  118. (version "9.06.0")
  119. (source (origin
  120. (method url-fetch)
  121. (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
  122. version ".tar.xz"))
  123. (sha256 (base32
  124. "0bcg2203p7cm0f53f3s883xhj2c91xnaxakj2cy7kcdknfxplvs4"))))
  125. (build-system gnu-build-system)
  126. (inputs `(("freetype" ,freetype)
  127. ("lcms" ,lcms)
  128. ("libjpeg-8" ,libjpeg-8)
  129. ("libpng" ,libpng)
  130. ("libpaper" ,libpaper)
  131. ("libtiff" ,libtiff)
  132. ("perl" ,perl)
  133. ("pkg-config" ,pkg-config) ; needed to find libtiff
  134. ("python" ,python-wrapper)
  135. ("tcl" ,tcl)
  136. ("zlib" ,zlib)))
  137. (arguments
  138. `(#:phases
  139. (alist-replace
  140. 'configure
  141. (lambda* (#:key #:allow-other-keys #:rest args)
  142. (let ((configure (assoc-ref %standard-phases 'configure)))
  143. (apply configure args)
  144. (substitute* "base/all-arch.mak"
  145. (("/bin/sh") (which "bash")))
  146. (substitute* "base/unixhead.mak"
  147. (("/bin/sh") (which "bash")))))
  148. (alist-replace
  149. 'build
  150. (lambda* (#:key #:allow-other-keys #:rest args)
  151. (let ((build (assoc-ref %standard-phases 'build)))
  152. (apply build args)
  153. (system* "make" "so")))
  154. (alist-replace
  155. 'install
  156. (lambda* (#:key #:allow-other-keys #:rest args)
  157. (let ((install (assoc-ref %standard-phases 'install)))
  158. (apply install args)
  159. (system* "make" "install-so")))
  160. %standard-phases)))))
  161. (synopsis "PostScript and PDF interpreter")
  162. (description
  163. "Ghostscript is an interpreter for the PostScript language and the PDF
  164. file format. It also includes a C library that implements the graphics
  165. capabilities of the PostScript language. It supports a wide variety of
  166. output file formats and printers.")
  167. (license license:gpl3+)
  168. (home-page "http://www.gnu.org/software/ghostscript/")))
  169. (define-public gs-fonts
  170. (package
  171. (name "gs-fonts")
  172. (version "8.11")
  173. (source (origin
  174. (method url-fetch)
  175. (uri (string-append "mirror://sourceforge/gs-fonts/gs-fonts/"
  176. version
  177. "%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-"
  178. version
  179. ".tar.gz"))
  180. (sha256 (base32
  181. "00f4l10xd826kak51wsmaz69szzm2wp8a41jasr4jblz25bg7dhf"))))
  182. (build-system gnu-build-system)
  183. (arguments
  184. `(#:tests? #f ; nothing to check, just files to copy
  185. #:modules ((guix build gnu-build-system)
  186. (guix build utils)
  187. (srfi srfi-1)) ; for alist-delete
  188. #:phases
  189. (alist-delete
  190. 'configure
  191. (alist-delete
  192. 'build
  193. (alist-replace
  194. 'install
  195. (lambda* (#:key outputs #:allow-other-keys)
  196. (let* ((out (assoc-ref outputs "out"))
  197. (dir (string-append out "/share/fonts/type1/ghostscript")))
  198. (mkdir-p dir)
  199. (for-each
  200. (lambda (file)
  201. (copy-file file (string-append dir "/" file)))
  202. (find-files "." "pfb|afm"))))
  203. %standard-phases)))))
  204. (synopsis "free replacements for the PostScript fonts")
  205. (description
  206. "gs-fonts provides fonts and font metrics customarily distributed with
  207. Ghostscript. It currently includes the 35 standard PostScript fonts.")
  208. (license license:gpl2)
  209. (home-page "http://sourceforge.net/projects/gs-fonts/")))
  210. (define-public libspectre
  211. (package
  212. (name "libspectre")
  213. (version "0.2.7")
  214. (source (origin
  215. (method url-fetch)
  216. (uri (string-append "http://libspectre.freedesktop.org/releases/libspectre-"
  217. version ".tar.gz"))
  218. (sha256 (base32
  219. "1v63lqc6bhhxwkpa43qmz8phqs8ci4dhzizyy16d3vkb20m846z8"))))
  220. (build-system gnu-build-system)
  221. (inputs `(("ghostscript" ,ghostscript)
  222. ("pkg-config" ,pkg-config)))
  223. (synopsis "postscript rendering library")
  224. (description
  225. "libspectre is a small library for rendering Postscript documents.
  226. It provides a convenient easy to use API for handling and rendering
  227. Postscript documents.")
  228. (license license:gpl2+)
  229. (home-page "http://www.freedesktop.org/wiki/Software/libspectre")))