diff options
Diffstat (limited to 'dev-libs/simdjson')
-rw-r--r-- | dev-libs/simdjson/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/simdjson/files/simdjson-3.10.0-dont-bundle-cxxopts.patch | 20 | ||||
-rw-r--r-- | dev-libs/simdjson/files/simdjson-3.10.1-tests.patch | 33 | ||||
-rw-r--r-- | dev-libs/simdjson/simdjson-3.10.1.ebuild | 102 |
4 files changed, 156 insertions, 0 deletions
diff --git a/dev-libs/simdjson/Manifest b/dev-libs/simdjson/Manifest index 718356e50168..b7882fecd346 100644 --- a/dev-libs/simdjson/Manifest +++ b/dev-libs/simdjson/Manifest @@ -1,3 +1,4 @@ +DIST simdjson-3.10.1.gh.tar.gz 2652674 BLAKE2B 3ccfc55d5bf8ce6a7e8be1b6cb28ed7b6289e23b1d4fe8505e35a42f4ff32a0ee7f500402828164bdeacae1b72e238413575288082151723d6d0c87dcefd1fa0 SHA512 b19fde8d81eaff34b83bb41028d7ee3a408ae5bc896277148e96879b1cba1a7cfc4af0064973bcb07e2b56e0955c3a3a581910d7af23d68510374e7f297c3b7c DIST simdjson-3.6.3.gh.tar.gz 2302220 BLAKE2B c46eeb8a07460cc5427fc35714fd262069cd3d913732e6037d808281d0fed0e82e0423dfd16abaeb515264559fe4454c42f81211354723eb21b212decfe7834b SHA512 b9fa7e554ded4e6cbe9d70ee29aa5b582e58b8b2ada1a781e58746082bb7d31791a4e2ea8b43d9391d783e61e489554f260448029c0b7e730cc69dc44f4aa86a DIST simdjson-3.9.1.gh.tar.gz 2636602 BLAKE2B 82c4956ebc902574ed1b36196097c6c07e9ca0f11384f71b260ae95ff5e7c436ce016da417197f84c21ece0ae2239fc1c4e02cf63672fae98b3fa69831de3adb SHA512 b8c091e7ecce4cdc67f538ab6715ce89bff16e68f6d56bdc37e05ab0b110b90bc6b039d5c76e2dceef9e30f35cb6ace5e4e230d4c70e928329a376f989b23bed DIST simdjson-3.9.3.gh.tar.gz 2643869 BLAKE2B f2e0f8d13a234c7ee639a57333b66a464312a20bd67f808688f6456ded7b6bdac75d857b10207adc03e05d89e701efe874d068774a90c3082d9e83792ed784d1 SHA512 893ce0cb380b1418438f5910262325031f8071c4577589a491713f91c980964b4105c1e1aa7f2b9373deed40ecf6b48fe48a1aa243151e424f138f5418e4821c diff --git a/dev-libs/simdjson/files/simdjson-3.10.0-dont-bundle-cxxopts.patch b/dev-libs/simdjson/files/simdjson-3.10.0-dont-bundle-cxxopts.patch new file mode 100644 index 000000000000..cd735888b232 --- /dev/null +++ b/dev-libs/simdjson/files/simdjson-3.10.0-dont-bundle-cxxopts.patch @@ -0,0 +1,20 @@ +diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt +index b9802392..056a0635 100644 +--- a/dependencies/CMakeLists.txt ++++ b/dependencies/CMakeLists.txt +@@ -146,15 +146,3 @@ endfunction() + if(SIMDJSON_COMPETITION) + competition_scope_() + endif() +- +-cmake_dependent_option(SIMDJSON_CXXOPTS "Download cxxopts (necessary for tools)" ON +- SIMDJSON_ALLOW_DOWNLOADS OFF) +- +-if(SIMDJSON_CXXOPTS) +- set_off(CXXOPTS_BUILD_EXAMPLES) +- set_off(CXXOPTS_BUILD_TESTS) +- set_off(CXXOPTS_ENABLE_INSTALL) +- +- import_dependency(cxxopts jarro2783/cxxopts 5965670) +- add_dependency(cxxopts) +-endif() diff --git a/dev-libs/simdjson/files/simdjson-3.10.1-tests.patch b/dev-libs/simdjson/files/simdjson-3.10.1-tests.patch new file mode 100644 index 000000000000..a5eade492ec6 --- /dev/null +++ b/dev-libs/simdjson/files/simdjson-3.10.1-tests.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ca23a8a0..0bf54dd6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -303,12 +303,11 @@ endif() + # + # Compile tools / tests / benchmarks + # +-add_subdirectory(tests) +-add_subdirectory(examples) +-if(CMAKE_SIZEOF_VOID_P EQUAL 8) # we only include the benchmarks on 64-bit systems. +- add_subdirectory(benchmark) ++if (SIMDJSON_TESTS) ++ add_subdirectory(tests) ++ add_subdirectory(fuzz) + endif() +-add_subdirectory(fuzz) ++add_subdirectory(examples) + + # + # Source files should be just ASCII +diff --git a/tests/ondemand/compilation_failure_tests/CMakeLists.txt b/tests/ondemand/compilation_failure_tests/CMakeLists.txt +index 54b74afb..b14567d3 100644 +--- a/tests/ondemand/compilation_failure_tests/CMakeLists.txt ++++ b/tests/ondemand/compilation_failure_tests/CMakeLists.txt +@@ -13,6 +13,7 @@ function(add_dual_compile_test TEST_NAME) + target_compile_definitions(${TEST_NAME}_should_not_compile PRIVATE COMPILATION_TEST_USE_FAILING_CODE=1) + endfunction(add_dual_compile_test) + ++target_compile_options(simdjson-internal-flags INTERFACE -Werror=uninitialized) + add_dual_compile_test(iterate_object) + add_dual_compile_test(iterate_array) + add_dual_compile_test(iterate_char_star) diff --git a/dev-libs/simdjson/simdjson-3.10.1.ebuild b/dev-libs/simdjson/simdjson-3.10.1.ebuild new file mode 100644 index 000000000000..26ee1b77d4e9 --- /dev/null +++ b/dev-libs/simdjson/simdjson-3.10.1.ebuild @@ -0,0 +1,102 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs cmake + +DATA_HASH="a5b13babe65c1bba7186b41b43d4cbdc20a5c470" +DESCRIPTION="SIMD accelerated C++ JSON library" +HOMEPAGE=" + https://simdjson.org/ + https://github.com/simdjson/simdjson +" +SRC_URI=" + https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz + test? ( https://github.com/${PN}/${PN}-data/archive/${DATA_HASH}.tar.gz -> ${PN}-data-${DATA_HASH}.tar.gz ) +" + +LICENSE="Apache-2.0 Boost-1.0 BSD MIT" +SLOT="0/23" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~x86" +IUSE="+all-impls test tools" + +BDEPEND=" + sys-apps/file + sys-apps/grep + virtual/pkgconfig +" +DEPEND=" + tools? ( >=dev-libs/cxxopts-3.2:= ) +" + +REQUIRED_USE="test? ( tools )" +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}/simdjson-3.10.0-dont-bundle-cxxopts.patch" + "${FILESDIR}/simdjson-1.0.0-install-tools.patch" + "${FILESDIR}/simdjson-3.7.1-data-optional.patch" + "${FILESDIR}/simdjson-3.10.1-tests.patch" +) + +DOCS=( + AUTHORS + CONTRIBUTING.md + CONTRIBUTORS + HACKING.md + README.md +) + +src_prepare() { + if use test; then + mkdir "${S}/dependencies/.cache" || die + mv "${WORKDIR}/${PN}-data-${DATA_HASH}" "${S}/dependencies/.cache/${PN}-data" || die + fi + + sed -e 's:-Werror ::' -i cmake/developer-options.cmake || die + sed -e '/Werror/ d ; /Werror/ d ' -i tests/ondemand/compilation_failure_tests/CMakeLists.txt || die + sed -e "s:^c++ :$(tc-getCXX) :" -i singleheader/README.md || die + mv tools/{,simd}jsonpointer.cpp || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DSIMDJSON_ENABLE_THREADS:BOOL=ON + ) + use test && mycmakeargs+=( + -DSIMDJSON_TESTS:BOOL=ON + ) + + if use tools; then + mycmakeargs+=( + -DSIMDJSON_DEVELOPER_MODE:BOOL=ON + -DSIMDJSON_ALLOW_DOWNLOADS:BOOL=OFF + -DSIMDJSON_GOOGLE_BENCHMARKS:BOOL=OFF + -DSIMDJSON_COMPETITION:BOOL=OFF + -DSIMDJSON_TOOLS:BOOL=ON + ) + elif ! use test; then + mycmakeargs+=( + -DSIMDJSON_DEVELOPER_MODELBOOL=OFF + ) + fi + + if use all-impls; then + local -a impls=("fallback") + if use amd64; then + impls+=("westmere" "haswell" "icelake") + elif use arm64; then + impls+=("arm64") + elif use ppc64; then + impls+=("ppc64") + fi + + mycmakeargs+=( + -DSIMDJSON_IMPLEMENTATION:STRING=$(printf '%s;' "${impls[@]}") + ) + fi + + cmake_src_configure +} |