Gentoo Archives: gentoo-commits

From: Theo Anderson <telans@××××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-cpp/parallel-hashmap/
Date: Sun, 02 May 2021 09:27:21
Message-Id: 1619920265.6acfa62b637a31df2582e1817c76fc7ce763e43b.telans@gentoo
1 commit: 6acfa62b637a31df2582e1817c76fc7ce763e43b
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sun May 2 01:31:46 2021 +0000
4 Commit: Theo Anderson <telans <AT> posteo <DOT> de>
5 CommitDate: Sun May 2 01:51:05 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6acfa62b
7
8 dev-cpp/parallel-hashmap: new package
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
12
13 dev-cpp/parallel-hashmap/Manifest | 1 +
14 dev-cpp/parallel-hashmap/metadata.xml | 33 ++++++++++++++++
15 .../parallel-hashmap/parallel-hashmap-1.33.ebuild | 45 ++++++++++++++++++++++
16 3 files changed, 79 insertions(+)
17
18 diff --git a/dev-cpp/parallel-hashmap/Manifest b/dev-cpp/parallel-hashmap/Manifest
19 new file mode 100644
20 index 000000000..da8d78b3e
21 --- /dev/null
22 +++ b/dev-cpp/parallel-hashmap/Manifest
23 @@ -0,0 +1 @@
24 +DIST parallel-hashmap-1.33.tar.gz 2038996 BLAKE2B b704a0230bd6d15e8a3a1aa11bec456183119d5104e1ac191e556edae1c0b0d2a27c5b52c84cae167cd09a90f4fc43f817c21d64d6b288a70596b6495ee872e6 SHA512 287f098229153d925632e68e3cdbabfae0ea0ab8864089e4c0553a166c6079ca82ed5246ba53afd2a2917abcf06f37bc18f098e721f5f3b8def4d2d8c1c8c745
25
26 diff --git a/dev-cpp/parallel-hashmap/metadata.xml b/dev-cpp/parallel-hashmap/metadata.xml
27 new file mode 100644
28 index 000000000..2609bf86a
29 --- /dev/null
30 +++ b/dev-cpp/parallel-hashmap/metadata.xml
31 @@ -0,0 +1,33 @@
32 +<?xml version="1.0" encoding="UTF-8"?>
33 +<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
34 +<pkgmetadata>
35 + <longdescription lang="en">
36 +Overview
37 +
38 +This repository aims to provide a set of excellent hash map implementations, as well as a btree alternative to std::map and std::set, with the following characteristics:
39 +
40 +Header only: nothing to build, just copy the parallel_hashmap directory to your project and you are good to go.
41 +
42 +drop-in replacement for std::unordered_map, std::unordered_set, std::map and std::set
43 +
44 +Compiler with C++11 support required, C++14 and C++17 APIs are provided (such as try_emplace)
45 +
46 +Very efficient, significantly faster than your compiler's unordered map/set or Boost's, or than sparsepp
47 +
48 +Memory friendly: low memory usage, although a little higher than sparsepp
49 +
50 +Supports heterogeneous lookup
51 +
52 +Easy to forward declare: just include phmap_fwd_decl.h in your header files to forward declare Parallel Hashmap containers [note: this does not work currently for hash maps with pointer keys]
53 +
54 +Dump/load feature: when a flat hash map stores data that is std::trivially_copyable, the table can be dumped to disk and restored as a single array, very efficiently, and without requiring any hash computation. This is typically about 10 times faster than doing element-wise serialization to disk, but it will use 10% to 60% extra disk space. See examples/serialize.cc. (flat hash map/set only)
55 +
56 +Automatic support for boost's hash_value() method for providing the hash function (see examples/hash_value.h). Also default hash support for std::pair and std::tuple.
57 +
58 +natvis visualization support in Visual Studio (hash map/set only)
59 + </longdescription>
60 + <upstream>
61 + <bugs-to>https://github.com/greg7mdp/parallel-hashmap/issues</bugs-to>
62 + <remote-id type="github">greg7mdp/parallel-hashmap</remote-id>
63 + </upstream>
64 +</pkgmetadata>
65
66 diff --git a/dev-cpp/parallel-hashmap/parallel-hashmap-1.33.ebuild b/dev-cpp/parallel-hashmap/parallel-hashmap-1.33.ebuild
67 new file mode 100644
68 index 000000000..4aecefcc6
69 --- /dev/null
70 +++ b/dev-cpp/parallel-hashmap/parallel-hashmap-1.33.ebuild
71 @@ -0,0 +1,45 @@
72 +# Copyright 1999-2021 Gentoo Authors
73 +# Distributed under the terms of the GNU General Public License v2
74 +
75 +EAPI=7
76 +
77 +inherit cmake
78 +
79 +DESCRIPTION="A family of header-only, very fast and memory-friendly hashmap and btree containers."
80 +HOMEPAGE="
81 + https://greg7mdp.github.io/parallel-hashmap/
82 + https://github.com/greg7mdp/parallel-hashmap
83 +"
84 +SRC_URI="https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
85 +
86 +LICENSE="Apache-2.0"
87 +SLOT="0"
88 +KEYWORDS="~amd64"
89 +IUSE="examples"
90 +
91 +DEPEND=""
92 +RDEPEND="${DEPEND}"
93 +#BDEPEND="
94 +# doc? ( app-text/pandoc )
95 +#"
96 +
97 +#TODO: explore the various cmake options (if any)
98 +#TODO: tests, doc
99 +
100 +src_compile() {
101 + cmake_src_compile
102 +
103 + #waiting for https://github.com/greg7mdp/parallel-hashmap/issues/91
104 +# if use doc ; then
105 +# cd html || die
106 +# emake all
107 +# fi
108 +}
109 +
110 +src_install() {
111 + cmake_src_install
112 + if use examples ; then
113 + dodoc -r examples
114 + docompress -x "/usr/share/doc/${PF}/examples"
115 + fi
116 +}