commit:     8a5c2fe40aa43666e02b63dbb2138551336f5a65
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 13 15:45:00 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Sep 13 16:03:20 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a5c2fe4

media-video/vlc: fix build with live555 >= 2024.11.28

Upstream commit 8befcbfa834b809602db24c9ba7456d8cfc25cdb

See also:
https://code.videolan.org/videolan/vlc/-/merge_requests/7709

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/vlc-3.0.22-live555-fix-w-20241128.patch  | 47 ++++++++++++++++++++++
 ...lc-3.0.9999.ebuild => vlc-3.0.22_rc1-r1.ebuild} |  9 +++--
 media-video/vlc/vlc-3.0.9999.ebuild                |  4 +-
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/media-video/vlc/files/vlc-3.0.22-live555-fix-w-20241128.patch 
b/media-video/vlc/files/vlc-3.0.22-live555-fix-w-20241128.patch
new file mode 100644
index 000000000000..3b61982a6e67
--- /dev/null
+++ b/media-video/vlc/files/vlc-3.0.22-live555-fix-w-20241128.patch
@@ -0,0 +1,47 @@
+https://code.videolan.org/videolan/vlc/-/merge_requests/7709
+
+From 2ae84a65385394637f243e37a89026a20828c657 Mon Sep 17 00:00:00 2001
+From: Florian Albrechtskirchinger <[email protected]>
+Date: Sun, 2 Mar 2025 08:30:43 +0100
+Subject: [PATCH] live555: fix build with versions >= 2024.11.28
+
+In the 2024.11.28 release (version 1732752000), live555 introduced
+`EventLoopWatchVariable` as a typedef for `std::atomic<char>`, replacing
+direct use of `char` in earlier versions. Add a conditional typedef to
+define it as `char` for older versions, and update `event_rtsp` and
+`event_data` to use `EventLoopWatchVariable`.
+
+(cherry picked from commit 8befcbfa834b809602db24c9ba7456d8cfc25cdb)
+---
+ modules/access/live555.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
+index e90382eeb3..a495187763 100644
+--- a/modules/access/live555.cpp
++++ b/modules/access/live555.cpp
+@@ -198,6 +198,10 @@ class RTSPClientVlc;
+ #define CAP_SUBSESSION_PAUSE    (1 << 3)
+ #define CAPS_DEFAULT            CAP_RATE_CONTROL
+ 
++#if LIVEMEDIA_LIBRARY_VERSION_INT < 1732752000 // 2024.11.28
++typedef char EventLoopWatchVariable;
++#endif
++
+ struct demux_sys_t
+ {
+     char            *p_sdp;    /* XXX mallocated */
+@@ -236,8 +240,8 @@ struct demux_sys_t
+     bool             b_no_data;     /* if we never received any data */
+     int              i_no_data_ti;  /* consecutive number of TaskInterrupt */
+ 
+-    char             event_rtsp;
+-    char             event_data;
++    EventLoopWatchVariable event_rtsp;
++    EventLoopWatchVariable event_data;
+ 
+     bool             b_get_param;   /* Does the server support GET_PARAMETER 
*/
+     bool             b_paused;      /* Are we paused? */
+-- 
+2.51.0
+

diff --git a/media-video/vlc/vlc-3.0.9999.ebuild 
b/media-video/vlc/vlc-3.0.22_rc1-r1.ebuild
similarity index 97%
copy from media-video/vlc/vlc-3.0.9999.ebuild
copy to media-video/vlc/vlc-3.0.22_rc1-r1.ebuild
index b9c64d6bd49c..f258c996a79f 100644
--- a/media-video/vlc/vlc-3.0.9999.ebuild
+++ b/media-video/vlc/vlc-3.0.22_rc1-r1.ebuild
@@ -18,7 +18,8 @@ else
        if [[ ${MY_P} = ${P} ]] ; then
                
SRC_URI="https://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz";
        else
-               
SRC_URI="https://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz";
+               # 
SRC_URI="https://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz";
+               
SRC_URI="https://code.videolan.org/videolan/vlc/-/archive/${MY_PV}/${MY_P}.tar.bz2";
        fi
        S="${WORKDIR}/${MY_P}"
        KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv -sparc ~x86"
@@ -64,7 +65,6 @@ BDEPEND="
        wayland? ( dev-util/wayland-scanner )
        x86? ( dev-lang/yasm )
 "
-# <media-plugins/live-2024.11.28: 
https://github.com/gentoo/gentoo/pull/40610#issuecomment-2664870395
 RDEPEND="
        media-libs/libvorbis
        net-dns/libidn:=
@@ -149,7 +149,7 @@ RDEPEND="
        libtiger? ( media-libs/libtiger )
        linsys? ( media-libs/zvbi )
        lirc? ( app-misc/lirc )
-       live? ( <media-plugins/live-2024.11.28:= )
+       live? ( media-plugins/live:= )
        lua? ( ${LUA_DEPS} )
        mad? ( media-libs/libmad )
        matroska? (
@@ -235,6 +235,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-3.0.6-fdk-aac-2.0.0.patch # bug 672290
        "${FILESDIR}"/${PN}-3.0.11.1-configure_lua_version.patch
        "${FILESDIR}"/${PN}-3.0.18-drop-minizip-dep.patch
+       "${FILESDIR}"/${PN}-3.0.22-live555-fix-w-20241128.patch # git master
 )
 
 DOCS=( AUTHORS THANKS NEWS README doc/fortunes.txt )
@@ -257,7 +258,7 @@ src_prepare() {
        fi
 
        # Make it build with libtool 1.5
-       rm m4/lt* m4/libtool.m4 || die
+       # rm m4/lt* m4/libtool.m4 || die
 
        # We are not in a real git checkout due to the absence of a .git 
directory.
        touch src/revision.txt || die

diff --git a/media-video/vlc/vlc-3.0.9999.ebuild 
b/media-video/vlc/vlc-3.0.9999.ebuild
index b9c64d6bd49c..a6b581cc0add 100644
--- a/media-video/vlc/vlc-3.0.9999.ebuild
+++ b/media-video/vlc/vlc-3.0.9999.ebuild
@@ -64,7 +64,6 @@ BDEPEND="
        wayland? ( dev-util/wayland-scanner )
        x86? ( dev-lang/yasm )
 "
-# <media-plugins/live-2024.11.28: 
https://github.com/gentoo/gentoo/pull/40610#issuecomment-2664870395
 RDEPEND="
        media-libs/libvorbis
        net-dns/libidn:=
@@ -149,7 +148,7 @@ RDEPEND="
        libtiger? ( media-libs/libtiger )
        linsys? ( media-libs/zvbi )
        lirc? ( app-misc/lirc )
-       live? ( <media-plugins/live-2024.11.28:= )
+       live? ( media-plugins/live:= )
        lua? ( ${LUA_DEPS} )
        mad? ( media-libs/libmad )
        matroska? (
@@ -235,6 +234,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-3.0.6-fdk-aac-2.0.0.patch # bug 672290
        "${FILESDIR}"/${PN}-3.0.11.1-configure_lua_version.patch
        "${FILESDIR}"/${PN}-3.0.18-drop-minizip-dep.patch
+       "${FILESDIR}"/${PN}-3.0.22-live555-fix-w-20241128.patch # git master
 )
 
 DOCS=( AUTHORS THANKS NEWS README doc/fortunes.txt )

Reply via email to