aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-util/elfsh/Manifest4
-rw-r--r--dev-util/elfsh/elfsh-0.51_beta3.ebuild43
-rw-r--r--dev-util/elfsh/elfsh-0.65_rc1.ebuild59
-rw-r--r--dev-util/elfsh/files/0.51_beta3-gentoo.patch63
-rw-r--r--dev-util/elfsh/files/elfsh-0.51_beta3-glibc210.patch70
5 files changed, 180 insertions, 59 deletions
diff --git a/dev-util/elfsh/Manifest b/dev-util/elfsh/Manifest
index 79fb290..5482bbc 100644
--- a/dev-util/elfsh/Manifest
+++ b/dev-util/elfsh/Manifest
@@ -1,4 +1,8 @@
+AUX 0.51_beta3-gentoo.patch 2027 RMD160 25addaf101cd9442496c33d8349519793870c79b SHA1 c39b5a44776ad56a6774e4d45b3cf37f6c4c5b93 SHA256 7e2ca434936f97c2726ebf5c1bae92f67b4d0f4de7bbfba9719447eb566da32d
+AUX elfsh-0.51_beta3-glibc210.patch 2426 RMD160 84fc6d07bc070dd1aba6e1d5650987d7fba56b62 SHA1 d8320bbb7f9b0634e208a0ef5b58f1185ba3abc9 SHA256 9b6cff64b5448268f761967217cde3fab051b1885c18240888b37a95966fa0d0
+DIST elfsh-0.51b3-portable.tgz 136679 RMD160 278b2c846335d14953b27fa8946763622acb6303 SHA1 d8afc99cb2966710aa4b6a781ad9008bf0baaeb9 SHA256 ecffe100d0da12235cfe464726313491409739493030f3fbdb3a28696b23447f
DIST elfsh-0.65_rc1.zip 444993 RMD160 dd7bd496d1f47230d1f734140df47ae439a92b49 SHA1 ef68515f1a89b137ba44314bee3623a742e8b841 SHA256 740e0bda6c368cbf7ceb6082e038d84c155220666c4edbb8dc8724b83d4feb93
+EBUILD elfsh-0.51_beta3.ebuild 1171 RMD160 792ff71d76cb4d2a2b38aa08219cec01c236710e SHA1 25d60508c926afc4a8047e4384d28b9e6f0c996f SHA256 4675978ee64080dbadd34702f19f92922edeacf058db1092c6813f56c96e3954
EBUILD elfsh-0.65_rc1.ebuild 1432 RMD160 34a5807e907704c248b1ad2fbe79b12d6c9cb7ef SHA1 39e42ef1d21b9aa2c6f0f1b8f1d7d74b0ba2e020 SHA256 def54e688f03c06b029575e26a12376c77b72893f17bc148e6bbd15409c7dcdc
MISC ChangeLog 2630 RMD160 adc830efb4c76b81e15efe283927c958ac72808f SHA1 374b3915f651e628ca1eaaebaaaee3deefd12bfc SHA256 730ed1e37d9ad16a10af40ab9c1430b2db9433a7b566918b29eb45027069d3a9
MISC metadata.xml 599 RMD160 fd154df6138e5e4f5eb6c3ec1d08c31796cf0846 SHA1 04c97591a90e2fabe1aad9c01301a643758a1565 SHA256 83055939faf8fec5a3a709176ed5865ba8870aa4e68df119ae1f6b17f9ed544b
diff --git a/dev-util/elfsh/elfsh-0.51_beta3.ebuild b/dev-util/elfsh/elfsh-0.51_beta3.ebuild
new file mode 100644
index 0000000..32bc8b3
--- /dev/null
+++ b/dev-util/elfsh/elfsh-0.51_beta3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/elfsh/elfsh-0.51_beta3.ebuild,v 1.8 2010/08/10 20:41:20 hwoarang Exp $
+
+inherit eutils toolchain-funcs
+
+MY_PV=${PV/_beta/b}
+S=${WORKDIR}/${PN}-${MY_PV}
+DESCRIPTION="scripting language to modify ELF binaries"
+HOMEPAGE="http://www.eresi-project.org/"
+SRC_URI="mirror://gentoo/elfsh-${MY_PV}-portable.tgz"
+#http://elfsh.segfault.net/files/elfsh-${MY_PV}-portable.tgz
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=">=dev-libs/expat-1.95"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PV}-gentoo.patch
+ epatch "${FILESDIR}"/${P}-glibc210.patch
+ sed -i \
+ -e "s:-g3 -O2:${CFLAGS}:" \
+ -e "s:\$(CC):& \$(CFLAGS) \$(ELDFLGS): "\
+ `find -name Makefile` \
+ || die
+ sed -i -e "s:LIBPATH = \$(PREFIX)/lib:LIBPATH = \$(PREFIX)/$(get_libdir):" Makefile
+
+}
+
+src_compile() {
+ # emacs does not have to be a requirement.
+ emake CC=$(tc-getCC) ETAGS=echo ELDFLGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die "einstall failed"
+}
diff --git a/dev-util/elfsh/elfsh-0.65_rc1.ebuild b/dev-util/elfsh/elfsh-0.65_rc1.ebuild
deleted file mode 100644
index 98b4276..0000000
--- a/dev-util/elfsh/elfsh-0.65_rc1.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/elfsh/elfsh-0.65_rc1.ebuild,v 1.4 2009/05/02 20:29:16 halcy0n Exp $
-
-inherit eutils toolchain-funcs
-
-DESCRIPTION="scripting language to modify ELF binaries"
-HOMEPAGE="http://www.eresi-project.org/"
-SRC_URI="mirror://gentoo/${P}.zip"
-#http://www.eresi-project.org/browser/tags/elfsh_0_65rc1
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS=""
-IUSE="readline"
-
-DEPEND=">=dev-libs/expat-1.95
- readline? ( sys-libs/readline )
- app-arch/unzip
- dev-libs/libhash"
-RDEPEND=""
-
-S="${WORKDIR}/tags/elfsh_0_65rc1"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- sed -i \
- -e 's: -O2 : :g' \
- -e "s: -g3 : ${CFLAGS} :" \
- -e "/^LDFLAGS/s:=:=${LDFLAGS} :" \
- $(find -name Makefile) \
- || die
- chmod +x configure
-}
-
-src_compile() {
- local bits
- touch foo.c && $(tc-getCC) -c foo.c -o foo.o || die
- case $(file foo.o) in
- *64-bit*) bits=64;;
- *32-bit*) bits=32;;
- *) die "unknown bits: $(file foo.o)";;
- esac
- # not an autoconf script
- ./configure \
- $([[ ${bits} == "64" ]] && echo "--enable-m64") \
- --enable-${bits} \
- $(use_enable readline) \
- || die
- # emacs does not have to be a requirement.
- emake ETAGS=echo || die "emake failed"
-}
-
-src_install() {
- make install DESTDIR="${D}" || die "install failed"
- dodoc README.FIRST doc/AUTHOR doc/CREDITS doc/Changelog doc/*.txt
- doman doc/*.1
-}
diff --git a/dev-util/elfsh/files/0.51_beta3-gentoo.patch b/dev-util/elfsh/files/0.51_beta3-gentoo.patch
new file mode 100644
index 0000000..26c4f7b
--- /dev/null
+++ b/dev-util/elfsh/files/0.51_beta3-gentoo.patch
@@ -0,0 +1,63 @@
+diff -ur elfsh-0.51b3.orig/Makefile elfsh-0.51b3/Makefile
+--- elfsh-0.51b3.orig/Makefile 2004-09-20 22:20:22.152723392 -0400
++++ elfsh-0.51b3/Makefile 2004-09-20 22:21:37.270303784 -0400
+@@ -5,12 +5,14 @@
+ ## Last update Sun May 25 18:12:43 2003 mayhem
+ ##
+
++DESTDIR = /
++PREFIX = $(DESTDIR)/usr
+ RM = rm -f
+ ETAGS = etags
+-MODPATH = /usr/share/elfsh/
+-BINPATH = /usr/bin
+-LIBPATH = /usr/lib/
+-INCPATH = /usr/include/
++BINPATH = $(PREFIX)/bin
++LIBPATH = $(PREFIX)/lib
++INCPATH = $(PREFIX)/include
++MODPATH = $(LIBPATH)/elfsh
+
+ all :
+ @echo 'Builting libelfsh...'
+@@ -32,14 +34,15 @@
+ #$(MAKE) -s tags
+
+ install : mod_install
++ @mkdir -p $(BINPATH) $(LIBPATH) $(INCPATH)
+ @cp vm/elfsh $(BINPATH)/
+ @cp libelfsh/libelfsh.a libelfsh/libelfsh.so $(LIBPATH)
+ @cp libelfsh/include/libelfsh*.h $(INCPATH)
+- @chmod 755 $(BINPATH)/elfsh $(LIBPATH)libelfsh.so $(LIBPATH)libelfsh.a $(INCPATH)libelfsh*.h
++ @chmod 755 $(BINPATH)/elfsh $(LIBPATH)/libelfsh.so
+ @echo 'ELFsh and Libelfsh installed successfully .'
+
+ mod_install:
+- @mkdir $(MODPATH) 2>/dev/null || true
++ @mkdir -p $(MODPATH)
+ @cp modules/*.so $(MODPATH)
+ @chmod -R 755 $(MODPATH)
+
+diff -ur elfsh-0.51b3.orig/vm/Makefile elfsh-0.51b3/vm/Makefile
+--- elfsh-0.51b3.orig/vm/Makefile 2004-09-20 22:20:22.117728712 -0400
++++ elfsh-0.51b3/vm/Makefile 2004-09-20 22:22:17.807141248 -0400
+@@ -13,6 +13,7 @@
+ #DLOPT_linux-gnu = -ldl
+ #DLOPT_solaris = -ldl
+ #EXTRAOPT = -lefence
++EXTRAOPT = -ldl
+
+ # Uncomment that to use libasm
+ #ASMOPT = -DUSE_LIBASM
+diff -ur elfsh-0.51b3.orig/vm/include/elfsh.h elfsh-0.51b3/vm/include/elfsh.h
+--- elfsh-0.51b3.orig/vm/include/elfsh.h 2004-09-20 22:20:22.116728864 -0400
++++ elfsh-0.51b3/vm/include/elfsh.h 2004-09-20 22:20:22.358692080 -0400
+@@ -94,7 +94,7 @@
+ #define ELFSH_SHELL "/bin/bash"
+ #define ELFSH_INIT "elfsh_init"
+ #define ELFSH_FINI "elfsh_fini"
+-#define ELFSH_MODPATH "/usr/share/elfsh/"
++#define ELFSH_MODPATH "/usr/lib/elfsh/"
+
+ /* For elfsh/elfsh/disasm.c:display_object() */
+ #define ELFSH_HEXA_VIEW 0
diff --git a/dev-util/elfsh/files/elfsh-0.51_beta3-glibc210.patch b/dev-util/elfsh/files/elfsh-0.51_beta3-glibc210.patch
new file mode 100644
index 0000000..2e83c93
--- /dev/null
+++ b/dev-util/elfsh/files/elfsh-0.51_beta3-glibc210.patch
@@ -0,0 +1,70 @@
+diff -NrU5 elfsh-0.51b3.original/modules/modgraph.c elfsh-0.51b3/modules/modgraph.c
+--- elfsh-0.51b3.original/modules/modgraph.c 2009-07-22 23:17:51.000000000 -0600
++++ elfsh-0.51b3/modules/modgraph.c 2009-07-22 23:33:28.000000000 -0600
+@@ -181,11 +181,11 @@
+ }
+ }
+ else
+ {
+ name = elfsh_reverse_metasym(world.current, blk->vaddr, &off);
+- dprintf(fd, "%s_%08x", name, off);
++ d_printf(fd, "%s_%08x", name, off);
+
+ }
+ free(buffer);
+ world.state.vm_quiet = vm_quiet;
+ }
+diff -NrU5 elfsh-0.51b3.original/vm/disasm.c elfsh-0.51b3/vm/disasm.c
+--- elfsh-0.51b3.original/vm/disasm.c 2009-07-22 23:17:51.000000000 -0600
++++ elfsh-0.51b3/vm/disasm.c 2009-07-22 23:33:53.000000000 -0600
+@@ -80,30 +80,30 @@
+
+ /* Are we in quiet mode ? */
+ if (world.state.vm_quiet)
+ {
+ snprintf(buf, sizeof(buf), " %08X %s + %u", vaddr + index, name, nindex);
+- dprintf(fd, "%-40s %-30s ", buf, s);
++ d_printf(fd, "%-40s %-30s ", buf, s);
+ }
+ else
+ {
+ snprintf(buf, sizeof(buf), " %08X [foff: %u] %s + %u",
+ vaddr + index, foffset + index, name, nindex);
+- dprintf(fd, "%-60s %-50s ", buf, s);
++ d_printf(fd, "%-60s %-50s ", buf, s);
+ }
+
+ /* Print bytes in hexa for this instruction */
+ ret = asm_instr_len(&ptr);
+ if (!ret)
+ ret++;
+
+ if (!world.state.vm_quiet)
+ for (idx_bytes = 0; idx_bytes < ret; idx_bytes++)
+- dprintf(fd, "%c%c ",
++ d_printf(fd, "%c%c ",
+ base[(buff[index + idx_bytes] >> 4) & 0x0F],
+ base[buff[index + idx_bytes] & 0x0F]);
+- dprintf(fd, "\n");
++ d_printf(fd, "\n");
+ return (ret);
+ }
+ #endif /* USE_LIBASM */
+
+
+diff -NrU5 elfsh-0.51b3.original/vm/include/elfsh.h elfsh-0.51b3/vm/include/elfsh.h
+--- elfsh-0.51b3.original/vm/include/elfsh.h 2009-07-22 23:17:51.000000000 -0600
++++ elfsh-0.51b3/vm/include/elfsh.h 2009-07-22 23:22:30.000000000 -0600
+@@ -469,11 +469,11 @@
+ int vm_getsort(u_int index, u_int argc, char **argv);
+ int vm_getdisasm(u_int index, u_int argc, char **argv);
+ int vm_gethexa(u_int index, u_int argc, char **argv);
+ int vm_getvarparams(u_int index, u_int argc, char **argv);
+
+-int dprintf(int fd, char *format, ...);
++int d_printf(int fd, char *format, ...);
+
+ /* Libasm resolve handler */
+ void do_resolve(void *data, u_int vaddr, char *, u_int);
+ u_int display_instr(int, u_int, u_int, u_int, u_int,
+ char *, u_int, char *);