From 4ddf38d37dd139274c51588dda25328b88222a49 Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 9 Jun 2023 10:52:02 +0100 Subject: dev-cpp/cppdap: add nlohmann dep Closes: https://bugs.gentoo.org/908101 Signed-off-by: Sam James --- dev-cpp/cppdap/cppdap-0_pre20230605-r1.ebuild | 52 +++++++++++++++++++++++++++ dev-cpp/cppdap/cppdap-0_pre20230605.ebuild | 49 ------------------------- 2 files changed, 52 insertions(+), 49 deletions(-) create mode 100644 dev-cpp/cppdap/cppdap-0_pre20230605-r1.ebuild delete mode 100644 dev-cpp/cppdap/cppdap-0_pre20230605.ebuild (limited to 'dev-cpp/cppdap') diff --git a/dev-cpp/cppdap/cppdap-0_pre20230605-r1.ebuild b/dev-cpp/cppdap/cppdap-0_pre20230605-r1.ebuild new file mode 100644 index 000000000000..c467b8cd360c --- /dev/null +++ b/dev-cpp/cppdap/cppdap-0_pre20230605-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +# See https://github.com/google/cppdap/issues/113 re no release +CPPDAP_COMMIT="252b56807b532533ea7362a4d949758dcb481d2b" +GTEST_COMMIT="0a03480824b4fc7883255dbd2fd8940c9f81e22e" +DESCRIPTION="C++ library for the Debug Adapter Protocol" +HOMEPAGE="https://github.com/google/cppdap" +SRC_URI="https://github.com/google/cppdap/archive/${CPPDAP_COMMIT}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" test? ( https://github.com/google/googletest/archive/${GTEST_COMMIT}.tar.gz -> ${PN}-gtest-${GTEST_COMMIT}.tar.gz )" +S="${WORKDIR}"/${PN}-${CPPDAP_COMMIT} + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND="dev-cpp/nlohmann_json" +DEPEND="${RDEPEND}" + +src_prepare() { + if use test ; then + rm -rf "${S}"/third_party/googletest || die + ln -s "${WORKDIR}"/googletest-${GTEST_COMMIT} "${S}"/third_party/googletest || die + mkdir "${S}"/third_party/googletest/.git || die + fi + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + # Per README, could use rapidjson or jsoncpp instead. + -DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=ON + -DCPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE=OFF + -DCPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE=OFF + + -DCPPDAP_BUILD_TESTS=$(usex test) + ) + + cmake_src_configure +} + +src_test() { + cd "${BUILD_DIR}" || die + ./cppdap-unittests || die +} diff --git a/dev-cpp/cppdap/cppdap-0_pre20230605.ebuild b/dev-cpp/cppdap/cppdap-0_pre20230605.ebuild deleted file mode 100644 index 4a2272173f46..000000000000 --- a/dev-cpp/cppdap/cppdap-0_pre20230605.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -# See https://github.com/google/cppdap/issues/113 re no release -CPPDAP_COMMIT="252b56807b532533ea7362a4d949758dcb481d2b" -GTEST_COMMIT="0a03480824b4fc7883255dbd2fd8940c9f81e22e" -DESCRIPTION="C++ library for the Debug Adapter Protocol" -HOMEPAGE="https://github.com/google/cppdap" -SRC_URI="https://github.com/google/cppdap/archive/${CPPDAP_COMMIT}.tar.gz -> ${P}.tar.gz" -SRC_URI+=" test? ( https://github.com/google/googletest/archive/${GTEST_COMMIT}.tar.gz -> ${PN}-gtest-${GTEST_COMMIT}.tar.gz )" -S="${WORKDIR}"/${PN}-${CPPDAP_COMMIT} - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64" -IUSE="test" -RESTRICT="!test? ( test )" - -src_prepare() { - if use test ; then - rm -rf "${S}"/third_party/googletest || die - ln -s "${WORKDIR}"/googletest-${GTEST_COMMIT} "${S}"/third_party/googletest || die - mkdir "${S}"/third_party/googletest/.git || die - fi - - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=( - # Per README, could use rapidjson or jsoncpp instead. - -DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=ON - -DCPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE=OFF - -DCPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE=OFF - - -DCPPDAP_BUILD_TESTS=$(usex test) - ) - - cmake_src_configure -} - -src_test() { - cd "${BUILD_DIR}" || die - ./cppdap-unittests || die -} -- cgit v1.2.3-65-gdbad