* [bug#31430] [PATCH 1/6] gnu: Add catch-framework2.
2018-05-28 7:57 ` [bug#31430] [PATCH 0/6] Add xtensor and its dependencies (new patches) Fis Trivial
@ 2018-05-28 8:08 ` Fis Trivial
2018-05-28 8:09 ` [bug#31430] [PATCH 2/6] gnu: Add amalgamate Fis Trivial
` (4 subsequent siblings)
5 siblings, 0 replies; 19+ messages in thread
From: Fis Trivial @ 2018-05-28 8:08 UTC (permalink / raw)
To: Fis Trivial; +Cc: 31430@debbugs.gnu.org
* 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
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#31430] [PATCH 2/6] gnu: Add amalgamate.
2018-05-28 7:57 ` [bug#31430] [PATCH 0/6] Add xtensor and its dependencies (new patches) Fis Trivial
2018-05-28 8:08 ` [bug#31430] [PATCH 1/6] gnu: Add catch-framework2 Fis Trivial
@ 2018-05-28 8:09 ` Fis Trivial
2018-05-28 11:44 ` Ludovic Courtès
2018-05-28 8:10 ` [bug#31430] [PATCH 3/6] gnu: Add fifo-map Fis Trivial
` (3 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Fis Trivial @ 2018-05-28 8:09 UTC (permalink / raw)
To: Fis Trivial; +Cc: 31430@debbugs.gnu.org
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
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#31430] [PATCH 2/6] gnu: Add amalgamate.
2018-05-28 8:09 ` [bug#31430] [PATCH 2/6] gnu: Add amalgamate Fis Trivial
@ 2018-05-28 11:44 ` Ludovic Courtès
0 siblings, 0 replies; 19+ messages in thread
From: Ludovic Courtès @ 2018-05-28 11:44 UTC (permalink / raw)
To: Fis Trivial; +Cc: 31430
Fis Trivial <ybbs.daans@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’.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#31430] [PATCH 3/6] gnu: Add fifo-map.
2018-05-28 7:57 ` [bug#31430] [PATCH 0/6] Add xtensor and its dependencies (new patches) Fis Trivial
2018-05-28 8:08 ` [bug#31430] [PATCH 1/6] gnu: Add catch-framework2 Fis Trivial
2018-05-28 8:09 ` [bug#31430] [PATCH 2/6] gnu: Add amalgamate Fis Trivial
@ 2018-05-28 8:10 ` Fis Trivial
2018-05-28 11:48 ` Ludovic Courtès
2018-05-28 8:11 ` [bug#31430] [PATCH 4/6] gnu: Add json-modern-cxx Fis Trivial
` (2 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Fis Trivial @ 2018-05-28 8:10 UTC (permalink / raw)
To: Fis Trivial; +Cc: 31430@debbugs.gnu.org
* 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@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@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
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#31430] [PATCH 3/6] gnu: Add fifo-map.
2018-05-28 8:10 ` [bug#31430] [PATCH 3/6] gnu: Add fifo-map Fis Trivial
@ 2018-05-28 11:48 ` Ludovic Courtès
0 siblings, 0 replies; 19+ messages in thread
From: Ludovic Courtès @ 2018-05-28 11:48 UTC (permalink / raw)
To: Fis Trivial; +Cc: 31430
[-- Attachment #1: Type: text/plain, Size: 329 bytes --]
Fis Trivial <ybbs.daans@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’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1267 bytes --]
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
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#31430] [PATCH 4/6] gnu: Add json-modern-cxx.
2018-05-28 7:57 ` [bug#31430] [PATCH 0/6] Add xtensor and its dependencies (new patches) Fis Trivial
` (2 preceding siblings ...)
2018-05-28 8:10 ` [bug#31430] [PATCH 3/6] gnu: Add fifo-map Fis Trivial
@ 2018-05-28 8:11 ` Fis Trivial
2018-05-28 12:18 ` Ludovic Courtès
2018-05-28 8:12 ` [bug#31430] [PATCH 5/6] gnu: Add xtl Fis Trivial
2018-05-28 8:12 ` [bug#31430] [PATCH 6/6] gnu: Add xtensor Fis Trivial
5 siblings, 1 reply; 19+ messages in thread
From: Fis Trivial @ 2018-05-28 8:11 UTC (permalink / raw)
To: Fis Trivial; +Cc: 31430@debbugs.gnu.org
* 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
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#31430] [PATCH 4/6] gnu: Add json-modern-cxx.
2018-05-28 8:11 ` [bug#31430] [PATCH 4/6] gnu: Add json-modern-cxx Fis Trivial
@ 2018-05-28 12:18 ` Ludovic Courtès
0 siblings, 0 replies; 19+ messages in thread
From: Ludovic Courtès @ 2018-05-28 12:18 UTC (permalink / raw)
To: Fis Trivial; +Cc: 31430
[-- Attachment #1: Type: text/plain, Size: 200 bytes --]
Fis Trivial <ybbs.daans@hotmail.com> skribis:
> * gnu/packages/cpp.scm (json-modern-cxx): New variable.
Applied with the changes below (‘clang-runtime’ is not needed AFAICS.)
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 920 bytes --]
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)))
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#31430] [PATCH 5/6] gnu: Add xtl.
2018-05-28 7:57 ` [bug#31430] [PATCH 0/6] Add xtensor and its dependencies (new patches) Fis Trivial
` (3 preceding siblings ...)
2018-05-28 8:11 ` [bug#31430] [PATCH 4/6] gnu: Add json-modern-cxx Fis Trivial
@ 2018-05-28 8:12 ` Fis Trivial
2018-05-28 8:12 ` [bug#31430] [PATCH 6/6] gnu: Add xtensor Fis Trivial
5 siblings, 0 replies; 19+ messages in thread
From: Fis Trivial @ 2018-05-28 8:12 UTC (permalink / raw)
To: Fis Trivial; +Cc: 31430@debbugs.gnu.org
* 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
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#31430] [PATCH 6/6] gnu: Add xtensor.
2018-05-28 7:57 ` [bug#31430] [PATCH 0/6] Add xtensor and its dependencies (new patches) Fis Trivial
` (4 preceding siblings ...)
2018-05-28 8:12 ` [bug#31430] [PATCH 5/6] gnu: Add xtl Fis Trivial
@ 2018-05-28 8:12 ` Fis Trivial
2018-05-28 12:24 ` bug#31430: " Ludovic Courtès
5 siblings, 1 reply; 19+ messages in thread
From: Fis Trivial @ 2018-05-28 8:12 UTC (permalink / raw)
To: Fis Trivial; +Cc: 31430@debbugs.gnu.org
* 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
^ permalink raw reply related [flat|nested] 19+ messages in thread