GNU bug report logs - #49443
[PATCH] Add blitz.

Previous Next

Package: guix-patches;

Reported by: Ivan Gankevich <i.gankevich <at> spbu.ru>

Date: Tue, 6 Jul 2021 16:57:01 UTC

Severity: normal

Tags: patch

Done: Arun Isaac <arunisaac <at> systemreboot.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49443 in the body.
You can then email your comments to 49443 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49443; Package guix-patches. (Tue, 06 Jul 2021 16:57:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Gankevich <i.gankevich <at> spbu.ru>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 06 Jul 2021 16:57:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Gankevich <i.gankevich <at> spbu.ru>
To: guix-patches <at> gnu.org
Cc: Ivan Gankevich <i.gankevich <at> spbu.ru>
Subject: [PATCH] Add blitz.
Date: Tue,  6 Jul 2021 19:56:08 +0300
---
 gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

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+))))
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49443; Package guix-patches. (Tue, 13 Jul 2021 17:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 49443 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Ivan Gankevich <i.gankevich <at> spbu.ru>
Cc: 49443 <at> debbugs.gnu.org
Subject: Re: [bug#49443] [PATCH] Add blitz.
Date: Tue, 13 Jul 2021 23:16:03 +0530
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49443; Package guix-patches. (Wed, 14 Jul 2021 11:58:01 GMT) Full text and rfc822 format available.

Message #11 received at 49443 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Gankevich <i.gankevich <at> spbu.ru>
To: 49443 <at> debbugs.gnu.org
Cc: Ivan Gankevich <i.gankevich <at> spbu.ru>
Subject: [PATCH] gnu: Add blitz.
Date: Wed, 14 Jul 2021 14:57:14 +0300
* gnu/packages/maths.scm (blitz): New variable.
---
 gnu/packages/maths.scm | 54 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b4cf0b5409..eb92fb083a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6440,3 +6440,57 @@ 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 cmake-build-system)
+    (arguments
+      `(#:configure-flags
+        '("-DBUILD_DOC=ON"
+          "-DDISABLE_REFMAN_PDF=ON" ;; refman.pdf requires array-2016-10-06.sty
+          "-DBUILD_TESTING=ON")
+        ;; default "check" target also includes examples and benchmarks
+        #:test-target "check-testsuite"
+        #:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'patch-locations
+            (lambda _
+              ;; replace "texinfo.tex" location
+              (substitute* "doc/CMakeLists.txt"
+                (("/usr/share/texmf/tex/texinfo/")
+                 (format #f "~a/share/texmf-dist/tex/texinfo/"
+                         (assoc-ref %build-inputs "texlive-tex-texinfo"))))
+              #t))
+          (add-after 'build 'build-doc
+            (lambda _
+              (define jobs (format #f "-j~a" (parallel-job-count)))
+              (invoke "make" jobs "blitz-doc")
+              #t))
+          (add-after 'check 'check-examples
+            (lambda _
+              (define jobs (format #f "-j~a" (parallel-job-count)))
+              (invoke "make" jobs "check-examples")
+              #t)))))
+    (native-inputs
+      `(("python" ,python)
+        ("texinfo" ,texinfo)
+        ("texlive-tex-texinfo" ,texlive-tex-texinfo)
+        ("texlive" ,(texlive-union (list texlive-epsf))) ;; for texi2dvi
+        ("texi2html" ,texi2html)
+        ("doxygen" ,doxygen)
+        ("graphviz" ,graphviz)))
+    (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+))))
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49443; Package guix-patches. (Thu, 15 Jul 2021 13:40:02 GMT) Full text and rfc822 format available.

Message #14 received at 49443 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Ivan Gankevich <i.gankevich <at> spbu.ru>
Cc: Arun Isaac <arunisaac <at> systemreboot.net>, 49443 <at> debbugs.gnu.org
Subject: [PATCH v3 1/1] gnu: Add blitz.
Date: Thu, 15 Jul 2021 19:09:31 +0530
From: Ivan Gankevich <i.gankevich <at> spbu.ru>

* gnu/packages/maths.scm (blitz): New variable.

Signed-off-by: Arun Isaac <arunisaac <at> systemreboot.net>
---
 gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b4cf0b5409..628b967eff 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -46,6 +46,7 @@
 ;;; Copyright © 2021 Franck Pérignon <franck.perignon <at> univ-grenoble-alpes.fr>
 ;;; Copyright © 2021 Philip McGrath <philip <at> philipmcgrath.com>
 ;;; Copyright © 2021 Paul A. Patience <paul <at> apatience.com>
