Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Dec 2020 21:07:42 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r556854 - in head/multimedia: libv4l libv4l/files v4l-utils v4l_compat
Message-ID:  <202012022107.0B2L7gka063392@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Dec  2 21:07:42 2020
New Revision: 556854
URL: https://svnweb.freebsd.org/changeset/ports/556854

Log:
  Update v4l_compat, libv4l and v4l-utils to 1.20.0
  - Regenerate patches.
  - Fetch all sources from GitHub.
  - Update package descriptions, WWW links.
  
  Approved by:	pi (implicit)

Added:
  head/multimedia/libv4l/files/patch-utils_libcecutil_cec-gen.pl   (contents, props changed)
Deleted:
  head/multimedia/libv4l/files/patch-afb12361.c
  head/multimedia/libv4l/files/patch-lib_libv4lconvert_rgbyuv.c
  head/multimedia/libv4l/files/patch-utils_cec-ctl_msg2ctl.pl
  head/multimedia/libv4l/files/patch-utils_common_ir-encode.c
  head/multimedia/libv4l/files/patch-utils_common_keymap.h
  head/multimedia/libv4l/files/patch-utils_common_v4l2-tpg.h
  head/multimedia/libv4l/files/patch-utils_ir-ctl_bpf__encoder.c
  head/multimedia/libv4l/files/patch-utils_media-ctl_media-ctl.c
Modified:
  head/multimedia/libv4l/Makefile
  head/multimedia/libv4l/distinfo
  head/multimedia/libv4l/files/patch-lib_include_libdvbv5_descriptors.h
  head/multimedia/libv4l/files/patch-utils_v4l2-compliance_v4l2-test-buffers.cpp
  head/multimedia/libv4l/files/patch-utils_v4l2-ctl_v4l2-ctl-overlay.cpp
  head/multimedia/libv4l/pkg-descr
  head/multimedia/v4l-utils/pkg-descr
  head/multimedia/v4l_compat/Makefile
  head/multimedia/v4l_compat/pkg-descr

Modified: head/multimedia/libv4l/Makefile
==============================================================================
--- head/multimedia/libv4l/Makefile	Wed Dec  2 21:05:55 2020	(r556853)
+++ head/multimedia/libv4l/Makefile	Wed Dec  2 21:07:42 2020	(r556854)
@@ -3,14 +3,8 @@
 # Check v4l_compat and v4l-utils slave ports
 
 PORTNAME?=	libv4l
-PORTVERSION=	1.18.0
+PORTVERSION=	1.20.0
 CATEGORIES=	multimedia
-MASTER_SITES=	http://linuxtv.org/downloads/v4l-utils/:master \
-		http://www.selasky.org/hans_petter/distfiles/:local \
-		http://home.selasky.org/distfiles/:local
-WEBCAMDVERSION=	5.7.1.1
-DISTFILES=	v4l-utils-${PORTVERSION}.tar.bz2:master \
-		webcamd-${WEBCAMDVERSION}.tar.bz2:local
 
 MAINTAINER=	multimedia@FreeBSD.org
 COMMENT?=	Video4Linux library
@@ -19,8 +13,18 @@ LICENSE=	GPLv2 LGPL21
 LICENSE_COMB=	dual
 
 USES=		compiler:c11 tar:bzip2
-WRKSRC=		${WRKDIR}/v4l-utils-${PORTVERSION}
 
+USE_GITHUB=	yes
+GH_ACCOUNT=	hselasky
+GH_PROJECT=	v4l-utils
+GH_TAGNAME=	v4l-utils-${PORTVERSION}
+
+GH_TUPLE=	hselasky:webcamd:v5.10.6.0:webcamd \
+		torvalds:linux:v5.10-rc6:linux
+
+WEBCAMDDIR=	${WRKDIR}/webcamd-5.10.6.0
+LINUXDIR=	${WRKDIR}/linux-*
+
 .if ${PORTNAME} == v4l-utils || ${PORTNAME} == libv4l
 LIB_DEPENDS+=	libargp.so:devel/argp-standalone \
 		libudev.so:devel/libudev-devd
@@ -30,7 +34,7 @@ BUILD_DEPENDS+= gsed>0:textproc/gsed \
 GNU_CONFIGURE=	yes
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
-USES+=		gmake iconv jpeg libtool pathfix pkgconfig
+USES+=		autoreconf gmake iconv jpeg libtool pathfix pkgconfig
 USE_LDCONFIG=	yes
 CONFIGURE_ARGS=	\
 	--disable-qv4l2 \
