commit:     995150ab9992ad1851d392fc1833b98bf55ede16
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Wed Feb  4 19:45:05 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb  6 00:04:33 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=995150ab

app-emulation/punes: fix compilation with ffmpeg8

Closes: https://bugs.gentoo.org/969619
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45323
Closes: https://github.com/gentoo/gentoo/pull/45323
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/punes/files/punes-0.111-ffmpeg8.patch | 21 +++++++++++++++++++++
 app-emulation/punes/punes-0.111-r2.ebuild           |  1 +
 2 files changed, 22 insertions(+)

diff --git a/app-emulation/punes/files/punes-0.111-ffmpeg8.patch 
b/app-emulation/punes/files/punes-0.111-ffmpeg8.patch
new file mode 100644
index 000000000000..a21289c05986
--- /dev/null
+++ b/app-emulation/punes/files/punes-0.111-ffmpeg8.patch
@@ -0,0 +1,21 @@
+From 
https://github.com/punesemu/puNES/commit/057f49044ec547de1ace03911a317a99e31f25cc
+From: Essem <[email protected]>
+Date: Wed, 31 Dec 2025 03:05:30 -0600
+Subject: [PATCH] Fix build on FFmpeg 8.0 (#444)
+
+`FF_PROFILE_H264_HIGH` has been deprecated since FFmpeg 6.1, with
+`AV_PROFILE_H264_HIGH` acting as its replacement.
+--- a/src/core/recording.c
++++ b/src/core/recording.c
+@@ -1058,7 +1058,11 @@ static BYTE ffmpeg_video_add_stream_format_h264(void) {
+               if (vbr < 4000) {
+                       vbr = 4000;
+               }
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(60, 31, 102)
++              video->avcc->profile = AV_PROFILE_H264_HIGH;
++#else
+               video->avcc->profile = FF_PROFILE_H264_HIGH;
++#endif
+               video->avcc->bit_rate = (int64_t)vbr;
+       }
+       video->avcc->thread_count = FFMIN(8, gui_hardware_concurrency());

diff --git a/app-emulation/punes/punes-0.111-r2.ebuild 
b/app-emulation/punes/punes-0.111-r2.ebuild
index 7b2d9abf34cf..31e697ff4318 100644
--- a/app-emulation/punes/punes-0.111-r2.ebuild
+++ b/app-emulation/punes/punes-0.111-r2.ebuild
@@ -45,6 +45,7 @@ PATCHES=(
        "${FILESDIR}/punes-0.111-FULLSCREEN_RESFREQ-fix.patch"
        "${FILESDIR}/punes-0.111-qt6.7_Q_OBJECT.patch"
        "${FILESDIR}/punes-0.111-qt6.9-compatibility.patch"
+       "${FILESDIR}/punes-0.111-ffmpeg8.patch"
 )
 
 src_configure() {

Reply via email to