From b452252b4726733b0b997a9d31b95e18bd6b71c2 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Wed, 16 Sep 2020 16:28:19 +0200 Subject: dev-embedded/dc-tool-ip: Port to EAPI 7 Closes: https://bugs.gentoo.org/722592 Closes: https://bugs.gentoo.org/742173 Package-Manager: Portage-3.0.7, Repoman-3.0.1 Signed-off-by: David Seifert --- dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild | 35 +++++++++-------- .../dc-tool-ip/files/1.0.4-bfd-update.patch | 22 ----------- .../files/dc-tool-ip-1.0.4-bfd-update.patch | 22 +++++++++++ .../files/dc-tool-ip-1.0.4-makefile.patch | 45 ++++++++++++++++++++++ 4 files changed, 85 insertions(+), 39 deletions(-) delete mode 100644 dev-embedded/dc-tool-ip/files/1.0.4-bfd-update.patch create mode 100644 dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-bfd-update.patch create mode 100644 dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-makefile.patch (limited to 'dev-embedded/dc-tool-ip') diff --git a/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild b/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild index fc9a8492d5ea..ff03cd024553 100644 --- a/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild +++ b/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="4" +EAPI=7 -inherit eutils flag-o-matic toolchain-funcs +inherit flag-o-matic toolchain-funcs -DESCRIPTION="ethernet program loader for the Dreamcast" +DESCRIPTION="Ethernet program loader for the Dreamcast" HOMEPAGE="http://cadcdev.sourceforge.net/" SRC_URI="mirror://sourceforge/cadcdev/dcload-ip-${PV}-src.tar.gz" @@ -14,18 +14,20 @@ SLOT="0" KEYWORDS="amd64 x86" IUSE="doc" -S=${WORKDIR}/dcload-ip-${PV} +RDEPEND="sys-libs/binutils-libs" +DEPEND="${RDEPEND}" -src_prepare() { - epatch "${FILESDIR}"/${PV}-bfd-update.patch - epatch "${FILESDIR}"/${P}-headers.patch +S="${WORKDIR}/dcload-ip-${PV}" + +PATCHES=( + "${FILESDIR}"/${P}-bfd-update.patch + "${FILESDIR}"/${P}-headers.patch + "${FILESDIR}"/${P}-makefile.patch +) + +src_configure() { + tc-export CC append-cppflags -DPACKAGE -DPACKAGE_VERSION #465952 - sed -i \ - -e "/^HOSTCC/s:gcc:$(tc-getCC):" \ - -e "/^HOSTCFLAGS/s:-O2:${CFLAGS} ${CPPFLAGS}:" \ - -e 's:-L/usr/local/dcdev/lib:$(LDFLAGS):' \ - -e 's:/usr/local/dcdev/include:.:' \ - Makefile.cfg || die "sed" } src_compile() { @@ -34,9 +36,8 @@ src_compile() { src_install() { dobin host-src/tool/dc-tool + dodoc README NETWORK CHANGES dodoc -r make-cd - if use doc ; then - dodoc -r example-src - fi + use doc && dodoc -r example-src } diff --git a/dev-embedded/dc-tool-ip/files/1.0.4-bfd-update.patch b/dev-embedded/dc-tool-ip/files/1.0.4-bfd-update.patch deleted file mode 100644 index 62da02f12e98..000000000000 --- a/dev-embedded/dc-tool-ip/files/1.0.4-bfd-update.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- host-src/tool/dc-tool.c.orig 2004-11-13 19:38:50.007151024 -0500 -+++ host-src/tool/dc-tool.c 2004-11-13 19:38:58.320887144 -0500 -@@ -431,13 +431,13 @@ - if ((section->flags & SEC_HAS_CONTENTS) && (section->flags & SEC_LOAD)) { - printf("Section %s, ",section->name); - printf("lma 0x%x, ",section->lma); -- printf("size %d\n",section->_raw_size); -- if (section->_raw_size) { -- size += section->_raw_size; -- inbuf = malloc(section->_raw_size); -- bfd_get_section_contents(somebfd, section, inbuf, 0, section->_raw_size); -+ printf("size %d\n",section->rawsize); -+ if (section->rawsize) { -+ size += section->rawsize; -+ inbuf = malloc(section->rawsize); -+ bfd_get_section_contents(somebfd, section, inbuf, 0, section->rawsize); - -- send_data(inbuf, section->lma, section->_raw_size); -+ send_data(inbuf, section->lma, section->rawsize); - - free(inbuf); - } diff --git a/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-bfd-update.patch b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-bfd-update.patch new file mode 100644 index 000000000000..2b3b32d7e3f4 --- /dev/null +++ b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-bfd-update.patch @@ -0,0 +1,22 @@ +--- a/host-src/tool/dc-tool.c ++++ b/host-src/tool/dc-tool.c +@@ -431,13 +431,13 @@ + if ((section->flags & SEC_HAS_CONTENTS) && (section->flags & SEC_LOAD)) { + printf("Section %s, ",section->name); + printf("lma 0x%x, ",section->lma); +- printf("size %d\n",section->_raw_size); +- if (section->_raw_size) { +- size += section->_raw_size; +- inbuf = malloc(section->_raw_size); +- bfd_get_section_contents(somebfd, section, inbuf, 0, section->_raw_size); ++ printf("size %d\n",section->rawsize); ++ if (section->rawsize) { ++ size += section->rawsize; ++ inbuf = malloc(section->rawsize); ++ bfd_get_section_contents(somebfd, section, inbuf, 0, section->rawsize); + +- send_data(inbuf, section->lma, section->_raw_size); ++ send_data(inbuf, section->lma, section->rawsize); + + free(inbuf); + } diff --git a/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-makefile.patch b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-makefile.patch new file mode 100644 index 000000000000..ae902dcc2a6b --- /dev/null +++ b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-makefile.patch @@ -0,0 +1,45 @@ +--- a/host-src/tool/Makefile ++++ b/host-src/tool/Makefile +@@ -1,18 +1,13 @@ + include ../../Makefile.cfg + +-CC = $(HOSTCC) +-CFLAGS = $(HOSTCFLAGS) -DDREAMCAST_IP=\"$(DREAMCAST_IP)\" -DHAVE_GETOPT +-INCLUDE = -I$(BFDINCLUDE) ++CPPFLAGS += -DDREAMCAST_IP=\"$(DREAMCAST_IP)\" -DHAVE_GETOPT + + OBJECTS = dc-tool.o syscalls.o + +-.c.o: +- $(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $< +- + all: dc-tool + + dc-tool: $(OBJECTS) +- $(CC) -o $@ $(OBJECTS) $(BFDLIB) ++ $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(BFDLIB) + + .PHONY : install + install: dc-tool +--- a/Makefile.cfg ++++ b/Makefile.cfg +@@ -8,8 +8,8 @@ + # the ones in your system + + # these must point to your sh-elf bfd, not the system one +-BFDLIB = -L/usr/local/dcdev/lib -lbfd -liberty +-BFDINCLUDE = /usr/local/dcdev/include ++BFDLIB = -lbfd -liberty ++BFDINCLUDE = + + # cygwin + # these must point to your sh-elf bfd, not the system one +@@ -24,7 +24,7 @@ + + # you generally shouldn't change this unless you are making forked + # versions (or test versions) +-VERFLAGS = -DDCLOAD_VERSION=\"1.0.4\" ++CPPFLAGS += -DDCLOAD_VERSION=\"1.0.4\" + TARGETCFLAGS += $(VERFLAGS) + HOSTCFLAGS += $(VERFLAGS) + -- cgit v1.2.3-65-gdbad