From: Herman Rimm via Guix-patches via <guix-patches@gnu.org>
To: 70087@debbugs.gnu.org
Cc: Andreas Enge <andreas@enge.fr>, Eric Bavier <bavier@posteo.net>,
Sharlatan Hellseher <sharlatanus@gmail.com>
Subject: [bug#70087] [PATCH 1/3] gnu: gecode: Update to 6.2.0-1.f7f0d7c.
Date: Wed, 15 May 2024 20:01:58 +0200 [thread overview]
Message-ID: <5f72bf3db2123b5e1a7b724a09b87325661ad103.1715795372.git.herman@rimm.ee> (raw)
In-Reply-To: <cover.1715795372.git.herman@rimm.ee>
* gnu/packages/maths.scm (gecode): Update to 6.2.0-1.f7f0d7c.
[version]: Use version.
[arguments]: Add patch-msc-and-version phase. Install examples to the
examples output again.
(minizinc)[arguments]: Copy provided gecode.msc file instead.
Change-Id: I5e89105f3fef61d6aa677a4a118225679220ce5d
---
gnu/packages/maths.scm | 105 +++++++++++++++++------------------------
1 file changed, 43 insertions(+), 62 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 1feabe5f1c..6cb3bdbfb0 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2703,28 +2703,26 @@ (define-public clp
(license license:epl1.0)))
(define-public gecode
- ;; The current release is not compatible with minizinc anymore.
- ;; Use a commit that has been tested with minizinc.
- (let ((commit "2d20e88cae176584b6e09d909aca3eb72ae76829")
- (revision "2"))
+ (let* ((commit "f7f0d7c273d6844698f01cec8229ebe0b66a016a")
+ (version (git-version "6.2.0" "1" commit)))
(package
(name "gecode")
- (version (git-version "6.2.0" revision commit))
+ (version version)
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/Gecode/gecode")
- (commit commit)))
+ (url "https://github.com/Gecode/gecode")
+ (commit commit)))
(file-name (git-file-name name version))
(sha256
- (base32 "0hf7hd7m5p26xwn8f561f0gn2a6q33xz818jg3ivmvp2ysmmmm4r"))
+ (base32
+ "16gzwa64w90vifaflmii515rsrqclf2y7nziq621m4ad9cjgcixj"))
(modules '((guix build utils)))
- (snippet '(begin
- ;; delete generated sources
- (for-each delete-file
- '("gecode/kernel/var-imp.hpp"
- "gecode/kernel/var-type.hpp"))))))
+ ;; delete generated sources
+ (snippet '(for-each delete-file
+ '("gecode/kernel/var-imp.hpp"
+ "gecode/kernel/var-type.hpp")))))
(outputs '("out" "examples"))
(build-system gnu-build-system)
(arguments
@@ -2738,6 +2736,16 @@ (define-public gecode
(ice-9 popen))
#:phases
#~(modify-phases %standard-phases
+ (add-before 'configure 'patch-msc-and-version
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "tools/flatzinc/gecode.msc.in"
+ (("\\.\\./../..") out)
+ (("\\.\\.")
+ (string-append out "/share/minizinc")))
+ (substitute* "configure"
+ (("(PACKAGE_[^0-9]*)[0-9\\.]+" all match)
+ (string-append match #$version))))))
(add-after 'build 'build-examples
(lambda _
(invoke "make" "compileexamples")))
@@ -2746,33 +2754,27 @@ (define-public gecode
(add-after 'install 'fix-rpath
(lambda _
(let ((libdir (string-append #$output "/lib")))
- (for-each (lambda (file)
- (let* ((pipe (open-pipe* OPEN_READ
- "patchelf"
- "--print-rpath" file))
- (line (read-line pipe)))
- (and (zero? (close-pipe pipe))
- (invoke "patchelf" "--set-rpath"
- (string-append libdir
- ":" line)
- file))))
- (find-files libdir ".*\\.so$")))))
+ (for-each
+ (lambda (file)
+ (let* ((pipe (open-pipe* OPEN_READ "patchelf"
+ "--print-rpath" file))
+ (line (read-line pipe)))
+ (and (zero? (close-pipe pipe))
+ (invoke "patchelf" "--set-rpath"
+ (string-append libdir ":" line)
+ file))))
+ (find-files libdir ".*\\.so$")))))
(add-after 'install 'install-examples
- (lambda _
- (invoke "make" "installexamples"
- (string-append "bindir="
- #$output "/bin"))))
- ;; Tests depend on installed libraries.
- (delete 'check)
- (add-after 'fix-rpath 'check
- (assoc-ref %standard-phases
- 'check)))))
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((examples (assoc-ref outputs "examples"))
+ (bindir (format #f "bindir=~a/bin" examples)))
+ (invoke "make" "installexamples" bindir)))))))
(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.")
+ "Gecode is a C++ toolkit for developing constraint-based systems
+and applications. It provides a modular and extensible solver.")
(license license:expat))))
(define-public libfixmath
@@ -4180,33 +4182,12 @@ (define-public minizinc
}"
port)
(newline port)))
-
- (copy-recursively
- (string-append chuffed "/share/minizinc/solvers")
- (string-append pkgdatadir "/solvers"))
- (call-with-output-file (string-append pkgdatadir
- "/solvers/gecode.msc")
- (lambda (port)
- (format port
- "\
-{
- \"id\": \"org.gecode.gecode\",
- \"name\": \"Gecode\",
- \"description\": \"Gecode FlatZinc executable\",
- \"version\": ~s,
- \"mznlib\": ~s,
- \"executable\": ~s,
- \"supportsMzn\": false,
- \"supportsFzn\": true,
- \"needsSolns2Out\": true,
- \"needsMznExecutable\": false,
- \"needsStdlibDir\": false,
- \"isGUIApplication\": false
-}"
- (last (string-split gecode #\-))
- (string-append gecode "/share/gecode/mznlib")
- (string-append gecode "/bin/fzn-gecode"))
- (newline port)))))))))
+ (for-each
+ (lambda (solver)
+ (copy-recursively
+ (string-append solver "/share/minizinc/solvers")
+ (string-append pkgdatadir "/solvers")))
+ (list gecode chuffed))))))))
(native-inputs
(list bison flex))
(inputs
--
2.41.0
next prev parent reply other threads:[~2024-05-15 18:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-30 11:40 [bug#70087] [PATCH 1/4] gnu: gecode: Update to development version 6.3.0 Herman Rimm via Guix-patches via
2024-03-30 11:42 ` [bug#70087] [PATCH 2/4] gnu: Add chuffed Herman Rimm via Guix-patches via
2024-03-30 11:42 ` [bug#70087] [PATCH 3/4] gnu: minizinc: Add chuffed backend Herman Rimm via Guix-patches via
2024-03-30 11:42 ` [bug#70087] [PATCH 4/4] gnu: minizinc: Update to 2.8.3 Herman Rimm via Guix-patches via
2024-05-12 19:08 ` [bug#70087] [PATCH 1/4] gnu: gecode: Update to development version 6.3.0 Andreas Enge
2024-05-14 7:31 ` Herman Rimm via Guix-patches via
2024-05-14 11:44 ` Andreas Enge
2024-05-15 10:12 ` Andreas Enge
2024-05-15 12:06 ` Andreas Enge
2024-05-15 12:39 ` Andreas Enge
2024-05-15 13:08 ` bug#70087: " Andreas Enge
2024-05-15 15:51 ` [bug#70087] [PATCH v2 1/4] gnu: gecode: Update to 6.2.0-1.f7f0d7c Herman Rimm via Guix-patches via
2024-05-15 15:51 ` [bug#70087] [PATCH v2 2/4] gnu: Add chuffed Herman Rimm via Guix-patches via
2024-05-15 15:51 ` [bug#70087] [PATCH v2 3/4] gnu: minizinc: Add chuffed backend Herman Rimm via Guix-patches via
2024-05-15 15:51 ` [bug#70087] [PATCH v2 4/4] gnu: minizinc: Update to 2.8.4 Herman Rimm via Guix-patches via
2024-05-15 17:08 ` [bug#70087] [PATCH v2 1/4] gnu: gecode: Update to 6.2.0-1.f7f0d7c Andreas Enge
2024-05-15 18:01 ` [bug#70087] [PATCH 0/3] Update minizinc and solvers Herman Rimm via Guix-patches via
2024-05-15 18:01 ` Herman Rimm via Guix-patches via [this message]
2024-05-15 18:01 ` [bug#70087] [PATCH 2/3] gnu: chuffed: Update to 0.13.2 Herman Rimm via Guix-patches via
2024-05-15 18:02 ` [bug#70087] [PATCH 3/3] gnu: minizinc: Update to 2.8.4 Herman Rimm via Guix-patches via
2024-05-15 19:03 ` [bug#70087] [PATCH 0/3] Update minizinc and solvers Andreas Enge
2024-05-22 15:12 ` Andreas Enge
2024-06-02 10:17 ` bug#70087: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f72bf3db2123b5e1a7b724a09b87325661ad103.1715795372.git.herman@rimm.ee \
--to=guix-patches@gnu.org \
--cc=70087@debbugs.gnu.org \
--cc=andreas@enge.fr \
--cc=bavier@posteo.net \
--cc=herman@rimm.ee \
--cc=sharlatanus@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).