sys-devel/prelink: Update dependencies.
[gentoo.git] / sys-devel / prelink / prelink-20151030.ebuild
1 # Copyright 2002-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 MY_PN="${PN}-cross"
7 MY_P="${MY_PN}-${PV}"
8
9 inherit autotools eutils flag-o-matic
10
11 DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in faster load times"
12 HOMEPAGE="https://git.yoctoproject.org/cgit/cgit.cgi/prelink-cross/ https://people.redhat.com/jakub/prelink"
13 SRC_URI="https://git.yoctoproject.org/cgit/cgit.cgi/${MY_PN}/snapshot/${MY_P}.tar.bz2
14         doc? ( https://people.redhat.com/jakub/prelink/prelink.pdf )"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="amd64 ~arm ppc ppc64 x86"
19 IUSE="doc selinux"
20
21 RDEPEND=">=dev-libs/elfutils-0.100
22         selinux? ( sys-libs/libselinux )
23         !dev-libs/libelf"
24 DEPEND="${RDEPEND}
25         sys-libs/binutils-libs"
26
27 S=${WORKDIR}/${MY_P}
28
29 src_prepare() {
30         epatch "${FILESDIR}"/${PN}-20130503-prelink-conf.patch
31         epatch "${FILESDIR}"/${PN}-20130503-libiberty-md5.patch
32
33         sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh #100147
34
35         has_version 'dev-libs/elfutils[threads]' && append-ldflags -pthread
36
37         eautoreconf
38 }
39
40 src_configure() {
41         econf $(use_enable selinux)
42 }
43
44 src_install() {
45         default
46
47         use doc && dodoc "${DISTDIR}"/prelink.pdf
48
49         insinto /etc
50         doins doc/prelink.conf
51
52         exeinto /etc/cron.daily
53         newexe "${FILESDIR}"/prelink.cron prelink
54         newconfd "${FILESDIR}"/prelink.confd prelink
55 }
56
57 pkg_postinst() {
58         if [ -z "${REPLACING_VERSIONS}" ] ; then
59                 elog "You may wish to read the Gentoo Linux Prelink Guide, which can be"
60                 elog "found online at:"
61                 elog "    https://wiki.gentoo.org/wiki/Prelink"
62                 elog "Please edit /etc/conf.d/prelink to enable and configure prelink"
63         fi
64 }