commit: 52aa359238d71ff37942157fd9abedc8ba2bb6d6 Author: David Seifert <soap <AT> gentoo <DOT> org> AuthorDate: Sat Aug 8 16:53:33 2020 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Sat Aug 8 16:53:33 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52aa3592
media-sound/sexypsf: Fix building under -fno-common Closes: https://bugs.gentoo.org/706820 Package-Manager: Portage-3.0.1, Repoman-2.3.23 Signed-off-by: David Seifert <soap <AT> gentoo.org> .../sexypsf/files/sexypsf-0.4.8-Makefile.patch | 12 +++ .../sexypsf/files/sexypsf-0.4.8-fno-common.patch | 102 +++++++++++++++++++++ media-sound/sexypsf/sexypsf-0.4.8.ebuild | 22 +++-- 3 files changed, 128 insertions(+), 8 deletions(-) diff --git a/media-sound/sexypsf/files/sexypsf-0.4.8-Makefile.patch b/media-sound/sexypsf/files/sexypsf-0.4.8-Makefile.patch new file mode 100644 index 00000000000..348c392f357 --- /dev/null +++ b/media-sound/sexypsf/files/sexypsf-0.4.8-Makefile.patch @@ -0,0 +1,12 @@ +--- a/Linux/Makefile ++++ b/Linux/Makefile +@@ -28,9 +28,3 @@ + + clean: + ${RM} *.o ../*.o ../spu/*.o sexypsf +- +-../%.o: ../%.c +- ${CC} ${CFLAGS} -c -o $@ $< +- +-%.o: %.c +- ${CC} ${CFLAGS} -c -o $@ $< 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 new file mode 100644 index 00000000000..fd0d96525b3 --- /dev/null +++ b/media-sound/sexypsf/files/sexypsf-0.4.8-fno-common.patch @@ -0,0 +1,102 @@ +--- a/PsxCounters.c ++++ b/PsxCounters.c +@@ -20,6 +20,9 @@ + + #include "PsxCommon.h" + ++psxCounter psxCounters[5]; ++u32 psxNextCounter, psxNextsCounter; ++ + static int cnts = 4; + static u32 last=0; + +--- a/PsxCounters.h ++++ b/PsxCounters.h +@@ -24,9 +24,9 @@ + u32 sCycle, Cycle, rate, interrupt; + } psxCounter; + +-psxCounter psxCounters[5]; ++extern psxCounter psxCounters[5]; + +-u32 psxNextCounter, psxNextsCounter; ++extern u32 psxNextCounter, psxNextsCounter; + + void psxRcntInit(); + void psxRcntUpdate(); +--- a/PsxMem.c ++++ b/PsxMem.c +@@ -21,6 +21,12 @@ + + #include "PsxCommon.h" + ++s8 *psxM; ++s8 *psxP; ++s8 *psxR; ++s8 *psxH; ++char **psxMemLUT; ++ + void LoadPSXMem(u32 address, s32 length, char *data) + { + //printf("%08x %08x\n",address,length); +--- a/PsxMem.h ++++ b/PsxMem.h +@@ -41,21 +41,21 @@ + } + #endif + +-s8 *psxM; ++extern s8 *psxM; + #define psxMu32(mem) (*(u32*)&psxM[(mem) & 0x1fffff]) + +-s8 *psxP; +-s8 *psxR; ++extern s8 *psxP; ++extern s8 *psxR; + #define psxRu32(mem) (*(u32*)&psxR[(mem) & 0x7ffff]) + +-s8 *psxH; ++extern s8 *psxH; + + #define psxHu8(mem) (*(u8*) &psxH[(mem) & 0xffff]) + + #define psxHu16(mem) (*(u16*)&psxH[(mem) & 0xffff]) + #define psxHu32(mem) (*(u32*)&psxH[(mem) & 0xffff]) + +-char **psxMemLUT; ++extern char **psxMemLUT; + + #define PSXM(mem) (psxMemLUT[(mem) >> 16] == 0 ? NULL : (void*)(psxMemLUT[(mem) >> 16] + ((mem) & 0xffff))) + +--- a/R3000A.c ++++ b/R3000A.c +@@ -22,6 +22,9 @@ + + #include "PsxCommon.h" + ++R3000Acpu *psxCpu; ++psxRegisters psxRegs; ++ + int psxInit() { + + psxCpu = &psxInt; +--- a/R3000A.h ++++ b/R3000A.h +@@ -32,7 +32,7 @@ + void (*Shutdown)(); + } R3000Acpu; + +-R3000Acpu *psxCpu; ++extern R3000Acpu *psxCpu; + extern R3000Acpu psxInt; + + typedef union { +@@ -68,7 +68,7 @@ + u32 interrupt; + } psxRegisters; + +-psxRegisters psxRegs; ++extern psxRegisters psxRegs; + + #define _i32(x) (s32)x + #define _u32(x) (u32)x diff --git a/media-sound/sexypsf/sexypsf-0.4.8.ebuild b/media-sound/sexypsf/sexypsf-0.4.8.ebuild index 427a0518e2c..7f7bf7f7e77 100644 --- a/media-sound/sexypsf/sexypsf-0.4.8.ebuild +++ b/media-sound/sexypsf/sexypsf-0.4.8.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,19 +11,25 @@ SRC_URI="http://projects.raphnet.net/sexypsf/${P}.tar.bz2"; LICENSE="GPL-2" SLOT="0" - KEYWORDS="amd64 ppc x86" -IUSE="" -DEPEND="sys-libs/zlib" +RDEPEND="sys-libs/zlib" +DEPEND="${RDEPEND}" -src_compile() { +PATCHES=( + "${FILESDIR}"/${PN}-0.4.8-Makefile.patch + "${FILESDIR}"/${PN}-0.4.8-fno-common.patch +) + +src_configure() { tc-export CC - cd Linux || die - emake +} + +src_compile() { + emake -C Linux } src_install() { dobin Linux/sexypsf - dodoc Docs/* + dodoc -r Docs/. }