+;;; Copyright © 2021 Ivan Gankevich <i.gankevich <at> spbu.ru>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -6440,3 +6441,39 @@ 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 cmake-build-system)
+    (arguments
+     `(#:configure-flags '("-DBUILD_DOC=ON"
+                           "-DBUILD_TESTING=ON")
+       ;; The default "check" target also includes examples and benchmarks.
+       #:test-target "check-testsuite"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'build-doc
+           (lambda _
+             (invoke "make" "-j" (number->string (parallel-job-count))
+                     "blitz-doc"))))))
+    (native-inputs
+     `(("python" ,python)
+       ("texinfo" ,texinfo)))
+    (synopsis "C++ template class library for multidimensional arrays")
+    (description "Blitz++ is a C++ template class library that provides
+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+))))
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49443; Package guix-patches. (Thu, 15 Jul 2021 13:40:02 GMT) Full text and rfc822 format available.

Message #17 received at 49443 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Ivan Gankevich <i.gankevich <at> spbu.ru>
Cc: Arun Isaac <arunisaac <at> systemreboot.net>, 49443 <at> debbugs.gnu.org
Subject: [PATCH v3 0/1] Add blitz.
Date: Thu, 15 Jul 2021 19:09:30 +0530
Hi Ivan,

Thanks for the quick response! Save a few minor changes, this patch LGTM. I am
sending a v3 patch with the necessary changes in a following email. Let me
know if it works, and I'll push it to master. Below, I note some of the
changes I've made.

1. I added a copyright header for you.

> +          (add-after 'build 'build-doc
> +            (lambda _
> +              (define jobs (format #f "-j~a" (parallel-job-count)))
> +              (invoke "make" jobs "blitz-doc")
> +              #t))

2. We do not need format for this. See how I've done it. It's simpler and does
not use a heavy-weight function like format.

> +          (add-after 'check 'check-examples
> +            (lambda _
> +              (define jobs (format #f "-j~a" (parallel-job-count)))
> +              (invoke "make" jobs "check-examples")
> +              #t)))))

3. Just check-testsuite should be good enough. So, this phase is not required.

> +    (native-inputs
> +      `(("python" ,python)
> +        ("texinfo" ,texinfo)
> +        ("texlive-tex-texinfo" ,texlive-tex-texinfo)
> +        ("texlive" ,(texlive-union (list texlive-epsf))) ;; for texi2dvi
> +        ("texi2html" ,texi2html)

4. Actually, I only wanted you to build the info manual, not the pdf and html
manuals. Sorry, I should have been clearer. So, I removed the texlive,
texlive-tex-texinfo, texi2html, doxygen, graphviz dependencies and other
related things from the package.

> +    (synopsis "C++ template class library for multidimensional arrays")
> +    (description
> +      "High-performance multidimensional array containers for scientific computing.")

5. Description should be a complete sentence.

Regards,
Arun

Ivan Gankevich (1):
  gnu: Add blitz.

 gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49443; Package guix-patches. (Thu, 15 Jul 2021 17:21:02 GMT) Full text and rfc822 format available.

Message #20 received at 49443 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Gankevich <i.gankevich <at> spbu.ru>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 49443 <at> debbugs.gnu.org
Subject: Re: [PATCH v3 0/1] Add blitz.
Date: Thu, 15 Jul 2021 20:20:50 +0300
>Thanks for the quick response! Save a few minor changes, this patch LGTM. I am
>sending a v3 patch with the necessary changes in a following email. Let me
>know if it works, and I'll push it to master. Below, I note some of the
>changes I've made.

Thank you, Arun!. The patch works fine on my machine.


>4. Actually, I only wanted you to build the info manual, not the pdf and html
>manuals. Sorry, I should have been clearer. So, I removed the texlive,
>texlive-tex-texinfo, texi2html, doxygen, graphviz dependencies and other
>related things from the package.

You’re right, texinfo documentation is enough for this simple library.




Reply sent to Arun Isaac <arunisaac <at> systemreboot.net>:
You have taken responsibility. (Fri, 16 Jul 2021 04:41:01 GMT) Full text and rfc822 format available.

Notification sent to Ivan Gankevich <i.gankevich <at> spbu.ru>:
bug acknowledged by developer. (Fri, 16 Jul 2021 04:41:01 GMT) Full text and rfc822 format available.

Message #25 received at 49443-done <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Ivan Gankevich <i.gankevich <at> spbu.ru>
Cc: 49443-done <at> debbugs.gnu.org
Subject: Re: [PATCH v3 0/1] Add blitz.
Date: Fri, 16 Jul 2021 10:10:48 +0530
[Message part 1 (text/plain, inline)]
Hi Ivan,

> Thank you, Arun!. The patch works fine on my machine.

Pushed to master!

>>4. Actually, I only wanted you to build the info manual, not the pdf and html
>>manuals. Sorry, I should have been clearer. So, I removed the texlive,
>>texlive-tex-texinfo, texi2html, doxygen, graphviz dependencies and other
>>related things from the package.
>
> You’re right, texinfo documentation is enough for this simple library.

I don't think there is any Guix package that includes the PDF and HTML
documentation. It would make the packages much too heavy what with all
the texlive dependencies you'll have to add. And, I guess the consensus
is that the added size is not worth it.

Regards,
Arun
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Aug 2021 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 257 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.