From b43d335f6cfee85b6b036646005a941f4a64de06 Mon Sep 17 00:00:00 2001 From: Roger Freitas Pereira Date: Wed, 8 Jul 2026 22:23:54 -0300 Subject: [PATCH] pcsxr: fix build with GCC 14 and PIE crash --- srcpkgs/pcsxr/patches/fix-gcc14-errors.patch | 27 ++++++++++++++++++++ srcpkgs/pcsxr/template | 9 +++++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/pcsxr/patches/fix-gcc14-errors.patch diff --git a/srcpkgs/pcsxr/patches/fix-gcc14-errors.patch b/srcpkgs/pcsxr/patches/fix-gcc14-errors.patch new file mode 100644 index 00000000000000..2d1300c6945354 --- /dev/null +++ b/srcpkgs/pcsxr/patches/fix-gcc14-errors.patch @@ -0,0 +1,27 @@ +Fix errors exposed by GCC 14 promoting warnings to errors: +- cfg-gtk.c: SDL_JoystickName() takes SDL_Joystick* in SDL2; use + SDL_JoystickNameForIndex() +- gpu.c: cast Display* to unsigned long (integer), not unsigned long* + +--- a/plugins/dfinput/cfg-gtk.c ++++ b/plugins/dfinput/cfg-gtk.c +@@ -607,7 +607,7 @@ + + n = SDL_NumJoysticks(); + for (j = 0; j < n; j++) { +- sprintf(buf, "%d: %s", j + 1, SDL_JoystickName(j)); ++ sprintf(buf, "%d: %s", j + 1, SDL_JoystickNameForIndex(j)); + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, buf, -1); + } +--- a/plugins/peopsxgl/gpu.c ++++ b/plugins/peopsxgl/gpu.c +@@ -1091,7 +1091,7 @@ + #if defined (_MACGL) + *disp = display; + #else +- *disp=(unsigned long *)display; // return display ID to main emu ++ *disp=(unsigned long)display; // return display ID to main emu + #endif + } + diff --git a/srcpkgs/pcsxr/template b/srcpkgs/pcsxr/template index eeda663d6545dc..73356b95058a5d 100644 --- a/srcpkgs/pcsxr/template +++ b/srcpkgs/pcsxr/template @@ -1,7 +1,7 @@ # Template file for 'pcsxr' pkgname=pcsxr version=1.9.94 -revision=2 +revision=3 build_style=gnu-configure configure_args="--enable-libcdio --enable-opengl" hostmakedepends="pkg-config automake libtool intltool glib-devel gettext-devel nasm" @@ -15,8 +15,13 @@ homepage="http://pcsxr.codeplex.com/" distfiles="${DEBIAN_SITE}/main/p/pcsxr/pcsxr_${version}.orig.tar.xz" checksum=8a366b68a7c236443aa75b422bea84b5115f8d8c23e5a78fd6951e643e90f660 lib32disabled=yes +nopie=yes -CFLAGS="-fcommon" +# no real test suite; make check only runs intltool's POTFILES +# completeness lint, which fails on unused macOS sources +make_check=no + +CFLAGS="-fcommon -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types" pre_configure() { autoreconf -fi