mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
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 <soap@gentoo.org>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- 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
|
||||
--- 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);
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user