diff options
| author | Sam James <sam@gentoo.org> | 2025-05-21 10:54:54 +0100 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-05-21 10:54:54 +0100 |
| commit | 3eaba79d3f9b38f4da3cd8fa870dc30829b70e80 (patch) | |
| tree | 7d2423816ff98bdb363a9630946fd69d2dc8326d /dev-cpp/json11/json11-1.0.0-r1.ebuild | |
| parent | a4115082af429008454120f19e1d913accbf5481 (diff) | |
| download | gentoo-3eaba79d3f9b38f4da3cd8fa870dc30829b70e80.tar.gz gentoo-3eaba79d3f9b38f4da3cd8fa870dc30829b70e80.tar.bz2 gentoo-3eaba79d3f9b38f4da3cd8fa870dc30829b70e80.zip | |
dev-cpp/json11: wire up tests
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp/json11/json11-1.0.0-r1.ebuild')
| -rw-r--r-- | dev-cpp/json11/json11-1.0.0-r1.ebuild | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/dev-cpp/json11/json11-1.0.0-r1.ebuild b/dev-cpp/json11/json11-1.0.0-r1.ebuild index 66b400e6f1bd..bcb8fbbb9bb9 100644 --- a/dev-cpp/json11/json11-1.0.0-r1.ebuild +++ b/dev-cpp/json11/json11-1.0.0-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 2022-2024 Gentoo Authors +# Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit cmake +inherit cmake edo DESCRIPTION="A tiny JSON library for C++11" HOMEPAGE="https://github.com/dropbox/json11" @@ -12,9 +12,25 @@ SRC_URI="https://github.com/dropbox/json11/archive/refs/tags/v${PV}.tar.gz -> ${ LICENSE="MIT" SLOT="0" KEYWORDS="amd64 x86" +IUSE="test" +RESTRICT="!test? ( test )" PATCHES=( "${FILESDIR}"/${P}-fix-multiarch-install.patch "${FILESDIR}"/${PN}-1.0.0-json11.pc-do-not-state-the-defaults.patch "${FILESDIR}"/${PN}-1.0.0-include-cstdint.patch ) + +src_configure() { + local mycmakeargs=( + -DJSON11_BUILD_TESTS=$(usex test) + ) + + cmake_src_configure +} + +src_test() { + cmake_src_test + + edo "${BUILD_DIR}"/json11_test +} |
