Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/wit/, games-util/wit/files/
Date: Sat, 03 Oct 2020 22:51:06
Message-Id: 1601765444.48a5b269397a4dfb5c52a1e598c0d568bdfe6a9b.soap@gentoo
1 commit: 48a5b269397a4dfb5c52a1e598c0d568bdfe6a9b
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 3 22:50:44 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 3 22:50:44 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48a5b269
7
8 games-util/wit: Fix -fno-common
9
10 Bug: https://bugs.gentoo.org/742404
11 Closes: https://bugs.gentoo.org/706610
12 Closes: https://bugs.gentoo.org/724706
13 Closes: https://bugs.gentoo.org/739408
14 Package-Manager: Portage-3.0.8, Repoman-3.0.1
15 Signed-off-by: David Seifert <soap <AT> gentoo.org>
16
17 games-util/wit/files/wit-3.02a-fno-common.patch | 11 ++
18 games-util/wit/files/wit-3.02a-makefile.patch | 113 +++++++++++++++++++--
19 ...c-stack.patch => wit-3.02a-no-exec-stack.patch} | 0
20 games-util/wit/wit-3.02a.ebuild | 25 +++--
21 4 files changed, 129 insertions(+), 20 deletions(-)
22
23 diff --git a/games-util/wit/files/wit-3.02a-fno-common.patch b/games-util/wit/files/wit-3.02a-fno-common.patch
24 new file mode 100644
25 index 00000000000..b930213f156
26 --- /dev/null
27 +++ b/games-util/wit/files/wit-3.02a-fno-common.patch
28 @@ -0,0 +1,11 @@
29 +--- a/dclib/dclib-color.h
30 ++++ b/dclib/dclib-color.h
31 +@@ -535,7 +535,7 @@
32 + /////////////// color helpers ///////////////
33 + ///////////////////////////////////////////////////////////////////////////////
34 +
35 +-u32 ColorTab_M0_M15[16]; // first 16 colors of "\e[m"
36 ++extern u32 ColorTab_M0_M15[16]; // first 16 colors of "\e[m"
37 +
38 + // return a m256 index
39 + u8 ConvertColorRGB3ToM256 ( u8 r, u8 g, u8 b );
40
41 diff --git a/games-util/wit/files/wit-3.02a-makefile.patch b/games-util/wit/files/wit-3.02a-makefile.patch
42 index a0dea1405a6..a0172d50f0f 100644
43 --- a/games-util/wit/files/wit-3.02a-makefile.patch
44 +++ b/games-util/wit/files/wit-3.02a-makefile.patch
45 @@ -1,9 +1,21 @@
46 Don't link libdl into wfuse as it's unnecessary, use system bzip2, respect user
47 CFLAGS, use pkgconfig to determine ncurses libs, and use verbose build output.
48
49 ---- wiimms-iso-tools.source-3.02a/Makefile
50 -+++ wiimms-iso-tools.source-3.02a/Makefile
51 -@@ -171,7 +171,7 @@
52 +--- a/Makefile
53 ++++ b/Makefile
54 +@@ -111,11 +111,6 @@
55 + #-------------------------------------------------------------------------------
56 + # compiler settings
57 +
58 +-PRE ?=
59 +-CC = $(PRE)gcc
60 +-CPP = $(PRE)g++
61 +-STRIP = $(PRE)strip
62 +-
63 + #-------------------------------------------------------------------------------
64 + # files
65 +
66 +@@ -171,7 +166,7 @@
67 TOPT_wit := $(OPT_STATIC)
68 TOPT_wwt := $(OPT_STATIC)
69 TOPT_wdf := $(OPT_STATIC)
70 @@ -12,7 +24,7 @@ CFLAGS, use pkgconfig to determine ncurses libs, and use verbose build output.
71
72 #TOPT_ALL := $(TOPT_wit) $(TOPT_wwt) $(TOPT_wdf) $(TOPT_wfuse)
73
74 -@@ -206,8 +206,8 @@
75 +@@ -206,8 +201,8 @@
76 endif
77
78 # lib summary
79 @@ -23,11 +35,12 @@ CFLAGS, use pkgconfig to determine ncurses libs, and use verbose build output.
80 RM_FILES += $(foreach l,$(LIB_LIST),src/$(l)/*.{d,o})
81
82
83 -@@ -297,10 +297,8 @@
84 +@@ -297,10 +292,9 @@
85 DEFINES1 += -D_LZMA_PROB32=1 # LZMA option
86 DEFINES = $(strip $(DEFINES1) $(MODE) $(XDEF))
87
88 -CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -funroll-loops
89 ++CFLAGS += -fno-strict-aliasing
90 CFLAGS += -Wall -Wno-parentheses -Wno-unused-function
91 -#CFLAGS += -O3 -Isrc/libwbfs -Isrc/lzma -Isrc -I$(UI) -I. -Iwork
92 -CFLAGS += -O3 -Isrc/libwbfs -Isrc -I$(UI) -I. -Iwork
93 @@ -35,16 +48,22 @@ CFLAGS, use pkgconfig to determine ncurses libs, and use verbose build output.
94 ifeq ($(SYSTEM),cygwin)
95 CFLAGS += -Wno-format-truncation
96 else ifeq ($(SYSTEM),mac)
97 -@@ -317,7 +315,7 @@
98 +@@ -311,13 +305,10 @@
99 +
100 + DEPFLAGS += -MMD
101 +
102 +-LDFLAGS += -static-libgcc
103 +-LDFLAGS := $(strip $(LDFLAGS))
104 +-
105 ifeq ($(HAVE_ZLIB),1)
106 LIBS += -lz
107 endif
108 -LIBS += -lm -lncurses $(XLIBS)
109 -+LIBS += -lm $(shell pkg-config --libs ncurses) -lbz2 $(XLIBS)
110 ++LIBS += -lm $(shell $(PKG_CONFIG) --libs ncurses) -lbz2 $(XLIBS)
111
112 DISTRIB_RM = ./wit-v$(VERSION)-r
113 DISTRIB_BASE = wit-v$(VERSION)-r$(REVISION_NEXT)
114 -@@ -370,83 +368,70 @@
115 +@@ -370,83 +361,70 @@
116 # general rules
117
118 $(ALL_TOOLS_X): %: %.o $(ALL_OBJECTS) $(TOBJ_ALL) Makefile | $(HELPER_TOOLS)
119 @@ -144,7 +163,7 @@ CFLAGS, use pkgconfig to determine ncurses libs, and use verbose build output.
120
121 #
122 ###############################################################################
123 -@@ -644,9 +629,8 @@
124 +@@ -644,9 +622,8 @@
125
126 .PHONY : gen-doc
127 gen-doc:
128 @@ -156,7 +175,16 @@ CFLAGS, use pkgconfig to determine ncurses libs, and use verbose build output.
129
130 #
131 #--------------------------
132 -@@ -764,8 +748,7 @@
133 +@@ -750,7 +727,7 @@
134 +
135 + .PHONY : predef
136 + predef:
137 +- @gcc -E -dM none.c | sort
138 ++ @$(CC) -E -dM none.c | sort
139 +
140 + #
141 + #--------------------------
142 +@@ -764,8 +741,7 @@
143 #--------------------------
144
145 templates.sed: Makefile
146 @@ -166,7 +194,7 @@ CFLAGS, use pkgconfig to determine ncurses libs, and use verbose build output.
147 '/^~/ d;\n' \
148 's|@.@@@|$(VERSION_NUM)|g;\n' \
149 's|@@@@-@@-@@|$(DATE)|g;\n' \
150 -@@ -828,13 +811,12 @@
151 +@@ -828,13 +804,12 @@
152
153 .PHONY : test
154 test:
155 @@ -185,3 +213,66 @@ CFLAGS, use pkgconfig to determine ncurses libs, and use verbose build output.
156
157 #
158 #--------------------------
159 +--- a/makefiles-local/Makefile.local.i386
160 ++++ b/makefiles-local/Makefile.local.i386
161 +@@ -5,6 +5,3 @@
162 + # => copy Makefile.local to main directory and remove appropriate comments
163 +
164 + #------------------------------------------------------------------------------
165 +-
166 +-#CFLAGS += -mtune=generic
167 +-CFLAGS += -march=i686
168 +--- a/makefiles-local/Makefile.local.x86_64
169 ++++ b/makefiles-local/Makefile.local.x86_64
170 +@@ -5,6 +5,3 @@
171 + # => copy Makefile.local to main directory and remove appropriate comments
172 +
173 + #------------------------------------------------------------------------------
174 +-
175 +-CFLAGS += -march=x86-64
176 +-
177 +--- a/setup.sh
178 ++++ b/setup.sh
179 +@@ -118,6 +118,6 @@
180 +
181 + ---EOT---
182 +
183 +-gcc $xflags system.c -o system.tmp && ./system.tmp >>Makefile.setup
184 ++${CC} $xflags system.c -o system.tmp && ./system.tmp >>Makefile.setup
185 + rm -f system.tmp
186 +
187 +--- a/test-libwbfs/Makefile
188 ++++ b/test-libwbfs/Makefile
189 +@@ -7,11 +7,6 @@
190 +
191 + SHELL = /bin/bash
192 +
193 +-PRE ?=
194 +-CC = $(PRE)gcc
195 +-CPP = $(PRE)g++
196 +-STRIP = $(PRE)strip
197 +-
198 + #-------------------------------------------------------------------------------
199 + # files
200 +
201 +@@ -46,18 +41,14 @@
202 + DEFINES = -DLARGE_FILES -D_FILE_OFFSET_BITS=64 $(XDEF)
203 + DEFINES := $(strip $(DEFINES))
204 +
205 +-CFLAGS = -fomit-frame-pointer -fno-strict-aliasing
206 ++CFLAGS += -fno-strict-aliasing
207 + CFLAGS += -Wall -Wno-parentheses -Wno-unused-function
208 +-CFLAGS += -O3 -I../src/libwbfs -I.
209 ++CFLAGS += -I../src/libwbfs -I.
210 + CFLAGS += $(XFLAGS)
211 + CFLAGS := $(strip $(CFLAGS))
212 +
213 + DEPFLAGS += -MMD
214 +
215 +-LDFLAGS += -static-libgcc
216 +-#LDFLAGS += -static
217 +-LDFLAGS := $(strip $(LDFLAGS))
218 +-
219 + LIBS += $(XLIBS)
220 +
221 + #
222
223 diff --git a/games-util/wit/files/wit-2.30a-no-exec-stack.patch b/games-util/wit/files/wit-3.02a-no-exec-stack.patch
224 similarity index 100%
225 rename from games-util/wit/files/wit-2.30a-no-exec-stack.patch
226 rename to games-util/wit/files/wit-3.02a-no-exec-stack.patch
227
228 diff --git a/games-util/wit/wit-3.02a.ebuild b/games-util/wit/wit-3.02a.ebuild
229 index 7d79724689d..95c5351036a 100644
230 --- a/games-util/wit/wit-3.02a.ebuild
231 +++ b/games-util/wit/wit-3.02a.ebuild
232 @@ -1,4 +1,4 @@
233 -# Copyright 1999-2019 Gentoo Authors
234 +# Copyright 1999-2020 Gentoo Authors
235 # Distributed under the terms of the GNU General Public License v2
236
237 EAPI=7
238 @@ -19,24 +19,31 @@ IUSE="+fuse +zlib"
239 RDEPEND="
240 app-arch/bzip2:0=
241 fuse? ( sys-fs/fuse:0= )
242 - zlib? ( sys-libs/zlib:0= )
243 -"
244 + zlib? ( sys-libs/zlib:0= )"
245 DEPEND="${RDEPEND}"
246 BDEPEND="virtual/pkgconfig"
247
248 -DOCS="doc/*.txt"
249 +S="${WORKDIR}/${MY_P}"
250
251 PATCHES=(
252 "${FILESDIR}"/${P}-makefile.patch
253 - "${FILESDIR}"/${PN}-2.30a-no-exec-stack.patch
254 + "${FILESDIR}"/${P}-no-exec-stack.patch
255 + "${FILESDIR}"/${P}-fno-common.patch
256 )
257
258 -S=${WORKDIR}/${MY_P}
259 -
260 -src_compile() {
261 +src_configure() {
262 export NO_FUSE=$(usex fuse 0 1)
263 export NO_ZLIB=$(usex zlib 0 1)
264
265 - emake INSTALL_PATH="${D}"/usr CC="$(tc-getCC)"
266 + tc-export CC PKG_CONFIG
267 +}
268 +
269 +src_compile() {
270 + emake INSTALL_PATH="${ED}"/usr
271 emake doc
272 }
273 +
274 +src_install() {
275 + default
276 + dodoc doc/*.txt
277 +}