summaryrefslogtreecommitdiff
path: root/dev-util/librnp/librnp-0.16.0.ebuild
blob: 4f3c972de1fee0a7cffb4e97ad6ecb44860675d3 (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
42
43
44
45
46
47
48
49
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="High performance C++ OpenPGP library"
HOMEPAGE="https://www.rnpgp.org/ https://github.com/rnpgp/rnp"
SRC_URI="https://github.com/rnpgp/rnp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="Apache-2.0 BSD BSD-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="man test"

RDEPEND="app-arch/bzip2
	dev-libs/botan:2=
	dev-libs/json-c:=
	sys-libs/zlib"
DEPEND="${RDEPEND}
	test? ( dev-cpp/gtest )"
BDEPEND="man? ( dev-ruby/asciidoctor )"

RESTRICT="!test? ( test )"
S="${WORKDIR}/${P/*lib/}"

src_configure() {
	local mycmakeargs=(
		-DBUILD_TESTING=$(usex test on off)

		-DCRYPTO_BACKEND=botan

		-DDOWNLOAD_GTEST=off
		-DDOWNLOAD_RUBYRNP=off

		-DENABLE_COVERAGE=off
		-DENABLE_DOC=$(usex man on off)
		-DENABLE_FUZZERS=off
		-DENABLE_SANITIZERS=off
	)

	cmake_src_configure
}

src_test() {
	cd "${BUILD_DIR}" || die
	ctest -j"${MAKEOPTS}" -R .* --output-on-failure || die
}