From 06e55223adce7eddc906d449962612b626b6c782 Mon Sep 17 00:00:00 2001 From: charIes17 Date: Tue, 26 Dec 2017 11:23:42 +0100 Subject: dev-libs/libmelf: Bump to EAPI=6 Closes: https://bugs.gentoo.org/642280 Package-Manager: Portage-2.3.13, Repoman-2.3.3 Closes: https://github.com/gentoo/gentoo/pull/6641 --- .../libmelf-0.4.0-r1-gcc-makefile-cleanup.patch | 86 +++++++--------------- dev-libs/libmelf/libmelf-0.4.0-r1.ebuild | 42 +++++++---- 2 files changed, 56 insertions(+), 72 deletions(-) (limited to 'dev-libs/libmelf') diff --git a/dev-libs/libmelf/files/libmelf-0.4.0-r1-gcc-makefile-cleanup.patch b/dev-libs/libmelf/files/libmelf-0.4.0-r1-gcc-makefile-cleanup.patch index 384818f57630..10bda2a476a8 100644 --- a/dev-libs/libmelf/files/libmelf-0.4.0-r1-gcc-makefile-cleanup.patch +++ b/dev-libs/libmelf/files/libmelf-0.4.0-r1-gcc-makefile-cleanup.patch @@ -1,11 +1,9 @@ -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@ +--- a/example/Makefile.in ++++ b/example/Makefile.in +@@ -1,7 +1,11 @@ +-cc=@CC@ DEFINES=@DEFINES@ -+OPTFLAGS=-Wall -O3 -+CFLAGS=${DEFINES} ${OPTFLAGS} -I.. ++CFLAGS=$(DEFINES) $(OPTFLAGS) -I.. +BINS = sign test new -all: @@ -13,25 +11,27 @@ diff -Nuar --exclude '*~' libmelf-0.4.0.orig/example/Makefile.in libmelf-0.4.0/e - ${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 ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $^ -o $@ -L.. -lmelf + +all: $(BINS) + +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 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -1,25 +1,23 @@ +-CC=gcc +- + STATICBIN=libmelf.a + DYNAMICBIN=libmelf.so + DEBUG= DEFINES=@DEFINES@ -DMELF_COMP INCLUDES=-I. PREFIX=@PREFIX@ -CFLAGS=${DEBUG} ${DEFINES} ${INCLUDES} -Wall -O3 -fPIC -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 @@ -42,64 +42,32 @@ diff -Nuar --exclude '*~' libmelf-0.4.0.orig/Makefile.in libmelf-0.4.0/Makefile. - cd example && make - cd tools && make +all: ${STATICBIN} ${DYNAMICBIN} -+ cd example && $(MAKE) -+ cd tools && $(MAKE) - - *.c.${O}: - ${CC} ${CFLAGS} $*.c ++ $(MAKE) -C example ++ $(MAKE) -C tools +-*.c.${O}: +- ${CC} ${CFLAGS} $*.c +${STATICBIN}: ${OBJS} -+ ar rc ${STATICBIN} ${OBJS} && ranlib ${STATICBIN} ++ $(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/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@ +--- a/tools/Makefile.in ++++ b/tools/Makefile.in +@@ -1,8 +1,11 @@ +-cc=@CC@ DEFINES=@DEFINES@ -+CFLAGS=${DEFINES} ${OPTFLAGS} -I.. ++CFLAGS=$(DEFINES) $(OPTFLAGS) -I.. +BINS=elfres -all: - ${CC} ${DEFINES} -I.. -Wall -O3 elfres.c -o elfres ../libmelf.a +%: %.c -+ ${CC} $(CFLAGS) $^ -o $@ -L.. -lmelf ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $^ -o $@ -L.. -lmelf + +all: $(BINS) clean: -- rm -f elfres -+ -rm -f $(BINS) - - distclean: -- rm -f elfres Makefile -+ -rm -f $(BINS) Makefile + rm -f elfres diff --git a/dev-libs/libmelf/libmelf-0.4.0-r1.ebuild b/dev-libs/libmelf/libmelf-0.4.0-r1.ebuild index ecc5ecc76d3a..be54175c6c62 100644 --- a/dev-libs/libmelf/libmelf-0.4.0-r1.ebuild +++ b/dev-libs/libmelf/libmelf-0.4.0-r1.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=3 -inherit eutils flag-o-matic toolchain-funcs +EAPI=6 + +inherit flag-o-matic toolchain-funcs DESCRIPTION="libmelf is a library interface for manipulating ELF object files" HOMEPAGE="http://www.hick.org/code/skape/libmelf/" @@ -11,30 +12,45 @@ SRC_URI="http://www.hick.org/code/skape/${PN}/${P}.tar.gz" LICENSE="Artistic" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="static-libs" DEPEND="" RDEPEND="${DEPEND}" -src_prepare() { +PATCHES=( # This patch was gained from the elfsign-0.2.2 release - epatch "${FILESDIR}"/${PN}-0.4.1-unfinal-release.patch + "${FILESDIR}"/${PN}-0.4.1-unfinal-release.patch # Cleanup stuff - epatch "${FILESDIR}"/${PN}-0.4.0-r1-gcc-makefile-cleanup.patch + "${FILESDIR}"/${PN}-0.4.0-r1-gcc-makefile-cleanup.patch +) + +src_prepare() { + default + + # * QA Notice: The following shared libraries lack a SONAME + # * /usr/lib64/libmelf.so + sed 's/\(-shared -fPIC\)/\1 -Wl,-soname,libmelf.so/' -i configure || die } -src_compile() { +src_configure() { + tc-export CC AR RANLIB append-flags -fPIC - emake CC="$(tc-getCC)" OPTFLAGS="${CFLAGS}" || die "emake failed" + default +} + +src_compile() { + emake OPTFLAGS="${CFLAGS}" } src_install() { - into /usr dobin tools/elfres - dolib.a libmelf.a + dolib.so libmelf.so + use static-libs && dolib.a libmelf.a + insinto /usr/include doins melf.h stdelf.h - dodoc ChangeLog README - dohtml -r docs/html + + HTML_DOCS=( docs/html/. ) + einstalldocs } -- cgit v1.2.3-65-gdbad