diff --git a/dev-libs/simdjson/files/simdjson-0.7.0-dont-bundle-cssopts.patch b/dev-libs/simdjson/files/simdjson-0.7.0-dont-bundle-cssopts.patch new file mode 100644 index 0000000000000..1f82151fb3d46 --- /dev/null +++ b/dev-libs/simdjson/files/simdjson-0.7.0-dont-bundle-cssopts.patch @@ -0,0 +1,29 @@ +diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt +index 51ab3a31..d3d5e86e 100644 +--- a/dependencies/CMakeLists.txt ++++ b/dependencies/CMakeLists.txt +@@ -105,6 +105,3 @@ endif() + set_off(CXXOPTS_BUILD_EXAMPLES) + set_off(CXXOPTS_BUILD_TESTS) + set_off(CXXOPTS_ENABLE_INSTALL) +- +-import_dependency(cxxopts jarro2783/cxxopts 794c975) +-add_dependency(cxxopts) +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index f1a82be7..217a9fee 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -1,10 +1,7 @@ +-if(TARGET cxxopts) # we only build the tools if cxxopts is available + message(STATUS "We have cxxopts as a dependency and we are buiding the tools (e.g., json2json).") +- link_libraries(simdjson simdjson-internal-flags simdjson-windows-headers cxxopts) ++ link_libraries(simdjson simdjson-internal-flags simdjson-windows-headers) + add_executable(json2json json2json.cpp) + add_executable(jsonstats jsonstats.cpp) + add_executable(jsonpointer jsonpointer.cpp) + add_executable(minify minify.cpp) +-else() +- message(STATUS "We are missing cxxopts as a dependency so the tools (e.g., json2json) are omitted.") +-endif() +\ No newline at end of file ++ install(TARGETS json2json jsonstats jsonpointer minify DESTINATION bin) diff --git a/dev-libs/simdjson/metadata.xml b/dev-libs/simdjson/metadata.xml index cee379b154091..988e8654bc72f 100644 --- a/dev-libs/simdjson/metadata.xml +++ b/dev-libs/simdjson/metadata.xml @@ -5,4 +5,7 @@ chutzpah@gentoo.org Patrick McLean + + Build and install extra command line tools + diff --git a/dev-libs/simdjson/simdjson-0.7.0.ebuild b/dev-libs/simdjson/simdjson-0.7.0-r1.ebuild similarity index 71% rename from dev-libs/simdjson/simdjson-0.7.0.ebuild rename to dev-libs/simdjson/simdjson-0.7.0-r1.ebuild index e1805b6a55b03..3c6404e0f470c 100644 --- a/dev-libs/simdjson/simdjson-0.7.0.ebuild +++ b/dev-libs/simdjson/simdjson-0.7.0-r1.ebuild @@ -15,16 +15,24 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="Apache-2.0 Boost-1.0" SLOT="0/4" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" -IUSE="test" +IUSE="test tools" BDEPEND=" sys-apps/file sys-apps/findutils sys-apps/grep " +DEPEND=" + tools? ( dev-libs/cxxopts ) +" +REQUIRED_USE="test? ( tools )" RESTRICT="!test? ( test )" +PATCHES=( + "${FILESDIR}/simdjson-0.7.0-dont-bundle-cssopts.patch" +) + src_prepare() { sed -e 's:-Werror ::' -i cmake/simdjson-flags.cmake || die cmake_src_prepare @@ -32,7 +40,9 @@ src_prepare() { src_configure() { local mycmakeargs=( - $(usex test '' '-DSIMDJSON_JUST_LIBRARY=ON') + $(usex tools '' '-DSIMDJSON_JUST_LIBRARY=ON') + -DSIMDJSON_GOOGLE_BENCHMARKS=OFF + -DSIMDJSON_COMPETITION=OFF ) cmake_src_configure