summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-devel/prelink
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-devel/prelink')
-rw-r--r--sys-devel/prelink/Manifest4
-rw-r--r--sys-devel/prelink/files/prelink-20061201-prelink-conf.patch31
-rw-r--r--sys-devel/prelink/files/prelink-20130503-libiberty-md5.patch61
-rw-r--r--sys-devel/prelink/files/prelink-20130503-prelink-conf.patch39
-rw-r--r--sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch12
-rw-r--r--sys-devel/prelink/files/prelink.confd43
-rw-r--r--sys-devel/prelink/files/prelink.cron61
-rw-r--r--sys-devel/prelink/metadata.xml5
-rw-r--r--sys-devel/prelink/prelink-20110511.ebuild75
-rw-r--r--sys-devel/prelink/prelink-20111012.ebuild81
-rw-r--r--sys-devel/prelink/prelink-20120628.ebuild91
-rw-r--r--sys-devel/prelink/prelink-20130503.ebuild84
12 files changed, 587 insertions, 0 deletions
diff --git a/sys-devel/prelink/Manifest b/sys-devel/prelink/Manifest
new file mode 100644
index 00000000000..283f1e20ee6
--- /dev/null
+++ b/sys-devel/prelink/Manifest
@@ -0,0 +1,4 @@
+DIST prelink-20110511.tar.bz2 924501 SHA256 038725b6e3125dc163bca6c6bd348958ca117510d6d2603f06431fee59b4e0fe SHA512 4ae8a8a9fc29c98954e43eb606bef5e4d6eeca6ea9cec855f13e640e1090dd99543c60da240bc8f68b01e1ec94a6860863772378b1b13191faf42912fb8d51ec WHIRLPOOL 8e8dc9247bfd9425527f7246aa2e61ff351a7701729c22f04bddce46ac37fe109a2c777cc880a40a55a28a0072337e5e8f8e410616b537180486c757f2dad161
+DIST prelink-20111012.tar.bz2 926500 SHA256 b86df2e6c051176da711a85982b80d87c8ce8e053e04bd0ffb2f9ba817f62aaf SHA512 51e57337b528728e916a69c2fc6a21503882d43317d927c1c3990193b929e7d0a91e04411647fd798f4f2467a87dc5482a8f8f95650546bb2336d42e563e66cf WHIRLPOOL e4c0b2ec05694ea56dd365b725f19d8b263a6392426ac47d4cefa49326a32b6174026416b98acb5a56a2644c2094db6f4c4c3523de3b74d33c09ac42e235ae66
+DIST prelink-20120628.tar.bz2 917485 SHA256 46548d655e9d764260b735ecdd1c8b0673756224f5fd9a4f14fef1cdb6bad44d SHA512 ee45d0c916fe8dd8e358ba1bae2ea0af41f7ae45a77b2c126236f93035bd335797834714fd9d7841a3e6987855a12adf5c8c954c72155e51319786ac21ed42ef WHIRLPOOL 06f34a15363924576bfa8c54180a78993589c3fd51c6a4cd7a58c823c4a5738591bc9332173e3312a557b1af4c1c71bc1f02982145fd9af5ad1f7063be58a205
+DIST prelink-20130503.tar.bz2 928040 SHA256 6339c7605e9b6f414d1be32530c9c8011f38820d36431c8a62e8674ca37140f0 SHA512 69138a695e3e535deacd8224f6f8364ff64b8868b87b516d1f3392d9df968f77265177e9fede09c38f16aa878f9fd57a9ec39f0d9deabc0c9c01609b11156ba3 WHIRLPOOL 51b4234009c6ac6e6f45f09e3513feb5efe1dbf9d705b55f88d0443fe386bacbe04fa4a4e5d60caf40ef0a98a5557eb2e9f3a11549ec01c0200c324cb948ab34
diff --git a/sys-devel/prelink/files/prelink-20061201-prelink-conf.patch b/sys-devel/prelink/files/prelink-20061201-prelink-conf.patch
new file mode 100644
index 00000000000..9397088c5cd
--- /dev/null
+++ b/sys-devel/prelink/files/prelink-20061201-prelink-conf.patch
@@ -0,0 +1,31 @@
+--- doc/prelink.conf.orig 2008-08-29 08:18:59.000000000 -0400
++++ doc/prelink.conf 2008-08-29 08:21:48.000000000 -0400
+@@ -16,8 +16,11 @@
+ -b *.a
+ -b *.js
+ -b /lib/modules
+--b /usr/lib/locale
+--b /usr/X11R6/lib{,64}/X11/xfig
++-b /usr/lib{,32,64}/locale
++-b /usr/lib{,32,64}/wine
++-b /usr/lib{,32,64}/valgrind
++-b /usr/X11R6/lib{,32,64}/X11/xfig
++-b /usr/src
+ -l /bin
+ -l /usr/bin
+ -l /sbin
+@@ -27,9 +30,9 @@
+ -l /usr/games
+ -l /usr/libexec
+ -l /var/ftp/bin
+--l /lib{,64}
+--l /usr/lib{,64}
+--l /usr/X11R6/lib{,64}
+--l /usr/kerberos/lib{,64}
++-l /lib{,32,64}
++-l /usr/lib{,32,64}
++-l /usr/X11R6/lib{,32,64}
++-l /usr/kerberos/lib{,32,64}
+ -l /usr/X11R6/LessTif
+--l /var/ftp/lib{,64}
++-l /var/ftp/lib{,32,64}
diff --git a/sys-devel/prelink/files/prelink-20130503-libiberty-md5.patch b/sys-devel/prelink/files/prelink-20130503-libiberty-md5.patch
new file mode 100644
index 00000000000..36b8bcecb31
--- /dev/null
+++ b/sys-devel/prelink/files/prelink-20130503-libiberty-md5.patch
@@ -0,0 +1,61 @@
+From 8eeb9da6d017761037bf757780ea544dfeabbad8 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 31 Jul 2012 09:02:35 +0000
+Subject: [PATCH] libiberty/md5: fix strict alias warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Current libiberty md5 code triggers these warnings with gcc-4.7.1 for me:
+
+libiberty/md5.c: In function ‘md5_finish_ctx’:
+libiberty/md5.c:117:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
+libiberty/md5.c:118:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
+
+The change below fixes things for me. The optimized output (-O2) is the same
+before/after my change on x86_64-linux. I imagine it'll be the same for most
+targets. It seems simpler than using a union on the md5_ctx buffer since these
+are the only two locations in the code where this occurs.
+---
+ libiberty/ChangeLog | 5 +++++
+ libiberty/md5.c | 12 ++++++++----
+ 2 files changed, 13 insertions(+), 4 deletions(-)
+
+2012-07-31 Mike Frysinger <vapier@gentoo.org>
+
+ * md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output
+ to swap_bytes, and then call memcpy to move it to ctx->buffer.
+
+diff --git a/libiberty/md5.c b/libiberty/md5.c
+index 0db8fc8..8cc0cb5 100644
+--- a/src/md5.c
++++ b/src/md5.c
+@@ -103,6 +103,7 @@ md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
+ {
+ /* Take yet unprocessed bytes into account. */
+ md5_uint32 bytes = ctx->buflen;
++ md5_uint32 swap_bytes;
+ size_t pad;
+
+ /* Now count remaining bytes. */
+@@ -113,10 +114,13 @@ md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
+ pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes;
+ memcpy (&ctx->buffer[bytes], fillbuf, pad);
+
+- /* Put the 64-bit file length in *bits* at the end of the buffer. */
+- *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
+- *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
+- (ctx->total[0] >> 29));
++ /* Put the 64-bit file length in *bits* at the end of the buffer.
++ Use memcpy to avoid aliasing problems. On most systems, this
++ will be optimized away to the same code. */
++ swap_bytes = SWAP (ctx->total[0] << 3);
++ memcpy (&ctx->buffer[bytes + pad], &swap_bytes, sizeof (swap_bytes));
++ swap_bytes = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
++ memcpy (&ctx->buffer[bytes + pad + 4], &swap_bytes, sizeof (swap_bytes));
+
+ /* Process last bytes. */
+ md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
+--
+1.8.2.1
+
diff --git a/sys-devel/prelink/files/prelink-20130503-prelink-conf.patch b/sys-devel/prelink/files/prelink-20130503-prelink-conf.patch
new file mode 100644
index 00000000000..9233a411482
--- /dev/null
+++ b/sys-devel/prelink/files/prelink-20130503-prelink-conf.patch
@@ -0,0 +1,39 @@
+--- a/doc/prelink.conf
++++ b/doc/prelink.conf
+@@ -5,6 +5,7 @@
+ # If a directory name is prefixed with `-h ', symbolic links in a
+ # directory hierarchy are followed.
+ # Directories or files with `-b ' prefix will be blacklisted.
++-c /etc/prelink.conf.d/*.conf
+ -b *.la
+ -b *.png
+ -b *.py
+@@ -16,8 +16,11 @@
+ -b *.a
+ -b *.js
+ -b /lib/modules
+--b /usr/lib/locale
+--b /usr/X11R6/lib{,64}/X11/xfig
++-b /usr/lib{,x32,32,64}/locale
++-b /usr/lib{,x32,32,64}/wine
++-b /usr/lib{,x32,32,64}/valgrind
++-b /usr/X11R6/lib{,x32,32,64}/X11/xfig
++-b /usr/src
+ -l /bin
+ -l /usr/bin
+ -l /sbin
+@@ -27,9 +30,9 @@
+ -l /usr/games
+ -l /usr/libexec
+ -l /var/ftp/bin
+--l /lib{,64}
+--l /usr/lib{,64}
+--l /usr/X11R6/lib{,64}
+--l /usr/kerberos/lib{,64}
++-l /lib{,x32,32,64}
++-l /usr/lib{,x32,32,64}
++-l /usr/X11R6/lib{,x32,32,64}
++-l /usr/kerberos/lib{,x32,32,64}
+ -l /usr/X11R6/LessTif
+--l /var/ftp/lib{,64}
++-l /var/ftp/lib{,x32,32,64}
diff --git a/sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch b/sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch
new file mode 100644
index 00000000000..896101040b5
--- /dev/null
+++ b/sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch
@@ -0,0 +1,12 @@
+diff -urNp prelink_orig/src/arch-arm.c prelink/src/arch-arm.c
+--- prelink_orig/src/arch-arm.c 2011-08-26 03:20:49.000000000 -0400
++++ prelink/src/arch-arm.c 2012-11-28 23:59:28.030164736 -0500
+@@ -832,7 +832,7 @@ PL_ARCH = {
+ .R_COPY = R_ARM_COPY,
+ .R_RELATIVE = R_ARM_RELATIVE,
+ .rtype_class_valid = RTYPE_CLASS_VALID,
+- .dynamic_linker = "/lib/ld-linux.so.3",
++ .dynamic_linker = "/lib/ld-linux-armhf.so.3",
+ .adjust_dyn = arm_adjust_dyn,
+ .adjust_rel = arm_adjust_rel,
+ .adjust_rela = arm_adjust_rela,
diff --git a/sys-devel/prelink/files/prelink.confd b/sys-devel/prelink/files/prelink.confd
new file mode 100644
index 00000000000..6b89b8c1f1f
--- /dev/null
+++ b/sys-devel/prelink/files/prelink.confd
@@ -0,0 +1,43 @@
+# For an in depth prelinking guide, please see:
+# http://www.gentoo.org/doc/en/prelink-howto.xml
+
+# Control prelinking behavior in the cronjob.
+# yes - automatically prelink the system
+# no - automatically un-prelink the system
+# "" - do nothing at all (user manages)
+# (if you change this from yes to no prelink -ua
+# will be run next night to undo prelinking)
+PRELINKING=""
+
+# Options to pass to prelink
+# -m Try to conserve virtual memory by allowing overlapping
+# assigned virtual memory slots for libraries which
+# never appear together in one binary
+# -R Randomize virtual memory slot assignments for libraries.
+# This makes it slightly harder for various buffer overflow
+# attacks, since library addresses will be different on each
+# host using -R.
+PRELINK_OPTS=-mR
+
+# How often should full prelink be run (in days)
+# Normally, prelink will be run in quick mode, every
+# $PRELINK_FULL_TIME_INTERVAL days it will be run
+# in normal mode. Comment it out if it should be run
+# in normal mode always.
+PRELINK_FULL_TIME_INTERVAL=14
+
+# How often should prelink run (in days) even if
+# no packages have been upgraded via portage.
+# If $PRELINK_FULL_TIME_INTERVAL days have not elapsed
+# yet since last normal mode prelinking, last
+# quick mode prelinking happened less than
+# $PRELINK_NOEMER_CHECK_INTERVAL days ago
+# and no packages have been upgraded by portage
+# since last quick mode prelinking, prelink
+# will not do anything.
+# Change to
+# PRELINK_NOEMER_CHECK_INTERVAL=0
+# if you want to disable the portage database timestamp
+# check (especially if you don't use portage
+# exclusively to upgrade system libraries and/or binaries).
+PRELINK_NOEMER_CHECK_INTERVAL=7
diff --git a/sys-devel/prelink/files/prelink.cron b/sys-devel/prelink/files/prelink.cron
new file mode 100644
index 00000000000..a3edc429fee
--- /dev/null
+++ b/sys-devel/prelink/files/prelink.cron
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+. /etc/conf.d/prelink
+log="/var/log/prelink.log"
+
+case $PRELINKING in
+ yes|no);;
+ *) exit 0;;
+esac
+
+ionice -c3 -p $$ >/dev/null 2>&1
+renice +19 -p $$ >/dev/null 2>&1
+
+if [ "$PRELINKING" != yes ]; then
+ sed -ri '/^[[:space:]]*#?[[:space:]]*KDE_IS_PRELINKED=/s:.*:#KDE_IS_PRELINKED=1:' /etc/env.d/*kde* 2>/dev/null
+ if [ -f /etc/prelink.cache ]; then
+ echo /usr/sbin/prelink -uav > ${log}
+ /usr/sbin/prelink -uav >> ${log} 2>&1 \
+ || echo Prelink failed with return value $? >> ${log}
+ rm -f /etc/prelink.cache
+ # Restart init if needed
+ [ -n "$(find `ldd /sbin/init | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
+ fi
+ exit 0
+fi
+
+sed -ri '/^[[:space:]]*#?[[:space:]]*KDE_IS_PRELINKED=/s:.*:KDE_IS_PRELINKED=1:' /etc/env.d/*kde* 2>/dev/null
+
+if [ ! -f /etc/prelink.cache -o -f /var/lib/misc/prelink.force ] \
+ || grep -q '^prelink-ELF0.[0-2]' /etc/prelink.cache; then
+ # If cache does not exist or is from older prelink versions or
+ # if we were asked to explicitely, force full prelinking
+ rm -f /etc/prelink.cache /var/lib/misc/prelink.force
+ PRELINK_OPTS="$PRELINK_OPTS -f"
+ date > /var/lib/misc/prelink.full
+ cp -a /var/lib/misc/prelink.full /var/lib/misc/prelink.quick
+elif [ -n "$PRELINK_FULL_TIME_INTERVAL" \
+ -a "`find /var/lib/misc/prelink.full -mtime -${PRELINK_FULL_TIME_INTERVAL} 2>/dev/null`" \
+ = /var/lib/misc/prelink.full ]; then
+ # If no more than PRELINK_NOEMER_CHECK_INTERVAL days elapsed from last prelink
+ # (be it full or quick) and no packages have been upgraded via rpm since then,
+ # don't do anything.
+ [ "`find /var/lib/misc/prelink.quick -mtime -${PRELINK_NOEMER_CHECK_INTERVAL:-7} 2>/dev/null`" \
+ -a -f /var/cache/edb/counter \
+ -a /var/cache/edb/counter -ot /var/lib/misc/prelink.quick ] && exit 0
+ date > /var/lib/misc/prelink.quick
+ # If prelink without -q has been run in the last
+ # PRELINK_FULL_TIME_INTERVAL days, just use quick mode
+ PRELINK_OPTS="$PRELINK_OPTS -q"
+else
+ date > /var/lib/misc/prelink.full
+ cp -a /var/lib/misc/prelink.full /var/lib/misc/prelink.quick
+fi
+
+echo /usr/sbin/prelink -av $PRELINK_OPTS > ${log}
+/usr/sbin/prelink -av $PRELINK_OPTS >> ${log} 2>&1 \
+ || echo Prelink failed with return value $? >> ${log}
+# Restart init if needed
+[ -n "$(find `ldd /sbin/init | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
+
+exit 0
diff --git a/sys-devel/prelink/metadata.xml b/sys-devel/prelink/metadata.xml
new file mode 100644
index 00000000000..fb4199eb7af
--- /dev/null
+++ b/sys-devel/prelink/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>toolchain</herd>
+</pkgmetadata>
diff --git a/sys-devel/prelink/prelink-20110511.ebuild b/sys-devel/prelink/prelink-20110511.ebuild
new file mode 100644
index 00000000000..36da2f13a86
--- /dev/null
+++ b/sys-devel/prelink/prelink-20110511.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in faster load times"
+HOMEPAGE="http://people.redhat.com/jakub/prelink"
+
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+#SRC_URI="http://people.redhat.com/jakub/prelink/${P}.tar.bz2"
+#
+# if not available rip the distfile with rpm2targz from
+# http://mirrors.kernel.org/fedora/development/rawhide/source/SRPMS/prelink-[ver].src.rpm
+
+# track http://pkgs.fedoraproject.org/gitweb/?p=prelink.git;a=summary for
+# version bumps
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 -arm ppc ppc64 x86"
+IUSE=""
+
+DEPEND=">=dev-libs/elfutils-0.100[static-libs(+)]
+ !dev-libs/libelf
+ >=sys-libs/glibc-2.8"
+RDEPEND="${DEPEND}
+ >=sys-devel/binutils-2.18"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-20061201-prelink-conf.patch
+
+ sed -i -e 's:undosyslibs.sh::' testsuite/Makefile.in #254201
+ sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh #100147
+
+ # older GCCs don't support this flag
+ # sed it from the Makefile then add it back to CFLAGS so we can use
+ # strip-unsupported-flags
+ sed -i -e 's:-Wno-pointer-sign::' src/Makefile.in #325269
+ append-cflags -Wno-pointer-sign
+ strip-unsupported-flags
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ doins doc/prelink.conf
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/prelink.cron prelink
+ newconfd "${FILESDIR}"/prelink.confd prelink
+
+ dodir /var/{lib/misc,log}
+ touch "${D}/var/lib/misc/prelink.full"
+ touch "${D}/var/lib/misc/prelink.quick"
+ touch "${D}/var/lib/misc/prelink.force"
+ touch "${D}/var/log/prelink.log"
+}
+
+pkg_postinst() {
+ echo
+ elog "You may wish to read the Gentoo Linux Prelink Guide, which can be"
+ elog "found online at:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/Prelink"
+ elog
+ elog "Please edit /etc/conf.d/prelink to enable and configure prelink"
+ echo
+ touch "${ROOT}/var/lib/misc/prelink.force"
+}
diff --git a/sys-devel/prelink/prelink-20111012.ebuild b/sys-devel/prelink/prelink-20111012.ebuild
new file mode 100644
index 00000000000..ac6413fc74d
--- /dev/null
+++ b/sys-devel/prelink/prelink-20111012.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in faster load times"
+HOMEPAGE="http://people.redhat.com/jakub/prelink"
+
+#SRC_URI="mirror://gentoo/${P}.tar.bz2"
+SRC_URI="http://people.redhat.com/jakub/prelink/${P}.tar.bz2"
+#
+# if not available rip the distfile with rpm2targz from
+# http://mirrors.kernel.org/fedora/development/rawhide/source/SRPMS/prelink-[ver].src.rpm
+
+# track http://pkgs.fedoraproject.org/gitweb/?p=prelink.git;a=summary for
+# version bumps
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 -arm ~ppc ~ppc64 ~x86"
+IUSE=""
+
+DEPEND=">=dev-libs/elfutils-0.100[static-libs(+)]
+ !dev-libs/libelf
+ >=sys-libs/glibc-2.8"
+RDEPEND="${DEPEND}
+ >=sys-devel/binutils-2.18"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-20061201-prelink-conf.patch
+
+ sed -i -e 's:undosyslibs.sh::' testsuite/Makefile.in #254201
+ sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh #100147
+ # >=binutils-2.22 --no-copy-dt-needed-entries is the default
+ # --copy-dt-needed-entries was renamed from --add-needed in 2.21, use the
+ # former so we don't have to bump the dep
+ sed -i \
+ -e '/CCLINK=/s:\(CCLINK="$(CC)\):\1 -Wl,--add-needed :' \
+ -e '/CXXLINK=/s:\(CXXLINK="$(CXX)\):\1 -Wl,--add-needed :' \
+ testsuite/Makefile.in
+
+ has_version 'dev-libs/elfutils[threads]' && append-ldflags -pthread
+ # older GCCs don't support this flag
+ sed -i -e 's:-Wno-pointer-sign::' src/Makefile.in #325269
+ append-cflags -Wno-pointer-sign
+ strip-unsupported-flags
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ doins doc/prelink.conf
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/prelink.cron prelink
+ newconfd "${FILESDIR}"/prelink.confd prelink
+
+ dodir /var/{lib/misc,log}
+ touch "${D}/var/lib/misc/prelink.full"
+ touch "${D}/var/lib/misc/prelink.quick"
+ touch "${D}/var/lib/misc/prelink.force"
+ touch "${D}/var/log/prelink.log"
+}
+
+pkg_postinst() {
+ echo
+ elog "You may wish to read the Gentoo Linux Prelink Guide, which can be"
+ elog "found online at:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/Prelink"
+ elog
+ elog "Please edit /etc/conf.d/prelink to enable and configure prelink"
+ echo
+ touch "${ROOT}/var/lib/misc/prelink.force"
+}
diff --git a/sys-devel/prelink/prelink-20120628.ebuild b/sys-devel/prelink/prelink-20120628.ebuild
new file mode 100644
index 00000000000..32bedf4cd22
--- /dev/null
+++ b/sys-devel/prelink/prelink-20120628.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in faster load times"
+HOMEPAGE="http://people.redhat.com/jakub/prelink"
+
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+#SRC_URI="http://people.redhat.com/jakub/prelink/${P}.tar.bz2"
+
+# if not available on jakub's dev space extract the distfile with rpm2tarbz2 from
+# http://mirrors.kernel.org/fedora/development/rawhide/source/SRPMS/prelink-[ver].src.rpm
+#
+# track http://pkgs.fedoraproject.org/cgit/prelink.git/ for updates
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 -arm ~ppc ~ppc64 ~x86"
+IUSE="selinux"
+
+DEPEND=">=dev-libs/elfutils-0.100[static-libs(+)]
+ selinux? ( sys-libs/libselinux[static-libs(+)] )
+ !dev-libs/libelf
+ >=sys-libs/glibc-2.8"
+RDEPEND="${DEPEND}
+ >=sys-devel/binutils-2.18"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-20061201-prelink-conf.patch
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #469126
+
+ sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh #100147
+ # >=binutils-2.22 --no-copy-dt-needed-entries is the default
+ # --copy-dt-needed-entries was renamed from --add-needed in 2.21, use the
+ # former so we don't have to bump the dep
+ sed -i \
+ -e '/CCLINK=/s:\(CCLINK="$(CC)\):\1 -Wl,--add-needed :' \
+ -e '/CXXLINK=/s:\(CXXLINK="$(CXX)\):\1 -Wl,--add-needed :' \
+ testsuite/Makefile.am
+
+ # older GCCs don't support this flag
+ sed -i -e 's:-Wno-pointer-sign::' src/Makefile.am #325269
+ append-cflags -Wno-pointer-sign
+ strip-unsupported-flags
+
+ has_version 'dev-libs/elfutils[threads]' && append-ldflags -pthread
+
+ eautoreconf # prevent maintainer mode
+
+ # have to do this after eautoreconf or automake barfs on the trailing
+ # backslash of the previous line
+ sed -i -e 's:undosyslibs.sh::' testsuite/Makefile.in # 254201
+
+ export ac_cv_{header_selinux_selinux_h,lib_selinux_is_selinux_enabled}=$(usex selinux)
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ doins doc/prelink.conf
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/prelink.cron prelink
+ newconfd "${FILESDIR}"/prelink.confd prelink
+
+ dodir /var/{lib/misc,log}
+ touch "${D}/var/lib/misc/prelink.full"
+ touch "${D}/var/lib/misc/prelink.quick"
+ touch "${D}/var/lib/misc/prelink.force"
+ touch "${D}/var/log/prelink.log"
+}
+
+pkg_postinst() {
+ echo
+ elog "You may wish to read the Gentoo Linux Prelink Guide, which can be"
+ elog "found online at:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/Prelink"
+ elog
+ elog "Please edit /etc/conf.d/prelink to enable and configure prelink"
+ echo
+ touch "${ROOT}/var/lib/misc/prelink.force"
+}
diff --git a/sys-devel/prelink/prelink-20130503.ebuild b/sys-devel/prelink/prelink-20130503.ebuild
new file mode 100644
index 00000000000..66f2b56608a
--- /dev/null
+++ b/sys-devel/prelink/prelink-20130503.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in faster load times"
+HOMEPAGE="http://people.redhat.com/jakub/prelink"
+
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+#SRC_URI="http://people.redhat.com/jakub/prelink/${P}.tar.bz2"
+
+# if not available on jakub's dev space extract the distfile with rpm2tarbz2 from
+# http://mirrors.kernel.org/fedora/development/rawhide/source/SRPMS/p/prelink-[ver].src.rpm
+#
+# track http://pkgs.fedoraproject.org/cgit/prelink.git/ for updates
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 -arm ppc ppc64 x86"
+IUSE="selinux"
+
+DEPEND=">=dev-libs/elfutils-0.100[static-libs(+)]
+ selinux? ( sys-libs/libselinux[static-libs(+)] )
+ !dev-libs/libelf
+ >=sys-libs/glibc-2.8"
+RDEPEND="${DEPEND}
+ >=sys-devel/binutils-2.18"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-20130503-prelink-conf.patch
+ epatch "${FILESDIR}"/${PN}-20130503-libiberty-md5.patch
+ epatch "${FILESDIR}"/${PN}-armhf-dynamic-linker.patch
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #469126
+
+ sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh #100147
+ # >=binutils-2.22 --no-copy-dt-needed-entries is the default
+ # --copy-dt-needed-entries was renamed from --add-needed in 2.21, use the
+ # former so we don't have to bump the dep
+ sed -i \
+ -e '/CCLINK=/s:CCLINK="$(CC):& -Wl,--add-needed :' \
+ -e '/CXXLINK=/s:CXXLINK="$(CXX):& -Wl,--add-needed :' \
+ testsuite/Makefile.am
+
+ has_version 'dev-libs/elfutils[threads]' && append-ldflags -pthread
+
+ eautoreconf # prevent maintainer mode
+
+ # have to do this after eautoreconf or automake barfs on the trailing
+ # backslash of the previous line
+ sed -i -e 's:undosyslibs.sh::' testsuite/Makefile.in #254201
+
+ export ac_cv_{header_selinux_selinux_h,lib_selinux_is_selinux_enabled}=$(usex selinux)
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ doins doc/prelink.conf
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/prelink.cron prelink
+ newconfd "${FILESDIR}"/prelink.confd prelink
+
+ dodir /var/{lib/misc,log}
+ touch "${ED}"/var/lib/misc/prelink.{full,quick,force}
+ touch "${ED}"/var/log/prelink.log
+}
+
+pkg_postinst() {
+ if [ -z "${REPLACING_VERSIONS}" ] ; then
+ elog "You may wish to read the Gentoo Linux Prelink Guide, which can be"
+ elog "found online at:"
+ elog " https://wiki.gentoo.org/wiki/Prelink"
+ elog "Please edit /etc/conf.d/prelink to enable and configure prelink"
+ fi
+ touch "${EROOT}/var/lib/misc/prelink.force"
+}