dev-vcs/breezy: drop 3.3.5-r1
[gentoo/gentoo.git] / dev-cpp / cppdap / cppdap-0_pre20230605-r1.ebuild
blobffdc497483cb8538a8c3644443d8a428076c9c09
1 # Copyright 1999-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit cmake
8 # See https://github.com/google/cppdap/issues/113 re no release
9 CPPDAP_COMMIT="252b56807b532533ea7362a4d949758dcb481d2b"
10 GTEST_COMMIT="0a03480824b4fc7883255dbd2fd8940c9f81e22e"
11 DESCRIPTION="C++ library for the Debug Adapter Protocol"
12 HOMEPAGE="https://github.com/google/cppdap"
13 SRC_URI="https://github.com/google/cppdap/archive/${CPPDAP_COMMIT}.tar.gz -> ${P}.tar.gz"
14 SRC_URI+=" test? ( https://github.com/google/googletest/archive/${GTEST_COMMIT}.tar.gz -> ${PN}-gtest-${GTEST_COMMIT}.tar.gz )"
15 S="${WORKDIR}"/${PN}-${CPPDAP_COMMIT}
17 LICENSE="Apache-2.0"
18 SLOT="0"
19 KEYWORDS="amd64 arm arm64 ppc x86"
20 IUSE="test"
21 RESTRICT="!test? ( test )"
23 RDEPEND="dev-cpp/nlohmann_json"
24 DEPEND="${RDEPEND}"
26 src_prepare() {
27         if use test ; then
28                 rm -rf "${S}"/third_party/googletest || die
29                 ln -s "${WORKDIR}"/googletest-${GTEST_COMMIT} "${S}"/third_party/googletest || die
30                 mkdir "${S}"/third_party/googletest/.git || die
31         fi
33         cmake_src_prepare
36 src_configure() {
37         local mycmakeargs=(
38                 # Per README, could use rapidjson or jsoncpp instead.
39                 -DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=ON
40                 -DCPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE=OFF
41                 -DCPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE=OFF
43                 -DCPPDAP_BUILD_TESTS=$(usex test)
44         )
46         cmake_src_configure
49 src_test() {
50         cd "${BUILD_DIR}" || die
51         ./cppdap-unittests || die