NetBSD Problem Report #58542

From www@netbsd.org  Fri Aug  2 22:00:06 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 5C8DD1A923E
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  2 Aug 2024 22:00:06 +0000 (UTC)
Message-Id: <20240802220004.EAD6D1A923E@mollari.NetBSD.org>
Date: Fri,  2 Aug 2024 22:00:04 +0000 (UTC)
From: phil+netbsd@krylov.eu
Reply-To: phil+netbsd@krylov.eu
To: gnats-bugs@NetBSD.org
Subject: multimedia/qt6-qtmultimedia does not build on Linux
X-Send-Pr-Version: www-1.0

>Number:         58542
>Category:       pkg
>Synopsis:       multimedia/qt6-qtmultimedia does not build on Linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 02 22:05:00 +0000 2024
>Originator:     Phil Krylov
>Release:        pkgsrc-current
>Organization:
krylov.eu
>Environment:
Linux localhost.localdomain 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
>Description:
Since update to 6.7.2, multimedia/qt6-qtmultimedia misses PLIST.Linux. Also, a patch is needed to build it with Linux headers older than 5.2.
>How-To-Repeat:
bmake -C multimedia/qt6-qtmultimedia bin-install  # after you've got all the dependencies to build
>Fix:
Index: multimedia/qt6-qtmultimedia/PLIST.Linux
===================================================================
RCS file: multimedia/qt6-qtmultimedia/PLIST.Linux
diff -N multimedia/qt6-qtmultimedia/PLIST.Linux
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ multimedia/qt6-qtmultimedia/PLIST.Linux	2 Aug 2024 21:50:46 -0000
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+qt6/include/QtMultimedia/${PKGVERSION}/QtMultimedia/private/qsymbolsresolveutils_p.h
Index: multimedia/qt6-qtmultimedia/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/qt6-qtmultimedia/distinfo,v
retrieving revision 1.12
diff -p -u -r1.12 distinfo
--- multimedia/qt6-qtmultimedia/distinfo	26 Jun 2024 16:41:00 -0000	1.12
+++ multimedia/qt6-qtmultimedia/distinfo	2 Aug 2024 21:50:46 -0000
@@ -5,4 +5,6 @@ SHA512 (qtmultimedia-everywhere-src-6.7.
 Size (qtmultimedia-everywhere-src-6.7.2.tar.xz) = 8451800 bytes
 SHA1 (patch-cmake_FindFFmpeg.cmake) = d278e4676d2f6a1dbd42f813f9df832ccf77f02f
 SHA1 (patch-src_plugins_multimedia_ffmpeg_CMakeLists.txt) = b64897d43df685b86b918fc627942a7eb597272c
+SHA1 (patch-src_plugins_multimedia_ffmpeg_qv4l2camera.cpp) = 0734c66a251f8e89f5588a0ff52f9b749f27d491
+SHA1 (patch-src_plugins_multimedia_ffmpeg_qv4l2cameradevices.cpp) = d3e7d9108a79634d8273897cb12de29411c768b4
 SHA1 (patch-src_plugins_multimedia_gstreamer_mediacapture_qgstreamercamera.cpp) = 51a750623d77c6ac1c90c16eadb08dad4c47a359
Index: multimedia/qt6-qtmultimedia/patches/patch-src_plugins_multimedia_ffmpeg_qv4l2camera.cpp
===================================================================
RCS file: multimedia/qt6-qtmultimedia/patches/patch-src_plugins_multimedia_ffmpeg_qv4l2camera.cpp
diff -N multimedia/qt6-qtmultimedia/patches/patch-src_plugins_multimedia_ffmpeg_qv4l2camera.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ multimedia/qt6-qtmultimedia/patches/patch-src_plugins_multimedia_ffmpeg_qv4l2camera.cpp	2 Aug 2024 21:50:46 -0000
@@ -0,0 +1,34 @@
+$NetBSD$
+
+linux/videodev2.h on Linux before 5.2 lacks needed definitions.
+
+--- src/plugins/multimedia/ffmpeg/qv4l2camera.cpp.orig	2024-06-08 01:28:28.000000000 +0000
++++ src/plugins/multimedia/ffmpeg/qv4l2camera.cpp
+@@ -17,6 +17,27 @@ QT_BEGIN_NAMESPACE
+ 
+ static Q_LOGGING_CATEGORY(qLcV4L2Camera, "qt.multimedia.ffmpeg.v4l2camera");
+ 
++#ifndef V4L2_PIX_FMT_XBGR32  // Linux 3.17+
++#define V4L2_PIX_FMT_ABGR32  v4l2_fourcc('A', 'R', '2', '4') /* 32  BGRA-8-8-8-8  */
++#define V4L2_PIX_FMT_XBGR32  v4l2_fourcc('X', 'R', '2', '4') /* 32  BGRX-8-8-8-8  */
++#define V4L2_PIX_FMT_ARGB32  v4l2_fourcc('B', 'A', '2', '4') /* 32  ARGB-8-8-8-8  */
++#define V4L2_PIX_FMT_XRGB32  v4l2_fourcc('B', 'X', '2', '4') /* 32  XRGB-8-8-8-8  */
++#endif
++
++#ifndef V4L2_COLORSPACE_BT2020  // Linux 3.19+
++#define V4L2_COLORSPACE_BT2020	10
++#endif
++
++#ifndef V4L2_COLORSPACE_DCI_P3  // Linux 4.4+
++#define V4L2_COLORSPACE_DCI_P3	12
++#endif
++
++#ifndef V4L2_PIX_FMT_BGRA32  // Linux 5.2+
++#define V4L2_PIX_FMT_BGRA32  v4l2_fourcc('R', 'A', '2', '4') /* 32  ABGR-8-8-8-8  */
++#define V4L2_PIX_FMT_RGBA32  v4l2_fourcc('A', 'B', '2', '4') /* 32  RGBA-8-8-8-8  */
++#endif
++
++
+ static const struct {
+     QVideoFrameFormat::PixelFormat fmt;
+     uint32_t v4l2Format;
Index: multimedia/qt6-qtmultimedia/patches/patch-src_plugins_multimedia_ffmpeg_qv4l2cameradevices.cpp
===================================================================
RCS file: multimedia/qt6-qtmultimedia/patches/patch-src_plugins_multimedia_ffmpeg_qv4l2cameradevices.cpp
diff -N multimedia/qt6-qtmultimedia/patches/patch-src_plugins_multimedia_ffmpeg_qv4l2cameradevices.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ multimedia/qt6-qtmultimedia/patches/patch-src_plugins_multimedia_ffmpeg_qv4l2cameradevices.cpp	2 Aug 2024 21:50:46 -0000
@@ -0,0 +1,17 @@
+$NetBSD$
+
+linux/videodev2.h on Linux before 4.12 lacks needed definition.
+
+--- src/plugins/multimedia/ffmpeg/qv4l2cameradevices.cpp.orig	2024-08-02 15:41:42.029987252 +0000
++++ src/plugins/multimedia/ffmpeg/qv4l2cameradevices.cpp
+@@ -15,6 +15,10 @@
+ 
+ #include <linux/videodev2.h>
+ 
++#ifndef V4L2_CAP_META_CAPTURE  // Linux 4.12+
++#define V4L2_CAP_META_CAPTURE	0x00800000
++#endif
++
+ QT_BEGIN_NAMESPACE
+ 
+ static Q_LOGGING_CATEGORY(qLcV4L2CameraDevices, "qt.multimedia.ffmpeg.v4l2cameradevices");

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.