From: David Elsing <david.elsing@posteo.net>
To: 64446@debbugs.gnu.org
Cc: David Elsing <david.elsing@posteo.net>
Subject: [bug#64446] [PATCH v2] gnu: Add bliss.
Date: Wed, 20 Sep 2023 22:19:13 +0000 [thread overview]
Message-ID: <324c31a7249b044ffb5578795c35961562b12c38.1695248353.git.david.elsing@posteo.net> (raw)
In-Reply-To: <7y1qespk5l.fsf@posteo.net>
* gnu/packages/maths.scm (bliss): New variable.
---
gnu/packages/maths.scm | 85 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6141c09886..76ac34a5d9 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8567,3 +8567,88 @@ (define-public ruy
architecture.")
(license license:asl2.0))))
+(define-public bliss
+ (package
+ (name "bliss")
+ (version "0.77")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://users.aalto.fi/~tjunttil/bliss/downloads/bliss-"
+ version ".zip"))
+ (sha256
+ (base32
+ "193jb63kdwfas2cf61xj3fgkvhb6v2mnbwwpr0jas3zk6j0bkj5c"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ ;; There are no tests
+ #:tests? #f
+ #:configure-flags #~(list "-DUSE_GMP=ON") ; Used by igraph
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Ensure that GMP is used, otherwise the BigNum type changes.
+ (add-after 'unpack 'define-use-gmp
+ (lambda _
+ (substitute* "src/bignum.hh"
+ (("#pragma once.*" all)
+ (string-append all "#define BLISS_USE_GMP")))))
+ ;; Move headers under the bliss/ prefix. This is a Guix choice,
+ ;; since there are no upstream installation instructions and the
+ ;; header names are sufficiently generic to cause confusions with
+ ;; other packages (e.g. "heap.hh").
+ (add-after 'define-use-gmp 'move-headers
+ (lambda _
+ (substitute* (find-files "src")
+ (("#include \"(.*)\"" _ path)
+ (string-append "#include <bliss/" path ">")))
+ (mkdir-p "include/bliss")
+ (for-each
+ (lambda (file)
+ (rename-file file
+ (string-append "include/bliss/" (basename file))))
+ (find-files "src" "\\.(h|hh)$"))
+ (substitute* "Doxyfile"
+ (("INPUT *=.*") "INPUT = bliss"))))
+ (add-after 'move-headers 'patch-cmake
+ (lambda _
+ (let ((port (open-file "CMakeLists.txt" "a")))
+ (display
+ (apply
+ string-append
+ ;; Install the executable and the shared library.
+ "install(TARGETS bliss)\n"
+ "install(TARGETS bliss-executable)\n"
+ "install(DIRECTORY include/bliss DESTINATION include)\n"
+ "target_link_libraries(bliss PUBLIC ${GMP_LIBRARIES})\n"
+ ;; Missing include directories.
+ (map
+ (lambda (name)
+ (string-append
+ "target_include_directories(" name " PUBLIC\n"
+ "${CMAKE_CURRENT_SOURCE_DIR}/include"
+ " ${GMP_INCLUDE_DIR})\n"))
+ '("bliss" "bliss_static" "bliss-executable")))
+ port)
+ (close-port port))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (mkdir "doc")
+ (with-directory-excursion "doc"
+ (let ((srcdir (string-append "../../bliss-" #$version)))
+ (copy-recursively (string-append srcdir "/include/bliss")
+ "bliss")
+ (invoke "doxygen" (string-append srcdir "/Doxyfile"))))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (copy-recursively
+ "doc/html" (string-append #$output "/share/doc/"
+ #$name "-" #$version "/html")))))))
+ (native-inputs (list doxygen graphviz unzip))
+ (propagated-inputs (list gmp))
+ (home-page "https://users.aalto.fi/~tjunttil/bliss/index.html")
+ (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.41.0
next prev parent reply other threads:[~2023-09-20 22:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 21:21 [bug#64446] [PATCH] gnu: Add bliss David Elsing
2023-07-26 16:10 ` Andreas Enge
2023-09-20 22:14 ` David Elsing
2023-09-20 22:19 ` David Elsing [this message]
2023-10-11 17:11 ` bug#64446: [PATCH v2] " 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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=324c31a7249b044ffb5578795c35961562b12c38.1695248353.git.david.elsing@posteo.net \
--to=david.elsing@posteo.net \
--cc=64446@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).