me
/
guix
Archived
1
0
Fork 0

gnu: gecode: Update to 6.2.0-1.f7f0d7c.

* gnu/packages/maths.scm (gecode): Update to 6.2.0-1.f7f0d7c.

Change-Id: I48b77da2957a08850215aa02a77a845052bf26f7
master
Andreas Enge 2024-05-15 13:05:57 +02:00
parent 4b10015a12
commit 125fcf9f69
No known key found for this signature in database
GPG Key ID: F7D5C9BF765C61E3
1 changed files with 71 additions and 67 deletions

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2023 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2023, 2024 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2016, 2017 John Darrington <jmd@gnu.org> ;;; Copyright © 2014, 2016, 2017 John Darrington <jmd@gnu.org>
;;; Copyright © 2014-2022 Eric Bavier <bavier@posteo.net> ;;; Copyright © 2014-2022 Eric Bavier <bavier@posteo.net>
@ -2703,73 +2703,77 @@ and quadratic objectives using the Simplex algorithm.")
(license license:epl1.0))) (license license:epl1.0)))
(define-public gecode (define-public gecode
(package ;; The current release is not compatible with minizinc anymore.
(name "gecode") ;; Use the latest commit on the release/6.3.0 branch.
(version "6.2.0") (let ((commit "f7f0d7c273d6844698f01cec8229ebe0b66a016a")
(source (origin (revision "1"))
(method git-fetch) (package
(uri (git-reference (name "gecode")
(url "https://github.com/Gecode/gecode") (version (git-version "6.2.0" revision commit))
(commit (string-append "release-" version)))) (source (origin
(file-name (git-file-name name version)) (method git-fetch)
(sha256 (uri (git-reference
(base32 (url "https://github.com/Gecode/gecode")
"0b1cq0c810j1xr2x9y9996p894571sdxng5h74py17c6nr8c6dmk")) (commit commit)))
(modules '((guix build utils))) (file-name (git-file-name name version))
(snippet (sha256
'(begin (base32
;; delete generated sources "16gzwa64w90vifaflmii515rsrqclf2y7nziq621m4ad9cjgcixj"))
(for-each delete-file (modules '((guix build utils)))
'("gecode/kernel/var-imp.hpp" (snippet
"gecode/kernel/var-type.hpp")))))) '(begin
(outputs '("out" "examples")) ;; delete generated sources
(build-system gnu-build-system) (for-each delete-file
(arguments '("gecode/kernel/var-imp.hpp"
`(#:configure-flags "gecode/kernel/var-type.hpp"))))))
(list (string-append "GLDFLAGS=-Wl,-rpath=" (outputs '("out" "examples"))
(assoc-ref %outputs "out") (build-system gnu-build-system)
"/lib") (arguments
"--enable-examples=no") `(#:configure-flags
#:modules ((guix build gnu-build-system) (list (string-append "GLDFLAGS=-Wl,-rpath="
(guix build utils) (assoc-ref %outputs "out")
(ice-9 rdelim) "/lib")
(ice-9 popen)) "--enable-examples=no")
#:phases #:modules ((guix build gnu-build-system)
(modify-phases %standard-phases (guix build utils)
(add-after 'build 'build-examples (ice-9 rdelim)
(lambda* (#:key outputs #:allow-other-keys) (ice-9 popen))
(invoke "make" "compileexamples"))) #:phases
;; The Makefile disrespects GLDFLAGS for some reason, so we have to (modify-phases %standard-phases
;; patch it ourselves... *sigh* (add-after 'build 'build-examples
(add-after 'install 'fix-rpath (lambda* (#:key outputs #:allow-other-keys)
(lambda* (#:key outputs #:allow-other-keys) (invoke "make" "compileexamples")))
(let ((libdir (string-append (assoc-ref outputs "out") "/lib"))) ;; The Makefile disrespects GLDFLAGS for some reason, so we have to
(for-each ;; patch it ourselves... *sigh*
(lambda (file) (add-after 'install 'fix-rpath
(let* ((pipe (open-pipe* OPEN_READ "patchelf" (lambda* (#:key outputs #:allow-other-keys)
"--print-rpath" file)) (let ((libdir (string-append (assoc-ref outputs "out") "/lib")))
(line (read-line pipe))) (for-each
(and (zero? (close-pipe pipe)) (lambda (file)
(invoke "patchelf" "--set-rpath" (let* ((pipe (open-pipe* OPEN_READ "patchelf"
(string-append libdir ":" line) "--print-rpath" file))
file)))) (line (read-line pipe)))
(find-files libdir ".*\\.so$"))))) (and (zero? (close-pipe pipe))
(add-after 'install 'install-examples (invoke "patchelf" "--set-rpath"
(lambda* (#:key outputs #:allow-other-keys) (string-append libdir ":" line)
(invoke "make" "installexamples" file))))
(string-append "bindir=" (assoc-ref outputs "examples") (find-files libdir ".*\\.so$")))))
"/bin")))) (add-after 'install 'install-examples
;; Tests depend on installed libraries. (lambda* (#:key outputs #:allow-other-keys)
(delete 'check) (invoke "make" "installexamples"
(add-after 'fix-rpath 'check (string-append "bindir=" (assoc-ref outputs "examples")
(assoc-ref %standard-phases 'check))))) "/bin"))))
(native-inputs ;; Tests depend on installed libraries.
(list patchelf perl sed)) (delete 'check)
(home-page "https://www.gecode.org") (add-after 'fix-rpath 'check
(synopsis "Toolkit for developing constraint-based systems") (assoc-ref %standard-phases 'check)))))
(description "Gecode is a C++ toolkit for developing constraint-based (native-inputs
(list patchelf perl sed))
(home-page "https://www.gecode.org")
(synopsis "Toolkit for developing constraint-based systems")
(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))))
(define-public libfixmath (define-public libfixmath
(let ((commit "1416c9979635c69f344d3c1de84b3246001a6540") (let ((commit "1416c9979635c69f344d3c1de84b3246001a6540")