diff mbox series

[bug#49443] Add blitz.

Message ID 20210706165607.31598-1-i.gankevich@spbu.ru
State Accepted
Headers show
Series [bug#49443] Add blitz. | expand

Commit Message

Ivan Gankevich July 6, 2021, 4:56 p.m. UTC
---
 gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

Arun Isaac July 13, 2021, 5:46 p.m. UTC | #1
Hi Ivan,

Thank you for contributing to Guix!

Blitz upstream seems to have moved to the cmake build system. I think
the cmake-build-system will be a better fit for this package than the
gnu-build-system. Would you like to give this a try? Do try building the
documentation and tests as well, and let me know if you need any help.

Also, please note our indentation (particularly for git-reference) and
commit message conventions. Looking at other packages and previous
commits could prove helpful.

Thanks,
Arun
diff mbox series

Patch

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 93b8ee2ad4..12d758c4c4 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6408,3 +6408,40 @@  to source-code analysis of C software.  The Frama-C analyzers assist you in
 various source-code-related activities, from the navigation through unfamiliar
 projects up to the certification of critical software.")
     (license license:lgpl2.1+)))
+
+(define-public blitz
+  (package
+    (name "blitz")
+    (version "1.0.2")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference (url "https://github.com/blitzpp/blitz") (commit version)))
+        (file-name (git-file-name name version))
+        (sha256 (base32 "0c88gc72j3zggyk4yrrip6i0v7xkx97l140vpy3xhxs2i7xy1461"))))
+    (build-system gnu-build-system)
+    (arguments
+      `(#:configure-flags '("--enable-shared" "--disable-fortran")
+        #:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'remove-configure
+            (lambda _
+              ;; remove non-working configure script
+              (if (file-exists? "configure") (delete-file "configure"))
+              ;; remove broken symlinks
+              (for-each
+                (lambda (file)
+                  (if (eq? (stat:type (lstat file)) 'symlink)
+                    (delete-file file)))
+                (find-files "m4" "\\.m4$"))
+              #t)))))
+    (native-inputs
+      `(("autoconf" ,autoconf)
+        ("automake" ,automake)
+        ("libtool" ,libtool)
+        ("python2" ,python-2)))
+    (synopsis "C++ template class library for multidimensional arrays")
+    (description
+      "High-performance multidimensional array containers for scientific computing.")
+    (home-page "https://github.com/blitzpp/blitz")
+    (license (list license:artistic2.0 license:bsd-3 license:lgpl3+))))