From 00547d4d273d560b591c0c6e0120025f7fdcfad5 Mon Sep 17 00:00:00 2001 From: orbea Date: Mon, 21 Oct 2024 07:14:43 -0700 Subject: [PATCH] games-emulation/rmg: use pkg-config for SDL2 Also removes undocumented dependency on which(1). Upstream-PR: https://github.com/mupen64plus/mupen64plus-core/pull/1093 Upstream-Commit: https://github.com/mupen64plus/mupen64plus-core/commit/966a5df3165afede21204610c396dba1ed8a5bf3 Upstream-Commit: https://github.com/mupen64plus/mupen64plus-core/commit/b007759b9ed9d1473c732b4f3abcd9257165c65c Upstream-Commit: https://github.com/Rosalie241/RMG/commit/4cd4f4c6ea37c82cdda6b0a57e79af1b71df17fe Signed-off-by: orbea --- ...0.6.6-mupen64plus-core-sdl-pkgconfig.patch | 59 +++++++++++++++++++ games-emulation/rmg/rmg-0.6.5.ebuild | 1 + games-emulation/rmg/rmg-0.6.6.ebuild | 2 + 3 files changed, 62 insertions(+) create mode 100644 games-emulation/rmg/files/rmg-0.6.6-mupen64plus-core-sdl-pkgconfig.patch diff --git a/games-emulation/rmg/files/rmg-0.6.6-mupen64plus-core-sdl-pkgconfig.patch b/games-emulation/rmg/files/rmg-0.6.6-mupen64plus-core-sdl-pkgconfig.patch new file mode 100644 index 00000000000000..5b4fa24ce48102 --- /dev/null +++ b/games-emulation/rmg/files/rmg-0.6.6-mupen64plus-core-sdl-pkgconfig.patch @@ -0,0 +1,59 @@ +https://github.com/mupen64plus/mupen64plus-core/pull/1093 +https://github.com/mupen64plus/mupen64plus-core/commit/966a5df3165afede21204610c396dba1ed8a5bf3 +https://github.com/mupen64plus/mupen64plus-core/commit/b007759b9ed9d1473c732b4f3abcd9257165c65c +https://github.com/Rosalie241/RMG/commit/4cd4f4c6ea37c82cdda6b0a57e79af1b71df17fe + +From: orbea +Date: Mon, 21 Oct 2024 09:10:57 -0700 +Subject: [PATCH 3/3] build: drop SDL1 support + +SDL1 is unmaintained upstream and using it only leads to a degraded +experience. Especially when it recives far less testing. + +build: use pkg-config for SDL2 + +SDL2 hasn't required suing sdl2-config in a long time and using +pkg-config can have better results for distros. +--- + projects/unix/Makefile | 28 ++++++++++------------------ + 1 file changed, 10 insertions(+), 18 deletions(-) + +--- a/Source/3rdParty/mupen64plus-core/projects/unix/Makefile ++++ b/Source/3rdParty/mupen64plus-core/projects/unix/Makefile +@@ -351,26 +351,18 @@ endif + + # test for presence of SDL + ifeq ($(origin SDL_CFLAGS) $(origin SDL_LDLIBS), undefined undefined) +- SDL_CONFIG = $(CROSS_COMPILE)sdl2-config +- ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),) +- SDL_CONFIG = $(CROSS_COMPILE)sdl-config +- ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),) +- $(error No SDL development libraries found!) +- else +- ifeq ($(NETPLAY), 1) +- SDL_LDLIBS += -lSDL_net +- endif +- # SDL1 doesn't support vulkan +- VULKAN = 0 +- $(warning Using SDL 1.2 libraries) +- endif +- else +- ifeq ($(NETPLAY), 1) +- SDL_LDLIBS += -lSDL2_net ++ ifeq ($(shell $(PKG_CONFIG) --modversion sdl2 2>/dev/null),) ++ $(error No SDL2 development libraries found!) ++ endif ++ ifeq ($(NETPLAY), 1) ++ ifeq ($(shell $(PKG_CONFIG) --modversion SDL2_net 2>/dev/null),) ++ $(error No SDL2_net development libraries found!) + endif ++ SDL_CFLAGS += $(shell $(PKG_CONFIG) --cflags SDL2_net) ++ SDL_LDLIBS += $(shell $(PKG_CONFIG) --libs SDL2_net) + endif +- SDL_CFLAGS += $(shell $(SDL_CONFIG) --cflags) +- SDL_LDLIBS += $(shell $(SDL_CONFIG) --libs) ++ SDL_CFLAGS += $(shell $(PKG_CONFIG) --cflags sdl2) ++ SDL_LDLIBS += $(shell $(PKG_CONFIG) --libs sdl2) + endif + CFLAGS += $(SDL_CFLAGS) + LDLIBS += $(SDL_LDLIBS) diff --git a/games-emulation/rmg/rmg-0.6.5.ebuild b/games-emulation/rmg/rmg-0.6.5.ebuild index 6ca37bec719836..06ec3fd53c2b21 100644 --- a/games-emulation/rmg/rmg-0.6.5.ebuild +++ b/games-emulation/rmg/rmg-0.6.5.ebuild @@ -69,6 +69,7 @@ DEPEND=" " RDEPEND="${DEPEND}" BDEPEND=" + sys-apps/which virtual/pkgconfig dynarec? ( dev-lang/nasm ) rust-plugin? ( virtual/rust ) diff --git a/games-emulation/rmg/rmg-0.6.6.ebuild b/games-emulation/rmg/rmg-0.6.6.ebuild index 6ca37bec719836..190b349006a3b8 100644 --- a/games-emulation/rmg/rmg-0.6.6.ebuild +++ b/games-emulation/rmg/rmg-0.6.6.ebuild @@ -76,6 +76,8 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-0.5.6-parallel-rdp-standalone-musl.patch + # Use pkg-config(1) for SDL2 and don't depend on which(1) + "${FILESDIR}"/${P}-mupen64plus-core-sdl-pkgconfig.patch ) pkg_setup() {