;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
(define-public netpbm
(package
(name "netpbm")
- (version "10.61.01")
+ (version "10.78.3")
(source (origin
(method svn-fetch)
;; At the time of first packaging, the "super-stable" and
;; To determine the correct release: "svn log version.mk".
(uri (svn-reference
(url "http://svn.code.sf.net/p/netpbm/code/advanced")
- (revision 1832)))
+ (revision 2965)))
(sha256
(base32
- "1mj1pqq18yj0yb6l24zfjls7axhqmiv0pvcaabl5xvc4a0dm543j"))
+ "1k7as9qi1942wyjxpvbf02wg0h4braw44m3m3vvi8sm9y5z1m967"))
+ (patches (search-patches "netpbm-CVE-2017-2586.patch"
+ "netpbm-CVE-2017-2587.patch"))
(file-name (string-append name "-" version "-checkout"))
(modules '((guix build utils)))
(snippet
- ;; Remove non-FSDG-compliant code.
'(begin
- (use-modules (guix build utils))
+ ;; Remove non-FSDG-compliant code.
(define-syntax drop
(syntax-rules (in)
(drop "pbmto4425" "pbmtoln03" "pbmtolps" "pbmtopk" "pktopbm"
in "converter/pbm")
(drop "spottopgm" in "converter/pgm")
- (drop "ppmtopjxl" in "converter/ppm")))))
+ (drop "ppmtopjxl" in "converter/ppm")
+
+ ;; Remove timestamps from the generated code.
+ (substitute* "buildtools/makepointerman"
+ (("gmctime[(][)]")
+ "\"Thu Jan 1 00:00:00 1970\""))
+ (substitute* "buildtools/stamp-date"
+ (("^DATE=.*")
+ "DATE=\"Thu Jan 01 00:00:00+0000 1970\"\n")
+ (("^USER=.*")
+ "USER=Guix\n"))
+ #t))))
+
(build-system gnu-build-system)
(inputs `(("ghostscript" ,ghostscript)
("libjpeg" ,libjpeg)
(display "ZLIB = libz.so\n" f)
(display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
(close-port f))
+
(let ((rgb (string-append (assoc-ref inputs "xorg-rgb")
"/share/X11/rgb.txt")))
- (substitute* "pm_config.in.h"
- (("/usr/share/X11/rgb.txt") rgb)))
+ (substitute* "config.mk"
+ (("/usr/share/netpbm/rgb.txt") rgb))
+
+ ;; Our Ghostscript no longer provides the 'gs' command, only
+ ;; 'gsc', so look for that instead.
+ (substitute* "converter/other/pstopnm.c"
+ (("\"%s/gs\"")
+ "\"%s/gsc\"")
+ (("/usr/bin/gs")
+ (string-append (assoc-ref inputs "ghostscript") "/bin/gsc"))))
#t))
(add-before 'check 'setup-check
(lambda _
(("all-in-place.test") "")
(("pnmpsnr.test") "")
(("pnmremap1.test") "")
- (("gif-roundtrip.test") ""))
+ (("gif-roundtrip.test") "")
+
+ ;; These two tests started failing in netpbm-10.78.3.
+ (("jpeg-roundtrip.test") "")
+ (("pbmtext.test") "")
+
+ ;; Skip tests that use nonfree programs that we don't build.
+ (("ps-alt-roundtrip.test") "" )
+ (("pbm-misc-converters.test") ""))
#t))
(replace 'install
(lambda* (#:key outputs make-flags #:allow-other-keys)