From patchwork Sun Sep 29 09:00:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 31550 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5379327BBE9; Sun, 29 Sep 2024 10:34:49 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 99F1327BBE2 for ; Sun, 29 Sep 2024 10:34:47 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1suqK0-0001gt-SG; Sun, 29 Sep 2024 05:34:32 -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 1suqJz-0001gk-5U for guix-patches@gnu.org; Sun, 29 Sep 2024 05:34:31 -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 1suqJy-00049D-T2 for guix-patches@gnu.org; Sun, 29 Sep 2024 05:34:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:References:In-Reply-To:To:Subject; bh=m+h0a5oiaUVA92u0kakaAKM7XEgHL/dCQALfSYIF5EA=; b=BQCsiUlJYHuerVKugJYvvx0AHXwtBJpU9V5XLg/CunkzF/5jy8ST+iHiTrJj/AbYqoSevhIt6VpgILFY+deeKK1USzgeo6POsqiMZSUG88iKKkBLMFHfF+FFbBhDSAJDVVgxC4id7h2wnBBaXh2psS8gyM1ydtNapPjFRfJAkv3Dgxv5hy6yOcILLwtDJvDj+aTeeje0iRTPGX1DeqQLHZ+7eh5Rc+9a2dQHPwb60BFWPi7HhuI/Ox0YFvUJ3Dgy1GuptcaHLz8CKSAwkUW00frs3geGQbbVHgd+XYkTy5nWWxHYxA62gk4iAeUxeiTMWoeaXD+JRQ8QJ9g8FiFGYw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1suqKT-00016Z-UH for guix-patches@gnu.org; Sun, 29 Sep 2024 05:35:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73551] [PATCH 5/8] gnu: Add cadical. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Sep 2024 09:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73551 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73551@debbugs.gnu.org Received: via spool by 73551-submit@debbugs.gnu.org id=B73551.17276024874219 (code B ref 73551); Sun, 29 Sep 2024 09:35:01 +0000 Received: (at 73551) by debbugs.gnu.org; 29 Sep 2024 09:34:47 +0000 Received: from localhost ([127.0.0.1]:40090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suqKE-00015y-K1 for submit@debbugs.gnu.org; Sun, 29 Sep 2024 05:34:47 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:54403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suqKC-00015Y-EL for 73551@debbugs.gnu.org; Sun, 29 Sep 2024 05:34:45 -0400 Received: by mail-lf1-f65.google.com with SMTP id 2adb3069b0e04-53988c54ec8so2075588e87.0 for <73551@debbugs.gnu.org>; Sun, 29 Sep 2024 02:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727602387; x=1728207187; darn=debbugs.gnu.org; h=mime-version:to:subject:date:from:references:in-reply-to:message-id :from:to:cc:subject:date:message-id:reply-to; bh=m+h0a5oiaUVA92u0kakaAKM7XEgHL/dCQALfSYIF5EA=; b=TtK+FS2vqLvi+GLOutkdKyLfuJNHr2B+bqQOUwtpSQzTuSJ4dD7PcLBRj4erVPd69k FXoYU+5OJieNLC2PZF2/p3RmT7s+X0gjKWsgFypL7ZCKTqxywNorvbzOFWh+kuK5DrEl dWNXJYL6nm5dsBgtQ+0tTElPbz8aXo1u7PAZewnhTSFusVnM+b7e5Ts3rn2SQl3GS+6c 6U1QC7U/sDA24YsOUDkXBJzKjltSizWtQjjbpP8XOArVMA7DHULBKGWRoPoM2xiy7WwT FvPpSzv9grMsu11pyp1ItQqVW8ApuVMIte0gUcjaUHavYC/ePPOSl+BNzyArPVVp7ggC mmzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727602387; x=1728207187; h=mime-version:to:subject:date:from:references:in-reply-to:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=m+h0a5oiaUVA92u0kakaAKM7XEgHL/dCQALfSYIF5EA=; b=EW1bApsVdaz3ijZHHaBDasTJntvhHV0R0XMCmp3nxdYVyII3VxxydhYqmSOSwdCQXq 53IGwz8mASAxxwGaaBmck5n3YOnKiK6rG6GJ5rP3i2m10dPiXbHXNgVXWOY3N/pwSH6u IupHnzVGKg4Dgct9xSn16jpNVk+MYgOyDTkZ331EHmSzGhhtKcYqRCkFbkiAWq2FgeCm Nu8T02phFhVrFNC9ljfmRVrsn23uLN5/d5gAJnebvn2VMz2QCmcAKyG0YbJ/cCJrCLl1 OFCq/IhSNM5A26SEW7hS/GeVdr4BR0kVapbmznMUUhVmQBevPm5A0uuYAiHZfMw6lW3L 9hoQ== X-Gm-Message-State: AOJu0YxOWg3lTECvSbjl+KbivT+SSSe+NP8bhlU95X6Wxcc4Y5pq7AGO BPgkFekaGITbapYbNiBkdrw3QwF+SjnOWvNU88bCOExUnOVNRhB0dHEiAyDP X-Google-Smtp-Source: AGHT+IHGWeaf6lFhkdGKMfqYaIH6WyHGV2iMxpDAGQtOeSW2n18OX4yekB464H/xdsD5wr1vAsHRTA== X-Received: by 2002:a17:907:1c24:b0:a8a:9246:7f57 with SMTP id a640c23a62f3a-a93c48e8e14mr980661266b.4.1727601868338; Sun, 29 Sep 2024 02:24:28 -0700 (PDT) Received: from lumine.fritz.box (85-127-114-32.dsl.dynamic.surfer.at. [85.127.114.32]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c88248af7dsm2997166a12.78.2024.09.29.02.24.27 for <73551@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 02:24:28 -0700 (PDT) Message-ID: <81e078aa4164ee1b92dfdb9f855c025230444d7a.1727601398.git.liliana.prikler@gmail.com> In-Reply-To: References: From: Liliana Marie Prikler Date: Sun, 29 Sep 2024 11:00:56 +0200 MIME-Version: 1.0 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/cadical-add-shared-library.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/maths.scm (cadical): New variable. --- gnu/local.mk | 1 + gnu/packages/maths.scm | 52 +++++++++++++++++++ .../patches/cadical-add-shared-library.patch | 49 +++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 gnu/packages/patches/cadical-add-shared-library.patch diff --git a/gnu/local.mk b/gnu/local.mk index 49660d4b3e..3d39016609 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1027,6 +1027,7 @@ dist_patch_DATA = \ %D%/packages/patches/breezy-fix-gio.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/bubblewrap-fix-locale-in-tests.patch \ + %D%/packages/patches/cadical-add-shared-library.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-remove-test-sqlite.patch \ %D%/packages/patches/calibre-remove-test-unrar.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index ab989e6af6..23015bc86a 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -9290,6 +9290,58 @@ (define-public lingeling also included.") (license license:expat))) +(define-public cadical + (package + (name "cadical") + (version "2.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/arminbiere/cadical") + (commit (string-append "rel-" version)))) + (file-name (git-file-name name version)) + (patches (search-patches "cadical-add-shared-library.patch")) + (sha256 + (base32 "1dzjah3z34v89ka48hncwqkxrwl4xqn9947p0ipf39lxshrq91xa")))) + (build-system gnu-build-system) + (arguments + (list #:test-target "test" + #:modules `(((guix build copy-build-system) #:prefix copy:) + (guix build gnu-build-system) + (guix build utils) + (ice-9 regex)) + #:imported-modules %copy-build-system-modules + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda* (#:key configure-flags #:allow-other-keys) + (setenv "CXXFLAGS" "-DPIC -fPIC") + (apply invoke "./configure" configure-flags))) + (replace 'check + (lambda args + ;; Tests are incorrectly linked upstream. + ;; Since we don't install them, just work around this in the + ;; check phase. + (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/build")) + (apply (assoc-ref %standard-phases 'check) args) + (unsetenv "LD_LIBRARY_PATH"))) + (replace 'install + (lambda args + (apply + (assoc-ref copy:%standard-phases 'install) + #:install-plan + `(("build" "bin" #:include ("cadical" "mobical")) + ("build" "lib" #:include-regexp ("libcadical\\.(a|so)$")) + ("src" "include" #:include ("cadical.h")) + ;; Internal headers used by cadiback. + ("src" "include/cadical" #:include-regexp ("\\.hpp$"))) + args)))))) + (home-page "https://github.com/arminbiere/cadical") + (synopsis "SAT solver") + (description "This package provides a SAT solver based on conflict-driven +clause learning.") + (license license:expat))) + (define-public louvain-community (let ((commit "8cc5382d4844af127b1c1257373740d7e6b76f1e") (revision "1")) diff --git a/gnu/packages/patches/cadical-add-shared-library.patch b/gnu/packages/patches/cadical-add-shared-library.patch new file mode 100644 index 0000000000..a1ae786d13 --- /dev/null +++ b/gnu/packages/patches/cadical-add-shared-library.patch @@ -0,0 +1,49 @@ +From fcb865786b524917aa9d3df8745aca66716794bf Mon Sep 17 00:00:00 2001 +From: Mate Soos +Date: Sun, 2 Jun 2024 21:50:06 -0400 +Subject: [PATCH] Also add a dynamic library + +--- +Liliana Marie Prikler : + Added -L. + Squashed fix for cadical and mobical. + + makefile.in | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/makefile.in b/makefile.in +index 291cb3e3..d179f591 100644 +--- a/makefile.in ++++ b/makefile.in +@@ -34,7 +34,7 @@ COMPILE=$(CXX) $(CXXFLAGS) -I$(DIR) -I$(ROOT)/src + + #--------------------------------------------------------------------------# + +-all: libcadical.a cadical mobical ++all: libcadical.so libcadical.a cadical mobical + + #--------------------------------------------------------------------------# + +@@ -54,10 +54,10 @@ contrib/%.o: $(ROOT)/contrib/%.cpp $(ROOT)/contrib/%.hpp $(ROOT)/src/*.hpp makef + # tester 'mobical') and the library are the main build targets. + + cadical: src/cadical.o libcadical.a makefile +- $(COMPILE) -o $@ $< -L. -lcadical $(LIBS) ++ $(COMPILE) -static -o $@ $< -L. -lcadical $(LIBS) + + mobical: src/mobical.o libcadical.a makefile $(LIBS) +- $(COMPILE) -o $@ $< -L. -lcadical ++ $(COMPILE) -static -o $@ $< -L. -lcadical + + libcadical.a: $(OBJ_SOLVER) $(OBJ_CONTRIB) makefile + ar rc $@ $(OBJ_SOLVER) $(OBJ_CONTRIB) +@@ -62,5 +62,8 @@ mobical: src/mobical.o libcadical.a makefile $(LIBS) + libcadical.a: $(OBJ_SOLVER) $(OBJ_CONTRIB) makefile + ar rc $@ $(OBJ_SOLVER) $(OBJ_CONTRIB) + ++libcadical.so: $(OBJ_SOLVER) $(OBJ_CONTRIB) $(LIBS) makefile ++ $(COMPILE) -shared -o $@ $(OBJ_SOLVER) $(OBJ_CONTRIB) $(LIBS) ++ + #--------------------------------------------------------------------------# + + # Note that 'build.hpp' is generated and resides in the build directory. \ No newline at end of file