summaryrefslogtreecommitdiff
blob: 45d79ae7e6abf6d8293b71fae5d71f99b7b1dc03 (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
53
54
55
56
57
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools

DESCRIPTION="FreeRADIUS Client framework"
HOMEPAGE="https://wiki.freeradius.org/project/Radiusclient"
SRC_URI="ftp://ftp.freeradius.org/pub/freeradius/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv sparc x86"

IUSE="scp shadow static-libs"

DEPEND="
	!net-dialup/radiusclient-ng
	virtual/libcrypt:=
"
RDEPEND="${DEPEND}"

DOCS=(
	BUGS doc/{ChangeLog,login.example,release-method.txt,instop.html}
	README.{radexample,rst}
)

PATCHES=(
	"${FILESDIR}/${PN}-1.1.7-ar-configure.in.patch"
	"${FILESDIR}/${PN}-1.1.7-configure-clang16.patch"
)

src_prepare() {
	default
	mv configure.in configure.ac || die \
		"Renaming configure.in to configure.ac failed"

	eautoreconf
}

src_configure() {
	local myeconfargs=(
		$(use_enable scp)
		$(use_enable shadow)
		--with-secure-path
	)
	econf "${myeconfargs[@]}"
}

src_install() {
	default
	newdoc doc/README README.login.example

	use static-libs || \
		find "${ED}" -name '*.a' -delete
}