From f5dcafa5703b5b3fcf2c81a6f6e0063b78c76cbe Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 22:24:43 +0000 Subject: [PATCH 1/9] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 4906717aa9d3f7582073e927b4504a81ed9f1e2f Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 19 Mar 2025 17:38:22 +0000 Subject: [PATCH 2/9] Rebuild for mbedtls 3.6 From d48557cd0583f593edd28ade0154ae4684415c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 24 Mar 2025 17:14:23 +0000 Subject: [PATCH 3/9] switch to bundled mbedtls 2.x for Fedora >= 42 retroarch is not compatible with mbedtls 3.x (yet?) and the bundled bearssl won't build on ppc64le --- retroarch.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/retroarch.spec b/retroarch.spec index 9a22c98..1335577 100644 --- a/retroarch.spec +++ b/retroarch.spec @@ -124,7 +124,9 @@ BuildRequires: gcc-c++ >= 7 BuildRequires: glslang-devel BuildRequires: libappstream-glib BuildRequires: make +%if 0%{?fedora} < 42 BuildRequires: mbedtls-devel +%endif BuildRequires: mesa-libEGL-devel BuildRequires: spirv-tools-libs BuildRequires: systemd-devel @@ -222,6 +224,10 @@ Provides: bundled(rcheevos) = 10.7 Provides: bundled(SPIRV-Cross) Provides: bundled(stb) +%if 0%{?fedora} >= 42 +Provides: bundled(mbedtls) = 2.5.1 +%endif + %global _description %{expand: libretro is an API that exposes generic audio/video/input callbacks. A frontend for libretro (such as RetroArch) handles video output, audio output, input and @@ -301,8 +307,10 @@ rm -rf \ %{nil} popd +%if 0%{?fedora} < 42 # * Not part of the 'mbedtls' upstream source find deps/mbedtls/ ! -name 'cacert.h' -type f -exec rm -f {} + +%endif # Use system assets, libretro cores, libretro's core info and audio/video, # filters, database files (cheatcode, content data, cursors) @@ -348,7 +356,11 @@ sed -e 's|retroarch.cfg|%{name}.cfg|g' \ ./configure \ --prefix=%{_prefix} \ --disable-builtinflac \ +%if 0%{?fedora} < 42 --disable-builtinmbedtls \ +%else + --enable-builtinmbedtls \ +%endif --disable-builtinzlib \ --enable-dbus \ --enable-libdecor \ From 8b4270569b21505bb6d3442b7392bdd1b34b839f Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 8 Apr 2025 06:15:16 -0400 Subject: [PATCH 4/9] Unbundle three of the four bundled stb libraries --- retroarch.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/retroarch.spec b/retroarch.spec index 1335577..3bef799 100644 --- a/retroarch.spec +++ b/retroarch.spec @@ -131,6 +131,11 @@ BuildRequires: mesa-libEGL-devel BuildRequires: spirv-tools-libs BuildRequires: systemd-devel +# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_header_only_libraries +BuildRequires: stb_image-static +BuildRequires: stb_rect_pack-static +BuildRequires: stb_truetype-static + BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(caca) BuildRequires: pkgconfig(dbus-1) @@ -222,7 +227,8 @@ Provides: bundled(lua) = 5.3.6 Provides: bundled(rcheevos) = 10.7 Provides: bundled(SPIRV-Cross) -Provides: bundled(stb) +# Unbundling this in the manner of the other stb libraries does not work. +Provides: bundled(stb_vorbis) %if 0%{?fedora} >= 42 Provides: bundled(mbedtls) = 2.5.1 @@ -306,6 +312,10 @@ rm -rf \ wayland-protocols \ %{nil} popd +for lib in image rect_pack truetype +do + ln -svf /usr/include/stb/stb_${lib}.h deps/stb/stb_${lib}.h +done %if 0%{?fedora} < 42 # * Not part of the 'mbedtls' upstream source From 08651437574680ddf12dc46d005acb73ac7d94e1 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Tue, 27 May 2025 17:39:48 +0200 Subject: [PATCH 5/9] Rebuilt for flac 1.5.0 From fd81acf7626aed3cad0ef7a81cb295808c3c2475 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 11:56:33 +0000 Subject: [PATCH 6/9] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 5c0d919eddd9b5025cb0b9d02f6877c0c96c821a Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Wed, 15 Oct 2025 10:36:53 +0200 Subject: [PATCH 7/9] Rebuilt for FFmpeg 8 From e782a2bb6080df95636d8fc9c8ddebc8b59796fb Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Wed, 15 Oct 2025 10:36:53 +0200 Subject: [PATCH 8/9] Fixed build with FFmpeg 8 Backported upstream patch. --- retroarch-ffmpeg8.patch | 85 +++++++++++++++++++++++++++++++++++++++++ retroarch.spec | 3 ++ 2 files changed, 88 insertions(+) create mode 100644 retroarch-ffmpeg8.patch diff --git a/retroarch-ffmpeg8.patch b/retroarch-ffmpeg8.patch new file mode 100644 index 0000000..0d64fb1 --- /dev/null +++ b/retroarch-ffmpeg8.patch @@ -0,0 +1,85 @@ +diff -up RetroArch-1.19.0/cores/libretro-ffmpeg/ffmpeg_core.c.ffmpeg8 RetroArch-1.19.0/cores/libretro-ffmpeg/ffmpeg_core.c +--- RetroArch-1.19.0/cores/libretro-ffmpeg/ffmpeg_core.c.ffmpeg8 2024-05-30 05:03:48.000000000 +0200 ++++ RetroArch-1.19.0/cores/libretro-ffmpeg/ffmpeg_core.c 2025-10-23 17:12:03.063697264 +0200 +@@ -99,6 +99,9 @@ static tpool_t *tpool; + + #define FFMPEG3 ((LIBAVUTIL_VERSION_INT < (56, 6, 100)) || \ + (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100))) ++#ifndef FFMPEG8 ++#define FFMPEG8 (LIBAVCODEC_VERSION_MAJOR >= 62) ++#endif + + #if ENABLE_HW_ACCEL + static enum AVHWDeviceType hw_decoder; +@@ -2088,17 +2091,28 @@ void CORE_PREFIX(retro_unload_game)(void + + for (i = 0; i < MAX_STREAMS; i++) + { ++#if FFMPEG8 ++ if (sctx[i]) ++ avcodec_free_context(&sctx[i]); ++ if (actx[i]) ++ avcodec_free_context(&actx[i]); ++#else + if (sctx[i]) + avcodec_close(sctx[i]); + if (actx[i]) + avcodec_close(actx[i]); ++#endif + sctx[i] = NULL; + actx[i] = NULL; + } + + if (vctx) + { ++#if FFMPEG8 ++ avcodec_free_context(&vctx); ++#else + avcodec_close(vctx); ++#endif + vctx = NULL; + } + +diff -up RetroArch-1.19.0/record/drivers/record_ffmpeg.c.ffmpeg8 RetroArch-1.19.0/record/drivers/record_ffmpeg.c +--- RetroArch-1.19.0/record/drivers/record_ffmpeg.c.ffmpeg8 2024-05-30 05:03:48.000000000 +0200 ++++ RetroArch-1.19.0/record/drivers/record_ffmpeg.c 2025-10-23 17:11:17.419250148 +0200 +@@ -70,6 +70,15 @@ extern "C" { + #include "../../verbosity.h" + + #define FFMPEG3 (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)) ++ ++#ifndef FFMPEG8 ++#define FFMPEG8 (LIBAVCODEC_VERSION_MAJOR >= 62) ++#endif ++ ++#ifndef AV_INPUT_BUFFER_MIN_SIZE ++#define AV_INPUT_BUFFER_MIN_SIZE 16384 ++#endif ++ + #define HAVE_CH_LAYOUT (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 28, 100)) + + struct ff_video_info +@@ -949,7 +958,11 @@ static void ffmpeg_free(void *data) + + if (handle->audio.codec) + { ++#if FFMPEG8 ++ avcodec_free_context(&handle->audio.codec); ++#else + avcodec_close(handle->audio.codec); ++#endif + av_free(handle->audio.codec); + } + +@@ -957,7 +970,11 @@ static void ffmpeg_free(void *data) + + if (handle->video.codec) + { ++#if FFMPEG8 ++ avcodec_free_context(&handle->video.codec); ++#else + avcodec_close(handle->video.codec); ++#endif + av_free(handle->video.codec); + } + diff --git a/retroarch.spec b/retroarch.spec index 3bef799..e7f480e 100644 --- a/retroarch.spec +++ b/retroarch.spec @@ -118,6 +118,8 @@ Source5: %{short_url}/libretro-database/archive/v%{version}/libretro-data Source10: %{name}-enable-network-access.sh Source11: README.fedora.md +# https://github.com/libretro/RetroArch/commit/21776a2e59f5f5899ff2198c0df25a95b5020012 +Patch0: %{name}-ffmpeg8.patch BuildRequires: desktop-file-utils BuildRequires: gcc-c++ >= 7 @@ -298,6 +300,7 @@ database of ROMs that are known to be good copies. %setup -n RetroArch-%{version} -q -D -T -a3 %setup -n RetroArch-%{version} -q -D -T -a4 %setup -n RetroArch-%{version} -q -D -T -a5 +%patch -P0 -p1 -b .ffmpeg8 # Unbundling pushd deps From 08cf039f9889f017c1674ec1812282b932243273 Mon Sep 17 00:00:00 2001 From: Artem Polishchuk Date: Thu, 18 Dec 2025 06:57:18 +0300 Subject: [PATCH 9/9] Update to 1.22.0 Signed-off-by: Artem Polishchuk --- .gitignore | 5 +++ retroarch-ffmpeg8.patch | 85 ----------------------------------------- retroarch.spec | 42 +++++++------------- sources | 10 ++--- 4 files changed, 23 insertions(+), 119 deletions(-) delete mode 100644 retroarch-ffmpeg8.patch diff --git a/.gitignore b/.gitignore index d4b9199..1df90dd 100644 --- a/.gitignore +++ b/.gitignore @@ -152,3 +152,8 @@ /retroarch-1.19.0.tar.gz /retroarch-assets-1.19.0.tar.gz /retroarch-joypad-autoconfig-1.19.0.tar.gz +/libretro-core-info-1.22.0.tar.gz +/libretro-database-1.22.0.tar.gz +/retroarch-1.22.0.tar.gz +/retroarch-assets-1.22.0.tar.gz +/retroarch-joypad-autoconfig-1.22.0.tar.gz diff --git a/retroarch-ffmpeg8.patch b/retroarch-ffmpeg8.patch deleted file mode 100644 index 0d64fb1..0000000 --- a/retroarch-ffmpeg8.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff -up RetroArch-1.19.0/cores/libretro-ffmpeg/ffmpeg_core.c.ffmpeg8 RetroArch-1.19.0/cores/libretro-ffmpeg/ffmpeg_core.c ---- RetroArch-1.19.0/cores/libretro-ffmpeg/ffmpeg_core.c.ffmpeg8 2024-05-30 05:03:48.000000000 +0200 -+++ RetroArch-1.19.0/cores/libretro-ffmpeg/ffmpeg_core.c 2025-10-23 17:12:03.063697264 +0200 -@@ -99,6 +99,9 @@ static tpool_t *tpool; - - #define FFMPEG3 ((LIBAVUTIL_VERSION_INT < (56, 6, 100)) || \ - (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100))) -+#ifndef FFMPEG8 -+#define FFMPEG8 (LIBAVCODEC_VERSION_MAJOR >= 62) -+#endif - - #if ENABLE_HW_ACCEL - static enum AVHWDeviceType hw_decoder; -@@ -2088,17 +2091,28 @@ void CORE_PREFIX(retro_unload_game)(void - - for (i = 0; i < MAX_STREAMS; i++) - { -+#if FFMPEG8 -+ if (sctx[i]) -+ avcodec_free_context(&sctx[i]); -+ if (actx[i]) -+ avcodec_free_context(&actx[i]); -+#else - if (sctx[i]) - avcodec_close(sctx[i]); - if (actx[i]) - avcodec_close(actx[i]); -+#endif - sctx[i] = NULL; - actx[i] = NULL; - } - - if (vctx) - { -+#if FFMPEG8 -+ avcodec_free_context(&vctx); -+#else - avcodec_close(vctx); -+#endif - vctx = NULL; - } - -diff -up RetroArch-1.19.0/record/drivers/record_ffmpeg.c.ffmpeg8 RetroArch-1.19.0/record/drivers/record_ffmpeg.c ---- RetroArch-1.19.0/record/drivers/record_ffmpeg.c.ffmpeg8 2024-05-30 05:03:48.000000000 +0200 -+++ RetroArch-1.19.0/record/drivers/record_ffmpeg.c 2025-10-23 17:11:17.419250148 +0200 -@@ -70,6 +70,15 @@ extern "C" { - #include "../../verbosity.h" - - #define FFMPEG3 (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)) -+ -+#ifndef FFMPEG8 -+#define FFMPEG8 (LIBAVCODEC_VERSION_MAJOR >= 62) -+#endif -+ -+#ifndef AV_INPUT_BUFFER_MIN_SIZE -+#define AV_INPUT_BUFFER_MIN_SIZE 16384 -+#endif -+ - #define HAVE_CH_LAYOUT (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 28, 100)) - - struct ff_video_info -@@ -949,7 +958,11 @@ static void ffmpeg_free(void *data) - - if (handle->audio.codec) - { -+#if FFMPEG8 -+ avcodec_free_context(&handle->audio.codec); -+#else - avcodec_close(handle->audio.codec); -+#endif - av_free(handle->audio.codec); - } - -@@ -957,7 +970,11 @@ static void ffmpeg_free(void *data) - - if (handle->video.codec) - { -+#if FFMPEG8 -+ avcodec_free_context(&handle->video.codec); -+#else - avcodec_close(handle->video.codec); -+#endif - av_free(handle->video.codec); - } - diff --git a/retroarch.spec b/retroarch.spec index e7f480e..8b7c4ba 100644 --- a/retroarch.spec +++ b/retroarch.spec @@ -22,7 +22,7 @@ ExcludeArch: s390x %global short_url https://github.com/libretro Name: %{appname}%{?p_suffix} -Version: 1.19.0 +Version: 1.22.0 Release: %autorelease Summary: Cross-platform, sophisticated frontend for the libretro API. %{?sum_suffix} @@ -118,17 +118,13 @@ Source5: %{short_url}/libretro-database/archive/v%{version}/libretro-data Source10: %{name}-enable-network-access.sh Source11: README.fedora.md -# https://github.com/libretro/RetroArch/commit/21776a2e59f5f5899ff2198c0df25a95b5020012 -Patch0: %{name}-ffmpeg8.patch BuildRequires: desktop-file-utils BuildRequires: gcc-c++ >= 7 BuildRequires: glslang-devel BuildRequires: libappstream-glib BuildRequires: make -%if 0%{?fedora} < 42 BuildRequires: mbedtls-devel -%endif BuildRequires: mesa-libEGL-devel BuildRequires: spirv-tools-libs BuildRequires: systemd-devel @@ -141,7 +137,8 @@ BuildRequires: stb_truetype-static BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(caca) BuildRequires: pkgconfig(dbus-1) -BuildRequires: pkgconfig(flac) +# Since Flac 1.5.0 update RetroArch won't compile +#BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(gl) @@ -218,7 +215,7 @@ Recommends: libretro-stella2014 # * Dummy for future %endif -Provides: bundled(7zip) = 9.20 +Provides: bundled(7zip) = 19.00 Provides: bundled(discord-rpc) Provides: bundled(dr) Provides: bundled(glslang) @@ -227,15 +224,12 @@ Provides: bundled(ibxm) # https://github.com/libretro/RetroArch/issues/8153 Provides: bundled(lua) = 5.3.6 -Provides: bundled(rcheevos) = 10.7 +Provides: bundled(flac) = 1.3.2 +Provides: bundled(rcheevos) = 12.1 Provides: bundled(SPIRV-Cross) # Unbundling this in the manner of the other stb libraries does not work. Provides: bundled(stb_vorbis) -%if 0%{?fedora} >= 42 -Provides: bundled(mbedtls) = 2.5.1 -%endif - %global _description %{expand: libretro is an API that exposes generic audio/video/input callbacks. A frontend for libretro (such as RetroArch) handles video output, audio output, input and @@ -246,8 +240,8 @@ While RetroArch is the reference frontend for libretro, several other projects have used the libretro interface to include support for emulators and/or game engines. libretro is completely open and free for anyone to use. -For how to download and install more libretro cores please read included README.fedora.md -file.} +For how to download and install more libretro cores please read included +README.fedora.md file.} %description %{_description} @@ -290,8 +284,8 @@ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} %description database RetroArch incoporates a ROM scanning system to automatically produce playlists. -Each ROM that is scanned by the playlist generator is checked against a -database of ROMs that are known to be good copies. +Each ROM that is scanned by the playlist generator is checked against a database +of ROMs that are known to be good copies. %prep @@ -300,13 +294,13 @@ database of ROMs that are known to be good copies. %setup -n RetroArch-%{version} -q -D -T -a3 %setup -n RetroArch-%{version} -q -D -T -a4 %setup -n RetroArch-%{version} -q -D -T -a5 -%patch -P0 -p1 -b .ffmpeg8 # Unbundling pushd deps rm -rf \ libfat \ - libFLAC \ +%dnl Since Flac 1.5.0 update RetroArch won't compile \ +%dnl libFLAC \ libiosuhax \ libvita2d \ libz \ @@ -320,10 +314,8 @@ do ln -svf /usr/include/stb/stb_${lib}.h deps/stb/stb_${lib}.h done -%if 0%{?fedora} < 42 # * Not part of the 'mbedtls' upstream source find deps/mbedtls/ ! -name 'cacert.h' -type f -exec rm -f {} + -%endif # Use system assets, libretro cores, libretro's core info and audio/video, # filters, database files (cheatcode, content data, cursors) @@ -368,12 +360,8 @@ sed -e 's|retroarch.cfg|%{name}.cfg|g' \ %build ./configure \ --prefix=%{_prefix} \ - --disable-builtinflac \ -%if 0%{?fedora} < 42 +%dnl --disable-builtinflac \ --disable-builtinmbedtls \ -%else - --enable-builtinmbedtls \ -%endif --disable-builtinzlib \ --enable-dbus \ --enable-libdecor \ @@ -451,10 +439,6 @@ mv %{buildroot}%{_datadir}/libretro/autoconfig/ \ %make_install -C libretro-database-%{version} \ INSTALLDIR=%{_datadir}/libretro/database%{?p_suffix} -# Rename desktop file to UUID for compatibility -mv %{buildroot}%{_datadir}/applications/%{appname}.desktop \ - %{buildroot}%{_datadir}/applications/%{uuid}.desktop - %if %{with freeworld} # Rename binary, desktop file, appdata manifest, manpage and config file mv %{buildroot}%{_bindir}/%{appname} \ diff --git a/sources b/sources index 2671772..19cfff3 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (libretro-core-info-1.19.0.tar.gz) = 17cca258bb3460f2078fea0f2d64319a946aecf915475f61ca4b8eac3c882edfb96e38ae897285b4e1959ab06cf277e93130317ea13c469515948fd28fc942cd -SHA512 (libretro-database-1.19.0.tar.gz) = 1ca406d93670ef9bd8fb4fdd4a551c8cff4f6523aad3b5172af62b78cc4ae69ffddc911f7077aa93cdbd5860ed20e75d93a6271d48b6a1d24b63528cfbea753f -SHA512 (retroarch-1.19.0.tar.gz) = fe807570eedac5e5142e68a0c9d4e085be923e4914a3cfa9635ef644c02de2d8f9777ce7dfbdee0d8584fc4fa038f04adc1c9a55e3fe46903ba8ce05878b17a0 -SHA512 (retroarch-assets-1.19.0.tar.gz) = 4e02e4c5d9b546ad12bf10d54aae51b43f18879e603edc7f90f02907712fff78c8cfd23adaa8fbce6b054aea91254ad942fc4ade60daf925906ba85e9b6ec9fb -SHA512 (retroarch-joypad-autoconfig-1.19.0.tar.gz) = 2644fe7f40dcb94fb433ea23b7825193ddc1b81d9fe9841b0a3bcba9598aa72286ea07426657ec6de404efb64e2c42950d81f58861ffc9193a892e8bd4a59a6d +SHA512 (libretro-core-info-1.22.0.tar.gz) = a9c4b471b77b09fcaa1d46f4fae9d56a07e30ef15665f1b067d53a28b5e14c2b83120dee8ddaa1ec9ba31bab198fb748f76d5d4990888f9141e774e256ec6e2d +SHA512 (libretro-database-1.22.0.tar.gz) = 832f020182d4371e88ddb817c9214f7292265a82e51e53e9a1645217f1de801ad67c2b05cd19e17b70732f79e3ee3d33e82e7045e5bda6d3d81414a677b3fcb5 +SHA512 (retroarch-1.22.0.tar.gz) = 99a2c1bf4d74090c357431e78968012187ec47040b2b22c5f5d155d9e1713583d3160b2fcd4b872e177f706a87cbc660efb37766181862865f8f3a437e3b92f5 +SHA512 (retroarch-assets-1.22.0.tar.gz) = 930683106b777745a799ce6a45aac82e09164946a788f820aed27856d1a3fcf39f26045edc84706f047afe654bd3ba265d84dcaf143def194258606c4ff656be +SHA512 (retroarch-joypad-autoconfig-1.22.0.tar.gz) = 1b59694d3520a516f145d3e48d12b42267591cd59f44ca0d6b1a3532d6c195884e2d4345a69326bf6fe75bf53b4edb077cfe57a4701e3fe72f04e61f66a0d317