summaryrefslogtreecommitdiff
blob: 521388fd56d903bce72d4658e0f0bfd1f4606261 (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
58
59
60
61
62
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools toolchain-funcs flag-o-matic

DESCRIPTION="Entropy Gathering And Distribution System"
HOMEPAGE="http://www.securesoftware.com"
SRC_URI="http://www.securesoftware.com/${PN}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~ppc x86"

EGADS_DATADIR=/var/run/egads

PATCHES=(
	"${FILESDIR}"/${P}-make-build-work-with-clang16.patch
)

src_prepare() {
	default

	rm aclocal.m4 || die

	eautoreconf

	sed -i \
		-e '/^BINDIR/d' \
		-e '/^LIBDIR/d' \
		-e '/^INCLUDEDIR/d' \
		"${S}"/Makefile.in || die "Failed to fix Makefile.in"
}

src_configure() {
	tc-export CC AR RANLIB

	# bug #312983
	append-flags -fno-strict-aliasing

	econf --with-egads-datadir="${EGADS_DATADIR}"
}

src_compile() {
	emake LIBDIR="/usr/$(get_libdir)"
}

src_install() {
	keepdir ${EGADS_DATADIR}
	fperms +t ${EGADS_DATADIR}

	# NOT parallel safe, and no DESTDIR support
	emake -j1 install \
		BINDIR="${D}"/usr/sbin \
		LIBDIR="${D}"/usr/$(get_libdir) \
		INCLUDEDIR="${D}"/usr/include

	dodoc README* doc/*.txt doc/*.html

	find "${ED}" -name '*.la' -delete || die
}