aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/netpbm.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-04-17 22:06:05 -0400
committerMark H Weaver <mhw@netris.org>2015-04-17 22:06:05 -0400
commit334345d9db53326fa062298e2372d6c33123949a (patch)
tree50774c171f1a348bd7de8e9a447bad2a14a9dffb /gnu/packages/netpbm.scm
parent8d7dc5d9dbf009009d33e21598f92c4685965cd5 (diff)
parent09dd019490e4a269b0a2d9512a07688f8ee657d3 (diff)
downloadguix-334345d9db53326fa062298e2372d6c33123949a.tar
guix-334345d9db53326fa062298e2372d6c33123949a.tar.gz
Merge branch 'core-updates'
Diffstat (limited to 'gnu/packages/netpbm.scm')
-rw-r--r--gnu/packages/netpbm.scm52
1 files changed, 38 insertions, 14 deletions
diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm
index e72cf32e3f..475635e7e1 100644
--- a/gnu/packages/netpbm.scm
+++ b/gnu/packages/netpbm.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,7 +50,41 @@
(revision 1832)))
(sha256
(base32
- "1mj1pqq18yj0yb6l24zfjls7axhqmiv0pvcaabl5xvc4a0dm543j"))))
+ "1mj1pqq18yj0yb6l24zfjls7axhqmiv0pvcaabl5xvc4a0dm543j"))
+ (file-name (string-append name "-" version "-checkout"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Remove non-FSDG-compliant code.
+ '(begin
+ (use-modules (guix build utils))
+
+ (define-syntax drop
+ (syntax-rules (in)
+ ;; Remove PROGRAM from DIRECTORY/Makefile, and remove
+ ;; DIRECTORY/PROGRAM and DIRECTORY/PROGRAM.c.
+ ((_ program ... in directory)
+ (begin
+ (substitute* (string-append directory "/Makefile")
+ ((program) "") ...)
+
+ (let* ((subdir (string-append directory "/" program))
+ (dot-c (string-append subdir ".c")))
+ (when (file-exists? subdir)
+ (delete-file-recursively subdir))
+ (when (file-exists? dot-c)
+ (delete-file dot-c)))
+
+ ...))))
+
+ ;; Drop advertisement for non-free program.
+ (drop "hpcdtoppm" in "converter/ppm")
+
+ ;; Drop programs without a license, see
+ ;; <http://packages.debian.org/changelogs/pool/main/n/netpbm-free/netpbm-free_10.0-12.2/libnetpbm10.copyright>.
+ (drop "pbmto4425" "pbmtoln03" "pbmtolps" "pbmtopk" "pktopbm"
+ in "converter/pbm")
+ (drop "spottopgm" in "converter/pgm")
+ (drop "ppmtopjxl" in "converter/ppm")))))
(build-system gnu-build-system)
(inputs `(("ghostscript" ,ghostscript)
("libjpeg" ,libjpeg)
@@ -75,19 +110,8 @@
(display "TIFFLIB = libtiff.so\n" f)
(display "JPEGLIB = libjpeg.so\n" f)
(display "ZLIB = libz.so\n" f)
- (close-port f)
- ;; drop advertisement for non-free program
- (substitute* "converter/ppm/Makefile" (("hpcdtoppm") ""))
- ;; drop programs without license, see
- ;; http://packages.debian.org/changelogs/pool/main/n/netpbm-free/netpbm-free_10.0-12.2/libnetpbm10.copyright
- (substitute* "converter/pbm/Makefile"
- (("pbmto4425") "")
- (("pbmtoln03") "")
- (("pbmtolps") "")
- (("pbmtopk") "")
- (("pktopbm") ""))
- (substitute* "converter/pgm/Makefile" (("spottopgm") ""))
- (substitute* "converter/ppm/Makefile" (("ppmtopjxl") ""))))
+ (display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
+ (close-port f)))
(alist-cons-before
'check 'setup-check
(lambda _