From bdbb0b3af033cae1d2dbabc9e6b5bfc2c12f9e0b Mon Sep 17 00:00:00 2001 From: Roger Freitas Pereira Date: Thu, 9 Jul 2026 01:19:10 -0300 Subject: [PATCH] New package: libretro-mupen64plus-nx-20260520 --- srcpkgs/libretro-mupen64plus | 1 + srcpkgs/libretro-mupen64plus-nx/INSTALL.msg | 4 ++ .../patches/fix-musl-build.patch | 38 ++++++++++++ srcpkgs/libretro-mupen64plus-nx/template | 61 +++++++++++++++++++ srcpkgs/libretro-mupen64plus-rpi | 2 +- .../patches/add-string.patch | 10 --- .../patches/gl-typedefs.patch | 13 ---- .../libretro-mupen64plus/patches/types.patch | 29 --------- srcpkgs/libretro-mupen64plus/template | 61 ------------------- 9 files changed, 105 insertions(+), 114 deletions(-) create mode 120000 srcpkgs/libretro-mupen64plus create mode 100644 srcpkgs/libretro-mupen64plus-nx/INSTALL.msg create mode 100644 srcpkgs/libretro-mupen64plus-nx/patches/fix-musl-build.patch create mode 100644 srcpkgs/libretro-mupen64plus-nx/template delete mode 100644 srcpkgs/libretro-mupen64plus/patches/add-string.patch delete mode 100644 srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch delete mode 100644 srcpkgs/libretro-mupen64plus/patches/types.patch delete mode 100644 srcpkgs/libretro-mupen64plus/template diff --git a/srcpkgs/libretro-mupen64plus b/srcpkgs/libretro-mupen64plus new file mode 120000 index 00000000000000..3eff59b8175ce1 --- /dev/null +++ b/srcpkgs/libretro-mupen64plus @@ -0,0 +1 @@ +libretro-mupen64plus-nx \ No newline at end of file diff --git a/srcpkgs/libretro-mupen64plus-nx/INSTALL.msg b/srcpkgs/libretro-mupen64plus-nx/INSTALL.msg new file mode 100644 index 00000000000000..f67539e8b79388 --- /dev/null +++ b/srcpkgs/libretro-mupen64plus-nx/INSTALL.msg @@ -0,0 +1,4 @@ +The old mupen64plus libretro core was replaced by Mupen64Plus-Next. +The core file is now /usr/lib/libretro/mupen64plus_next_libretro.so; +RetroArch playlists, core options and remaps referencing the old +mupen64plus_libretro.so must be updated to point to the new core. diff --git a/srcpkgs/libretro-mupen64plus-nx/patches/fix-musl-build.patch b/srcpkgs/libretro-mupen64plus-nx/patches/fix-musl-build.patch new file mode 100644 index 00000000000000..8c858e4fb94ee1 --- /dev/null +++ b/srcpkgs/libretro-mupen64plus-nx/patches/fix-musl-build.patch @@ -0,0 +1,38 @@ +From 9e78ed6c4ec494d29a9341d127cf3131a2e22722 Mon Sep 17 00:00:00 2001 +From: orbea +Date: Mon, 22 Jan 2024 08:03:46 -0800 +Subject: [PATCH] util: fix the musl build + +samu: job failed with status 1: /usr/lib/ccache/bin/c++ -I/tmp/Granite/util -I/tmp/Granite/application/global -std=gnu++14 -Wshadow -Wall -Wextra -Wno-comment -Wno-missing-field-initializers -Wno-empty-body -fno-omit-frame-pointer -msse3 -ffast-math -MD -MT util/CMakeFiles/granite-util.dir/aligned_alloc.cpp.o -MF util/CMakeFiles/granite-util.dir/aligned_alloc.cpp.o.d -o util/CMakeFiles/granite-util.dir/aligned_alloc.cpp.o -c /tmp/Granite/util/aligned_alloc.cpp +/tmp/Granite/util/aligned_alloc.cpp: In function 'void* Util::memalign_alloc(size_t, size_t)': +/tmp/Granite/util/aligned_alloc.cpp:47:5: error: 'uintptr_t' was not declared in this scope + 47 | uintptr_t addr = 0; + | ^~~~~~~~~ +/tmp/Granite/util/aligned_alloc.cpp:27:1: note: 'uintptr_t' is defined in header ''; did you forget to '#include '? + 26 | #include + +++ |+#include + 27 | #ifdef _WIN32 +/tmp/Granite/util/aligned_alloc.cpp:53:5: error: 'addr' was not declared in this scope + 53 | addr = ((uintptr_t)ptr + sizeof(uintptr_t) + boundary) & ~(boundary - 1); + | ^~~~ +/tmp/Granite/util/aligned_alloc.cpp:53:24: error: expected ')' before 'ptr' + 53 | addr = ((uintptr_t)ptr + sizeof(uintptr_t) + boundary) & ~(boundary - 1); + | ~ ^~~ + | ) +samu: subcommand failed +--- + util/aligned_alloc.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/mupen64plus-video-paraLLEl/parallel-rdp/util/aligned_alloc.cpp b/mupen64plus-video-paraLLEl/parallel-rdp/util/aligned_alloc.cpp +index 674aeb3c0..9f5900eca 100644 +--- a/mupen64plus-video-paraLLEl/parallel-rdp/util/aligned_alloc.cpp ++++ b/mupen64plus-video-paraLLEl/parallel-rdp/util/aligned_alloc.cpp +@@ -21,6 +21,7 @@ + */ + + #include "aligned_alloc.hpp" ++#include + #include + #include + #ifdef _WIN32 diff --git a/srcpkgs/libretro-mupen64plus-nx/template b/srcpkgs/libretro-mupen64plus-nx/template new file mode 100644 index 00000000000000..38ccd19765e7f8 --- /dev/null +++ b/srcpkgs/libretro-mupen64plus-nx/template @@ -0,0 +1,61 @@ +# Template file for 'libretro-mupen64plus-nx' +pkgname=libretro-mupen64plus-nx +version=0.0.20260520 +revision=1 +_gitrev=98c1b0d877542b01314b3b04272282ba223b65b3 +hostmakedepends="pkg-config" +makedepends="MesaLib-devel zlib-devel libpng-devel minizip-devel xxHash-devel" +short_desc="Libretro port of Mupen64Plus (Mupen64Plus-Next)" +maintainer="Rutpiv " +license="GPL-2.0-only" +homepage="https://github.com/libretro/mupen64plus-libretro-nx" +distfiles="https://github.com/libretro/mupen64plus-libretro-nx/archive/${_gitrev}.tar.gz" +checksum=3843919d459724d8b0d78e4a819b43a7ef1847dd9bae4bb41e0fd5e8bd72567d + +build_options="gles gles3" +case "$XBPS_TARGET_MACHINE" in + i686*|x86_64*) hostmakedepends+=" nasm";; + armv*|aarch64*) build_options_default="gles";; +esac + +do_build() { + local _args + # setting ARCH makes sure proper dynarec is selected + case "$XBPS_TARGET_MACHINE" in + armv*) _args=(ARCH=arm);; + *) _args=(ARCH="${XBPS_TARGET_MACHINE%-musl}");; + esac + case "$XBPS_TARGET_MACHINE" in + # LLE renderers: parallel-rsp JIT only supports 64-bit targets + x86_64*|aarch64*) + _args+=(LLE=1 HAVE_PARALLEL_RSP=1 HAVE_PARALLEL_RDP=1 + HAVE_THR_AL=1);; + esac + if [ "$build_option_gles3" ]; then + _args+=(FORCE_GLES3=1) + elif [ "$build_option_gles" ]; then + _args+=(FORCE_GLES=1) + fi + make CC="$CC" CXX="$CXX" platform=unix \ + SYSTEM_ZLIB=1 SYSTEM_LIBPNG=1 SYSTEM_MINIZIP=1 SYSTEM_XXHASH=1 \ + GIT_VERSION=" ${_gitrev:0:7}" \ + "${_args[@]}" ${makejobs} +} + +do_install() { + vinstall mupen64plus_next_libretro.so 755 usr/lib/libretro +} + +libretro-mupen64plus_package() { + metapackage=yes + short_desc="Libretro port of Mupen64 Plus (transitional dummy package)" + depends="${sourcepkg}>=${version}_${revision}" + reverts="20190611_2 20190611_1 20150204_1" +} + +libretro-mupen64plus-rpi_package() { + metapackage=yes + short_desc="Libretro port of Mupen64 Plus (transitional dummy package)" + depends="${sourcepkg}>=${version}_${revision}" + reverts="20190611_2 20190611_1" +} diff --git a/srcpkgs/libretro-mupen64plus-rpi b/srcpkgs/libretro-mupen64plus-rpi index b3931927d4937a..3eff59b8175ce1 120000 --- a/srcpkgs/libretro-mupen64plus-rpi +++ b/srcpkgs/libretro-mupen64plus-rpi @@ -1 +1 @@ -libretro-mupen64plus \ No newline at end of file +libretro-mupen64plus-nx \ No newline at end of file diff --git a/srcpkgs/libretro-mupen64plus/patches/add-string.patch b/srcpkgs/libretro-mupen64plus/patches/add-string.patch deleted file mode 100644 index 9f277a379f41b7..00000000000000 --- a/srcpkgs/libretro-mupen64plus/patches/add-string.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/GLideN64/src/ShaderUtils.h 2019-05-31 19:25:22.000000000 +0200 -+++ b/GLideN64/src/ShaderUtils.h 2020-09-24 17:12:36.260736024 +0200 -@@ -3,6 +3,7 @@ - - #include "OpenGL.h" - #include "Combiner.h" -+#include - - GLuint createShaderProgram(const char * _strVertex, const char * _strFragment); - bool checkShaderCompileStatus(GLuint obj); diff --git a/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch b/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch deleted file mode 100644 index 154b62af6c3459..00000000000000 --- a/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/libretro-common/include/glsm/glsm.h -+++ b/libretro-common/include/glsm/glsm.h -@@ -32,8 +32,8 @@ - RETRO_BEGIN_DECLS - - #ifdef HAVE_OPENGLES2 --typedef GLfloat GLdouble; --typedef GLclampf GLclampd; -+typedef double GLdouble; -+typedef double GLclampd; - #endif - - #if defined(HAVE_OPENGLES2) diff --git a/srcpkgs/libretro-mupen64plus/patches/types.patch b/srcpkgs/libretro-mupen64plus/patches/types.patch deleted file mode 100644 index c5b65bcaf04a2c..00000000000000 --- a/srcpkgs/libretro-mupen64plus/patches/types.patch +++ /dev/null @@ -1,29 +0,0 @@ -This is needed to build on armv6/7 musl. ---- a/mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c -+++ b/mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c -@@ -25,12 +25,8 @@ - #include - #include - --#if defined(__APPLE__) - #include // needed for u_int, u_char, etc - --#define MAP_ANONYMOUS MAP_ANON --#endif -- - #ifdef __cplusplus - extern "C" { - #endif ---- a/mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c -+++ b/mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c -@@ -24,10 +24,7 @@ - #include - #include - --#if defined(__APPLE__) - #include // needed for u_int, u_char, etc --#define MAP_ANONYMOUS MAP_ANON --#endif - - #include "new_dynarec.h" - #include "main/main.h" diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template deleted file mode 100644 index ec94380c63ed64..00000000000000 --- a/srcpkgs/libretro-mupen64plus/template +++ /dev/null @@ -1,61 +0,0 @@ -# Template file for 'libretro-mupen64plus' -pkgname=libretro-mupen64plus -version=20190611 -revision=2 -_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326 -hostmakedepends="pkg-config unzip" -makedepends="MesaLib-devel zlib-devel" -short_desc="Libretro port of Mupen64 Plus" -maintainer="Orphaned " -license="GPL-3.0-or-later" -homepage="http://www.libretro.com/" -distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz" -checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4 - -case "$XBPS_TARGET_MACHINE" in - i686*) hostmakedepends+=" nasm";; -esac - -build_options="gles gles3 rpi" - -case "$XBPS_TARGET_MACHINE" in - armv*) build_options_default="rpi";; - aarch64*) build_options_default="gles";; -esac - -CFLAGS="-fcommon" - -do_build() { - local _args - - # setting ARCH makes sure proper dynarec is selected - case "$XBPS_TARGET_MACHINE" in - armv*) _args=(ARCH=arm);; - *) _args=(ARCH="${XBPS_TARGET_MACHINE%-musl}");; - esac - - if [ "$build_option_rpi" ]; then - case "$XBPS_TARGET_MACHINE" in - armv6*) _args+=(platform="rpi mesa");; - armv7*) _args+=(platform="rpi2 mesa");; - esac - fi - - if [ "$build_option_gles3" ]; then - _args+=(FORCE_GLES3=1) - elif [ "$builld_option_gles" ]; then - _args+=(FORCE_GLES=1) - fi - - make CC="$CC" "${_args[@]}" "${makejobs}" -} - -do_install() { - vinstall mupen64plus_libretro.so 755 usr/lib/libretro -} - -libretro-mupen64plus-rpi_package() { - metapackage=yes - short_desc+=" (transitional dummy package)" - depends="${sourcepkg}>=${version}_${revision}" -}