;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2015 Andreas Enge ;;; Copyright © 2015, 2016 Ludovic Courtès ;;; Copyright © 2019 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages netpbm) #:use-module (gnu packages) #:use-module (gnu packages compression) #:use-module (gnu packages flex) #:use-module (gnu packages ghostscript) #:use-modul
aboutsummaryrefslogtreecommitdiff
blob: 638d071bafce55257670c9123e219c6d3ad22aae (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Fix doc snarfing with GCC 4.5+.
From <http://git.savannah.gnu.org/cgit/guile.git/commit/?h=branch_release-1-8&id=aac41d28358cea594bb30f6e547afb82bb6004a6>.

diff --git a/scripts/snarf-check-and-output-texi b/scripts/snarf-check-and-output-texi
index ea33e17..8cd42e8 100755
--- a/scripts/snarf-check-and-output-texi
+++ b/scripts/snarf-check-and-output-texi
@@ -267,6 +267,17 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
       (set! *file* file)
       (set! *line* line))
 
+     ;; newer gccs like to throw around more location markers into the
+     ;; preprocessed source; these (hash . hash) bits are what they translate to
+     ;; in snarfy terms.
+     (('location ('string . file) ('int . line) ('hash . 'hash))
+      (set! *file* file)
+      (set! *line* line))
+
+     (('location ('hash . 'hash) ('string . file) ('int . line) ('hash . 'hash))
+      (set! *file* file)
+      (set! *line* line))
+
      (('arglist rest ...)
       (set! *args* (do-arglist rest)))
(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* "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 _ ;; install temporarily into /tmp/netpbm (system* "make" "package") ;; remove test requiring X (substitute* "test/all-in-place.test" (("pamx") "")) ;; do not worry about non-existing file (substitute* "test/all-in-place.test" (("^rm ") "rm -f ")) ;; remove four tests that fail for unknown reasons (substitute* "test/Test-Order" (("all-in-place.test") "") (("pnmpsnr.test") "") (("pnmremap1.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) (let ((out (assoc-ref outputs "out"))) (apply system* "make" "package" (string-append "pkgdir=" out) make-flags) ;; copy static library (copy-file (string-append out "/link/libnetpbm.a") (string-append out "/lib/libnetpbm.a")) ;; remove superfluous folders and files (system* "rm" "-r" (string-append out "/link")) (system* "rm" "-r" (string-append out "/misc")) (with-directory-excursion out (for-each delete-file '("config_template" "pkginfo" "README" "VERSION"))) #t)))))) (synopsis "Toolkit for manipulation of images") (description "Netpbm is a toolkit for the manipulation of graphic images, including the conversion of images between a variety of different formats. There are over 300 separate tools in the package including converters for about 100 graphics formats.") (license gpl2) (home-page "http://netpbm.sourceforge.net/")))