summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2011-09-06 13:20:39 +0000
committerAnthony G. Basile <blueness@gentoo.org>2011-09-06 13:20:39 +0000
commitffbdb57873334ad71b014b3335e478b2d11ab256 (patch)
tree4ff388d251ebdc6c48c4ce571c199472636a93a5 /dev-util/elfkickers
parentApply patch to disable striping, we handle it by PM. (diff)
downloadhistorical-ffbdb57873334ad71b014b3335e478b2d11ab256.tar.gz
historical-ffbdb57873334ad71b014b3335e478b2d11ab256.tar.bz2
historical-ffbdb57873334ad71b014b3335e478b2d11ab256.zip
Patch for missing ELF defs on FreeBSD, bug #380085
Package-Manager: portage-2.1.10.11/cvs/Linux x86_64
Diffstat (limited to 'dev-util/elfkickers')
-rw-r--r--dev-util/elfkickers/ChangeLog8
-rw-r--r--dev-util/elfkickers/Manifest12
-rw-r--r--dev-util/elfkickers/elfkickers-3.0-r2.ebuild34
-rw-r--r--dev-util/elfkickers/files/add-freebsd-elf-defs.patch68
4 files changed, 116 insertions, 6 deletions
diff --git a/dev-util/elfkickers/ChangeLog b/dev-util/elfkickers/ChangeLog
index bd645652f1fc..0583c400d248 100644
--- a/dev-util/elfkickers/ChangeLog
+++ b/dev-util/elfkickers/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-util/elfkickers
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/elfkickers/ChangeLog,v 1.41 2011/09/05 20:36:17 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/elfkickers/ChangeLog,v 1.42 2011/09/06 13:20:39 blueness Exp $
+
+*elfkickers-3.0-r2 (06 Sep 2011)
+
+ 06 Sep 2011; Anthony G. Basile <blueness@gentoo.org>
+ +elfkickers-3.0-r2.ebuild, +files/add-freebsd-elf-defs.patch:
+ Patch for missing ELF defs on FreeBSD, bug #380085
05 Sep 2011; Markus Meier <maekke@gentoo.org> elfkickers-3.0-r1.ebuild:
add ~arm, bug #380085
diff --git a/dev-util/elfkickers/Manifest b/dev-util/elfkickers/Manifest
index 82adfdb640f8..e10a0f895638 100644
--- a/dev-util/elfkickers/Manifest
+++ b/dev-util/elfkickers/Manifest
@@ -1,6 +1,7 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
+AUX add-freebsd-elf-defs.patch 1937 RMD160 3869be1afdc3f3b31e239457b2d190ff47990519 SHA1 f41adce9292da2a5f049cfd884bc1e00fa32c905 SHA256 76b5cf0d09247787e7f5e528007df967220629442c1d7109c31c2b062a054e2b
AUX create-destdir-path.patch 472 RMD160 189d960c64c114b545066ec224145e236c5fc661 SHA1 8ab530448b31a635b0a85b9ca67b8f98d6a40b28 SHA256 fab7f8335a545b62b2186bc900a69150a36432a7ff977a1bae6b8279c3ca9304
AUX respect-CFLAGS-LDFLAGS.patch 3237 RMD160 f6e912b61c048f982dfe29df1f15f4c3dd74f7c4 SHA1 4ef6b27b0bbc821c130c47fe9c4b32e5a2ab0104 SHA256 738b1cd1d32d10816a422031902cd946d446751df4592fe29bb5f1d8c4ee6e0f
DIST ELFkickers-2.0a.tar.gz 119659 RMD160 9a982fe963fc110966bc0b5b23a159302e4ca389 SHA1 2599fa8c2e733b422dbefbeb393f8d702a426c10 SHA256 c196988f55fc6633d9f9f6d9ddc2ae9b4dfa1f300edf4cbbad865c06a8656df7
@@ -12,12 +13,13 @@ EBUILD elfkickers-2.0a-r4.ebuild 1601 RMD160 55b6b4bdc3b546cdacdaa4e8f5fc3b311c3
EBUILD elfkickers-2.0a-r5.ebuild 1605 RMD160 6e8770d7239fed1705f2f76261aba0b800efda58 SHA1 2d647f2dbd8cad1f055dec4bcdb393aa06690f29 SHA256 cd4c94f828de58e21a16c8f59e0e6fbb037d5666bf66bf44bbfc8134d1fc6f7b
EBUILD elfkickers-2.0a-r6.ebuild 1605 RMD160 ef887e45727f456caf34558ea1f6c7f2b9b531a7 SHA1 3c16c7f4f61d3c8cab3c122c5b305f3a70ce5164 SHA256 d2ec098f146a32da6b77cbae6e61bd658f680e4dca9830167e198560530dc443
EBUILD elfkickers-3.0-r1.ebuild 907 RMD160 7d0eb916ba0ac277010b050efa84c5a5a9d2cf65 SHA1 1119a4d8899112ce10081efc62cce249221b50db SHA256 5eac1862782755f7da962daa4c942165606bdadc165c817842197e84d41d540c
-MISC ChangeLog 5754 RMD160 452374e8406d088db5ee6ba1dee0b2e6a5b3cd68 SHA1 687193542afdef5a9421c7a84e246582c8a6f551 SHA256 96a288a78d70575c83734298564e9ff8a5a5ed6cd8baf7ac5e639965a20a1ff9
+EBUILD elfkickers-3.0-r2.ebuild 960 RMD160 3c88197406ddc0e819672686051ecd4be3a9eb0e SHA1 328bef81dff4f590f52a26387a01d0e9065b7a84 SHA256 0ed70c8a9fd53cd1b8f200ee63fe1068123d58b03c0fc289cf48cdab5cf65dc6
+MISC ChangeLog 5963 RMD160 aed5dc07e7600dcd89c5faa07bd0c8239e45f93f SHA1 cc1eac46fddc9abfe53ffaeab6b1e749aaf14df6 SHA256 2d3db4946f96a7be47be2542719c338631a2fb0f931e4f4f126e65cf19748096
MISC metadata.xml 665 RMD160 053a037de55405a9ef52d0804a5e4da65de9fd5d SHA1 9f9747b3d2e2225a7109b70aa5f40197e86f7ea0 SHA256 50c8944da2455788505b60ac101d7e2b8d3278118b011ca2665d61b2547ffccc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAk5lMvcACgkQkKaRLQcq0GImHgCfUuAizTtSZYSgwZUUp4QSfd0A
-4XYAmgP+SqPZv2wV3haXUxhID3FUTsae
-=E3IK
+iEYEAREIAAYFAk5mHjIACgkQl5yvQNBFVTVQNwCdE8SjDBnApsdOX/xHsOmGvBLG
+8eYAn08aVg2VQCFN799Qtz1pT9Lgjthe
+=v2lg
-----END PGP SIGNATURE-----
diff --git a/dev-util/elfkickers/elfkickers-3.0-r2.ebuild b/dev-util/elfkickers/elfkickers-3.0-r2.ebuild
new file mode 100644
index 000000000000..72dab508df41
--- /dev/null
+++ b/dev-util/elfkickers/elfkickers-3.0-r2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/elfkickers/elfkickers-3.0-r2.ebuild,v 1.1 2011/09/06 13:20:39 blueness Exp $
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+MY_PN=${PN/elf/ELF}-${PV}
+S=${WORKDIR}/${MY_PN}
+
+DESCRIPTION="collection of programs to manipulate ELF files: sstrip, rebind, elfls, elftoc"
+HOMEPAGE="http://www.muppetlabs.com/~breadbox/software/elfkickers.html"
+SRC_URI="http://www.muppetlabs.com/~breadbox/pub/software/${MY_PN}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc"
+
+DEPEND="app-misc/pax-utils"
+RDEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/respect-CFLAGS-LDFLAGS.patch
+ epatch "${FILESDIR}"/create-destdir-path.patch
+ epatch "${FILESDIR}"/add-freebsd-elf-defs.patch
+ sed -i -e "s:^prefix = /usr/local:prefix = ${D}:" Makefile \
+ || die "sed failed"
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) all
+}
diff --git a/dev-util/elfkickers/files/add-freebsd-elf-defs.patch b/dev-util/elfkickers/files/add-freebsd-elf-defs.patch
new file mode 100644
index 000000000000..792a91d6dfb2
--- /dev/null
+++ b/dev-util/elfkickers/files/add-freebsd-elf-defs.patch
@@ -0,0 +1,68 @@
+--- ./elfrw/elfrw.h.orig 2011-05-31 01:47:08.000000000 +0200
++++ ./elfrw/elfrw.h 2011-06-08 12:16:37.000000000 +0200
+@@ -10,6 +10,24 @@
+ #include <stdio.h>
+ #include <elf.h>
+
++#ifdef __FreeBSD__
++typedef uint16_t Elf64_Section;
++
++#define PT_GNU_STACK 0x6474e551
++#define PT_GNU_RELRO 0x6474e552
++
++#if __FreeBSD_version < 700022
++#define SHT_GNU_HASH 0x6ffffff6
++#define EM_CRIS 76
++#define EM_M32R 88
++#define EM_MN10300 89
++#endif
++
++#define ELFCLASSNUM 3
++#define ELFDATANUM 3
++#define EV_NUM 2
++#endif
++
+ /*
+ * The initialization functions. Call one of these to set the flavor
+ * of ELF structures to translate to and from. The library can be
+--- ./elftoc/readelf.h.orig 2011-05-22 20:46:29.000000000 +0200
++++ ./elftoc/readelf.h 2011-06-08 12:16:37.000000000 +0200
+@@ -7,6 +7,12 @@
+ #ifndef _readelf_h_
+ #define _readelf_h_
+
++#ifdef __FreeBSD__
++#define ELFCLASSNUM 3
++#define ELFDATANUM 3
++#define EV_NUM 2
++#endif
++
+ /* Read all of the basic headers from the file image (namely the ELF
+ * header, the program segment header table, and the section header
+ * table). False is returned if the file could not be parsed as an ELF
+--- ./elftoc/pieces.c.orig 2011-05-26 03:25:14.000000000 +0200
++++ ./elftoc/pieces.c 2011-06-08 12:16:37.000000000 +0200
+@@ -16,6 +16,10 @@
+ #include "out.h"
+ #include "pieces.h"
+
++#ifdef __FreeBSD__
++typedef uint64_t Elf32_Xword;
++#endif
++
+ /* Flags used to insert warnings in the generated source code.
+ */
+ #define PW_MISALIGNED 0x0001 /* piece misaligned for original type */
+--- ./elftoc/outbase.h.orig 2011-05-22 20:46:29.000000000 +0200
++++ ./elftoc/outbase.h 2011-06-08 12:16:37.000000000 +0200
+@@ -7,6 +7,10 @@
+ #ifndef _outbase_h_
+ #define _outbase_h_
+
++#ifdef __FreeBSD__
++#define NT_AUXV 6
++#endif
++
+ /* Set the current output file. Call this before calling any output
+ * functions. (The FILE* argument is given as a void* so as to not
+ * include stdio.h here.)