GNU bug report logs -
#31430
[PATCH 0/3] gnu: Add xtensor and its dependencies.
Previous Next
Reported by: Fis Trivial <ybbs.daans <at> hotmail.com>
Date: Sat, 12 May 2018 14:22:02 UTC
Severity: normal
Tags: patch
Done: ludo <at> gnu.org (Ludovic Courtès)
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 31430 in the body.
You can then email your comments to 31430 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Sat, 12 May 2018 14:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Fis Trivial <ybbs.daans <at> hotmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 12 May 2018 14:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi, guixs:
One of the variables that is added by these patches is
`json-modern-cxx`. It's not a real name. The full name of this package
should be "JSON for Modern C++", which is registered in the json
website[1]. On the other hand, it's repo's name is just "json".
I think this package should not occupy the name "json", and a package
name "json-for-modern-c++" feels weird and long, so I renamed it as
"json-modern-cxx". I believe there is a better choice, but wording is
just not my thing. Tell me about your idea and I will make the
corresponding changes.
Thanks in advance.
[1]: http://json.org/
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Sat, 12 May 2018 14:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 31430 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/cpp.scm (json-modern-cxx): New variable.
---
gnu/packages/cpp.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 3e9c39df6..8a30d464e 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -124,3 +124,25 @@ unified access to TCP/UDP sockets, serial ports, console, and files streams.
It also allows a server application to wait for any activity on any
combination of these streams.")
(license license:bsd-3)))
+
+(define-public json-modern-cxx
+ ;; The downloaded tar ball is about 109 MiB large, the most significant part
+ ;; comes from testing data file.
+ (package
+ (name "json-modern-cxx")
+ (version "3.1.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/nlohmann/json/archive/v"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0m5fhdpx2qll933db2nsi30nns3cifavzvijzz6mxhdkpmngmzz8"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (home-page "https://github.com/nlohmann/json")
+ (build-system cmake-build-system)
+ (synopsis "JSON for Modern C++")
+ (description "JSON for Modern C++ is a C++ json library that provides
+intutive syntax and trivial integration.")
+ (license license:expat)))
--
2.14.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Sat, 12 May 2018 14:26:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 31430 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/cpp.scm (xtl): New variable.
---
gnu/packages/cpp.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 8a30d464e..e4388a6a8 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -146,3 +146,37 @@ combination of these streams.")
(description "JSON for Modern C++ is a C++ json library that provides
intutive syntax and trivial integration.")
(license license:expat)))
+
+(define-public xtl
+ (package
+ (name "xtl")
+ (version "0.4.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/QuantStack/xtl/archive/"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "05bcz9y590b77bxcip0k31rgsapmkwqi1smvsvc84zz7m87d4jvy"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (native-inputs
+ `(("googletest" ,googletest)
+ ("json-modern-cxx" ,json-modern-cxx)))
+ (arguments
+ `(#:configure-flags
+ '("-DBUILD_TESTS=ON")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* _
+ (invoke "make" "test_xtl")
+ (chdir "test")
+ (invoke "./test_xtl")
+ (chdir ".."))))))
+ (home-page "https://github.com/QuantStack/xtl")
+ (build-system cmake-build-system)
+ (synopsis "C++ template library providing some basic tools")
+ (description "xtl is a C++ header-only template library providing basic
+tools (containers, algorithms) used by other quantstack packages")
+ (license license:bsd-3)))
--
2.14.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Sat, 12 May 2018 14:26:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 31430 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/algebra.scm (xtensor): New variable.
---
gnu/packages/algebra.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 03a61be47..c248390ce 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me <at> tobias.gr>
;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
;;; Copyright © 2017 Eric Bavier <bavier <at> member.fsf.org>
+;;; Copyright © 2018 Fis Trivial <ybbs.daans <at> hotmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,7 +28,9 @@
(define-module (gnu packages algebra)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages cpp)
#:use-module (gnu packages documentation)
#:use-module (gnu packages ed)
#:use-module (gnu packages flex)
@@ -774,3 +777,37 @@ features, and more.")
;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
;; See 'COPYING.README' for details.
(license license:mpl2.0)))
+
+(define-public xtensor
+ (package
+ (name "xtensor")
+ (version "0.15.9")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/QuantStack/xtensor/archive/"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0mlsw4p1w5mh7pscddfdamz27zq3wml5qla3vbzgvif34vsqc8ra"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("googletest" ,googletest)
+ ("xtl" ,xtl)))
+ (arguments
+ `(#:configure-flags
+ '("-DBUILD_TESTS=ON")
+ #:test-target "xtest"))
+ (home-page "https://github.com/nlohmann/json")
+ (synopsis "C++ tensors with broadcasting and lazy computing")
+ (description "xtensor is a C++ library meant for numerical analysis with
+multi-dimensional array expressions.
+
+xtensor provides
+@itemize
+@item an extensible expression system enabling lazy broadcasting.
+@item an API following the idioms of the C++ standard library.
+@item tools to manipulate array expressions and build upon xtensor.
+@end itemize")
+ (license license:bsd-3)))
--
2.14.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Wed, 23 May 2018 12:10:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 31430 <at> debbugs.gnu.org (full text, mbox):
Hello,
Fis Trivial <ybbs.daans <at> hotmail.com> skribis:
> One of the variables that is added by these patches is
> `json-modern-cxx`. It's not a real name. The full name of this package
> should be "JSON for Modern C++", which is registered in the json
> website[1]. On the other hand, it's repo's name is just "json".
>
> I think this package should not occupy the name "json", and a package
> name "json-for-modern-c++" feels weird and long, so I renamed it as
> "json-modern-cxx". I believe there is a better choice, but wording is
> just not my thing. Tell me about your idea and I will make the
> corresponding changes.
That makes sense to me!
> * gnu/packages/cpp.scm (json-modern-cxx): New variable.
[...]
> +(define-public json-modern-cxx
> + ;; The downloaded tar ball is about 109 MiB large, the most significant part
> + ;; comes from testing data file.
> + (package
> + (name "json-modern-cxx")
> + (version "3.1.2")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/nlohmann/json/archive/v"
> + version ".tar.gz"))
> + (sha256
> + (base32
> + "0m5fhdpx2qll933db2nsi30nns3cifavzvijzz6mxhdkpmngmzz8"))
> + (file-name (string-append name "-" version ".tar.gz"))))
> + (home-page "https://github.com/nlohmann/json")
> + (build-system cmake-build-system)
> + (synopsis "JSON for Modern C++")
What about something like: “JSON parser and printer library for C++”?
Another issue: the tarball contains a few bundled dependencies under
thirdparty/: amalgate, Catch, Fuzzer, etc. Could you look into
“unbundling” these?
Ideally you would add the missing package definitions (if any), add them
as inputs, and add a snippet that (delete-file-recursively "thirdparty").
If it turns out to be trickier than expected, let us know as well. :-)
TIA!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Thu, 24 May 2018 21:32:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 31430 <at> debbugs.gnu.org (full text, mbox):
Fis Trivial <ybbs.daans <at> hotmail.com> skribis:
> * gnu/packages/cpp.scm (xtl): New variable.
[...]
> + (replace 'check
> + (lambda* _
> + (invoke "make" "test_xtl")
> + (chdir "test")
> + (invoke "./test_xtl")
> + (chdir ".."))))))
Instead of chdir, rather do:
(with-directory-excursion "test"
(invoke "./test_xtl")
#t)
> + (home-page "https://github.com/QuantStack/xtl")
> + (build-system cmake-build-system)
> + (synopsis "C++ template library providing some basic tools")
> + (description "xtl is a C++ header-only template library providing basic
> +tools (containers, algorithms) used by other quantstack packages")
I know it’s from upstream, but please s/quantstack/QuantStack/ and add a
period at the end.
Could you send an updated patch?
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Thu, 24 May 2018 21:35:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 31430 <at> debbugs.gnu.org (full text, mbox):
Fis Trivial <ybbs.daans <at> hotmail.com> skribis:
> * gnu/packages/algebra.scm (xtensor): New variable.
[...]
> + (home-page "https://github.com/nlohmann/json")
Copy/paste error. :-)
You can actually arrange to write:
(package
;; …
(home-page …)
(source (origin
;; …
(uri (string-append home-page …)))))
That’s slightly less error-prone.
Apart from that LGTM, thanks!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Fri, 25 May 2018 08:47:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 31430 <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès writes:
> Fis Trivial <ybbs.daans <at> hotmail.com> skribis:
>
>> * gnu/packages/cpp.scm (xtl): New variable.
>
> [...]
>
>> + (replace 'check
>> + (lambda* _
>> + (invoke "make" "test_xtl")
>> + (chdir "test")
>> + (invoke "./test_xtl")
>> + (chdir ".."))))))
>
> Instead of chdir, rather do:
>
> (with-directory-excursion "test"
> (invoke "./test_xtl")
> #t)
>
>> + (home-page "https://github.com/QuantStack/xtl")
>> + (build-system cmake-build-system)
>> + (synopsis "C++ template library providing some basic tools")
>> + (description "xtl is a C++ header-only template library providing basic
>> +tools (containers, algorithms) used by other quantstack packages")
>
> I know it’s from upstream, but please s/quantstack/QuantStack/ and add a
> period at the end.
>
> Could you send an updated patch?
>
> Ludo’.
Thanks for the review. I will resend the patches series in a few days if
unbundling json-modern-cxx went well.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Mon, 28 May 2018 07:58:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 31430 <at> debbugs.gnu.org (full text, mbox):
Hi, guixs.
These are updated patches for xtensor and its dependencies.
The newly added catch-framework2 is an upgraded version of
catch-framework with breaking changes. "catch2" is the official new
name. I tried to upgrade it in place, but none of the other packages
which use `catch-framework' build successfully, so I added the new one
as an indenpendent package and copied meta data from the old one.
For `amalgamate', the term "amalgamate.py" is picked from upstream, it's
indeed a simple script that does the work. So I kept the term in guix.
`modern-json-cxx' should be completely unbundled now. If there's still
hidden third party files, just let me know. It's tests require fuzzing
tool from llvm, You might just disable those tests. It doesn't seem
worthy to me to pull compiler-rt into a json library. Anyway, I enabled
those tests as-is.
Thanks.
fis (6):
gnu: Add catch-framework2.
gnu: Add amalgamate.
gnu: Add fifo-map.
gnu: Add json-modern-cxx.
gnu: Add xtl.
gnu: Add xtensor.
gnu/local.mk | 2 +
gnu/packages/algebra.scm | 36 ++++++
gnu/packages/check.scm | 20 ++++
gnu/packages/code.scm | 61 ++++++++++-
gnu/packages/cpp.scm | 121 +++++++++++++++++++++
.../patches/fifo-map-fix-flags-for-gcc.patch | 39 +++++++
.../patches/fifo-map-remove-catch.hpp.patch | 30 +++++
7 files changed, 304 insertions(+), 5 deletions(-)
create mode 100644 gnu/packages/patches/fifo-map-fix-flags-for-gcc.patch
create mode 100644 gnu/packages/patches/fifo-map-remove-catch.hpp.patch
--
2.14.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Mon, 28 May 2018 08:09:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 31430 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/check.scm (catch-framework2): New variable.
---
gnu/packages/check.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 712e470fe..b9c10e5df 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -161,6 +161,8 @@ supervised tests.")
(base32
"1027cyfx5gsjkdkaf6c2wnjh68882grw8n672018cj3vs9lrhmix"))))))
+;; When dependent packages upgraded to use newer version of catch, this one should
+;; be removed.
(define-public catch-framework
(package
(name "catch")
@@ -199,6 +201,24 @@ supervised tests.")
multi-paradigm automated test framework for C++ and Objective-C.")
(license license:boost1.0)))
+(define-public catch-framework2
+ (package
+ (name "catch2")
+ (version "1.12.2")
+ (home-page "https://github.com/catchorg/Catch2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append home-page "/archive/v" version ".tar.gz"))
+ (sha256
+ (base32
+ "0g2ysxc6adqca5wh7nsicnxb9wkxg75cd5izjsl39rcj0v903gr7"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system cmake-build-system)
+ (synopsis "Automated test framework for C++ and Objective-C")
+ (description "Catch2 stands for C++ Automated Test Cases in Headers and is
+a multi-paradigm automated test framework for C++ and Objective-C.")
+ (license license:boost1.0)))
+
(define-public cmdtest
(package
(name "cmdtest")
--
2.14.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Mon, 28 May 2018 08:10:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 31430 <at> debbugs.gnu.org (full text, mbox):
This commit also re-orders some module statements.
* gnu/packages/code.scm (amalgamate): New variable.
---
gnu/packages/code.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 56 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index fc1c000b9..0f641464d 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -30,12 +30,16 @@
(define-module (gnu packages code)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
+ #:use-module (gnu packages autogen)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
#:use-module (gnu packages databases)
@@ -43,15 +47,13 @@
#:use-module (gnu packages gcc)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages pcre)
- #:use-module (gnu packages pkg-config)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
#:use-module (gnu packages texinfo)
- #:use-module (gnu packages autogen)
#:use-module (gnu packages ncurses)
- #:use-module (gnu packages autotools)
#:use-module (gnu packages llvm)
- #:use-module (gnu packages lua)
- #:use-module (gnu packages bash))
+ #:use-module (gnu packages lua))
;;; Tools to deal with source code: metrics, cross-references, etc.
@@ -645,3 +647,52 @@ deal with incomplete or malformed syntax. GNU indent offers several
extensions over the standard utility.")
(license license:gpl3+)
(home-page "https://www.gnu.org/software/indent/")))
+
+(define-public amalgamate
+ (let* ((commit "c91f07eea1133aa184f652b8f1398eaf03586208")
+ (revision "0")
+ (version (string-append "1.1.1" revision commit)))
+ (package
+ (name "amalgamate")
+ (version version)
+ (home-page "https://github.com/edlund/amalgamate")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (sha256
+ (base32
+ "0cllaraw8mxs8q2nr28nhgzkb417gj2wcklqg59w84f4lc78k3yb"))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet
+ '(substitute* "test.sh"
+ (("test_command \"cc -Wall -Wextra -o source.out source.c\"" all)
+ "test_command \"gcc -Wall -Wextra -o source.out source.c\"")))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("python" ,python-wrapper)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir out)
+ (mkdir bin)
+ (copy-file "amalgamate.py"
+ (string-append bin "/amalgamate.py")))))
+ (replace 'check
+ (lambda _
+ (invoke "./test.sh"))))))
+ (synopsis "Tool for amalgamating C source and header files")
+ ;; The package is indeed a script file, and the term "amalgamate.py" is
+ ;; used by upstream.
+ (description "amalgamate.py aims to make it easy to use SQLite-style C
+source and header amalgamation in projects.")
+ (license license:bsd-3))))
--
2.14.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Mon, 28 May 2018 08:11:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 31430 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/cpp.scm (fifo-map): New variable.
* gnu/packages/patches/fifo-map-fix-flags-for-gcc.patch: New file.
* gnu/packages/patches/fifo-map-remove-catch.hpp.patch: New file.
* gnu/local.mk: Add new patch files.
---
gnu/local.mk | 2 +
gnu/packages/cpp.scm | 45 ++++++++++++++++++++++
.../patches/fifo-map-fix-flags-for-gcc.patch | 39 +++++++++++++++++++
.../patches/fifo-map-remove-catch.hpp.patch | 30 +++++++++++++++
4 files changed, 116 insertions(+)
create mode 100644 gnu/packages/patches/fifo-map-fix-flags-for-gcc.patch
create mode 100644 gnu/packages/patches/fifo-map-remove-catch.hpp.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 4cdbaec1d..b9ef6d58d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -661,6 +661,8 @@ dist_patch_DATA = \
%D%/packages/patches/fasthenry-spFactor.patch \
%D%/packages/patches/fcgi-2.4.0-gcc44-fixes.patch \
%D%/packages/patches/fcgi-2.4.0-poll.patch \
+ %D%/packages/patches/fifo-map-fix-flags-for-gcc.patch \
+ %D%/packages/patches/fifo-map-remove-catch.hpp.patch \
%D%/packages/patches/file-CVE-2017-1000249.patch \
%D%/packages/patches/findutils-localstatedir.patch \
%D%/packages/patches/findutils-test-xargs.patch \
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 80ffc1ea2..5644311a1 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -151,3 +151,48 @@ the same arithmetic operators as for single values. It also provides
accelerated implementation of common mathematical functions operating on
batches.")
(license license:bsd-3)))
+
+(define-public fifo-map
+ (let* ((commit "0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9")
+ (revision "0")
+ (version (string-append "1.1.1" revision commit)))
+ (package
+ (name "fifo-map")
+ (version version)
+ (home-page "https://github.com/nlohmann/fifo_map")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (sha256
+ (base32
+ "0pi77b75kp0l7z454ihcd14nzpi3nc5m4nyjbsgy5f9bw3676196"))
+ (patches (search-patches "fifo-map-remove-catch.hpp.patch"
+ "fifo-map-fix-flags-for-gcc.patch"))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet '(delete-file-recursively "./test/thirdparty"))))
+ (native-inputs
+ `(("catch2" ,catch-framework2)))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "./unit")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (inc (string-append out "/include/fifo_map")))
+ (mkdir-p inc)
+ (with-directory-excursion
+ (string-append "../" ,name "-" ,version "-checkout")
+ (copy-file "src/fifo_map.hpp"
+ (string-append inc "/fifo_map.hpp")))))))))
+ (synopsis "FIFO-ordered associative container for C++")
+ (description "Fifo_map is a C++ header only library for associative
+container which uses the order in which keys were inserted to the container
+as ordering relation.")
+ (license license:expat))))
diff --git a/gnu/packages/patches/fifo-map-fix-flags-for-gcc.patch b/gnu/packages/patches/fifo-map-fix-flags-for-gcc.patch
new file mode 100644
index 000000000..59b710522
--- /dev/null
+++ b/gnu/packages/patches/fifo-map-fix-flags-for-gcc.patch
@@ -0,0 +1,39 @@
+From 0871db30bd73d112a434f54572d34cca28de61c5 Mon Sep 17 00:00:00 2001
+From: fis <ybbs.daans <at> hotmail.com>
+Date: Sat, 26 May 2018 22:58:37 +0800
+Subject: [PATCH 2/2] * CMakeLists.txt: Fix flags for gcc.
+
+---
+ CMakeLists.txt | 18 ++----------------
+ 1 file changed, 2 insertions(+), 16 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index eba147b..d60dcef 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,20 +6,6 @@ add_executable(unit src/fifo_map.hpp test/unit.cpp)
+
+ target_include_directories(unit PRIVATE "test" "src")
+
+-if(MSVC)
+- set(CMAKE_CXX_FLAGS
+- "/EHsc"
+- )
++set(CMAKE_CXX_FLAGS "-std=c++11 -fpermissive")
+
+- STRING(REPLACE "/O2" "/Od" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
+-
+- add_definitions(-D_SCL_SECURE_NO_WARNINGS)
+-else(MSVC)
+- set(CMAKE_CXX_FLAGS
+- "-std=c++11 -stdlib=libc++"
+- )
+-endif(MSVC)
+-
+-include_directories(
+- src test
+-)
++include_directories(src test)
+--
+2.14.3
+
diff --git a/gnu/packages/patches/fifo-map-remove-catch.hpp.patch b/gnu/packages/patches/fifo-map-remove-catch.hpp.patch
new file mode 100644
index 000000000..be4efd3e9
--- /dev/null
+++ b/gnu/packages/patches/fifo-map-remove-catch.hpp.patch
@@ -0,0 +1,30 @@
+From 20dcf90fd02511f8d78ea7cc8ac82c121fd2f6cf Mon Sep 17 00:00:00 2001
+From: fis <ybbs.daans <at> hotmail.com>
+Date: Sat, 26 May 2018 22:56:29 +0800
+Subject: [PATCH 1/2] * CMakeLists.txt: Remove catch.hpp.
+
+---
+ CMakeLists.txt | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6603c7f..eba147b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,11 +2,9 @@ cmake_minimum_required(VERSION 2.8)
+
+ project(fifo_map LANGUAGES CXX)
+
+-add_executable(unit
+- src/fifo_map.hpp test/thirdparty/catch/catch.hpp test/unit.cpp
+-)
++add_executable(unit src/fifo_map.hpp test/unit.cpp)
+
+-target_include_directories(unit PRIVATE "test" "src" "test/thirdparty")
++target_include_directories(unit PRIVATE "test" "src")
+
+ if(MSVC)
+ set(CMAKE_CXX_FLAGS
+--
+2.14.3
+
--
2.14.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Mon, 28 May 2018 08:12:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 31430 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/cpp.scm (json-modern-cxx): New variable.
---
gnu/packages/cpp.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 5644311a1..17dab4c3b 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -29,7 +29,9 @@
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages check)
+ #:use-module (gnu packages code)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages llvm)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages tls))
@@ -196,3 +198,44 @@ batches.")
container which uses the order in which keys were inserted to the container
as ordering relation.")
(license license:expat))))
+
+(define-public json-modern-cxx
+ (package
+ (name "json-modern-cxx")
+ (version "3.1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/nlohmann/json/archive/v" version ".tar.gz"))
+ (sha256
+ (base32
+ "0m5fhdpx2qll933db2nsi30nns3cifavzvijzz6mxhdkpmngmzz8"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (delete-file-recursively "./third_party")
+ (delete-file-recursively "./test/thirdparty")
+ (delete-file-recursively "./benchmarks/thirdparty")
+ ;; Splits catch and fifo_map
+ (with-directory-excursion "test/src"
+ (let ((files (find-files "." ".*\\.cpp")))
+ (substitute* files
+ (("#include ?\"(catch.hpp)\"" all catch-hpp)
+ (string-append "#include <catch/" catch-hpp ">")))
+ (substitute* files
+ (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
+ (string-append
+ "#include <fifo_map/" fifo-map-hpp ">")))))))))
+ (native-inputs
+ `(("amalgamate" ,amalgamate)
+ ("catch2" ,catch-framework2)
+ ("clang-runtime" ,clang-runtime)
+ ("fifo-map" ,fifo-map)))
+ (home-page "https://github.com/nlohmann/json")
+ (build-system cmake-build-system)
+ (synopsis "JSON parser and printer library for C++")
+ (description "JSON for Modern C++ is a C++ json library that provides
+intutive syntax and trivial integration.")
+ (license license:expat)))
--
2.14.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Mon, 28 May 2018 08:13:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 31430 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/cpp.scm (xtl): New variable.
---
gnu/packages/cpp.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 17dab4c3b..b3f054bc8 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -239,3 +239,36 @@ as ordering relation.")
(description "JSON for Modern C++ is a C++ json library that provides
intutive syntax and trivial integration.")
(license license:expat)))
+
+(define-public xtl
+ (package
+ (name "xtl")
+ (version "0.4.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/QuantStack/xtl/archive/"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "05bcz9y590b77bxcip0k31rgsapmkwqi1smvsvc84zz7m87d4jvy"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (native-inputs
+ `(("googletest" ,googletest)
+ ("json-modern-cxx" ,json-modern-cxx)))
+ (arguments
+ `(#:configure-flags
+ '("-DBUILD_TESTS=ON")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* _
+ (with-directory-excursion "test"
+ (invoke "./test_xtl")
+ #t))))))
+ (home-page "https://github.com/QuantStack/xtl")
+ (build-system cmake-build-system)
+ (synopsis "C++ template library providing some basic tools")
+ (description "xtl is a C++ header-only template library providing basic
+tools (containers, algorithms) used by other QuantStack packages.")
+ (license license:bsd-3)))
--
2.14.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Mon, 28 May 2018 08:13:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 31430 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/algebra.scm (xtensor): New variable.
---
gnu/packages/algebra.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 210b734b9..bf6214432 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -27,7 +27,9 @@
(define-module (gnu packages algebra)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages cpp)
#:use-module (gnu packages documentation)
#:use-module (gnu packages ed)
#:use-module (gnu packages flex)
@@ -774,3 +776,37 @@ features, and more.")
;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
;; See 'COPYING.README' for details.
(license license:mpl2.0)))
+
+(define-public xtensor
+ (package
+ (name "xtensor")
+ (version "0.15.9")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/QuantStack/xtensor/archive/"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0mlsw4p1w5mh7pscddfdamz27zq3wml5qla3vbzgvif34vsqc8ra"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("googletest" ,googletest)
+ ("xtl" ,xtl)))
+ (arguments
+ `(#:configure-flags
+ '("-DBUILD_TESTS=ON")
+ #:test-target "xtest"))
+ (home-page "http://quantstack.net/xtensor")
+ (synopsis "C++ tensors with broadcasting and lazy computing")
+ (description "xtensor is a C++ library meant for numerical analysis with
+multi-dimensional array expressions.
+
+xtensor provides:
+@itemize
+@item an extensible expression system enabling lazy broadcasting.
+@item an API following the idioms of the C++ standard library.
+@item tools to manipulate array expressions and build upon xtensor.
+@end itemize")
+ (license license:bsd-3)))
--
2.14.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Mon, 28 May 2018 11:45:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 31430 <at> debbugs.gnu.org (full text, mbox):
Fis Trivial <ybbs.daans <at> hotmail.com> skribis:
> This commit also re-orders some module statements.
>
> * gnu/packages/code.scm (amalgamate): New variable.
[...]
> +(define-public amalgamate
> + (let* ((commit "c91f07eea1133aa184f652b8f1398eaf03586208")
> + (revision "0")
> + (version (string-append "1.1.1" revision commit)))
I changed ‘string-append’ to ‘git-version’ here. There rest is fine!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Mon, 28 May 2018 11:49:02 GMT)
Full text and
rfc822 format available.
Message #53 received at 31430 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Fis Trivial <ybbs.daans <at> hotmail.com> skribis:
> * gnu/packages/cpp.scm (fifo-map): New variable.
> * gnu/packages/patches/fifo-map-fix-flags-for-gcc.patch: New file.
> * gnu/packages/patches/fifo-map-remove-catch.hpp.patch: New file.
> * gnu/local.mk: Add new patch files.
Applied with the changes below.
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 5644311a1..2caf6af4d 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -155,7 +155,7 @@ batches.")
(define-public fifo-map
(let* ((commit "0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9")
(revision "0")
- (version (string-append "1.1.1" revision commit)))
+ (version (git-version "1.1.1" revision commit)))
(package
(name "fifo-map")
(version version)
@@ -186,11 +186,10 @@ batches.")
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(inc (string-append out "/include/fifo_map")))
- (mkdir-p inc)
(with-directory-excursion
(string-append "../" ,name "-" ,version "-checkout")
- (copy-file "src/fifo_map.hpp"
- (string-append inc "/fifo_map.hpp")))))))))
+ (install-file "src/fifo_map.hpp" inc)
+ #t)))))))
(synopsis "FIFO-ordered associative container for C++")
(description "Fifo_map is a C++ header only library for associative
container which uses the order in which keys were inserted to the container
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31430
; Package
guix-patches
.
(Mon, 28 May 2018 12:19:01 GMT)
Full text and
rfc822 format available.
Message #56 received at 31430 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Fis Trivial <ybbs.daans <at> hotmail.com> skribis:
> * gnu/packages/cpp.scm (json-modern-cxx): New variable.
Applied with the changes below (‘clang-runtime’ is not needed AFAICS.)
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 80b491119..4831ab035 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -228,13 +228,13 @@ as ordering relation.")
(string-append
"#include <fifo_map/" fifo-map-hpp ">")))))))))
(native-inputs
- `(("amalgamate" ,amalgamate)
- ("catch2" ,catch-framework2)
- ("clang-runtime" ,clang-runtime)
+ `(("amalgamate" ,amalgamate)))
+ (inputs
+ `(("catch2" ,catch-framework2)
("fifo-map" ,fifo-map)))
(home-page "https://github.com/nlohmann/json")
(build-system cmake-build-system)
(synopsis "JSON parser and printer library for C++")
- (description "JSON for Modern C++ is a C++ json library that provides
+ (description "JSON for Modern C++ is a C++ JSON library that provides
intutive syntax and trivial integration.")
(license license:expat)))
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Mon, 28 May 2018 12:25:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Fis Trivial <ybbs.daans <at> hotmail.com>
:
bug acknowledged by developer.
(Mon, 28 May 2018 12:25:02 GMT)
Full text and
rfc822 format available.
Message #61 received at 31430-done <at> debbugs.gnu.org (full text, mbox):
I’ve applied the whole series now, thank you for all the work!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 26 Jun 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.