me
/
guix
Archived
1
0
Fork 0

gnu: niftilib: Simplify build phases.

* gnu/packages/image.scm (niftilib)[arguments]: Use make-flags instead of
replacing "configure" phase; simplify "install" phase.
master
Ricardo Wurmus 2017-03-19 14:24:27 +01:00
parent eba72e1716
commit f729a4d8b2
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 39 additions and 52 deletions

View File

@ -3,7 +3,7 @@
;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
;;; Copyright © 2014, 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2014, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
;;; Copyright © 2014, 2017 John Darrington <jmd@gnu.org>
@ -1179,39 +1179,26 @@ and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
(base32 "123z9bwzgin5y8gi5ni8j217k7n683whjsvg0lrpii9flgk8isd3"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f
#:parallel-build? #f
'(#:tests? #f ; there is no test target
#:parallel-build? #f ; not supported
#:make-flags
(list "SHELL=bash"
(string-append "ZLIB_INC="
(assoc-ref %build-inputs "zlib") "/include")
;; Append "-fPIC" to CFLAGS.
(string-append "CFLAGS="
"-Wall -ansi -pedantic -fPIC"))
#:phases
(modify-phases %standard-phases
(replace 'install
(lambda _
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(for-each
(lambda (dir)
(let ((directory (assoc-ref %outputs "out")))
(mkdir-p (string-append directory "/" dir))
(zero? (system* "cp" "-a" dir directory))))
'("bin" "lib" "include"))))
(replace 'configure
(lambda _
(substitute* "Makefile"
(("^SHELL[ \t]*=[ \t]*csh")
(string-append "SHELL = "
(assoc-ref %build-inputs "bash")
"/bin/sh"))
(("^CFLAGS[ \t]*=[ \t]\\$\\(ANSI_FLAGS\\)")
"CFLAGS = $(ANSI_FLAGS) -fPIC")
(("^ZLIB_INC[ \t]*=[ \t]*-I/usr/include")
(string-append "ZLIB_INC = -I"
(assoc-ref %build-inputs "zlib")
"/include"))
(("^CP[ \t]*=[ \t]*cp")
(string-append "CP = "
(assoc-ref %build-inputs "coreutils")
"/bin/cp")))
#t)))))
(copy-recursively dir (string-append out "/" dir)))
'("bin" "lib" "include")))
#t))
(delete 'configure))))
(inputs
`(("zlib" ,zlib)))
(synopsis "Library for reading and writing files in the nifti-1 format")