commit:     1d30271d0083eb61aec97a5295227ccc93754e54
Author:     Z. Liu <zhixu.liu <AT> gmail <DOT> com>
AuthorDate: Tue Dec 30 16:02:54 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan  1 23:48:50 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d30271d

media-libs/amf-headers: add static for inline

to fix errors when an inline function is used in multiple files

Closes: https://bugs.gentoo.org/834761
Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45211
Closes: https://github.com/gentoo/gentoo/pull/45211
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...4.36-r1.ebuild => amf-headers-1.4.36-r2.ebuild} |  4 +++
 .../files/amf-headers-1.4.36-static-inline.patch   | 29 ++++++++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/media-libs/amf-headers/amf-headers-1.4.36-r1.ebuild 
b/media-libs/amf-headers/amf-headers-1.4.36-r2.ebuild
similarity index 91%
rename from media-libs/amf-headers/amf-headers-1.4.36-r1.ebuild
rename to media-libs/amf-headers/amf-headers-1.4.36-r2.ebuild
index a0651704cafb..ac1c8466fde7 100644
--- a/media-libs/amf-headers/amf-headers-1.4.36-r1.ebuild
+++ b/media-libs/amf-headers/amf-headers-1.4.36-r2.ebuild
@@ -19,6 +19,10 @@ S="${WORKDIR}/AMF-${PV}"
 LICENSE="MIT"
 SLOT="0"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.4.36-static-inline.patch
+)
+
 src_unpack() {
        default
 

diff --git 
a/media-libs/amf-headers/files/amf-headers-1.4.36-static-inline.patch 
b/media-libs/amf-headers/files/amf-headers-1.4.36-static-inline.patch
new file mode 100644
index 000000000000..57e319e0b4b2
--- /dev/null
+++ b/media-libs/amf-headers/files/amf-headers-1.4.36-static-inline.patch
@@ -0,0 +1,29 @@
+https://github.com/GPUOpen-LibrariesAndSDKs/AMF/pull/582
+
+From 23529a75168248b93c46b25adac1e61bb1f7ab75 Mon Sep 17 00:00:00 2001
+From: "Z. Liu" <[email protected]>
+Date: Tue, 30 Dec 2025 23:44:12 +0800
+Subject: [PATCH] add `static` to fix errors when an inline function is used in
+ multiple files
+
+see https://bugs.gentoo.org/834761, build is failed for media-tv/mythtv
+due to multiple definitions of 'GetDefaultChannelLayout'
+
+Signed-off-by: Z. Liu <[email protected]>
+
+diff --git a/amf/public/include/core/AudioBuffer.h 
b/amf/public/include/core/AudioBuffer.h
+index 7382fc0..34f8adc 100644
+--- a/amf/public/include/core/AudioBuffer.h
++++ b/amf/public/include/core/AudioBuffer.h
+@@ -85,7 +85,7 @@ namespace amf
+     } AMF_AUDIO_CHANNEL_LAYOUT;
+ 
+     // get the most common layout for a given number of speakers
+-    inline int GetDefaultChannelLayout(int channels)
++    static inline int GetDefaultChannelLayout(int channels)
+     {
+         switch (channels)
+         {
+-- 
+2.49.1
+

Reply via email to