From: David Elsing <david.elsing@posteo.net>
To: 64446@debbugs.gnu.org
Cc: David Elsing <david.elsing@posteo.net>,
andreas@enge.fr, efraim@flashner.co.il, bavier@posteo.net
Subject: [bug#64446] [PATCH] gnu: Add bliss.
Date: Mon, 3 Jul 2023 21:21:32 +0000 [thread overview]
Message-ID: <5840cd3331640479ee55e604b4e5080be85819ba.1688419275.git.david.elsing@posteo.net> (raw)
* 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 <bliss/" path ">")))
+ (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
next reply other threads:[~2023-07-03 21:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 21:21 David Elsing [this message]
2023-07-26 16:10 ` [bug#64446] [PATCH] gnu: Add bliss Andreas Enge
2023-09-20 22:14 ` David Elsing
2023-09-20 22:19 ` [bug#64446] [PATCH v2] " David Elsing
2023-10-11 17:11 ` bug#64446: " Ludovic Courtès
2023-07-26 16:22 ` [bug#64446] [PATCH] " Andreas Enge
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5840cd3331640479ee55e604b4e5080be85819ba.1688419275.git.david.elsing@posteo.net \
--to=david.elsing@posteo.net \
--cc=64446@debbugs.gnu.org \
--cc=andreas@enge.fr \
--cc=bavier@posteo.net \
--cc=efraim@flashner.co.il \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.