1 # Copyright 2002-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
9 inherit autotools eutils flag-o-matic
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 )"
18 KEYWORDS="amd64 ~arm ppc ppc64 x86"
21 RDEPEND=">=dev-libs/elfutils-0.100
22 selinux? ( sys-libs/libselinux )
25 sys-libs/binutils-libs"
30 epatch "${FILESDIR}"/${PN}-20130503-prelink-conf.patch
31 epatch "${FILESDIR}"/${PN}-20130503-libiberty-md5.patch
33 sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh #100147
35 has_version 'dev-libs/elfutils[threads]' && append-ldflags -pthread
41 econf $(use_enable selinux)
47 use doc && dodoc "${DISTDIR}"/prelink.pdf
50 doins doc/prelink.conf
52 exeinto /etc/cron.daily
53 newexe "${FILESDIR}"/prelink.cron prelink
54 newconfd "${FILESDIR}"/prelink.confd prelink
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"