summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2010-03-03 17:19:52 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2010-03-03 17:19:52 +0000
commitb615617ca2cc5e6f75b57fc8b882c6b74448d206 (patch)
tree24741f83e9b1ee6dc86e80566449e308f68642c5 /app-admin
parentVersion bump (diff)
downloadgentoo-2-b615617ca2cc5e6f75b57fc8b882c6b74448d206.tar.gz
gentoo-2-b615617ca2cc5e6f75b57fc8b882c6b74448d206.tar.bz2
gentoo-2-b615617ca2cc5e6f75b57fc8b882c6b74448d206.zip
Revbump fixes multiple issues wrt bug #265575
(Portage version: 2.2_rc63/cvs/Linux x86_64)
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/chrpath/ChangeLog12
-rw-r--r--app-admin/chrpath/chrpath-0.13-r1.ebuild29
-rw-r--r--app-admin/chrpath/files/chrpath-keepgoing.patch20
-rw-r--r--app-admin/chrpath/files/chrpath-multilib.patch141
4 files changed, 200 insertions, 2 deletions
diff --git a/app-admin/chrpath/ChangeLog b/app-admin/chrpath/ChangeLog
index 9a8fb2457c2f..5b39e188f3ad 100644
--- a/app-admin/chrpath/ChangeLog
+++ b/app-admin/chrpath/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-admin/chrpath
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/chrpath/ChangeLog,v 1.11 2009/12/07 12:13:28 grobian Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/chrpath/ChangeLog,v 1.12 2010/03/03 17:19:52 hwoarang Exp $
+
+*chrpath-0.13-r1 (03 Mar 2010)
+
+ 03 Mar 2010; Markos Chandras <hwoarang@gentoo.org>
+ +chrpath-0.13-r1.ebuild, +files/chrpath-keepgoing.patch,
+ +files/chrpath-multilib.patch:
+ Revbump fixes multiple issues wrt bug #265575 thanks to Mario Fetka
+ (geos_one) <mario.fetka@gmail.com> for the patches and the ebuild
07 Dec 2009; Fabian Groffen <grobian@gentoo.org> chrpath-0.13.ebuild:
Add Prefix keywords
diff --git a/app-admin/chrpath/chrpath-0.13-r1.ebuild b/app-admin/chrpath/chrpath-0.13-r1.ebuild
new file mode 100644
index 000000000000..a708833a30b1
--- /dev/null
+++ b/app-admin/chrpath/chrpath-0.13-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/chrpath/chrpath-0.13-r1.ebuild,v 1.1 2010/03/03 17:19:52 hwoarang Exp $
+
+EAPI="2"
+
+inherit eutils autotools
+
+DESCRIPTION="chrpath can modify the rpath and runpath of ELF executables"
+HOMEPAGE="http://directory.fsf.org/project/chrpath/"
+# original upstream no longer exists (ftp://ftp.hungry.com/pub/hungry)
+SRC_URI="http://ftp.tux.org/pub/X-Windows/ftp.hungry.com/chrpath/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux
+~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-multilib.patch
+ epatch "${FILESDIR}"/${PN}-keepgoing.patch
+ eautoreconf
+}
+
+src_install() {
+ einstall
+ dodoc ChangeLog AUTHORS NEWS README || die "dodoc failed"
+}
diff --git a/app-admin/chrpath/files/chrpath-keepgoing.patch b/app-admin/chrpath/files/chrpath-keepgoing.patch
new file mode 100644
index 000000000000..d8f6965729ff
--- /dev/null
+++ b/app-admin/chrpath/files/chrpath-keepgoing.patch
@@ -0,0 +1,20 @@
+--- chrpath-0.13/main.c.orig 2006-02-27 20:21:06.000000000 +0100
++++ chrpath-0.13/main.c 2006-02-27 21:07:16.027641500 +0100
+@@ -57,6 +57,7 @@
+ printf(" -r <path>|--replace <path> Replace current rpath/runpath setting\n");
+ printf(" with the path given\n");
+ printf(" -l|--list List the current rpath/runpath (default)\n");
++ printf(" -k|--keepgoing Continue as much as possible after an error.\n");
+ printf(" -h|--help Show this usage information.\n");
+ #ifndef HAVE_GETOPT_LONG
+ printf("\n *** The long options are not available on this platform");
+--- chrpath-0.13/chrpath.1.orig 2004-09-19 10:35:44.000000000 +0200
++++ chrpath-0.13/chrpath.1 2006-02-28 10:06:28.187060500 +0100
+@@ -22,6 +22,7 @@
+ [ \fB-r\fP \fI<path>\fP |\ \fB--replace\fP \fI<path>\fP ]
+ [ \fB-c\fP | \fB--convert\fP ]
+ [ \fB-l\fP | \fB--list\fP ]
++[ \fB-k\fP | \fB--keepgoing\fP ]
+ [ \fB-h\fP | \fB--help\fP ]
+ \fI<program>\fP [ \fI<program>\fP ... ]
+ .SH DESCRIPTION
diff --git a/app-admin/chrpath/files/chrpath-multilib.patch b/app-admin/chrpath/files/chrpath-multilib.patch
new file mode 100644
index 000000000000..a1c45a5447f3
--- /dev/null
+++ b/app-admin/chrpath/files/chrpath-multilib.patch
@@ -0,0 +1,141 @@
+--- a/configure.ac 2004-09-19 10:28:33.000000000 +0200
++++ b/configure.ac 2006-02-27 16:12:00.282066250 +0100
+@@ -16,6 +16,7 @@
+ dnl Checks for programs.
+ AC_PROG_CC
+ AC_PROG_INSTALL
++AC_PROG_LIBTOOL
+
+ dnl Checks for libraries.
+
+@@ -26,7 +27,6 @@
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+ AC_C_BIGENDIAN
+-AC_CHECK_SIZEOF(void *)
+
+ dnl Checks for library functions.
+ AC_CHECK_FUNCS(getopt_long)
+--- a/Makefile.am 2004-09-19 10:29:28.000000000 +0200
++++ b/Makefile.am 2006-02-27 16:57:31.166290750 +0100
+@@ -12,12 +12,19 @@
+ fakeroot debian/rules binary
+
+ chrpath_SOURCES = \
+- chrpath.c \
+- killrpath.c \
+ main.c \
+- elf.c \
+ protos.h
+
++chrpath_LDADD = -ldl
++
++lib_LTLIBRARIES = libchrpath32.la libchrpath64.la
++libchrpath32_la_SOURCES = chrpath.c killrpath.c elf.c protos.h
++libchrpath32_la_CFLAGS = -DSIZEOF_VOID_P=4
++libchrpath32_la_LDFLAGS = -avoid-version
++libchrpath64_la_SOURCES = chrpath.c killrpath.c elf.c protos.h
++libchrpath64_la_CFLAGS = -DSIZEOF_VOID_P=8
++libchrpath64_la_LDFLAGS = -avoid-version
++
+ EXTRA_DIST = ChangeLog.usermap $(man_MANS)
+
+ CLEANFILES = *.bb *.bbg *.da *.gcov testsuite/*.bb testsuite/*.bbg
+--- a/main.c 2004-09-19 10:33:37.000000000 +0200
++++ b/main.c 2006-02-27 17:23:39.400267750 +0100
+@@ -12,13 +12,19 @@
+ # include "config.h"
+ #endif
+
++#include <dlfcn.h>
++#include <elf.h>
++#include <fcntl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <unistd.h>
+ #ifdef HAVE_GETOPT_H
+ #include <getopt.h>
+ #endif
+-#include "protos.h"
++
++typedef int (*killrpath_t)(const char *filename);
++typedef int (*chrpath_t)(const char *filename, const char *newpath, int convert);
+
+ #ifdef HAVE_GETOPT_LONG
+ # define GETOPT_LONG getopt_long
+@@ -61,6 +67,30 @@
+ printf("\n");
+ }
+
++static unsigned
++elf_class(const char *filename)
++{
++ Elf32_Ehdr ehdr;
++ int fd;
++
++ fd = open(filename, O_RDONLY);
++ if (fd == -1)
++ return 0;
++ if (read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr))
++ {
++ close(fd);
++ return 0;
++ }
++ close(fd);
++ if ((memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0)
++ || (ehdr.e_ident[EI_VERSION] != EV_CURRENT))
++ {
++ fprintf(stderr, "`%s' probably isn't an ELF file.\n", filename);
++ return 0;
++ }
++ return ehdr.e_ident[EI_CLASS];
++}
++
+ int
+ main(int argc, char * const argv[])
+ {
+@@ -73,6 +103,9 @@
+ #ifdef HAVE_GETOPT_LONG
+ int option_index = 0;
+ #endif /* HAVE_GETOPT_LONG */
++ void* dll[2];
++ killrpath_t killrpath[2];
++ chrpath_t chrpath[2];
+
+ if (argc < 2)
+ {
+@@ -116,14 +149,31 @@
+ }
+ } while (-1 != opt);
+
++ dll[0] = dlopen("libchrpath32.so", RTLD_LAZY);
++ killrpath[0] = (killrpath_t)dlsym(dll[0], "killrpath");
++ chrpath[0] = (chrpath_t)dlsym(dll[0], "chrpath");
++
++ dll[1] = dlopen("libchrpath64.so", RTLD_LAZY);
++ killrpath[1] = (killrpath_t)dlsym(dll[1], "killrpath");
++ chrpath[1] = (chrpath_t)dlsym(dll[1], "chrpath");
++
+ while (optind < argc && (!retval || keep_going))
+ {
++ const char* program = argv[optind++];
++ unsigned eclass = elf_class(program);
++ if (!eclass)
++ {
++ retval = 1;
++ continue;
++ }
+ if (remove)
+- retval |= killrpath(argv[optind++]);
++ retval |= killrpath[eclass - ELFCLASS32](program);
+ else
+ /* list by default, replace if path is set */
+- retval |= chrpath(argv[optind++], newpath, convert);
++ retval |= chrpath[eclass - ELFCLASS32](program, newpath, convert);
+ }
+
++ dlclose(dll[0]);
++ dlclose(dll[1]);
+ return retval;
+ }