From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 6HVqAGnaRGZkFQEAqHPOHw:P1 (envelope-from ) for ; Wed, 15 May 2024 17:53:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 6HVqAGnaRGZkFQEAqHPOHw (envelope-from ) for ; Wed, 15 May 2024 17:53:13 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b="hp/40XPz"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715788392; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=H3eEM4P9SrBSFg7Ubh8/tJzJdJg4/S/AhRxvIHTvQvA=; b=A/WeWBVvc/KVziQtxaON/xy9K8bxBrAvwRR/ZmP6lcw9w5VbW4VAteccAx1A9BAVCb+eJT CcOaAPaCXY8FtrfhM2Yn8Vdmk/3tnHF9yBQnjTt8XE2XLns8PBTpufA5r5Fceu/6r2NLQV xBlP2R7jwq35anNQ5RF435aBjpkhu5HTBoYCwDz3w4A00JmvSblL2J+VMzDzrhnqFpg4Gg uNpaMWAcmjBharb2ZQyc5mkKh2jqQG4ghAuBoseY7Q8amPpmoiwzEf47dZC4iEBeUYSiVF XwJdygZJGekTrjoOSAILzfV0CE6Q6yGs+2LwtIbOr7hK76b7apy1ozHTCrCQ2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b="hp/40XPz"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715788392; a=rsa-sha256; cv=none; b=VRl+UN1Gew9zWdOwsASf7yrwTmpkn+UVhWPzXDtps5PaRvBKIeW5dxE3eLc+ekYN/tV3Nd KFSixrZG6Tc4ZrVJ0SId3GDNBlRIy3OQtBy9QDTAO4XazC8SJAz41DWB6xTREfT3vaUzkQ b9g9obZU1PoJzHvDNYn9AyTSxFRq9yrwiNbh8PDzMExIyDmTTHFn11TrHRPlbEADVK3p7C 68LK472Pnt77uUzQc4708V8A7+tj7crvqyiD0bq4bD7pl9qWHtpEra+P2PNGYasShY9P9L tA+QcK4cHT50l1ABy1UCLGsn+baxZuAyjs6zyDxiNio76lJCbzmg0jc4UfGf6g== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8DC0317061 for ; Wed, 15 May 2024 17:53:12 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7GwG-00041j-2B; Wed, 15 May 2024 11:53:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7GwE-00041C-G8 for guix-patches@gnu.org; Wed, 15 May 2024 11:53:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7GwE-0004PL-83 for guix-patches@gnu.org; Wed, 15 May 2024 11:53:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Gw9-0003Wt-O7; Wed, 15 May 2024 11:53:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70087] [PATCH v2 1/4] gnu: gecode: Update to 6.2.0-1.f7f0d7c. References: In-Reply-To: Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, bavier@posteo.net, sharlatanus@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 15:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70087 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70087@debbugs.gnu.org Cc: Andreas Enge , Eric Bavier , Sharlatan Hellseher X-Debbugs-Original-Xcc: Andreas Enge , Eric Bavier , Sharlatan Hellseher Received: via spool by 70087-submit@debbugs.gnu.org id=B70087.171578832913508 (code B ref 70087); Wed, 15 May 2024 15:53:01 +0000 Received: (at 70087) by debbugs.gnu.org; 15 May 2024 15:52:09 +0000 Received: from localhost ([127.0.0.1]:42815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7GvI-0003Vo-Vi for submit@debbugs.gnu.org; Wed, 15 May 2024 11:52:09 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:47759 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7GvE-0003VC-Ur for 70087@debbugs.gnu.org; Wed, 15 May 2024 11:52:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1715788315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3eEM4P9SrBSFg7Ubh8/tJzJdJg4/S/AhRxvIHTvQvA=; b=hp/40XPzWU1q2UjRmu23p0mtAZ+7RSPdLA2/IGqFbB9F7SzykFr8DkRDqSwojwnIsaToSu x2+ufW4ighxZt1xV4rXfBg6Kt6CBCfd9UuRaaUmmfUuWUHPgjn+8ocLt1m22Do7TeRnoP8 KHoozlo4p+vlD+c8RFhzG4Wx9cox9k7ZSBt3Sj2ET3ILPKCkGrLoYPsZtD7+d6Kunl/Zp/ zEEScgdw76dJLKS8rmv4q7HEl10D1eIFqLVzOnsGr5GZ+uGxs6LtD7Hypy895ry8Nfbjik ENZEPJ3R8jHSeB/L/uZ/3vVxuDjQZPtPOKG1YfCXiTnG0cl1+RIYrhu/V0BWFw== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 70c139aa (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70087@debbugs.gnu.org>; Wed, 15 May 2024 15:51:55 +0000 (UTC) Date: Wed, 15 May 2024 17:51:22 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches From: Herman Rimm via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.37 X-Spam-Score: -5.37 X-Migadu-Queue-Id: 8DC0317061 X-Migadu-Scanner: mx13.migadu.com X-TUID: c+e6LNoKOkeo * gnu/packages/maths.scm (gecode): Update to 6.2.0-1.f7f0d7c. [version]: Use version. [source]: Use commit. [arguments]: Add patch-msc-and-version phase. (minizinc)[arguments]: Copy provided gecode.msc file instead. Change-Id: I5e89105f3fef61d6aa677a4a118225679220ce5d --- gnu/packages/maths.scm | 174 +++++++++++++++++++---------------------- 1 file changed, 82 insertions(+), 92 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index d551b751e6..48f43f264b 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -63,6 +63,7 @@ ;;; Copyright © 2023 Jake Leporte ;;; Copyright © 2023 Camilo Q.S. (Distopico) ;;; Copyright © 2023 David Elsing +;;; Copyright © 2024 Herman Rimm ;;; ;;; This file is part of GNU Guix. ;;; @@ -2612,73 +2613,81 @@ (define-public clp (license license:epl1.0))) (define-public gecode - (package - (name "gecode") - (version "6.2.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/Gecode/gecode") - (commit (string-append "release-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0b1cq0c810j1xr2x9y9996p894571sdxng5h74py17c6nr8c6dmk")) - (modules '((guix build utils))) - (snippet - '(begin - ;; delete generated sources - (for-each delete-file - '("gecode/kernel/var-imp.hpp" - "gecode/kernel/var-type.hpp")))))) - (outputs '("out" "examples")) - (build-system gnu-build-system) - (arguments - `(#:configure-flags - (list (string-append "GLDFLAGS=-Wl,-rpath=" - (assoc-ref %outputs "out") - "/lib") - "--enable-examples=no") - #:modules ((guix build gnu-build-system) - (guix build utils) - (ice-9 rdelim) - (ice-9 popen)) - #:phases - (modify-phases %standard-phases - (add-after 'build 'build-examples - (lambda* (#:key outputs #:allow-other-keys) - (invoke "make" "compileexamples"))) - ;; The Makefile disrespects GLDFLAGS for some reason, so we have to - ;; patch it ourselves... *sigh* - (add-after 'install 'fix-rpath - (lambda* (#:key outputs #:allow-other-keys) - (let ((libdir (string-append (assoc-ref outputs "out") "/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$"))))) - (add-after 'install 'install-examples - (lambda* (#:key outputs #:allow-other-keys) - (invoke "make" "installexamples" - (string-append "bindir=" (assoc-ref outputs "examples") - "/bin")))) - ;; Tests depend on installed libraries. - (delete 'check) - (add-after 'fix-rpath 'check - (assoc-ref %standard-phases 'check))))) - (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.") - (license license:expat))) + (let* ((commit "f7f0d7c273d6844698f01cec8229ebe0b66a016a") + (version (git-version "6.2.0" "1" commit))) + (package + (name "gecode") + (version version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Gecode/gecode") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "16gzwa64w90vifaflmii515rsrqclf2y7nziq621m4ad9cjgcixj")) + (modules '((guix build utils))) + ;; 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 + (list + #:configure-flags + #~(list (string-append "GLDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") + "--enable-examples=no") + #:modules '((guix build gnu-build-system) + (guix build utils) + (ice-9 rdelim) + (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"))) + ;; The Makefile disrespects GLDFLAGS for some reason, so + ;; we have to patch it ourselves... *sigh* + (add-after 'install 'fix-rpath + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (libdir (string-append out "/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$"))))) + (add-after 'install 'install-examples + (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.") + (license license:expat)))) (define-public libfixmath (let ((commit "1416c9979635c69f344d3c1de84b3246001a6540") @@ -4083,31 +4092,12 @@ (define-public minizinc }" port) (newline port))) - - (mkdir-p (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)))))))) (native-inputs (list bison flex)) (inputs base-commit: 059c9ed104c91f7a537f369c4524b91d6cf8a13e -- 2.41.0