diff options
-rw-r--r-- | dev-util/elfkickers/Manifest | 1 | ||||
-rw-r--r-- | dev-util/elfkickers/elfkickers-3.1.ebuild | 35 | ||||
-rw-r--r-- | dev-util/elfkickers/files/elfkickers-3.1-create-destdir-path.patch | 17 | ||||
-rw-r--r-- | dev-util/elfkickers/files/elfkickers-3.1-respect-CFLAGS-LDFLAGS.patch | 103 |
4 files changed, 156 insertions, 0 deletions
diff --git a/dev-util/elfkickers/Manifest b/dev-util/elfkickers/Manifest index 8e8bff7117aa..c2e6debaa6c4 100644 --- a/dev-util/elfkickers/Manifest +++ b/dev-util/elfkickers/Manifest @@ -1,2 +1,3 @@ DIST ELFkickers-3.0.tar.gz 99527 SHA256 8597dc38ecb1a352f86c5075608547f2c4dcd50f4ba89de70c5494cf6611c6aa SHA512 dab3076baa0bc62cdcadd885fa101df77e602ba32b67ad1635be1f981e817078944f682f3bffaba1c8b0dc181036f7266ddbd82fe15a2e34ca5dadf1aa9974ed WHIRLPOOL d5d4a98169ad397df695a7f7861a95b44ca7c48d454968788965098077e04a58c953d984dfa6dbb7963c1cd52cec2965f4faf6a7ca08e1adde1e9d8915dabd62 DIST ELFkickers-3.0a.tar.gz 100112 SHA256 c3429957142169c21ff550e0c06bbb0d48bb76437c4ccbc67164bf56b6e9774f SHA512 c90a763e5b60069f9cb67fd5c114da753184ff466c3db1dd9a44e86de9408a4384a3ac00a8c67191ca9a6556fd0db11058542361e987710f9b5bedabaec2717c WHIRLPOOL 9ed47c5c64c79dca6bce891beb430502b33481b3bc14f19f46e26157b6772ca5d1e6bc00907337dd3dc07d163b6a0cc246fef7e4afd36a85547e210b7b4bd2ea +DIST ELFkickers-3.1.tar.gz 101406 SHA256 6d663fb06dd723a078282937052368498e3860d3c42f0d765579d496e5f51a58 SHA512 a0b1ba6cdb23b12f41b81cac1960b15cc2a4418cef48923900b668fa5132ce428bab16b1780698864fdf0c374762d57f471fc124d231f8de143be172c757000b WHIRLPOOL 550df625744d0de9170623ae6aa849840309369085be65d7784b81147826109f8c2997d65cdc20359f728b468a94b212bc5c89d6236a0cb05c9f98fa8e3fec9d diff --git a/dev-util/elfkickers/elfkickers-3.1.ebuild b/dev-util/elfkickers/elfkickers-3.1.ebuild new file mode 100644 index 000000000000..dbeb2f2abb9a --- /dev/null +++ b/dev-util/elfkickers/elfkickers-3.1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="6" + +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 ~hppa ~mips ~sparc ~x86 ~x86-fbsd" +IUSE="doc" + +DEPEND="app-misc/pax-utils" +RDEPEND="" + +src_prepare() { + epatch "${FILESDIR}"/${P}-respect-CFLAGS-LDFLAGS.patch + epatch "${FILESDIR}"/${P}-create-destdir-path.patch + epatch "${FILESDIR}"/add-freebsd-elf-defs.patch + sed -i -e "s:^prefix = /usr/local:prefix = ${D}:" Makefile \ + || die "sed failed" + eapply_user +} + +src_compile() { + emake CC=$(tc-getCC) all +} diff --git a/dev-util/elfkickers/files/elfkickers-3.1-create-destdir-path.patch b/dev-util/elfkickers/files/elfkickers-3.1-create-destdir-path.patch new file mode 100644 index 000000000000..1f0c3e94fe9b --- /dev/null +++ b/dev-util/elfkickers/files/elfkickers-3.1-create-destdir-path.patch @@ -0,0 +1,17 @@ +diff -Naur ELFkickers-3.1.orig/Makefile ELFkickers-3.1/Makefile +--- ELFkickers-3.1.orig/Makefile 2015-07-23 13:25:30.000000000 -0400 ++++ ELFkickers-3.1/Makefile 2016-11-16 17:17:08.237039268 -0500 +@@ -24,10 +24,9 @@ + infect: bin/infect doc/infect.1 + + install: $(PROGRAMS) +- mkdir -p $(prefix)/bin +- cp bin/* $(prefix)/bin/. +- mkdir -p $(prefix)/share/man/man1 +- cp doc/* $(prefix)/share/man/man1/. ++ install -d $(prefix)/usr/bin $(prefix)/usr/share/man/man1 ++ install bin/* $(prefix)/usr/bin ++ install -m 644 doc/* $(prefix)/usr/share/man/man1 + + clean: + for dir in elfrw $(PROGRAMS) ; do $(MAKE) -C$$dir clean ; done diff --git a/dev-util/elfkickers/files/elfkickers-3.1-respect-CFLAGS-LDFLAGS.patch b/dev-util/elfkickers/files/elfkickers-3.1-respect-CFLAGS-LDFLAGS.patch new file mode 100644 index 000000000000..b285f3b2509c --- /dev/null +++ b/dev-util/elfkickers/files/elfkickers-3.1-respect-CFLAGS-LDFLAGS.patch @@ -0,0 +1,103 @@ +diff -Naur ELFkickers-3.1.orig/ebfc/Makefile ELFkickers-3.1/ebfc/Makefile +--- ELFkickers-3.1.orig/ebfc/Makefile 2014-11-17 14:50:34.000000000 -0500 ++++ ELFkickers-3.1/ebfc/Makefile 2016-11-16 17:13:53.297033908 -0500 +@@ -1,7 +1,7 @@ + # Makefile for ebfc + +-CC = gcc +-CFLAGS = -Wall -Wextra -Wno-missing-field-initializers ++CC ?= gcc ++CFLAGS += -Wno-missing-field-initializers + + ebfc: ebfc.o brainfuck.o libelfparts.a + +diff -Naur ELFkickers-3.1.orig/elfls/Makefile ELFkickers-3.1/elfls/Makefile +--- ELFkickers-3.1.orig/elfls/Makefile 2011-05-31 02:53:05.000000000 -0400 ++++ ELFkickers-3.1/elfls/Makefile 2016-11-16 17:12:48.885032137 -0500 +@@ -1,7 +1,7 @@ + # Makefile for elfls + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw ++CC ?= gcc ++CFLAGS += -I../elfrw + + elfls: elfls.c ../elfrw/libelfrw.a + +diff -Naur ELFkickers-3.1.orig/elfrw/Makefile ELFkickers-3.1/elfrw/Makefile +--- ELFkickers-3.1.orig/elfrw/Makefile 2011-05-22 14:02:12.000000000 -0400 ++++ ELFkickers-3.1/elfrw/Makefile 2016-11-16 17:13:06.653032625 -0500 +@@ -1,7 +1,6 @@ + # Makefile for libelfrw.a + +-CC = gcc +-CFLAGS = -Wall -Wextra -O3 ++CC ?= gcc + + LIBOBJS = elfrw.o elfrw_dyn.o elfrw_ehdr.o elfrw_phdr.o elfrw_rel.o \ + elfrw_shdr.o elfrw_sym.o elfrw_ver.o +diff -Naur ELFkickers-3.1.orig/elftoc/Makefile ELFkickers-3.1/elftoc/Makefile +--- ELFkickers-3.1.orig/elftoc/Makefile 2011-05-23 23:30:22.000000000 -0400 ++++ ELFkickers-3.1/elftoc/Makefile 2016-11-16 17:12:57.549032375 -0500 +@@ -1,8 +1,6 @@ + # Makefile for elftoc + +-CC = gcc +-CFLAGS = -Wall -Wextra +-LDFLAGS = -Wall -Wextra ++CC ?= gcc + + OBJS = gen.o names.o address.o readelf.o shdrtab.o phdrtab.o dynamic.o \ + pieces.o outbase.o outitems.o outelf64.o outelf32.o out.o elftoc.o +diff -Naur ELFkickers-3.1.orig/infect/Makefile ELFkickers-3.1/infect/Makefile +--- ELFkickers-3.1.orig/infect/Makefile 2011-05-31 02:52:27.000000000 -0400 ++++ ELFkickers-3.1/infect/Makefile 2016-11-16 17:12:30.617031634 -0500 +@@ -1,7 +1,6 @@ + # Makefile for infect + +-CC = gcc +-CFLAGS = -Wall -Wextra ++CC ?= gcc + + infect: infect.c + +diff -Naur ELFkickers-3.1.orig/objres/Makefile ELFkickers-3.1/objres/Makefile +--- ELFkickers-3.1.orig/objres/Makefile 2016-11-14 16:46:24.000000000 -0500 ++++ ELFkickers-3.1/objres/Makefile 2016-11-16 17:13:40.225033549 -0500 +@@ -1,8 +1,7 @@ + # Makefile for objres + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw +-LDFLAGS = -Wall -Wextra ++CC ?= gcc ++CFLAGS += -I../elfrw + + objres: objres.o ../elfrw/libelfrw.a + +diff -Naur ELFkickers-3.1.orig/rebind/Makefile ELFkickers-3.1/rebind/Makefile +--- ELFkickers-3.1.orig/rebind/Makefile 2011-05-23 23:29:16.000000000 -0400 ++++ ELFkickers-3.1/rebind/Makefile 2016-11-16 17:13:17.373032920 -0500 +@@ -1,7 +1,7 @@ + # Makefile for rebind + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw ++CC ?= gcc ++CFLAGS += -I../elfrw + + rebind: rebind.c ../elfrw/libelfrw.a + +diff -Naur ELFkickers-3.1.orig/sstrip/Makefile ELFkickers-3.1/sstrip/Makefile +--- ELFkickers-3.1.orig/sstrip/Makefile 2011-05-23 23:29:58.000000000 -0400 ++++ ELFkickers-3.1/sstrip/Makefile 2016-11-16 17:14:05.949034256 -0500 +@@ -1,7 +1,7 @@ + # Makefile for sstrip + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw ++CC ?= gcc ++CFLAGS += -I../elfrw + + sstrip: sstrip.c ../elfrw/libelfrw.a + |