1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-17 07:40:29 +02:00
Files
guix/gnu/packages/patches/stepmania-ffmpeg-compat.patch
Liliana Marie Prikler 3191948625 gnu: stepmania: Update to 5.1.0-b2-1.d55acb1.
* gnu/packages/patches/stepmania-ffmpeg-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/games.scm (stepmania): Update to 5.1.0-b2-1.d55acb1.
[source]<patches>: Add “stepmania-ffmpeg-compat.patch”.
<snippet>: Adjust unbundling.
[arguments]<#:configure-flags>: Add “-DWITH_SYSTEM_GLEW=1”,
“-DWITH_SYSTEM_JSONCPP=1”, “-DWITH_SYSTEM_JPEG=1”, “-DWITH_SYSTEM_MAD=1”,
“-DWITH_SYSTEM_OGG=1”, “-DWITH_SYSTEM_PCRE=1”, “-DWITH_SYSTEM_PNG=1”,
“-DWITH_SYSTEM_TOMMATH=1”, “-DWITH_SYSTEM_TOMCRYPT=1” and
“-DWITH_SYSTEM_ZLIB=1”.
<#:phases>: Remove ‘unbundle-libpng’.
[inputs]: Drop labels.  Sort alphabetically.
Replace ffmpeg-for-stepmania with ffmpeg-6.
Add libtommath and libtomcrypt.

Change-Id: I577fe1c15f906c3c67d1ae71a1e085e3fd05aef2
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2025-10-06 18:41:20 +08:00

49 lines
1.8 KiB
Diff

See [6] and [7].
[6] https://github.com/Tatsh/tatsh-overlay/blob/master/games-arcade/stepmania/files/stepmania-ffmpeg-6.patch
[7] https://github.com/Tatsh/tatsh-overlay/blob/master/games-arcade/stepmania/files/stepmania-ffmpeg-7.patch
diff --git a/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp b/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp
index 935ddf324b0..d4eed01d599 100644
--- a/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp
+++ b/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp
@@ -9,6 +9,10 @@
#include <cerrno>
+#if LIBAVCODEC_VERSION_MAJOR > 59
+#define frame_number frame_num
+#endif
+
static void FixLilEndian()
{
#if defined(ENDIAN_LITTLE)
@@ -405,7 +405,7 @@ void MovieTexture_FFMpeg::RegisterProtocols()
return;
Done = true;
-#if !FF_API_NEXT
+#if LIBAVCODEC_VERSION_MAJOR < 58
avcodec::avcodec_register_all();
avcodec::av_register_all();
#endif
@@ -508,7 +508,7 @@ RString MovieDecoder_FFMpeg::OpenCodec()
if( m_pStreamCodec->codec )
avcodec::avcodec_close( m_pStreamCodec );
- avcodec::AVCodec *pCodec = avcodec::avcodec_find_decoder( m_pStreamCodec->codec_id );
+ const avcodec::AVCodec *pCodec = avcodec::avcodec_find_decoder( m_pStreamCodec->codec_id );
if( pCodec == nullptr )
return ssprintf( "Couldn't find decoder %i", m_pStreamCodec->codec_id );
diff --git a/src/arch/MovieTexture/MovieTexture_FFMpeg.h b/src/arch/MovieTexture/MovieTexture_FFMpeg.h
index c092b765fc2..99f5ffcb1be 100644
--- a/src/arch/MovieTexture/MovieTexture_FFMpeg.h
+++ b/src/arch/MovieTexture/MovieTexture_FFMpeg.h
@@ -13,6 +13,7 @@ namespace avcodec
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libavutil/pixdesc.h>
+ #include <libavcodec/avcodec.h>
#if LIBAVCODEC_VERSION_MAJOR >= 58
#define av_free_packet av_packet_unref