1 |
commit: 06a27d0d6efa8f6a5919fbe0c6ad08d1a44a938d |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 8 18:24:10 2021 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 8 18:24:23 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06a27d0d |
7 |
|
8 |
dev-libs/simdjson-1.0.0: Version bump |
9 |
|
10 |
Package-Manager: Portage-3.0.22, Repoman-3.0.3 |
11 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
12 |
|
13 |
dev-libs/simdjson/Manifest | 2 + |
14 |
.../files/simdjson-1.0.0-dont-bundle-cxxopts.patch | 32 +++++++++ |
15 |
.../simdjson-1.0.0-dont-fetch-data-tarball.patch | 14 ++++ |
16 |
dev-libs/simdjson/simdjson-1.0.0.ebuild | 76 ++++++++++++++++++++++ |
17 |
4 files changed, 124 insertions(+) |
18 |
|
19 |
diff --git a/dev-libs/simdjson/Manifest b/dev-libs/simdjson/Manifest |
20 |
index 6f87beb869c..1fc40bc707f 100644 |
21 |
--- a/dev-libs/simdjson/Manifest |
22 |
+++ b/dev-libs/simdjson/Manifest |
23 |
@@ -1,3 +1,5 @@ |
24 |
DIST simdjson-0.9.2.tar.gz 7958184 BLAKE2B 7fbb3c85b5dfd2d18a09087f6c6e09437bfb8aec418eb219485b6f558fe117791b28e51a45bb416b677d42ca6d73d8b37381deee1aea4bd49fd132a16312a49e SHA512 6d546f0283b680da581b51bab86f7165abdab0a82d51e9c4a5abcf9a94e24059adfb63c8e4e8ef147fee50fc94f6a0efc4dba34dce499926e1da0dcd1fe63dd6 |
25 |
DIST simdjson-0.9.6.tar.gz 7956235 BLAKE2B 8d1ffb96a937f859598f45232f1c55a767c4dcb401e1b15b8745df0b3b1907a9ecf3319080b5f7dd6deeac7c97b6b7ee608a98173c2c92794ea5f79ea0083b18 SHA512 bfe565dd00e95e1c5c409fce1ec2a8d88c83fc61d9f46265afc0254f8a37f241fcb5b0729bc5ac58695766e2a6cb05abbf93220fa21fd8fe34872ac4a538140c |
26 |
DIST simdjson-0.9.7.tar.gz 7956250 BLAKE2B 2fa04be699eb5573ac17db9b476ded1853cfe45c0993c9303b70bfd0e8e4343b69e4a02f21dac35d2c0255826bfedf41123fd635d36d48a08f74b28b5a6536ce SHA512 6f4ad854adc2b932f9926610cdd28ddda7fc1776b84a224adb5b337f81c92721bd11c8ab180897117891cdefe9c1ef14b9f062c9a1a2ebc5b5582c29cb656bf0 |
27 |
+DIST simdjson-1.0.0.tar.gz 1546728 BLAKE2B 6b70416404776b4fcc30cd3ab07b8048899bbe3497af779504a685bc2459424e82bd40bf100d7ed8ccfa05e871a0a1edd9eebd11294cdc3d1780797d7f79ba1e SHA512 dbf8abfeec5c079f4d87e8bf31d1af27601f7f0578ebb8ad28a25f496b4b771b68a75f9a11f61706c539d54c36a493a2d2819bd15427c3b7f7a0b36811177f17 |
28 |
+DIST simdjson-data-1.0.0.tar.gz 6635706 BLAKE2B 563376147f18d590a176a5a0398365db1a3e677b773c018f335efa7fff05ac22ac5dc37613792082a32e6c9b91a773a590f7dfd15efa5ba660f9142b128b28a7 SHA512 168198404b11b8c76ff4f53645d7b5a88a5c72b4a5b6646b4410859ec3416ae9b37fc59f7d2f014ccc785615ea5c31dc00b145dbb1a7acb701b94029dd4ea1e1 |
29 |
|
30 |
diff --git a/dev-libs/simdjson/files/simdjson-1.0.0-dont-bundle-cxxopts.patch b/dev-libs/simdjson/files/simdjson-1.0.0-dont-bundle-cxxopts.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..316c4ba4006 |
33 |
--- /dev/null |
34 |
+++ b/dev-libs/simdjson/files/simdjson-1.0.0-dont-bundle-cxxopts.patch |
35 |
@@ -0,0 +1,32 @@ |
36 |
+diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt |
37 |
+index 76651318..2cc06e9e 100644 |
38 |
+--- a/dependencies/CMakeLists.txt |
39 |
++++ b/dependencies/CMakeLists.txt |
40 |
+@@ -133,15 +133,3 @@ endfunction() |
41 |
+ if(SIMDJSON_COMPETITION) |
42 |
+ competition_scope_() |
43 |
+ endif() |
44 |
+- |
45 |
+-cmake_dependent_option(SIMDJSON_CXXOPTS "Download cxxopts (necessary for tools)" ON |
46 |
+- SIMDJSON_ALLOW_DOWNLOADS OFF) |
47 |
+- |
48 |
+-if(SIMDJSON_CXXOPTS) |
49 |
+- set_off(CXXOPTS_BUILD_EXAMPLES) |
50 |
+- set_off(CXXOPTS_BUILD_TESTS) |
51 |
+- set_off(CXXOPTS_ENABLE_INSTALL) |
52 |
+- |
53 |
+- import_dependency(cxxopts jarro2783/cxxopts 794c975) |
54 |
+- add_dependency(cxxopts) |
55 |
+-endif() |
56 |
+diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt |
57 |
+index f3eaa054..62c34cdd 100644 |
58 |
+--- a/tools/CMakeLists.txt |
59 |
++++ b/tools/CMakeLists.txt |
60 |
+@@ -1,6 +1,6 @@ |
61 |
+ if(TARGET cxxopts) # we only build the tools if cxxopts is available |
62 |
+ message(STATUS "We have cxxopts as a dependency and we are building the tools (e.g., json2json).") |
63 |
+- foreach(tool IN ITEMS json2json jsonstats jsonpointer minify) |
64 |
++ foreach(tool IN ITEMS json2json jsonstats simdjsonpointer minify) |
65 |
+ add_executable("${tool}" "${tool}.cpp") |
66 |
+ simdjson_apply_props("${tool}") |
67 |
+ target_link_libraries( |
68 |
|
69 |
diff --git a/dev-libs/simdjson/files/simdjson-1.0.0-dont-fetch-data-tarball.patch b/dev-libs/simdjson/files/simdjson-1.0.0-dont-fetch-data-tarball.patch |
70 |
new file mode 100644 |
71 |
index 00000000000..2459604d980 |
72 |
--- /dev/null |
73 |
+++ b/dev-libs/simdjson/files/simdjson-1.0.0-dont-fetch-data-tarball.patch |
74 |
@@ -0,0 +1,14 @@ |
75 |
+diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt |
76 |
+index 76651318..91232ce0 100644 |
77 |
+--- a/dependencies/CMakeLists.txt |
78 |
++++ b/dependencies/CMakeLists.txt |
79 |
+@@ -19,8 +19,7 @@ if(SIMDJSON_GOOGLE_BENCHMARKS) |
80 |
+ endif() |
81 |
+ |
82 |
+ # The bulk of our benchmarking and testing data has been moved simdjson/simdjson-data |
83 |
+-import_dependency(simdjson-data simdjson/simdjson-data a5b13babe65c1bba7186b41b43d4cbdc20a5c470) |
84 |
+-add_dependency(simdjson-data) |
85 |
++add_subdirectory(simdjson-data dependencies/simdjson-data) |
86 |
+ |
87 |
+ # This prevents variables declared with set() from unnecessarily escaping and |
88 |
+ # should not be called more than once |
89 |
|
90 |
diff --git a/dev-libs/simdjson/simdjson-1.0.0.ebuild b/dev-libs/simdjson/simdjson-1.0.0.ebuild |
91 |
new file mode 100644 |
92 |
index 00000000000..c68fa749db0 |
93 |
--- /dev/null |
94 |
+++ b/dev-libs/simdjson/simdjson-1.0.0.ebuild |
95 |
@@ -0,0 +1,76 @@ |
96 |
+# Copyright 2020-2021 Gentoo Authors |
97 |
+# Distributed under the terms of the GNU General Public License v2 |
98 |
+ |
99 |
+EAPI=7 |
100 |
+ |
101 |
+inherit toolchain-funcs cmake |
102 |
+ |
103 |
+DATA_HASH="a5b13babe65c1bba7186b41b43d4cbdc20a5c470" |
104 |
+DESCRIPTION="SIMD accelerated C++ JSON library" |
105 |
+HOMEPAGE=" |
106 |
+ https://simdjson.org/ |
107 |
+ https://github.com/simdjson/simdjson |
108 |
+" |
109 |
+SRC_URI=" |
110 |
+ https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz |
111 |
+ test? ( https://github.com/${PN}/${PN}-data/archive/${DATA_HASH}.tar.gz -> ${PN}-data-${PV}.tar.gz ) |
112 |
+" |
113 |
+ |
114 |
+LICENSE="Apache-2.0 Boost-1.0 BSD MIT" |
115 |
+SLOT="0/8" |
116 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
117 |
+IUSE="test tools" |
118 |
+ |
119 |
+BDEPEND=" |
120 |
+ sys-apps/file |
121 |
+ sys-apps/findutils |
122 |
+ sys-apps/grep |
123 |
+" |
124 |
+DEPEND=" |
125 |
+ tools? ( dev-libs/cxxopts:= ) |
126 |
+" |
127 |
+ |
128 |
+REQUIRED_USE="test? ( tools )" |
129 |
+RESTRICT="!test? ( test )" |
130 |
+ |
131 |
+PATCHES=( |
132 |
+ "${FILESDIR}/simdjson-1.0.0-dont-bundle-cxxopts.patch" |
133 |
+ "${FILESDIR}/simdjson-0.9.0-tests.patch" |
134 |
+ "${FILESDIR}/simdjson-1.0.0-dont-fetch-data-tarball.patch" |
135 |
+) |
136 |
+ |
137 |
+DOCS=( |
138 |
+ AUTHORS |
139 |
+ CONTRIBUTING.md |
140 |
+ CONTRIBUTORS |
141 |
+ HACKING.md |
142 |
+ README.md |
143 |
+) |
144 |
+ |
145 |
+src_prepare() { |
146 |
+ mv "${WORKDIR}/${PN}-data-${DATA_HASH}" "${S}/dependencies/${PN}-data" || die |
147 |
+ sed -e 's:-Werror ::' -i cmake/developer-options.cmake || die |
148 |
+ sed -e "s:^c++ :$(tc-getCXX) :" -i singleheader/README.md || die |
149 |
+ cmake_src_prepare |
150 |
+} |
151 |
+ |
152 |
+src_configure() { |
153 |
+ local -a mycmakeargs=( |
154 |
+ -DSIMDJSON_ENABLE_THREADS=ON |
155 |
+ -DSIMDJSON_ALLOW_DOWNLOADS=OFF |
156 |
+ ) |
157 |
+ |
158 |
+ if use tools; then |
159 |
+ mycmakeargs+=( |
160 |
+ -DSIMDJSON_JUST_LIBRARY=OFF |
161 |
+ -DSIMDJSON_GOOGLE_BENCHMARKS=OFF |
162 |
+ -DSIMDJSON_COMPETITION=OFF |
163 |
+ ) |
164 |
+ else |
165 |
+ mycmakeargs+=( |
166 |
+ -DSIMDJSON_DEVELOPER_MODE=ON |
167 |
+ ) |
168 |
+ fi |
169 |
+ |
170 |
+ cmake_src_configure |
171 |
+} |