Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/simdjson/, dev-libs/simdjson/files/
Date: Wed, 08 Sep 2021 23:23:09
Message-Id: 1631143343.9e6955223160b1a7675406e106ea471ace8f404e.chutzpah@gentoo
1 commit: 9e6955223160b1a7675406e106ea471ace8f404e
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 8 23:22:23 2021 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 8 23:22:23 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e695522
7
8 dev-libs/simdjson-1.0.0-r1: Bump, fix bug #812185
9
10 Closes: https://bugs.gentoo.org/812185
11 Package-Manager: Portage-3.0.22, Repoman-3.0.3
12 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
13
14 .../files/simdjson-1.0.0-dont-bundle-cxxopts.patch | 12 ------------
15 .../simdjson-1.0.0-dont-fetch-data-tarball.patch | 8 +++++---
16 .../files/simdjson-1.0.0-install-tools.patch | 21 +++++++++++++++++++++
17 dev-libs/simdjson/files/simdjson-1.0.0-tests.patch | 17 +++++++++++++++++
18 ...mdjson-1.0.0.ebuild => simdjson-1.0.0-r1.ebuild} | 20 +++++++++++++++-----
19 5 files changed, 58 insertions(+), 20 deletions(-)
20
21 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
22 index 316c4ba4006..f796677655d 100644
23 --- a/dev-libs/simdjson/files/simdjson-1.0.0-dont-bundle-cxxopts.patch
24 +++ b/dev-libs/simdjson/files/simdjson-1.0.0-dont-bundle-cxxopts.patch
25 @@ -18,15 +18,3 @@ index 76651318..2cc06e9e 100644
26 - import_dependency(cxxopts jarro2783/cxxopts 794c975)
27 - add_dependency(cxxopts)
28 -endif()
29 -diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
30 -index f3eaa054..62c34cdd 100644
31 ---- a/tools/CMakeLists.txt
32 -+++ b/tools/CMakeLists.txt
33 -@@ -1,6 +1,6 @@
34 - if(TARGET cxxopts) # we only build the tools if cxxopts is available
35 - message(STATUS "We have cxxopts as a dependency and we are building the tools (e.g., json2json).")
36 -- foreach(tool IN ITEMS json2json jsonstats jsonpointer minify)
37 -+ foreach(tool IN ITEMS json2json jsonstats simdjsonpointer minify)
38 - add_executable("${tool}" "${tool}.cpp")
39 - simdjson_apply_props("${tool}")
40 - target_link_libraries(
41
42 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
43 index 2459604d980..b3cd8558b2f 100644
44 --- a/dev-libs/simdjson/files/simdjson-1.0.0-dont-fetch-data-tarball.patch
45 +++ b/dev-libs/simdjson/files/simdjson-1.0.0-dont-fetch-data-tarball.patch
46 @@ -1,14 +1,16 @@
47 diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt
48 -index 76651318..91232ce0 100644
49 +index 76651318..da5029c0 100644
50 --- a/dependencies/CMakeLists.txt
51 +++ b/dependencies/CMakeLists.txt
52 -@@ -19,8 +19,7 @@ if(SIMDJSON_GOOGLE_BENCHMARKS)
53 +@@ -19,8 +19,9 @@ if(SIMDJSON_GOOGLE_BENCHMARKS)
54 endif()
55
56 # The bulk of our benchmarking and testing data has been moved simdjson/simdjson-data
57 -import_dependency(simdjson-data simdjson/simdjson-data a5b13babe65c1bba7186b41b43d4cbdc20a5c470)
58 -add_dependency(simdjson-data)
59 -+add_subdirectory(simdjson-data dependencies/simdjson-data)
60 ++if(SIMDJSON_TESTS)
61 ++ add_subdirectory(simdjson-data dependencies/simdjson-data)
62 ++endif()
63
64 # This prevents variables declared with set() from unnecessarily escaping and
65 # should not be called more than once
66
67 diff --git a/dev-libs/simdjson/files/simdjson-1.0.0-install-tools.patch b/dev-libs/simdjson/files/simdjson-1.0.0-install-tools.patch
68 new file mode 100644
69 index 00000000000..10d33231560
70 --- /dev/null
71 +++ b/dev-libs/simdjson/files/simdjson-1.0.0-install-tools.patch
72 @@ -0,0 +1,21 @@
73 +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
74 +index f3eaa054..4eaff3d1 100644
75 +--- a/tools/CMakeLists.txt
76 ++++ b/tools/CMakeLists.txt
77 +@@ -1,12 +1,13 @@
78 +-if(TARGET cxxopts) # we only build the tools if cxxopts is available
79 ++if(SIMDJSON_TOOLS)
80 + message(STATUS "We have cxxopts as a dependency and we are building the tools (e.g., json2json).")
81 +- foreach(tool IN ITEMS json2json jsonstats jsonpointer minify)
82 ++ foreach(tool IN ITEMS json2json jsonstats simdjsonpointer minify)
83 + add_executable("${tool}" "${tool}.cpp")
84 + simdjson_apply_props("${tool}")
85 + target_link_libraries(
86 + "${tool}" PRIVATE
87 +- simdjson simdjson-internal-flags simdjson-windows-headers cxxopts
88 ++ simdjson simdjson-internal-flags simdjson-windows-headers
89 + )
90 ++ install(TARGETS "${tool}")
91 + endforeach()
92 + else()
93 + message(STATUS "We are missing cxxopts as a dependency so the tools (e.g., json2json) are omitted.")
94
95 diff --git a/dev-libs/simdjson/files/simdjson-1.0.0-tests.patch b/dev-libs/simdjson/files/simdjson-1.0.0-tests.patch
96 new file mode 100644
97 index 00000000000..cccbd449466
98 --- /dev/null
99 +++ b/dev-libs/simdjson/files/simdjson-1.0.0-tests.patch
100 @@ -0,0 +1,17 @@
101 +diff --git a/CMakeLists.txt b/CMakeLists.txt
102 +index 235222a8..8532183a 100644
103 +--- a/CMakeLists.txt
104 ++++ b/CMakeLists.txt
105 +@@ -221,9 +221,10 @@ add_subdirectory(singleheader)
106 + #
107 + # Compile tools / tests / benchmarks
108 + #
109 +-add_subdirectory(tests)
110 ++if (SIMDJSON_TESTS)
111 ++ add_subdirectory(tests)
112 ++endif()
113 + add_subdirectory(examples)
114 +-add_subdirectory(benchmark)
115 + add_subdirectory(fuzz)
116 +
117 + #
118
119 diff --git a/dev-libs/simdjson/simdjson-1.0.0.ebuild b/dev-libs/simdjson/simdjson-1.0.0-r1.ebuild
120 similarity index 78%
121 rename from dev-libs/simdjson/simdjson-1.0.0.ebuild
122 rename to dev-libs/simdjson/simdjson-1.0.0-r1.ebuild
123 index c68fa749db0..4ad5cdab99d 100644
124 --- a/dev-libs/simdjson/simdjson-1.0.0.ebuild
125 +++ b/dev-libs/simdjson/simdjson-1.0.0-r1.ebuild
126 @@ -37,6 +37,8 @@ PATCHES=(
127 "${FILESDIR}/simdjson-1.0.0-dont-bundle-cxxopts.patch"
128 "${FILESDIR}/simdjson-0.9.0-tests.patch"
129 "${FILESDIR}/simdjson-1.0.0-dont-fetch-data-tarball.patch"
130 + "${FILESDIR}/simdjson-1.0.0-install-tools.patch"
131 + "${FILESDIR}/simdjson-1.0.0-tests.patch"
132 )
133
134 DOCS=(
135 @@ -48,27 +50,35 @@ DOCS=(
136 )
137
138 src_prepare() {
139 - mv "${WORKDIR}/${PN}-data-${DATA_HASH}" "${S}/dependencies/${PN}-data" || die
140 + if use test; then
141 + mv "${WORKDIR}/${PN}-data-${DATA_HASH}" "${S}/dependencies/${PN}-data" || die
142 + fi
143 +
144 sed -e 's:-Werror ::' -i cmake/developer-options.cmake || die
145 sed -e "s:^c++ :$(tc-getCXX) :" -i singleheader/README.md || die
146 + mv tools/{,simd}jsonpointer.cpp || die
147 cmake_src_prepare
148 }
149
150 src_configure() {
151 local -a mycmakeargs=(
152 -DSIMDJSON_ENABLE_THREADS=ON
153 - -DSIMDJSON_ALLOW_DOWNLOADS=OFF
154 + )
155 + use test && mycmakeargs+=(
156 + -DSIMDJSON_TESTS=ON
157 )
158
159 if use tools; then
160 mycmakeargs+=(
161 - -DSIMDJSON_JUST_LIBRARY=OFF
162 + -DSIMDJSON_DEVELOPER_MODE=ON
163 + -DSIMDJSON_ALLOW_DOWNLOADS=OFF
164 -DSIMDJSON_GOOGLE_BENCHMARKS=OFF
165 -DSIMDJSON_COMPETITION=OFF
166 + -DSIMDJSON_TOOLS=ON
167 )
168 - else
169 + elif ! use test; then
170 mycmakeargs+=(
171 - -DSIMDJSON_DEVELOPER_MODE=ON
172 + -DSIMDJSON_DEVELOPER_MODE=OFF
173 )
174 fi