/[gentoo-x86]/sys-devel/prelink/prelink-20111012.ebuild
Gentoo

Contents of /sys-devel/prelink/prelink-20111012.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Jul 22 20:37:32 2012 UTC (2 years, 5 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -1 lines
Link against pthreads when elfutils is built with USE=threads #427538 by argonovsky.

(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-devel/prelink/prelink-20111012.ebuild,v 1.3 2012/07/20 17:31:19 vapier Exp $
4
5 EAPI="4"
6
7 inherit eutils flag-o-matic
8
9 DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in faster load times"
10 HOMEPAGE="http://people.redhat.com/jakub/prelink"
11
12 #SRC_URI="mirror://gentoo/${P}.tar.bz2"
13 SRC_URI="http://people.redhat.com/jakub/prelink/${P}.tar.bz2"
14 #
15 # if not available rip the distfile with rpm2targz from
16 # http://mirrors.kernel.org/fedora/development/rawhide/source/SRPMS/prelink-[ver].src.rpm
17
18 # track http://pkgs.fedoraproject.org/gitweb/?p=prelink.git;a=summary for
19 # version bumps
20
21 LICENSE="GPL-2"
22 SLOT="0"
23 KEYWORDS="~amd64 -arm ~ppc ~ppc64 ~x86"
24 IUSE=""
25
26 DEPEND=">=dev-libs/elfutils-0.100[static-libs(+)]
27 !dev-libs/libelf
28 >=sys-libs/glibc-2.8"
29 RDEPEND="${DEPEND}
30 >=sys-devel/binutils-2.18"
31
32 S=${WORKDIR}/${PN}
33
34 src_prepare() {
35 epatch "${FILESDIR}"/${PN}-20061201-prelink-conf.patch
36
37 sed -i -e 's:undosyslibs.sh::' testsuite/Makefile.in #254201
38 sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh #100147
39 # >=binutils-2.22 --no-copy-dt-needed-entries is the default
40 # --copy-dt-needed-entries was renamed from --add-needed in 2.21, use the
41 # former so we don't have to bump the dep
42 sed -i \
43 -e '/CCLINK=/s:\(CCLINK="$(CC)\):\1 -Wl,--add-needed :' \
44 -e '/CXXLINK=/s:\(CXXLINK="$(CXX)\):\1 -Wl,--add-needed :' \
45 testsuite/Makefile.in
46
47 has_version 'dev-libs/elfutils[threads]' && append-ldflags -pthread
48 # older GCCs don't support this flag
49 sed -i -e 's:-Wno-pointer-sign::' src/Makefile.in #325269
50 append-cflags -Wno-pointer-sign
51 strip-unsupported-flags
52 }
53
54 src_install() {
55 default
56
57 insinto /etc
58 doins doc/prelink.conf
59
60 exeinto /etc/cron.daily
61 newexe "${FILESDIR}"/prelink.cron prelink
62 newconfd "${FILESDIR}"/prelink.confd prelink
63
64 dodir /var/{lib/misc,log}
65 touch "${D}/var/lib/misc/prelink.full"
66 touch "${D}/var/lib/misc/prelink.quick"
67 touch "${D}/var/lib/misc/prelink.force"
68 touch "${D}/var/log/prelink.log"
69 }
70
71 pkg_postinst() {
72 echo
73 elog "You may wish to read the Gentoo Linux Prelink Guide, which can be"
74 elog "found online at:"
75 elog
76 elog " http://www.gentoo.org/doc/en/prelink-howto.xml"
77 elog
78 elog "Please edit /etc/conf.d/prelink to enable and configure prelink"
79 echo
80 touch "${ROOT}/var/lib/misc/prelink.force"
81 }

  ViewVC Help
Powered by ViewVC 1.1.20