From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GApsOtE8o2RNQQAASxT56A (envelope-from ) for ; Mon, 03 Jul 2023 23:25:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2MByOtE8o2TBdgAAauVa8A (envelope-from ) for ; Mon, 03 Jul 2023 23:25:37 +0200 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 578662849C for ; Mon, 3 Jul 2023 23:25:37 +0200 (CEST) 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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688419537; a=rsa-sha256; cv=none; b=GdZ8rDYUKnjN0mGYKrEXwH8UIPA/iJ2JYLk4ke8gcVelQDt69mAcattzz4+fr4ljM6NWO7 TgHYj8zjOA2Xf3IMQG1LCqJZ25hDvu9/A56d5rlWb07MulUN8vohVusfCAQSdlw48rz/7U 7ZodAY/GLmts5iHr9WHCLHU61NXM4/TTsax96LQ5db43DHg5t8XIM9E1FYZva21KF9DBrr Uq8e4VdXjkJnrhbeqLlma9d/sds3AEVf695qRWz4hd29Dmbfg3ozC0a0Gwhbg5nIkpFNyB 3LbjKi8/o2koJpSARcCOukuA9VWCLTX24fQCLenaRoV4NTdc4LiFm+wPB349Vw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=ceCAEWUB; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688419537; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ZOxPhnxGJfFNl4GprAkBQkXDht4uZbi4fHCUQjIcctY=; b=T28bl31vNA3wf43SUliKNYCXpiUrvhrC0ykiVKx3518gN5C1fLYYfzFDN8grqVgV8mR+W5 trfVZhk0A0w+sN3o8HDQc/18mWQCdm9tcnz4mokL4t5QekusPAxG6g+or/533GdS6wQ9db 5KSkhi4Va7GZNNi9Ef+DCBXNELgtD7cstxSxyR5lDemKc6odPIb9eq65LQjmmjbMRMC9Ci gkQc+BNkJYW1x13uav1rh4ShYDcBEw9PMRC1pqe2/9QozQ0fK3nCnX/C6J1dESOvfdOsz5 be64AmPk1khS3+Eo3NQ20piFWSI0GA/63tsNalmz4qxODoUXTCZfH4LtoxuLuw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=ceCAEWUB; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); 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" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.66 X-Spam-Score: -1.66 X-Migadu-Queue-Id: 578662849C X-TUID: m/HajhbVuPO1 * 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))) -- 2.40.1