Initial commit. Ebuild by Robin H. Johnson <robbat2@gentoo.org>.
authorRobin H. Johnson <robbat2@gentoo.org>
Tue, 1 Jun 2010 03:12:31 +0000 (03:12 +0000)
committerRobin H. Johnson <robbat2@gentoo.org>
Tue, 1 Jun 2010 03:12:31 +0000 (03:12 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

dev-libs/libmelf/ChangeLog [new file with mode: 0644]
dev-libs/libmelf/Manifest [new file with mode: 0644]
dev-libs/libmelf/files/libmelf-0.4.0-gcc-makefile-cleanup.patch [new file with mode: 0644]
dev-libs/libmelf/libmelf-0.4.0.ebuild [new file with mode: 0644]
dev-libs/libmelf/metadata.xml [new file with mode: 0644]

diff --git a/dev-libs/libmelf/ChangeLog b/dev-libs/libmelf/ChangeLog
new file mode 100644 (file)
index 0000000..ed4ac80
--- /dev/null
@@ -0,0 +1,10 @@
+# ChangeLog for dev-libs/libmelf
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libmelf/ChangeLog,v 1.1 2010/06/01 03:12:31 robbat2 Exp $
+
+*libmelf-0.4.0 (01 Jun 2010)
+
+  01 Jun 2010; Robin H. Johnson <robbat2@gentoo.org> +libmelf-0.4.0.ebuild,
+  +files/libmelf-0.4.0-gcc-makefile-cleanup.patch, +metadata.xml:
+  Initial commit. Ebuild by Robin H. Johnson <robbat2@gentoo.org>.
+
diff --git a/dev-libs/libmelf/Manifest b/dev-libs/libmelf/Manifest
new file mode 100644 (file)
index 0000000..f171e36
--- /dev/null
@@ -0,0 +1,5 @@
+AUX libmelf-0.4.0-gcc-makefile-cleanup.patch 4085 RMD160 163a68e22bc5d1c649ec46c2f57117b00db2a00a SHA1 f0ba54cee9e147fb1d0a8afef6bd455d6479aeb2 SHA256 2637cafa324ca673a54104cfdb78524e286739290532b648103084666f673416
+DIST libmelf-0.4.0.tar.gz 163173 RMD160 0d46a5e456196a33c14feb3c33724aadfb756407 SHA1 4d8857249e92da3d09b29aef272b132f32adde69 SHA256 f0820cec3b4338b4441743fc74d183fd28ad4e405e90d99c1dc01cf787ff0246
+EBUILD libmelf-0.4.0.ebuild 913 RMD160 7cbbd2692530fec800755d1664a7844388f2e183 SHA1 fbcd2734e709c8bfbe7194e44459235c5fa20270 SHA256 098597a58f1b3a9109b1870d8a73ad646e5771af57ca7456978088e01c00fbf4
+MISC ChangeLog 446 RMD160 8153ee51a53185918d49db84f2477014bd46a70f SHA1 1f6a0f7439fd3e2fea7f48b2a8e1d87b71478c1a SHA256 01e43453b28c12da13fdcdf508ba9cfda4c515c2780834090c51663af1e87378
+MISC metadata.xml 279 RMD160 f84566b5a463b59cc5ddd8a2210a54de9492ed2f SHA1 98caf044b8fce3f5ff202c7f7b71f0dcb9d51947 SHA256 785db7b7f8e4f9a526dc574ce2aa10024cc83af170f38ec9af9f56c23fc15543
diff --git a/dev-libs/libmelf/files/libmelf-0.4.0-gcc-makefile-cleanup.patch b/dev-libs/libmelf/files/libmelf-0.4.0-gcc-makefile-cleanup.patch
new file mode 100644 (file)
index 0000000..a31f5ef
--- /dev/null
@@ -0,0 +1,129 @@
+diff -Nuar --exclude '*~' libmelf-0.4.0.orig/example/Makefile.in libmelf-0.4.0/example/Makefile.in
+--- libmelf-0.4.0.orig/example/Makefile.in     2003-03-24 00:48:22.000000000 -0800
++++ libmelf-0.4.0/example/Makefile.in  2010-05-31 19:56:43.546947560 -0700
+@@ -1,7 +1,13 @@
+ cc=@CC@
+ DEFINES=@DEFINES@
++OPTFLAGS=-Wall -O3
++CFLAGS=${DEFINES} ${OPTFLAGS} -I..
++BINS = sign test new
+ 
+-all:
+-      ${CC} ${DEFINES} -I.. -Wall -O3 sign.c -o sign ../libmelf.a
+-      ${CC} ${DEFINES} -I.. -Wall -O3 test.c -o test ../libmelf.a
+-      ${CC} ${DEFINES} -I.. -Wall -O3 new.c -o new ../libmelf.a
++%: %.c
++      ${CC} $(CFLAGS) $^ -o $@ -L.. -lmelf
++
++all: sign test new
++
++clean:
++      -rm -f $(BINS)
+diff -Nuar --exclude '*~' libmelf-0.4.0.orig/Makefile.in libmelf-0.4.0/Makefile.in
+--- libmelf-0.4.0.orig/Makefile.in     2003-11-07 22:09:10.000000000 -0800
++++ libmelf-0.4.0/Makefile.in  2010-05-31 19:58:12.172822406 -0700
+@@ -6,35 +6,43 @@
+ DEFINES=@DEFINES@ -DMELF_COMP
+ INCLUDES=-I.
+ PREFIX=@PREFIX@
+-CFLAGS=${DEBUG} ${DEFINES} ${INCLUDES} -Wall -O3
+-LFLAGS=${DEBUG} ${DEFINES} ${INCLUDES} -Wall -O3 -o
++OPTFLAGS=-Wall -O3
++CFLAGS=${DEBUG} ${DEFINES} ${INCLUDES} ${OPTFLAGS}
++LFLAGS=${DEBUG} ${DEFINES} ${INCLUDES} ${OPTFLAGS} -o
++LIBDIR=lib
+ LIBS=
+ OBJS=melf.o melf_dynamic.o melf_elf.o melf_list.o melf_note.o melf_program.o melf_reloc.o \
+         melf_res.o melf_section.o melf_string.o melf_symbol.o melf_symbolTable.o
+ 
+-all: ${OBJS}
+-      ar rc ${STATICBIN} ${OBJS} && ranlib ${STATICBIN}
+-      @SHAREDEXEC@
+-      cd example && make
+-      cd tools && make
++all: ${STATICBIN} ${DYNAMICBIN}
++      cd example && $(MAKE)
++      cd tools && $(MAKE)
+ 
+ *.c.${O}:
+       ${CC} ${CFLAGS} $*.c
+ 
++${STATICBIN}: ${OBJS}
++      ar rc ${STATICBIN} ${OBJS} && ranlib ${STATICBIN}
++${DYNAMICBIN}: ${OBJS}
++      @SHAREDEXEC@
++
+ clean:
+       rm -f *.o ${STATICBIN} ${DYNAMICBIN} example/test example/new example/sign tools/elfres config.*
+-      cd tools && make clean
++      cd tools && $(MAKE) clean
+ 
+-distclean:
+-      make clean
++distclean: clean
+       rm -f Makefile example/Makefile stdelf.h
+-      cd tools && make distclean
++      cd tools && $(MAKE) distclean
+ 
+ install: ${OBJS} ${STATICBIN}
+-      cp libmelf.a ${PREFIX}/lib
+-      cp libmelf.so ${PREFIX}/lib
++      cp ${STATICBIN} ${PREFIX}/$(LIBDIR)
++      cp ${DYNAMICBIN} ${PREFIX}/$(LIBDIR)
+       cp melf.h ${PREFIX}/include
+       cp stdelf.h ${PREFIX}/include
+ 
+ uninstall:
+-      rm -f ${PREFIX}/lib/libmelf.a ${PREFIX}/lib/libmelf.so ${PREFIX}/include/melf.h ${PREFIX}/include/stdelf.h
++      -rm -f \
++              ${PREFIX}/$(LIBDIR)/${STATICBIN} \
++              ${PREFIX}/$(LIBDIR)/${DYNAMICBIN} \
++              ${PREFIX}/include/melf.h \
++              ${PREFIX}/include/stdelf.h
+diff -Nuar --exclude '*~' libmelf-0.4.0.orig/melf_dynamic.c libmelf-0.4.0/melf_dynamic.c
+--- libmelf-0.4.0.orig/melf_dynamic.c  2004-01-08 23:25:32.000000000 -0800
++++ libmelf-0.4.0/melf_dynamic.c       2010-05-31 19:35:59.230823053 -0700
+@@ -227,7 +227,7 @@
+               return NULL;
+ 
+       dynamic->content        = (void *)base;
+-      (unsigned char *)base  += dynamic->contentLength;
++      /*(unsigned char *)*/ base  += dynamic->contentLength;
+       dynamic->contentLength  = newLength;
+ 
+       base->d_tag      = DT_NULL;
+diff -Nuar --exclude '*~' libmelf-0.4.0.orig/melf_note.c libmelf-0.4.0/melf_note.c
+--- libmelf-0.4.0.orig/melf_note.c     2004-01-08 23:25:56.000000000 -0800
++++ libmelf-0.4.0/melf_note.c  2010-05-31 19:36:11.535947632 -0700
+@@ -205,7 +205,7 @@
+               return NULL;
+ 
+       note->content          = (void *)base;
+-      (unsigned char *)base += note->contentLength;
++      /*(unsigned char *)*/ base += note->contentLength;
+       
+       memset(base, 0, newLength - note->contentLength);
+ 
+diff -Nuar --exclude '*~' libmelf-0.4.0.orig/tools/Makefile.in libmelf-0.4.0/tools/Makefile.in
+--- libmelf-0.4.0.orig/tools/Makefile.in       2003-09-17 01:03:49.000000000 -0700
++++ libmelf-0.4.0/tools/Makefile.in    2010-05-31 19:57:55.126198024 -0700
+@@ -1,11 +1,15 @@
+ cc=@CC@
+ DEFINES=@DEFINES@
++CFLAGS=${DEFINES} ${OPTFLAGS} -I..
++BINS=elfres
+ 
+-all:
+-      ${CC} ${DEFINES} -I.. -Wall -O3 elfres.c -o elfres ../libmelf.a
++%: %.c
++      ${CC} $(CFLAGS) $^ -o $@ -L.. -lmelf
++
++all: $(BINS)
+ 
+ clean:
+-      rm -f elfres
++      -rm -f $(BINS)
+ 
+ distclean:    
+-      rm -f elfres Makefile
++      -rm -f $(BINS) Makefile
diff --git a/dev-libs/libmelf/libmelf-0.4.0.ebuild b/dev-libs/libmelf/libmelf-0.4.0.ebuild
new file mode 100644 (file)
index 0000000..a687b3a
--- /dev/null
@@ -0,0 +1,38 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libmelf/libmelf-0.4.0.ebuild,v 1.1 2010/06/01 03:12:31 robbat2 Exp $
+
+EAPI=3
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="libmelf is a library interface for manipulating ELF object files."
+HOMEPAGE="http://www.hick.org/code/skape/libmelf/"
+SRC_URI="http://www.hick.org/code/skape/${PN}/${P}.tar.gz"
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-gcc-makefile-cleanup.patch
+}
+
+src_compile() {
+       append-flags -fPIC
+       emake CC="$(tc-getCC)" OPTFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+       into /usr
+       dobin tools/elfres
+       dolib.a libmelf.a
+       dolib.so libmelf.so
+       insinto /usr/include
+       doins melf.h stdelf.h
+       dodoc ChangeLog README
+       dohtml -r docs/html
+}
diff --git a/dev-libs/libmelf/metadata.xml b/dev-libs/libmelf/metadata.xml
new file mode 100644 (file)
index 0000000..02e945c
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+    <herd>no-herd</herd>
+    <maintainer>
+        <email>robbat2@gentoo.org</email>
+        <name>Robin H. Johnson</name>
+    </maintainer>
+</pkgmetadata>