prelink-20151030.ebuild 1.7 KB

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