@@ -66,11 +70,14 @@ CONFIGURE_ARGS+= \
 
 post-patch:
 # Remove old FreeBSD include files (to be removed upstream)
-	@${RM} -r ${WRKDIR}/v4l-utils-${PORTVERSION}/contrib/freebsd/include/*
+	@${RM} -r ${WRKSRC}/contrib/freebsd/include/*
+# Create symbolic link for Linux sources
+	@(${RM} -r ${WEBCAMDDIR}/media_tree && ${LN} -s ${LINUXDIR} ${WEBCAMDDIR}/media_tree)
 # Apply webcamd patches first
-	@(cd ${WRKDIR}/webcamd-${WEBCAMDVERSION}/patches && ${SH} ./do_patch.sh)
+	@(cd ${WEBCAMDDIR}/patches && ${SH} ./do_patch.sh)
 # Patch all source files
-	@${FIND} ${WRKDIR} -type f \( -iname "*.[ch]" -or -iname "*.cpp" -or -iname "msg2ctl.pl" \) | \
+	@${FIND} ${WRKSRC} ${LINUXDIR}/include/uapi \
+		-type f \( -iname "*.[ch]" -or -iname "*.cpp" -or -iname "cec-gen.pl" \) | \
 		${XARGS} -n 10 ${REINPLACE_CMD} \
 			-e 's|__inline__|inline|g' \
 			-e 's|__u8|uint8_t|g' \
@@ -100,6 +107,8 @@ post-patch:
 			-e 's|_IOC_NONE|IOC_VOID|g' \
 			-e 's|<endian.h>|<sys/endian.h>|g' \
 			-e 's|<linux/compiler.h>|<sys/cdefs.h>|g' \
+			-e 's|"compiler.h"|<sys/cdefs.h>|g' \
+			-e 's|fallthrough;|;|g' \
 			-e 's|<linux/errno.h>|<errno.h>|g' \
 			-e 's|<linux/ioctl.h>|<sys/ioctl.h>|g' \
 			-e '/^.*\<linux\/kernel.h\>.*/d' \
@@ -110,11 +119,5 @@ post-patch:
 			-e 's|<sys/sysmacros.h>|<sys/types.h>|g' \
 			-e 's|/usr/bin/perl|${LOCALBASE}/bin/perl|g' \
 			-e 's|__user||g'
-
-# Duplicate some files to avoid patching
-	@${CP} ${WRKSRC}/utils/common/ir-encode.c ${WRKSRC}/utils/ir-ctl/ir-encode.c
-	@${CP} ${WRKSRC}/utils/common/ir-encode.c ${WRKSRC}/utils/keytable/ir-encode.c
-	@${CP} ${WRKSRC}/utils/common/keymap.h ${WRKSRC}/utils/ir-ctl/keymap.h
-	@${CP} ${WRKSRC}/utils/common/keymap.h ${WRKSRC}/utils/keytable/keymap.h
 
 .include <bsd.port.mk>

Modified: head/multimedia/libv4l/distinfo
==============================================================================
--- head/multimedia/libv4l/distinfo	Wed Dec  2 21:05:55 2020	(r556853)
+++ head/multimedia/libv4l/distinfo	Wed Dec  2 21:07:42 2020	(r556854)
@@ -1,5 +1,7 @@
-TIMESTAMP = 1587021105
-SHA256 (v4l-utils-1.18.0.tar.bz2) = 6cb60d822eeed20486a03cc23e0fc65956fbc1e85e0c1a7477f68bbd9802880d
-SIZE (v4l-utils-1.18.0.tar.bz2) = 1995506
-SHA256 (webcamd-5.7.1.1.tar.bz2) = e803b245d0e1ecaf5ff07c5a9700f0951d065827d4907c4615369afab3c102c2
-SIZE (webcamd-5.7.1.1.tar.bz2) = 14370502
+TIMESTAMP = 1606936269
+SHA256 (hselasky-v4l-utils-1.20.0-v4l-utils-1.20.0_GH0.tar.gz) = 1a2bcc1fa5182f718c982c6ee58d0756dca602639ab6b9a9caff021272b33646
+SIZE (hselasky-v4l-utils-1.20.0-v4l-utils-1.20.0_GH0.tar.gz) = 1620489
+SHA256 (hselasky-webcamd-v5.10.6.0_GH0.tar.gz) = e6c2627130c369fa6cb0a2b30850ccd44735f755127677be457bc5a783b7b3e2
+SIZE (hselasky-webcamd-v5.10.6.0_GH0.tar.gz) = 267471
+SHA256 (torvalds-linux-v5.10-rc6_GH0.tar.gz) = d139d4cc8eb8b27364adc774c0df0feac39389beb4357a36d628a48c92fed393
+SIZE (torvalds-linux-v5.10-rc6_GH0.tar.gz) = 185316277

