gnu: niftilib: Simplify build phases.
* gnu/packages/image.scm (niftilib)[arguments]: Use make-flags instead of replacing "configure" phase; simplify "install" phase.master
parent
eba72e1716
commit
f729a4d8b2
|
@ -3,7 +3,7 @@
|
||||||
;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
|
;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
|
||||||
;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
|
;;; 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 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
|
||||||
;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
|
;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
|
||||||
;;; Copyright © 2014, 2017 John Darrington <jmd@gnu.org>
|
;;; Copyright © 2014, 2017 John Darrington <jmd@gnu.org>
|
||||||
|
@ -1167,57 +1167,44 @@ and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
|
||||||
|
|
||||||
(define-public niftilib
|
(define-public niftilib
|
||||||
(package
|
(package
|
||||||
(name "niftilib")
|
(name "niftilib")
|
||||||
(version "2.0.0")
|
(version "2.0.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (list (string-append "mirror://sourceforge/niftilib/"
|
(uri (list (string-append "mirror://sourceforge/niftilib/"
|
||||||
"nifticlib/nifticlib_"
|
"nifticlib/nifticlib_"
|
||||||
(string-join (string-split version #\.) "_")
|
(string-join (string-split version #\.) "_")
|
||||||
"/nifticlib-" version ".tar.gz")))
|
"/nifticlib-" version ".tar.gz")))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "123z9bwzgin5y8gi5ni8j217k7n683whjsvg0lrpii9flgk8isd3"))))
|
(base32 "123z9bwzgin5y8gi5ni8j217k7n683whjsvg0lrpii9flgk8isd3"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:tests? #f
|
'(#:tests? #f ; there is no test target
|
||||||
#:parallel-build? #f
|
#:parallel-build? #f ; not supported
|
||||||
#:phases
|
#:make-flags
|
||||||
(modify-phases %standard-phases
|
(list "SHELL=bash"
|
||||||
(replace 'install
|
(string-append "ZLIB_INC="
|
||||||
(lambda _
|
(assoc-ref %build-inputs "zlib") "/include")
|
||||||
(for-each
|
;; Append "-fPIC" to CFLAGS.
|
||||||
(lambda (dir)
|
(string-append "CFLAGS="
|
||||||
(let ((directory (assoc-ref %outputs "out")))
|
"-Wall -ansi -pedantic -fPIC"))
|
||||||
(mkdir-p (string-append directory "/" dir))
|
#:phases
|
||||||
(zero? (system* "cp" "-a" dir directory))))
|
(modify-phases %standard-phases
|
||||||
'("bin" "lib" "include"))))
|
(replace 'install
|
||||||
(replace 'configure
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(lambda _
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(substitute* "Makefile"
|
(for-each
|
||||||
(("^SHELL[ \t]*=[ \t]*csh")
|
(lambda (dir)
|
||||||
(string-append "SHELL = "
|
(copy-recursively dir (string-append out "/" dir)))
|
||||||
(assoc-ref %build-inputs "bash")
|
'("bin" "lib" "include")))
|
||||||
"/bin/sh"))
|
#t))
|
||||||
|
(delete 'configure))))
|
||||||
(("^CFLAGS[ \t]*=[ \t]\\$\\(ANSI_FLAGS\\)")
|
(inputs
|
||||||
"CFLAGS = $(ANSI_FLAGS) -fPIC")
|
`(("zlib" ,zlib)))
|
||||||
|
(synopsis "Library for reading and writing files in the nifti-1 format")
|
||||||
(("^ZLIB_INC[ \t]*=[ \t]*-I/usr/include")
|
(description "Niftilib is a set of i/o libraries for reading and writing
|
||||||
(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)))))
|
|
||||||
(inputs
|
|
||||||
`(("zlib" ,zlib)))
|
|
||||||
(synopsis "Library for reading and writing files in the nifti-1 format")
|
|
||||||
(description "Niftilib is a set of i/o libraries for reading and writing
|
|
||||||
files in the nifti-1 data format - a binary file format for storing
|
files in the nifti-1 data format - a binary file format for storing
|
||||||
medical image data, e.g. magnetic resonance image (MRI) and functional MRI
|
medical image data, e.g. magnetic resonance image (MRI) and functional MRI
|
||||||
(fMRI) brain images.")
|
(fMRI) brain images.")
|
||||||
(home-page "http://niftilib.sourceforge.net")
|
(home-page "http://niftilib.sourceforge.net")
|
||||||
(license license:public-domain)))
|
(license license:public-domain)))
|
||||||
|
|
Reference in New Issue