From: Fis Trivial <ybbs.daans@hotmail.com>
To: Fis Trivial <ybbs.daans@hotmail.com>
Cc: "31430@debbugs.gnu.org" <31430@debbugs.gnu.org>
Subject: [bug#31430] [PATCH 3/6] gnu: Add fifo-map.
Date: Mon, 28 May 2018 08:10:26 +0000 [thread overview]
Message-ID: <BLUPR16MB05008AF3A9AFDAFA998D0F70926E0@BLUPR16MB0500.namprd16.prod.outlook.com> (raw)
In-Reply-To: <BLUPR16MB0500328748A5B5C06BAA0D07926E0@BLUPR16MB0500.namprd16.prod.outlook.com>
* 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
next prev parent reply other threads:[~2018-05-28 8:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-12 14:21 [bug#31430] [PATCH 0/3] gnu: Add xtensor and its dependencies Fis Trivial
2018-05-12 14:23 ` [bug#31430] [PATCH 1/3] gnu: Add json-modern-cxx Fis Trivial
2018-05-12 14:24 ` [bug#31430] [PATCH 2/3] gnu: Add xtl Fis Trivial
2018-05-24 21:31 ` Ludovic Courtès
2018-05-25 8:46 ` Fis Trivial
2018-05-12 14:25 ` [bug#31430] [PATCH 3/3] gnu: Add xtensor Fis Trivial
2018-05-24 21:34 ` Ludovic Courtès
2018-05-23 12:09 ` [bug#31430] [PATCH 0/3] gnu: Add xtensor and its dependencies Ludovic Courtès
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 11:44 ` Ludovic Courtès
2018-05-28 8:10 ` Fis Trivial [this message]
2018-05-28 11:48 ` [bug#31430] [PATCH 3/6] gnu: Add fifo-map Ludovic Courtès
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
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
2018-05-28 12:24 ` bug#31430: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BLUPR16MB05008AF3A9AFDAFA998D0F70926E0@BLUPR16MB0500.namprd16.prod.outlook.com \
--to=ybbs.daans@hotmail.com \
--cc=31430@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.