commit:     f5d7e42421230fbac2ecb7d8a612333b249eea37
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May  1 00:33:28 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May  1 00:33:28 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5d7e424

media-libs/xine-lib: fix build on (x86 w/ binutils-2.39 || clang)

Funnily enough, the change which did this in Binutils 2.39 is related
to the fixes for all the Qt stuff.

Closes: https://bugs.gentoo.org/731046
Closes: https://bugs.gentoo.org/955130
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../xine-lib-1.2.13-x86-protected-binutils-2.39.patch     | 15 +++++++++++++++
 ...xine-lib-1.2.9999.ebuild => xine-lib-1.2.13-r4.ebuild} | 15 ++++++++++++---
 media-libs/xine-lib/xine-lib-1.2.9999.ebuild              | 15 ++++++++++++---
 3 files changed, 39 insertions(+), 6 deletions(-)

diff --git 
a/media-libs/xine-lib/files/xine-lib-1.2.13-x86-protected-binutils-2.39.patch 
b/media-libs/xine-lib/files/xine-lib-1.2.13-x86-protected-binutils-2.39.patch
new file mode 100644
index 000000000000..e08d3f9f1c28
--- /dev/null
+++ 
b/media-libs/xine-lib/files/xine-lib-1.2.13-x86-protected-binutils-2.39.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/731046
+https://bugs.gentoo.org/955130
+https://sourceware.org/PR29377
+https://wiki.linuxfromscratch.org/blfs/ticket/16940
+--- a/include/xine.h
++++ b/include/xine.h
+@@ -118,7 +118,7 @@ xine_t *xine_new (void) XINE_PROTECTED;
+ /* allow the setting of some flags before xine_init
+  * FIXME-ABI: this is currently GLOBAL
+  */
+-void xine_set_flags (xine_t *, int) XINE_PROTECTED XINE_WEAK;
++void xine_set_flags (xine_t *, int) XINE_WEAK;
+ #define XINE_FLAG_NO_WRITE_CACHE              1
+ 
+ /*

diff --git a/media-libs/xine-lib/xine-lib-1.2.9999.ebuild 
b/media-libs/xine-lib/xine-lib-1.2.13-r4.ebuild
similarity index 93%
copy from media-libs/xine-lib/xine-lib-1.2.9999.ebuild
copy to media-libs/xine-lib/xine-lib-1.2.13-r4.ebuild
index 4a3c08267509..e32fac761662 100644
--- a/media-libs/xine-lib/xine-lib-1.2.9999.ebuild
+++ b/media-libs/xine-lib/xine-lib-1.2.13-r4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit flag-o-matic libtool multilib
+inherit ffmpeg-compat flag-o-matic libtool multilib
 
 if [[ ${PV} == *9999* ]]; then
        EHG_REPO_URI="http://hg.code.sf.net/p/xine/xine-lib-1.2";
@@ -37,7 +37,7 @@ REQUIRED_USE="
 RDEPEND="
        dev-libs/libxdg-basedir
        media-libs/libdvdnav
-       media-video/ffmpeg:=
+       media-video/ffmpeg-compat:6=
        sys-libs/zlib:=
        virtual/libiconv
        a52? ( media-libs/a52dec )
@@ -121,6 +121,11 @@ BDEPEND="
        virtual/pkgconfig
 "
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.2.13-configure-clang16.patch
+       "${FILESDIR}"/${PN}-1.2.13-x86-protected-binutils-2.39.patch
+)
+
 src_prepare() {
        default
 
@@ -139,6 +144,10 @@ src_prepare() {
 }
 
 src_configure() {
+       # TODO: fix with >=ffmpeg-7 then drop compat (bug #948076)
+       ffmpeg_compat_setup 6
+       ffmpeg_compat_add_flags
+
        # bug #944147
        append-flags -std=gnu17
 

diff --git a/media-libs/xine-lib/xine-lib-1.2.9999.ebuild 
b/media-libs/xine-lib/xine-lib-1.2.9999.ebuild
index 4a3c08267509..e32fac761662 100644
--- a/media-libs/xine-lib/xine-lib-1.2.9999.ebuild
+++ b/media-libs/xine-lib/xine-lib-1.2.9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit flag-o-matic libtool multilib
+inherit ffmpeg-compat flag-o-matic libtool multilib
 
 if [[ ${PV} == *9999* ]]; then
        EHG_REPO_URI="http://hg.code.sf.net/p/xine/xine-lib-1.2";
@@ -37,7 +37,7 @@ REQUIRED_USE="
 RDEPEND="
        dev-libs/libxdg-basedir
        media-libs/libdvdnav
-       media-video/ffmpeg:=
+       media-video/ffmpeg-compat:6=
        sys-libs/zlib:=
        virtual/libiconv
        a52? ( media-libs/a52dec )
@@ -121,6 +121,11 @@ BDEPEND="
        virtual/pkgconfig
 "
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.2.13-configure-clang16.patch
+       "${FILESDIR}"/${PN}-1.2.13-x86-protected-binutils-2.39.patch
+)
+
 src_prepare() {
        default
 
@@ -139,6 +144,10 @@ src_prepare() {
 }
 
 src_configure() {
+       # TODO: fix with >=ffmpeg-7 then drop compat (bug #948076)
+       ffmpeg_compat_setup 6
+       ffmpeg_compat_add_flags
+
        # bug #944147
        append-flags -std=gnu17
 

Reply via email to