[PATCH] Add blitz.

  • Done
  • quality assurance status badge
Details
2 participants
  • Arun Isaac
  • Ivan Gankevich
Owner
unassigned
Submitted by
Ivan Gankevich
Severity
normal

Debbugs page

Ivan Gankevich wrote 4 years ago
(address . guix-patches@gnu.org)(name . Ivan Gankevich)(address . i.gankevich@spbu.ru)
20210706165607.31598-1-i.gankevich@spbu.ru
---
gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (47 lines)
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
Arun Isaac wrote 4 years ago
(name . Ivan Gankevich)(address . i.gankevich@spbu.ru)(address . 49443@debbugs.gnu.org)
87v95em7j8.fsf@systemreboot.net
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
-----BEGIN PGP SIGNATURE-----

iQFPBAEBCAA5FiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAmDt0VsbHGFydW5pc2Fh
Y0BzeXN0ZW1yZWJvb3QubmV0AAoJEC4l7othgCuzvLsIALc3yw7dW+OtZBsTYzrN
fLTB8otc/BND/+cRV0BJde5JkKQQPWJ29Alx28Ku00gFCOqqWaPUL1RcJRhj0/fV
TgBxWwv7ES7zIKhjwUMsPJY120/7e8ZTFjc0Tf8f87w/Eihuz3lRYSRrZpm5EHfF
gfaoNXXyni45Kybkp+WF068n8iVriJxBCtRzVHsCmu713AhUFofaLnhVVrPu3nRF
7rRJsoL2OYe+px91HdkpDFq2YLdWwKvFz6IQAX7WaLz9lMHxt+nUmgjUhuXJRnU6
DIPhy8vSZ3HilURAm8AGAWaOPqjmCwpzcs3cs7yr2aQtk5N+oegDs1Tnj3kGy1Zj
dNo=
=qcpP
-----END PGP SIGNATURE-----

Ivan Gankevich wrote 4 years ago
[PATCH] gnu: Add blitz.
(address . 49443@debbugs.gnu.org)(name . Ivan Gankevich)(address . i.gankevich@spbu.ru)
20210714115713.24675-1-i.gankevich@spbu.ru
* gnu/packages/maths.scm (blitz): New variable.
---
gnu/packages/maths.scm | 54 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)

Toggle diff (64 lines)
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
Arun Isaac wrote 4 years ago
[PATCH v3 1/1] gnu: Add blitz.
(name . Ivan Gankevich)(address . i.gankevich@spbu.ru)(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 49443@debbugs.gnu.org)
20210715133931.31555-2-arunisaac@systemreboot.net
From: Ivan Gankevich <i.gankevich@spbu.ru>

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

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

Toggle diff (54 lines)
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@univ-grenoble-alpes.fr>
;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
+;;; Copyright © 2021 Ivan Gankevich <i.gankevich@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
Arun Isaac wrote 4 years ago
[PATCH v3 0/1] Add blitz.
(name . Ivan Gankevich)(address . i.gankevich@spbu.ru)(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 49443@debbugs.gnu.org)
20210715133931.31555-1-arunisaac@systemreboot.net
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.

Toggle quote (6 lines)
> + (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.

Toggle quote (6 lines)
> + (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.

Toggle quote (7 lines)
> + (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.

Toggle quote (4 lines)
> + (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
Ivan Gankevich wrote 4 years ago
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 49443@debbugs.gnu.org)
YPBucumAnD0YJUQi@surge
Toggle quote (5 lines)
>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.


Toggle quote (5 lines)
>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.
Arun Isaac wrote 4 years ago
(name . Ivan Gankevich)(address . i.gankevich@spbu.ru)(address . 49443-done@debbugs.gnu.org)
87fswena5r.fsf@systemreboot.net
Hi Ivan,

Toggle quote (2 lines)
> Thank you, Arun!. The patch works fine on my machine.

Pushed to master!

Toggle quote (7 lines)
>>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
-----BEGIN PGP SIGNATURE-----

iQFPBAEBCAA5FiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAmDxDdAbHGFydW5pc2Fh
Y0BzeXN0ZW1yZWJvb3QubmV0AAoJEC4l7othgCuzh80IAMK19B+zcD0yD4l1CVvO
SxihzOcNcKII0y91DcF/yd9Wx+95gcPEHKvwOBcOHznjYfly7ElFDcrMPzVdspwE
AUKD3NjENMEQfkT+CNPRqS5V2o3oeAaAL7w1ISOLNoivrxwe5sPcZz5Ph5TNqPmX
VTEb1pxx+cr3BFJ+HQnU2TC8kv5JbtI/4HDWg6rtaRj8QWhobjAbsTzNAH+g0sB/
KxsQF4IkzjP2z+wi9XREIRXLY/6DkQGlmM2FVeDIfdHvw6vgqjfYXjU9fy7CRRrk
5SfX2UciDnq6jSVMaNazoiW+tZuZrI+itIUnYeZzFKXZxzvT88D5Xj5kBcC9rIIv
bJ8=
=STnN
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49443@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49443
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help