[PATCH 1/4] gnu: gecode: Update to development version 6.3.0.

  • Open
  • quality assurance status badge
Details
One participant
  • Herman Rimm
Owner
unassigned
Submitted by
Herman Rimm
Severity
normal
H
H
Herman Rimm wrote on 30 Mar 12:40 +0100
(address . guix-patches@gnu.org)(name . Herman Rimm)(address . herman@rimm.ee)
f5a006def8b65680ffe79602658825e2b25bfb56.1711794209.git.herman@rimm.ee
* gnu/packages/maths.scm (gecode): Update.

Change-Id: I5e89105f3fef61d6aa677a4a118225679220ce5d
---
gnu/packages/maths.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 479591889f..6c23aa3562 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -63,6 +63,7 @@
;;; Copyright © 2023 Jake Leporte <jakeleporte@outlook.com>
;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
;;; Copyright © 2023 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2615,16 +2616,16 @@ (define-public clp
(define-public gecode
(package
(name "gecode")
- (version "6.2.0")
+ (version "6.3.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Gecode/gecode")
- (commit (string-append "release-" version))))
+ (commit "2d20e88cae176584b6e09d909aca3eb72ae76829")))
(file-name (git-file-name name version))
(sha256
(base32
- "0b1cq0c810j1xr2x9y9996p894571sdxng5h74py17c6nr8c6dmk"))
+ "0hf7hd7m5p26xwn8f561f0gn2a6q33xz818jg3ivmvp2ysmmmm4r"))
(modules '((guix build utils)))
(snippet
'(begin

base-commit: 350cdbe83819233b6db9fb1cfc797eaf80b0d168
--
2.41.0
H
H
Herman Rimm wrote on 30 Mar 12:42 +0100
[PATCH 2/4] gnu: Add chuffed.
(address . 70087@debbugs.gnu.org)(name . Herman Rimm)(address . herman@rimm.ee)
a6f28de25feaacb939b8da06539aed6de1b4f8de.1711794209.git.herman@rimm.ee
* gnu/packages/maths.scm (chuffed): Add variable.

Change-Id: I77fc1ceb9caa42833689fba771010aeb38443e5e
---
gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6c23aa3562..0c08851616 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -306,6 +306,43 @@ (define-public calc
(home-page "http://www.isthe.com/chongo/tech/comp/calc/")
(license license:lgpl2.1)))
+(define-public chuffed
+ (package
+ (name "chuffed")
+ (version "0.13.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/chuffed/chuffed")
+ (commit version)))
+ (sha256
+ (base32
+ "1c28q166qh84q4i5wz77fqvw7kld3fmhd245sgdvyxcbjpi2wr0m"))))
+ (build-system cmake-build-system)
+ (synopsis "Lazy clause generation solver")
+ (arguments '(#:tests? #f ; no 'check' target
+ #:modules ((guix build cmake-build-system)
+ (guix build utils))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'patch-msc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "chuffed.msc"
+ ;; TODO: Replace fzn-chuffed and chuffed path
+ ;; before build.
+ (("\\.\\./../..") out)
+ (("\\.\\.")
+ (string-append
+ out "/share/minizinc")))))))))
+ (description
+ "Chuffed is a state of the art lazy clause solver designed from the
+ground up with lazy clause generation in mind. Lazy clause generation
+is a hybrid approach to constraint solving that combines features of
+finite domain propagation and Boolean satisfiability.")
+ (home-page "https://github.com/chuffed/chuffed")
+ (license license:expat)))
+
(define-public coda
(package
(name "coda")
--
2.41.0
H
H
Herman Rimm wrote on 30 Mar 12:42 +0100
[PATCH 3/4] gnu: minizinc: Add chuffed backend.
(address . 70087@debbugs.gnu.org)(name . Herman Rimm)(address . herman@rimm.ee)
1f8b3e870c43629a1b35ecb532a1cffc19146315.1711794209.git.herman@rimm.ee
* gnu/packages/maths.scm (minizinc): Add backend.

Change-Id: If178a7585d70eb4b6f3223f5f6b2f34d9d2f2257
---
gnu/packages/maths.scm | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0c08851616..fd44f1f985 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4065,9 +4065,9 @@ (define-public minizinc
(lambda (file)
(member file (cons* "." ".." targets)))
(scandir ".")))
- (substitute* "libmzn.cmake"
- (("include\\(cmake/targets/(.*)\\)" all target)
- (if (member target targets) all "")))))
+ (substitute* "libmzn.cmake"
+ (("include\\(cmake/targets/(.*)\\)" all target)
+ (if (member target targets) all "")))))
(with-directory-excursion "include/minizinc/solvers/MIP"
(for-each delete-file
(remove
@@ -4106,9 +4106,10 @@ (define-public minizinc
(modify-phases %standard-phases
(add-after 'install 'install-solver-configs
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((gecode (assoc-ref inputs "gecode"))
+ (let ((chuffed (assoc-ref inputs "chuffed"))
+ (gecode (assoc-ref inputs "gecode"))
(pkgdatadir (string-append (assoc-ref outputs "out")
- "/share/minizinc")))
+ "/share/minizinc")))
(call-with-output-file (string-append pkgdatadir
"/Preferences.json")
(lambda (port)
@@ -4123,7 +4124,9 @@ (define-public minizinc
port)
(newline port)))
- (mkdir-p (string-append pkgdatadir "/solvers"))
+ (copy-recursively
+ (string-append chuffed "/share/minizinc/solvers")
+ (string-append pkgdatadir "/solvers"))
(call-with-output-file (string-append pkgdatadir
"/solvers/gecode.msc")
(lambda (port)
@@ -4150,7 +4153,7 @@ (define-public minizinc
(native-inputs
(list bison flex))
(inputs
- (list cbc gecode zlib))
+ (list cbc chuffed gecode zlib))
(home-page "https://www.minizinc.org")
(synopsis "High-level constraint modeling language")
(description "MiniZinc is a high-level modeling language for constraint
--
2.41.0
H
H
Herman Rimm wrote on 30 Mar 12:42 +0100
[PATCH 4/4] gnu: minizinc: Update to 2.8.3.
(address . 70087@debbugs.gnu.org)(name . Herman Rimm)(address . herman@rimm.ee)
5345bf947c546c7a9c1a581e9d22d33b953158ec.1711794209.git.herman@rimm.ee
* gnu/packages/maths.scm (minizinc): Update.

Change-Id: I503fd004b38abaac8829a2cb94c182b001d83763
---
gnu/packages/maths.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

Toggle diff (34 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index fd44f1f985..5a58696858 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4034,7 +4034,7 @@ (define-public metamath
(define-public minizinc
(package
(name "minizinc")
- (version "2.5.5")
+ (version "2.8.3")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -4043,7 +4043,7 @@ (define-public minizinc
(file-name (git-file-name name version))
(sha256
(base32
- "10b2hsl1fx9psh0iagmp8ki3f60f3qg5hmvra5aczjlfmbl88ggp"))
+ "1h3pc92m7ypvmhrrhk2263ib5rqc4fv4n6lai0p8dwiidjpcqnpz"))
(modules '((guix build utils)
(ice-9 ftw)
(srfi srfi-1)))
@@ -4089,6 +4089,9 @@ (define-public minizinc
"MIP_solverinstance.cpp"
"MIP_wrap.cpp")))
(scandir "."))))
+ ;; Gecode 6.3 does not yet support new interface.
+ (substitute* "solvers/gecode/gecode_solverinstance.cpp"
+ (("600300") "600400"))
(substitute* "CMakeLists.txt"
(("find_package\\(([^ ]*).*\\)" all pkg)
(if (member pkg '("Gecode" "OsiCBC" "Threads"))
--
2.41.0
?