[packages/ffmpeg] upstream fix for name clash with libv4l2 >= 1.30; rel 2

atler atler at pld-linux.org
Tue Aug 19 02:07:16 CEST 2025


commit 5ba9fdc7b148fa7b94ebcc700152521ddc2a8fb9
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Aug 19 02:04:12 2025 +0200

    upstream fix for name clash with libv4l2 >= 1.30; rel 2

 ffmpeg.spec        |  4 +++-
 libv4l2-1.30.patch | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+), 1 deletion(-)
---
diff --git a/ffmpeg.spec b/ffmpeg.spec
index 59b29f9..b27361d 100644
--- a/ffmpeg.spec
+++ b/ffmpeg.spec
@@ -132,7 +132,7 @@ Summary(pl.UTF-8):	FFmpeg - szybki konwerter audio/wideo
 Name:		ffmpeg
 # NOTE: 7.x prepared on DEVEL-7.1 branch, but other software is not ready (e.g. xine-lib 1.2.13, gstreamer-libav 1.24.2)
 Version:	6.1.3
-Release:	1
+Release:	2
 # LGPL or GPL, chosen at configure time (GPL version is more featured)
 # GPL: frei0r libcdio libdavs2 rubberband vidstab x264 x265 xavs xavs2 xvid
 # v3 (allows *GPLv3 or Apache-licensed libs): gmp lensfun opencore-amr vmaf vo-*enc rkmpp
@@ -148,6 +148,7 @@ Patch3:		v4l2-request-hwdec.patch
 Patch4:		ffmpeg-vulkan1.3.280.patch
 Patch5:		gcc14.patch
 Patch6:		texinfo-7.2.patch
+Patch7:		libv4l2-1.30.patch
 URL:		https://ffmpeg.org/
 %{?with_avisynth:BuildRequires:	AviSynthPlus-devel >= 3.7.3}
 %{?with_decklink:BuildRequires:	Blackmagic_DeckLink_SDK >= 10.11}
@@ -577,6 +578,7 @@ Dokumentacja pakietu FFmpeg w formacie HTML.
 %patch -P4 -p1
 %patch -P5 -p1
 %patch -P6 -p1
+%patch -P7 -p1
 
 # package the grep result for mplayer, the result formatted as ./mplayer/configure
 cat <<EOF > ffmpeg-avconfig
diff --git a/libv4l2-1.30.patch b/libv4l2-1.30.patch
new file mode 100644
index 0000000..16b3e65
--- /dev/null
+++ b/libv4l2-1.30.patch
@@ -0,0 +1,67 @@
+From 5fea5e3e11d6ff425db48f44489916399822aece Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen at gmail.com>
+Date: Fri, 6 Jun 2025 16:09:34 -0400
+Subject: [PATCH] configure: rename POSIX ioctl check
+
+Commit 00b64fca55a3a009c9d0e391c85f4fd3291e5d12 introduced configure
+detection for HAVE_POSIX_IOCTL but unfortunately this conflicts with
+v4l-utils version 1.30, which itself checks for #ifdef HAVE_POSIX_IOCTL
+in a public header and erroneously determines it to be true because we
+define this to be 0.
+
+Since this is only used for avdevice/v4l2, we rename this to something
+else, namely ioctl_posix, simply to prevent the name conflict with the
+file /usr/include/libv4l2.h at least until they can upstream a fix on
+their end.
+
+Signed-off-by: Leo Izen <leo.izen at gmail.com>
+---
+ configure          | 4 ++--
+ libavdevice/v4l2.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure b/configure
+index de1b88150f..534b443f7d 100755
+--- a/configure
++++ b/configure
+@@ -2533,6 +2533,7 @@ HAVE_LIST="
+     $TOOLCHAIN_FEATURES
+     $TYPES_LIST
+     gzip
++    ioctl_posix
+     libdrm_getfb2
+     makeinfo
+     makeinfo_html
+@@ -2545,7 +2546,6 @@ HAVE_LIST="
+     opencl_vaapi_intel_media
+     perl
+     pod2man
+-    posix_ioctl
+     texi2html
+     xmllint
+     zlib_gzip
+@@ -7275,7 +7275,7 @@ xmllint --version  > /dev/null 2>&1 && enable xmllint   || disable xmllint
+ check_headers linux/fb.h
+ check_headers linux/videodev2.h
+ test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
+-test_code cc sys/ioctl.h "int ioctl(int, int, ...)" && enable posix_ioctl
++test_code cc sys/ioctl.h "int ioctl(int, int, ...)" && enable ioctl_posix
+ 
+ # check V4L2 codecs available in the API
+ if enabled v4l2_m2m; then
+diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
+index 0ae6872338..c38ecbb378 100644
+--- a/libavdevice/v4l2.c
++++ b/libavdevice/v4l2.c
+@@ -111,7 +111,7 @@ struct video_data {
+     int (*open_f)(const char *file, int oflag, ...);
+     int (*close_f)(int fd);
+     int (*dup_f)(int fd);
+-#if HAVE_POSIX_IOCTL
++#if HAVE_IOCTL_POSIX
+     int (*ioctl_f)(int fd, int request, ...);
+ #else
+     int (*ioctl_f)(int fd, unsigned long int request, ...);
+-- 
+2.25.1
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ffmpeg.git/commitdiff/5ba9fdc7b148fa7b94ebcc700152521ddc2a8fb9



More information about the pld-cvs-commit mailing list