summaryrefslogtreecommitdiff
path: root/dev-libs/yyjson/yyjson-0.7.0-r1.ebuild
blob: 506382b3e617fe06a20db1bc710cf79dd1b04cc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="Fast JSON library in C"
HOMEPAGE="https://github.com/ibireme/yyjson https://ibireme.github.io/yyjson/doc/doxygen/html/"
SRC_URI="https://github.com/ibireme/yyjson/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT test? ( BSD )"
SLOT="0"
KEYWORDS="~amd64"

IUSE="doc test"

RESTRICT="!test? ( test )"

BDEPEND="doc? ( app-doc/doxygen )"

PATCHES=(
	"${FILESDIR}"/${PN}-0.7.0-disable-werror.patch
	"${FILESDIR}"/${PN}-0.7.0-fix-clang-16-valgrind.patch
)

src_configure() {
	local mycmakeargs=(
		-DYYJSON_BUILD_DOC=$(usex doc)
		-DYYJSON_BUILD_TESTS=$(usex test)
		-DYYJSON_ENABLE_VALGRIND=$(usex test)
	)

	cmake_src_configure
}

src_install() {
	cmake_src_install

	use doc && dodoc -r "${BUILD_DIR}"/doxygen/html
}