Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-embedded/dc-tool-ip/, dev-embedded/dc-tool-ip/files/
Date: Wed, 16 Sep 2020 14:28:46
Message-Id: 1600266499.b452252b4726733b0b997a9d31b95e18bd6b71c2.soap@gentoo
1 commit: b452252b4726733b0b997a9d31b95e18bd6b71c2
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 16 14:28:19 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 16 14:28:19 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b452252b
7
8 dev-embedded/dc-tool-ip: Port to EAPI 7
9
10 Closes: https://bugs.gentoo.org/722592
11 Closes: https://bugs.gentoo.org/742173
12 Package-Manager: Portage-3.0.7, Repoman-3.0.1
13 Signed-off-by: David Seifert <soap <AT> gentoo.org>
14
15 dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild | 35 +++++++++--------
16 ...ate.patch => dc-tool-ip-1.0.4-bfd-update.patch} | 4 +-
17 .../files/dc-tool-ip-1.0.4-makefile.patch | 45 ++++++++++++++++++++++
18 3 files changed, 65 insertions(+), 19 deletions(-)
19
20 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
21 index fc9a8492d5e..ff03cd02455 100644
22 --- a/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild
23 +++ b/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild
24 @@ -1,11 +1,11 @@
25 -# Copyright 1999-2013 Gentoo Foundation
26 +# Copyright 1999-2020 Gentoo Authors
27 # Distributed under the terms of the GNU General Public License v2
28
29 -EAPI="4"
30 +EAPI=7
31
32 -inherit eutils flag-o-matic toolchain-funcs
33 +inherit flag-o-matic toolchain-funcs
34
35 -DESCRIPTION="ethernet program loader for the Dreamcast"
36 +DESCRIPTION="Ethernet program loader for the Dreamcast"
37 HOMEPAGE="http://cadcdev.sourceforge.net/"
38 SRC_URI="mirror://sourceforge/cadcdev/dcload-ip-${PV}-src.tar.gz"
39
40 @@ -14,18 +14,20 @@ SLOT="0"
41 KEYWORDS="amd64 x86"
42 IUSE="doc"
43
44 -S=${WORKDIR}/dcload-ip-${PV}
45 +RDEPEND="sys-libs/binutils-libs"
46 +DEPEND="${RDEPEND}"
47
48 -src_prepare() {
49 - epatch "${FILESDIR}"/${PV}-bfd-update.patch
50 - epatch "${FILESDIR}"/${P}-headers.patch
51 +S="${WORKDIR}/dcload-ip-${PV}"
52 +
53 +PATCHES=(
54 + "${FILESDIR}"/${P}-bfd-update.patch
55 + "${FILESDIR}"/${P}-headers.patch
56 + "${FILESDIR}"/${P}-makefile.patch
57 +)
58 +
59 +src_configure() {
60 + tc-export CC
61 append-cppflags -DPACKAGE -DPACKAGE_VERSION #465952
62 - sed -i \
63 - -e "/^HOSTCC/s:gcc:$(tc-getCC):" \
64 - -e "/^HOSTCFLAGS/s:-O2:${CFLAGS} ${CPPFLAGS}:" \
65 - -e 's:-L/usr/local/dcdev/lib:$(LDFLAGS):' \
66 - -e 's:/usr/local/dcdev/include:.:' \
67 - Makefile.cfg || die "sed"
68 }
69
70 src_compile() {
71 @@ -34,9 +36,8 @@ src_compile() {
72
73 src_install() {
74 dobin host-src/tool/dc-tool
75 +
76 dodoc README NETWORK CHANGES
77 dodoc -r make-cd
78 - if use doc ; then
79 - dodoc -r example-src
80 - fi
81 + use doc && dodoc -r example-src
82 }
83
84 diff --git a/dev-embedded/dc-tool-ip/files/1.0.4-bfd-update.patch b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-bfd-update.patch
85 similarity index 85%
86 rename from dev-embedded/dc-tool-ip/files/1.0.4-bfd-update.patch
87 rename to dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-bfd-update.patch
88 index 62da02f12e9..2b3b32d7e3f 100644
89 --- a/dev-embedded/dc-tool-ip/files/1.0.4-bfd-update.patch
90 +++ b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-bfd-update.patch
91 @@ -1,5 +1,5 @@
92 ---- host-src/tool/dc-tool.c.orig 2004-11-13 19:38:50.007151024 -0500
93 -+++ host-src/tool/dc-tool.c 2004-11-13 19:38:58.320887144 -0500
94 +--- a/host-src/tool/dc-tool.c
95 ++++ b/host-src/tool/dc-tool.c
96 @@ -431,13 +431,13 @@
97 if ((section->flags & SEC_HAS_CONTENTS) && (section->flags & SEC_LOAD)) {
98 printf("Section %s, ",section->name);
99
100 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
101 new file mode 100644
102 index 00000000000..ae902dcc2a6
103 --- /dev/null
104 +++ b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-makefile.patch
105 @@ -0,0 +1,45 @@
106 +--- a/host-src/tool/Makefile
107 ++++ b/host-src/tool/Makefile
108 +@@ -1,18 +1,13 @@
109 + include ../../Makefile.cfg
110 +
111 +-CC = $(HOSTCC)
112 +-CFLAGS = $(HOSTCFLAGS) -DDREAMCAST_IP=\"$(DREAMCAST_IP)\" -DHAVE_GETOPT
113 +-INCLUDE = -I$(BFDINCLUDE)
114 ++CPPFLAGS += -DDREAMCAST_IP=\"$(DREAMCAST_IP)\" -DHAVE_GETOPT
115 +
116 + OBJECTS = dc-tool.o syscalls.o
117 +
118 +-.c.o:
119 +- $(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $<
120 +-
121 + all: dc-tool
122 +
123 + dc-tool: $(OBJECTS)
124 +- $(CC) -o $@ $(OBJECTS) $(BFDLIB)
125 ++ $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(BFDLIB)
126 +
127 + .PHONY : install
128 + install: dc-tool
129 +--- a/Makefile.cfg
130 ++++ b/Makefile.cfg
131 +@@ -8,8 +8,8 @@
132 + # the ones in your system
133 +
134 + # these must point to your sh-elf bfd, not the system one
135 +-BFDLIB = -L/usr/local/dcdev/lib -lbfd -liberty
136 +-BFDINCLUDE = /usr/local/dcdev/include
137 ++BFDLIB = -lbfd -liberty
138 ++BFDINCLUDE =
139 +
140 + # cygwin
141 + # these must point to your sh-elf bfd, not the system one
142 +@@ -24,7 +24,7 @@
143 +
144 + # you generally shouldn't change this unless you are making forked
145 + # versions (or test versions)
146 +-VERFLAGS = -DDCLOAD_VERSION=\"1.0.4\"
147 ++CPPFLAGS += -DDCLOAD_VERSION=\"1.0.4\"
148 + TARGETCFLAGS += $(VERFLAGS)
149 + HOSTCFLAGS += $(VERFLAGS)
150 +