From patchwork Mon Jul 3 21:21:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 14527 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 8385827BBEA; Mon, 3 Jul 2023 22:25:39 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 565C027BBE2 for ; Mon, 3 Jul 2023 22:25:37 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGR2l-0003hK-1d; Mon, 03 Jul 2023 17:25:11 -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 1qGR2h-0003gz-If for guix-patches@gnu.org; Mon, 03 Jul 2023 17:25:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGR2e-0005Af-Oa for guix-patches@gnu.org; Mon, 03 Jul 2023 17:25:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qGR2b-00064d-QK; Mon, 03 Jul 2023 17:25:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64446] [PATCH] gnu: Add bliss. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, efraim@flashner.co.il, bavier@posteo.net, guix-patches@gnu.org Resent-Date: Mon, 03 Jul 2023 21:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64446 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64446@debbugs.gnu.org Cc: David Elsing , andreas@enge.fr, efraim@flashner.co.il, bavier@posteo.net X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: andreas@enge.fr, efraim@flashner.co.il, bavier@posteo.net Received: via spool by submit@debbugs.gnu.org id=B.168841947223292 (code B ref -1); Mon, 03 Jul 2023 21:25:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jul 2023 21:24:32 +0000 Received: from localhost ([127.0.0.1]:34560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGR27-00063c-Qf for submit@debbugs.gnu.org; Mon, 03 Jul 2023 17:24:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:52468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGR22-00063N-FO for submit@debbugs.gnu.org; Mon, 03 Jul 2023 17:24:29 -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 1qGR21-0003dx-9R for guix-patches@gnu.org; Mon, 03 Jul 2023 17:24:25 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qGR1x-00056M-5I for guix-patches@gnu.org; Mon, 03 Jul 2023 17:24:25 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 55ADE240101 for ; Mon, 3 Jul 2023 23:24:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1688419457; bh=i4y28EJVHs2IkHRXDJEqvN6r/UERrd4YXuarxJEuzGQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding:From; b=ceCAEWUBm823y0ANDYPnEsGDpRZU/rDDVeR4gTu8kzF6fOsC70eZi0+s8PS0UjgST o1dN0qMMxuKAd8UJvZTfTh+r+mex0AGM77h5uD5wXg6v3UJAENrGXatSeQfBaM84Zb qzl49ToW7C6X7Sdpmspf4iT5ZnDLlOozNWD8pvchSFhbddFUG2Q6SIGyHfTvy2GKe8 HbO/PjAesrGjd0Sgu5nNFwpvUGmjSk1FA6FPQOlHjPg538ISW4re7l4aO7oEzyZ2HU ZGYqSQ5HEbMo+Sd/vb1t1LOk4SDKfHb54YYint4/SVGoVWuCLca6vOXm/tf6YUYYpB 876vVlB1ZVing== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QvzSw6srkz6txs; Mon, 3 Jul 2023 23:24:16 +0200 (CEST) From: David Elsing Date: Mon, 3 Jul 2023 21:21:32 +0000 Message-Id: <5840cd3331640479ee55e604b4e5080be85819ba.1688419275.git.david.elsing@posteo.net> MIME-Version: 1.0 Received-SPF: pass client-ip=185.67.36.66; envelope-from=david.elsing@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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/maths.scm (bliss): New variable. --- The Makefile is rudimentary, so it is easier to call g++ directly. I did not include GMP, as it is only used to express group sizes exactly. gnu/packages/maths.scm | 87 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 653e76027a..ff0aa6170b 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -8529,3 +8529,90 @@ (define-public scilab optimization, and modeling, simulation of explicit and implicit dynamical systems and symbolic manipulations.") (license license:cecill))) ;CeCILL v2.1 + +(define-public bliss + (package + (name "bliss") + (version "0.73") + (source (origin + (method url-fetch) + (uri (string-append "http://www.tcs.hut.fi/Software/bliss/bliss-" + version ".zip")) + (sha256 + (base32 + "110ggzyn4fpsq3haisv7pzkgfs5x1m7802r4n5cas30l0hlg6yzm")))) + (outputs (list "out" "doc")) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f ; No tests + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-string-macro + (lambda _ + (substitute* "bliss.cc" + (("\"__DATE__\"") "\" __DATE__ \"")))) + ;; Move headers under the bliss/ prefix + (add-after 'unpack 'move-headers + (lambda _ + (substitute* (find-files "." "\\.(h|hh|cc)$") + (("#include \"(.*)\"" all path) + (string-append "#include "))) + (mkdir-p "bliss") + (for-each + (lambda (file) + (rename-file file + (string-append "bliss/" (basename file)))) + (find-files "." "\\.(h|hh)$")))) + (add-after 'move-headers 'disable-gmp + (lambda _ + (substitute* "bliss/bignum.hh" + (("defined\\(BLISS_USE_GMP\\)") "0")))) + (delete 'configure) + (replace 'build + (lambda _ + (let ((source-files + '("defs" "graph" "partition" "orbit" "uintseqhash" "heap" + "timer" "utils"))) + (for-each + (lambda (file) + (display (string-append "Compiling " file "\n")) + (invoke "g++" "-I." "-fPIC" "-c" "-o" + (string-append file ".o") + (string-append file ".cc"))) + source-files) + (let ((object-files + (map (lambda (file) (string-append file ".o")) + source-files))) + (display (string-append "Linking shared library\n")) + (apply invoke "g++" "-I." "-fPIC" "-shared" + "-o" "libbliss.so" + "bliss_C.cc" + object-files) + (display (string-append "Building bliss\n")) + (apply invoke "g++" "-I." "-o" "bliss.out" "bliss.cc" + "-L." "-lbliss" + (string-append "-Wl,-rpath=" #$output:out "/lib") + object-files))))) + (add-after 'build 'build-doc + (lambda _ + (substitute* "Doxyfile" + (("INPUT *=.*") "INPUT = . bliss\n")) + (invoke "doxygen"))) + (replace 'install + (lambda _ + (install-file "libbliss.so" (string-append #$output:out "/lib")) + (mkdir-p (string-append #$output:out "/bin/")) + (copy-file "bliss.out" (string-append #$output:out "/bin/bliss")) + (copy-recursively "bliss" + (string-append #$output:out "/include/bliss")) + (copy-recursively + "html" (string-append #$output:doc "/share/doc/" + #$name "-" #$version "/html"))))))) + (native-inputs (list doxygen unzip)) + (home-page "http://www.tcs.hut.fi/Software/bliss/index.shtml") + (synopsis "Tool for computing automorphism groups and canonical labelings of graphs") + (description "@code{bliss} is a library for computing automorphism groups +and canonical forms of graphs. It has both a command line user interface as +well as C++ and C programming language APIs.") + (license license:lgpl3)))