summaryrefslogtreecommitdiff
path: root/net-libs/rtrlib/rtrlib-0.8.0.ebuild
blob: 50d2d94eb4038ebef11ea2deefe48cfd5af749cf (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
50
51
52
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake flag-o-matic

DESCRIPTION="An open-source C implementation of the RPKI/Router Protocol client"
HOMEPAGE="https://rtrlib.realmv6.org/"
SRC_URI="https://github.com/rtrlib/rtrlib/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86"

IUSE="doc ssh"

RDEPEND="ssh? ( net-libs/libssh:0= )"
DEPEND="
	${RDEPEND}
	doc? ( app-text/doxygen[dot] )
"

src_prepare() {
	# Fix automagic dependency on doxygen, fix path for installing docs
	if use doc; then
		sed -i -e "s:share/doc/rtrlib:share/doc/${PF}:" CMakeLists.txt || die
	else
		sed -i -e '/find_package(Doxygen)/d' CMakeLists.txt || die
	fi
	cmake_src_prepare
}

src_configure() {
	# -Werror=strict-aliasing
	# https://bugs.gentoo.org/861581
	# https://github.com/rtrlib/rtrlib/issues/287
	#
	# Do not trust LTO either.
	append-flags -fno-strict-aliasing
	filter-lto

	local mycmakeargs=(
		-DRTRLIB_TRANSPORT_SSH=$(usex ssh)
	)
	cmake_src_configure
}

src_install() {
	cmake_src_install
	find "${D}" -name '*.la' -delete || die
}