gnu: gecode: Use gexps.
* gnu/packages/maths.scm (gecode): Use gexps. Reindent package. Change-Id: I5a644d25f2d62c3245b0770fe99c20c3ef380ffcmaster
parent
75f3cca50a
commit
12d23e3ac9
|
@ -2710,18 +2710,17 @@ and quadratic objectives using the Simplex algorithm.")
|
||||||
(package
|
(package
|
||||||
(name "gecode")
|
(name "gecode")
|
||||||
(version (git-version "6.2.0" revision commit))
|
(version (git-version "6.2.0" revision commit))
|
||||||
(source (origin
|
(source
|
||||||
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/Gecode/gecode")
|
(url "https://github.com/Gecode/gecode")
|
||||||
(commit commit)))
|
(commit commit)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32 "16gzwa64w90vifaflmii515rsrqclf2y7nziq621m4ad9cjgcixj"))
|
||||||
"16gzwa64w90vifaflmii515rsrqclf2y7nziq621m4ad9cjgcixj"))
|
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet '(begin
|
||||||
'(begin
|
|
||||||
;; delete generated sources
|
;; delete generated sources
|
||||||
(for-each delete-file
|
(for-each delete-file
|
||||||
'("gecode/kernel/var-imp.hpp"
|
'("gecode/kernel/var-imp.hpp"
|
||||||
|
@ -2729,49 +2728,50 @@ and quadratic objectives using the Simplex algorithm.")
|
||||||
(outputs '("out" "examples"))
|
(outputs '("out" "examples"))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
(list
|
||||||
(list (string-append "GLDFLAGS=-Wl,-rpath="
|
#:configure-flags #~(list (string-append "GLDFLAGS=-Wl,-rpath="
|
||||||
(assoc-ref %outputs "out")
|
#$output "/lib")
|
||||||
"/lib")
|
|
||||||
"--enable-examples=no")
|
"--enable-examples=no")
|
||||||
#:modules ((guix build gnu-build-system)
|
#:modules '((guix build gnu-build-system)
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(ice-9 rdelim)
|
(ice-9 rdelim)
|
||||||
(ice-9 popen))
|
(ice-9 popen))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'build 'build-examples
|
(add-after 'build 'build-examples
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(invoke "make" "compileexamples")))
|
(invoke "make" "compileexamples")))
|
||||||
;; The Makefile disrespects GLDFLAGS for some reason, so we have to
|
;; The Makefile disrespects GLDFLAGS for some reason,
|
||||||
;; patch it ourselves... *sigh*
|
;; so we have to patch it ourselves.
|
||||||
(add-after 'install 'fix-rpath
|
(add-after 'install 'fix-rpath
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let ((libdir (string-append (assoc-ref outputs "out") "/lib")))
|
(let ((libdir (string-append #$output "/lib")))
|
||||||
(for-each
|
(for-each (lambda (file)
|
||||||
(lambda (file)
|
(let* ((pipe (open-pipe* OPEN_READ
|
||||||
(let* ((pipe (open-pipe* OPEN_READ "patchelf"
|
"patchelf"
|
||||||
"--print-rpath" file))
|
"--print-rpath" file))
|
||||||
(line (read-line pipe)))
|
(line (read-line pipe)))
|
||||||
(and (zero? (close-pipe pipe))
|
(and (zero? (close-pipe pipe))
|
||||||
(invoke "patchelf" "--set-rpath"
|
(invoke "patchelf" "--set-rpath"
|
||||||
(string-append libdir ":" line)
|
(string-append libdir
|
||||||
|
":" line)
|
||||||
file))))
|
file))))
|
||||||
(find-files libdir ".*\\.so$")))))
|
(find-files libdir ".*\\.so$")))))
|
||||||
(add-after 'install 'install-examples
|
(add-after 'install 'install-examples
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(invoke "make" "installexamples"
|
(invoke "make" "installexamples"
|
||||||
(string-append "bindir=" (assoc-ref outputs "examples")
|
(string-append "bindir="
|
||||||
"/bin"))))
|
#$output "/bin"))))
|
||||||
;; Tests depend on installed libraries.
|
;; Tests depend on installed libraries.
|
||||||
(delete 'check)
|
(delete 'check)
|
||||||
(add-after 'fix-rpath 'check
|
(add-after 'fix-rpath 'check
|
||||||
(assoc-ref %standard-phases 'check)))))
|
(assoc-ref %standard-phases
|
||||||
(native-inputs
|
'check)))))
|
||||||
(list patchelf perl sed))
|
(native-inputs (list patchelf perl sed))
|
||||||
(home-page "https://www.gecode.org")
|
(home-page "https://www.gecode.org")
|
||||||
(synopsis "Toolkit for developing constraint-based systems")
|
(synopsis "Toolkit for developing constraint-based systems")
|
||||||
(description "Gecode is a C++ toolkit for developing constraint-based
|
(description
|
||||||
|
"Gecode is a C++ toolkit for developing constraint-based
|
||||||
systems and applications. It provides a modular and extensible solver.")
|
systems and applications. It provides a modular and extensible solver.")
|
||||||
(license license:expat))))
|
(license license:expat))))
|
||||||
|
|
||||||
|
|
Reference in New Issue