Modified: head/multimedia/libv4l/files/patch-lib_include_libdvbv5_descriptors.h
==============================================================================
--- head/multimedia/libv4l/files/patch-lib_include_libdvbv5_descriptors.h	Wed Dec  2 21:05:55 2020	(r556853)
+++ head/multimedia/libv4l/files/patch-lib_include_libdvbv5_descriptors.h	Wed Dec  2 21:07:42 2020	(r556854)
@@ -1,4 +1,4 @@
---- lib/include/libdvbv5/descriptors.h.orig	2020-04-09 16:29:54 UTC
+--- lib/include/libdvbv5/descriptors.h.orig	2020-05-21 11:22:05 UTC
 +++ lib/include/libdvbv5/descriptors.h
 @@ -87,6 +87,9 @@ typedef void (*dvb_table_init_func)(struct dvb_v5_fe_p
  extern const dvb_table_init_func dvb_table_initializers[256];

Added: head/multimedia/libv4l/files/patch-utils_libcecutil_cec-gen.pl
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/libv4l/files/patch-utils_libcecutil_cec-gen.pl	Wed Dec  2 21:07:42 2020	(r556854)
@@ -0,0 +1,11 @@
+--- utils/libcecutil/cec-gen.pl.orig	2020-05-21 11:22:05 UTC
++++ utils/libcecutil/cec-gen.pl
+@@ -49,7 +49,7 @@
+ 	}
+ 	my @args = split(/, */, $func_args);
+ 	my $has_struct = $func_args =~ /struct/;
+-	return if ($func_args =~ /__u\d+\s*\*/);
++	return if ($func_args =~ /__u\d+\s*\*/ || $func_args =~ /uint\d+_t\s*\*/);
+ 
+ 	my $cec_msg = $msg;
+ 	while ($cec_msg =~ /_/ && !exists($msgs{$cec_msg})) {

Modified: head/multimedia/libv4l/files/patch-utils_v4l2-compliance_v4l2-test-buffers.cpp
==============================================================================
--- head/multimedia/libv4l/files/patch-utils_v4l2-compliance_v4l2-test-buffers.cpp	Wed Dec  2 21:05:55 2020	(r556853)
+++ head/multimedia/libv4l/files/patch-utils_v4l2-compliance_v4l2-test-buffers.cpp	Wed Dec  2 21:07:42 2020	(r556854)
@@ -1,30 +1,10 @@
---- utils/v4l2-compliance/v4l2-test-buffers.cpp.orig	2020-04-09 16:29:54 UTC
+--- utils/v4l2-compliance/v4l2-test-buffers.cpp.orig	2020-12-02 20:09:09 UTC
 +++ utils/v4l2-compliance/v4l2-test-buffers.cpp
-@@ -22,6 +22,7 @@
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
+@@ -32,6 +32,7 @@
+ #include <ctype.h>
+ #include <errno.h>
+ #include <poll.h>
 +#include <signal.h>
- #include <inttypes.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -48,8 +49,8 @@
- #define VIVID_CID_QUEUE_ERROR		(VIVID_CID_VIVID_BASE + 70)
- #define VIVID_CID_REQ_VALIDATE_ERROR	(VIVID_CID_VIVID_BASE + 72)
- 
--static struct cv4l_fmt cur_fmt;
--static struct cv4l_fmt cur_m2m_fmt;
-+static cv4l_fmt cur_fmt;
-+static cv4l_fmt cur_m2m_fmt;
- static int stream_from_fd = -1;
- static bool stream_use_hdr;
- 
-@@ -354,7 +355,7 @@ int buffer::check(unsigned type, unsigned memory, unsi
- 	unsigned timestamp_src = g_timestamp_src();
- 	unsigned frame_types = 0;
- 	unsigned buf_states = 0;
--	const struct cv4l_fmt &fmt = is_m2m ? cur_m2m_fmt : cur_fmt;
-+	const cv4l_fmt &fmt = is_m2m ? cur_m2m_fmt : cur_fmt;
- 
- 	fail_on_test(g_type() != type);
- 	fail_on_test(g_memory() == 0);
+ #include <sys/ioctl.h>
+ #include <netinet/in.h>
+ #include <map>

Modified: head/multimedia/libv4l/files/patch-utils_v4l2-ctl_v4l2-ctl-overlay.cpp
==============================================================================
--- head/multimedia/libv4l/files/patch-utils_v4l2-ctl_v4l2-ctl-overlay.cpp	Wed Dec  2 21:05:55 2020	(r556853)
+++ head/multimedia/libv4l/files/patch-utils_v4l2-ctl_v4l2-ctl-overlay.cpp	Wed Dec  2 21:07:42 2020	(r556854)
@@ -1,21 +1,21 @@
---- utils/v4l2-ctl/v4l2-ctl-overlay.cpp.orig	2020-04-09 16:29:54 UTC
+--- utils/v4l2-ctl/v4l2-ctl-overlay.cpp.orig	2020-05-21 11:22:05 UTC
 +++ utils/v4l2-ctl/v4l2-ctl-overlay.cpp
-@@ -14,11 +14,12 @@
+@@ -14,11 +14,13 @@
  #include <dirent.h>
  #include <math.h>
  
-+#include "v4l2-ctl.h"
-+
-+#ifndef __FreeBSD__
- #include <linux/fb.h>
+-#include <linux/fb.h>
  #include <vector>
  
--#include "v4l2-ctl.h"
--
+ #include "v4l2-ctl.h"
+ 
++#ifndef __FreeBSD__
++#include <linux/fb.h>
++
  static unsigned int set_fbuf;
  static unsigned int set_overlay_fmt;
  static struct v4l2_format overlay_fmt;	/* set_format/get_format video overlay */
-@@ -546,3 +547,24 @@ void overlay_list(cv4l_fd &fd)
+@@ -546,3 +548,24 @@ void overlay_list(cv4l_fd &fd)
  	if (options[OptFindFb])
  		find_fb(fd.g_fd());
  }

Modified: head/multimedia/libv4l/pkg-descr
==============================================================================
--- head/multimedia/libv4l/pkg-descr	Wed Dec  2 21:05:55 2020	(r556853)
+++ head/multimedia/libv4l/pkg-descr	Wed Dec  2 21:07:42 2020	(r556854)
@@ -3,4 +3,4 @@ compliant video devices. It allows for transcoding of 
 in user space instead of kernel space and creates a standard interface
 mechanism for video devices.
 
-WWW: http://freshmeat.net/projects/libv4l
+WWW: https://linuxtv.org/wiki/index.php/V4l-utils

Modified: head/multimedia/v4l-utils/pkg-descr
==============================================================================
--- head/multimedia/v4l-utils/pkg-descr	Wed Dec  2 21:05:55 2020	(r556853)
+++ head/multimedia/v4l-utils/pkg-descr	Wed Dec  2 21:07:42 2020	(r556854)
@@ -2,4 +2,4 @@ Linux V4L2 and DVB API utilities shipped with the v4l 
 You can always find the latest development v4l-utils in the git repo:
 http://git.linuxtv.org/v4l-utils.git
 
-WWW: http://freshmeat.net/projects/libv4l
+WWW: https://linuxtv.org/wiki/index.php/V4l-utils

Modified: head/multimedia/v4l_compat/Makefile
==============================================================================
--- head/multimedia/v4l_compat/Makefile	Wed Dec  2 21:05:55 2020	(r556853)
+++ head/multimedia/v4l_compat/Makefile	Wed Dec  2 21:07:42 2020	(r556854)
@@ -37,7 +37,7 @@ do-install:
 
 .for F in ${BASE_HEADERS}
 	${INSTALL_DATA} \
-		${WRKDIR}/webcamd-${WEBCAMDVERSION}/media_tree/include/uapi/${F} \
+		${LINUXDIR}/include/uapi/${F} \
 		${STAGEDIR}${PREFIX}/include/${F}
 .endfor
 

Modified: head/multimedia/v4l_compat/pkg-descr
==============================================================================
--- head/multimedia/v4l_compat/pkg-descr	Wed Dec  2 21:05:55 2020	(r556853)
+++ head/multimedia/v4l_compat/pkg-descr	Wed Dec  2 21:07:42 2020	(r556854)
@@ -1 +1,3 @@
-This port installs the Video4Linux header files.
+This port installs the Video4Linux user space API header files.
+
+WWW: https://linuxtv.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012022107.0B2L7gka063392>