Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/sexypsf/, media-sound/sexypsf/files/
Date: Sat, 08 Aug 2020 16:55:46
Message-Id: 1596905613.52aa359238d71ff37942157fd9abedc8ba2bb6d6.soap@gentoo
1 commit: 52aa359238d71ff37942157fd9abedc8ba2bb6d6
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 8 16:53:33 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 8 16:53:33 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52aa3592
7
8 media-sound/sexypsf: Fix building under -fno-common
9
10 Closes: https://bugs.gentoo.org/706820
11 Package-Manager: Portage-3.0.1, Repoman-2.3.23
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 .../sexypsf/files/sexypsf-0.4.8-Makefile.patch | 12 +++
15 .../sexypsf/files/sexypsf-0.4.8-fno-common.patch | 102 +++++++++++++++++++++
16 media-sound/sexypsf/sexypsf-0.4.8.ebuild | 22 +++--
17 3 files changed, 128 insertions(+), 8 deletions(-)
18
19 diff --git a/media-sound/sexypsf/files/sexypsf-0.4.8-Makefile.patch b/media-sound/sexypsf/files/sexypsf-0.4.8-Makefile.patch
20 new file mode 100644
21 index 00000000000..348c392f357
22 --- /dev/null
23 +++ b/media-sound/sexypsf/files/sexypsf-0.4.8-Makefile.patch
24 @@ -0,0 +1,12 @@
25 +--- a/Linux/Makefile
26 ++++ b/Linux/Makefile
27 +@@ -28,9 +28,3 @@
28 +
29 + clean:
30 + ${RM} *.o ../*.o ../spu/*.o sexypsf
31 +-
32 +-../%.o: ../%.c
33 +- ${CC} ${CFLAGS} -c -o $@ $<
34 +-
35 +-%.o: %.c
36 +- ${CC} ${CFLAGS} -c -o $@ $<
37
38 diff --git a/media-sound/sexypsf/files/sexypsf-0.4.8-fno-common.patch b/media-sound/sexypsf/files/sexypsf-0.4.8-fno-common.patch
39 new file mode 100644
40 index 00000000000..fd0d96525b3
41 --- /dev/null
42 +++ b/media-sound/sexypsf/files/sexypsf-0.4.8-fno-common.patch
43 @@ -0,0 +1,102 @@
44 +--- a/PsxCounters.c
45 ++++ b/PsxCounters.c
46 +@@ -20,6 +20,9 @@
47 +
48 + #include "PsxCommon.h"
49 +
50 ++psxCounter psxCounters[5];
51 ++u32 psxNextCounter, psxNextsCounter;
52 ++
53 + static int cnts = 4;
54 + static u32 last=0;
55 +
56 +--- a/PsxCounters.h
57 ++++ b/PsxCounters.h
58 +@@ -24,9 +24,9 @@
59 + u32 sCycle, Cycle, rate, interrupt;
60 + } psxCounter;
61 +
62 +-psxCounter psxCounters[5];
63 ++extern psxCounter psxCounters[5];
64 +
65 +-u32 psxNextCounter, psxNextsCounter;
66 ++extern u32 psxNextCounter, psxNextsCounter;
67 +
68 + void psxRcntInit();
69 + void psxRcntUpdate();
70 +--- a/PsxMem.c
71 ++++ b/PsxMem.c
72 +@@ -21,6 +21,12 @@
73 +
74 + #include "PsxCommon.h"
75 +
76 ++s8 *psxM;
77 ++s8 *psxP;
78 ++s8 *psxR;
79 ++s8 *psxH;
80 ++char **psxMemLUT;
81 ++
82 + void LoadPSXMem(u32 address, s32 length, char *data)
83 + {
84 + //printf("%08x %08x\n",address,length);
85 +--- a/PsxMem.h
86 ++++ b/PsxMem.h
87 +@@ -41,21 +41,21 @@
88 + }
89 + #endif
90 +
91 +-s8 *psxM;
92 ++extern s8 *psxM;
93 + #define psxMu32(mem) (*(u32*)&psxM[(mem) & 0x1fffff])
94 +
95 +-s8 *psxP;
96 +-s8 *psxR;
97 ++extern s8 *psxP;
98 ++extern s8 *psxR;
99 + #define psxRu32(mem) (*(u32*)&psxR[(mem) & 0x7ffff])
100 +
101 +-s8 *psxH;
102 ++extern s8 *psxH;
103 +
104 + #define psxHu8(mem) (*(u8*) &psxH[(mem) & 0xffff])
105 +
106 + #define psxHu16(mem) (*(u16*)&psxH[(mem) & 0xffff])
107 + #define psxHu32(mem) (*(u32*)&psxH[(mem) & 0xffff])
108 +
109 +-char **psxMemLUT;
110 ++extern char **psxMemLUT;
111 +
112 + #define PSXM(mem) (psxMemLUT[(mem) >> 16] == 0 ? NULL : (void*)(psxMemLUT[(mem) >> 16] + ((mem) & 0xffff)))
113 +
114 +--- a/R3000A.c
115 ++++ b/R3000A.c
116 +@@ -22,6 +22,9 @@
117 +
118 + #include "PsxCommon.h"
119 +
120 ++R3000Acpu *psxCpu;
121 ++psxRegisters psxRegs;
122 ++
123 + int psxInit() {
124 +
125 + psxCpu = &psxInt;
126 +--- a/R3000A.h
127 ++++ b/R3000A.h
128 +@@ -32,7 +32,7 @@
129 + void (*Shutdown)();
130 + } R3000Acpu;
131 +
132 +-R3000Acpu *psxCpu;
133 ++extern R3000Acpu *psxCpu;
134 + extern R3000Acpu psxInt;
135 +
136 + typedef union {
137 +@@ -68,7 +68,7 @@
138 + u32 interrupt;
139 + } psxRegisters;
140 +
141 +-psxRegisters psxRegs;
142 ++extern psxRegisters psxRegs;
143 +
144 + #define _i32(x) (s32)x
145 + #define _u32(x) (u32)x
146
147 diff --git a/media-sound/sexypsf/sexypsf-0.4.8.ebuild b/media-sound/sexypsf/sexypsf-0.4.8.ebuild
148 index 427a0518e2c..7f7bf7f7e77 100644
149 --- a/media-sound/sexypsf/sexypsf-0.4.8.ebuild
150 +++ b/media-sound/sexypsf/sexypsf-0.4.8.ebuild
151 @@ -1,4 +1,4 @@
152 -# Copyright 1999-2019 Gentoo Authors
153 +# Copyright 1999-2020 Gentoo Authors
154 # Distributed under the terms of the GNU General Public License v2
155
156 EAPI=7
157 @@ -11,19 +11,25 @@ SRC_URI="http://projects.raphnet.net/sexypsf/${P}.tar.bz2"
158
159 LICENSE="GPL-2"
160 SLOT="0"
161 -
162 KEYWORDS="amd64 ppc x86"
163 -IUSE=""
164
165 -DEPEND="sys-libs/zlib"
166 +RDEPEND="sys-libs/zlib"
167 +DEPEND="${RDEPEND}"
168
169 -src_compile() {
170 +PATCHES=(
171 + "${FILESDIR}"/${PN}-0.4.8-Makefile.patch
172 + "${FILESDIR}"/${PN}-0.4.8-fno-common.patch
173 +)
174 +
175 +src_configure() {
176 tc-export CC
177 - cd Linux || die
178 - emake
179 +}
180 +
181 +src_compile() {
182 + emake -C Linux
183 }
184
185 src_install() {
186 dobin Linux/sexypsf
187 - dodoc Docs/*
188 + dodoc -r Docs/.
189 }