On Wed, Dec 15, 2021 at 12:49:39AM +0100, Antoine Jacoutot wrote: > Do we need to sub package? Can’t we include everything in main?
I have no idea if ports suddenly pick up the new headers and/or whether there are any other side effects. Subpackages seemed cleaner and explicit; they avoid these error cases and it'll be clear which port are actually using the linux compat layer. > Anyway the change from libv4l to libv4l,-main is not needed as it’s the > default. I changed it to be explicit as is done with other ,-main packages as well, but yes, you could just leave it. > > On 14 Dec 2021, at 13:50, Klemens Nanni <k...@openbsd.org> wrote: > > > > Video4Linux headers are required for an ongoing porting effort; > > FreeBSD has a dedicated port for this that reaches back to their libv4l > > port it seems, which looks practically identical to our MULTI_PACKAGES. > > > > I just package the headers that are needed in their own subpackage. > > The actual libv4l package remains unchanged except that its FULLPKGPATH > > now has "-main", hence bumping all consumers. > > > > Feedback? OK? > > > > Index: x11/vlc/Makefile > > =================================================================== > > RCS file: /cvs/ports/x11/vlc/Makefile,v > > retrieving revision 1.252 > > diff -u -p -r1.252 Makefile > > --- x11/vlc/Makefile 3 Sep 2021 11:47:42 -0000 1.252 > > +++ x11/vlc/Makefile 14 Dec 2021 12:20:13 -0000 > > @@ -7,7 +7,7 @@ V= 3.0.14 > > DISTNAME= vlc-${V} > > PKGNAME-main= ${DISTNAME} > > PKGNAME-jack= vlc-jack-${V} > > -REVISION-main= 1 > > +REVISION-main= 2 > > REVISION-jack= 0 > > CATEGORIES= x11 > > MASTER_SITES= https://download.videolan.org/pub/videolan/vlc/${V}/ > > @@ -90,7 +90,7 @@ LIB_DEPENDS-main= ${MODQT5_LIB_DEPENDS} > > multimedia/libbluray \ > > multimedia/libdvdnav \ > > multimedia/libmatroska \ > > - multimedia/libv4l \ > > + multimedia/libv4l,-main \ > > multimedia/x264 \ > > multimedia/x265 \ > > net/avahi,-libs \ > > Index: telephony/linphone/mediastreamer2/Makefile > > =================================================================== > > RCS file: /cvs/ports/telephony/linphone/mediastreamer2/Makefile,v > > retrieving revision 1.6 > > diff -u -p -r1.6 Makefile > > --- telephony/linphone/mediastreamer2/Makefile 26 Jul 2021 07:08:32 > > -0000 1.6 > > +++ telephony/linphone/mediastreamer2/Makefile 14 Dec 2021 12:20:13 -0000 > > @@ -3,7 +3,7 @@ > > COMMENT = streaming engine for voice/video telephony applications > > > > MODULE = mediastreamer2 > > -REVISION = 1 > > +REVISION = 2 > > > > SHARED_LIBS += mediastreamer 0.0 # 11 > > > > @@ -26,7 +26,7 @@ LIB_DEPENDS = telephony/linphone/bctoolb > > telephony/linphone/ortp \ > > telephony/linphone/bzrtp \ > > telephony/bcg729 \ > > - multimedia/libv4l \ > > + multimedia/libv4l,-main \ > > multimedia/libvpx \ > > multimedia/libtheora \ > > security/libsrtp>=2.3.0p2 \ > > Index: telephony/baresip/baresip/Makefile > > =================================================================== > > RCS file: /cvs/ports/telephony/baresip/baresip/Makefile,v > > retrieving revision 1.29 > > diff -u -p -r1.29 Makefile > > --- telephony/baresip/baresip/Makefile 20 Jun 2021 12:13:52 -0000 1.29 > > +++ telephony/baresip/baresip/Makefile 14 Dec 2021 12:20:13 -0000 > > @@ -6,6 +6,7 @@ COMMENT-gtk = GTK+-based modules for ba > > GH_ACCOUNT = baresip > > GH_PROJECT = baresip > > GH_TAGNAME = v1.1.0 > > +REVISION-main = 0 > > REVISION-gtk = 0 > > PKGNAME-main = baresip-${GH_TAGNAME:C/^v//} > > PKGNAME-gtk = baresip-gtk-${GH_TAGNAME:C/^v//} > > @@ -28,7 +29,7 @@ LIB_DEPENDS-main = audio/gsm \ > > audio/twolame \ > > graphics/ffmpeg \ > > graphics/png \ > > - multimedia/libv4l \ > > + multimedia/libv4l,-main \ > > multimedia/libvpx>=1.3.0 \ > > net/mosquitto \ > > telephony/baresip/re>=2.0.1 \ > > Index: net/utox/Makefile > > =================================================================== > > RCS file: /cvs/ports/net/utox/Makefile,v > > retrieving revision 1.11 > > diff -u -p -r1.11 Makefile > > --- net/utox/Makefile 14 Oct 2021 16:52:03 -0000 1.11 > > +++ net/utox/Makefile 14 Dec 2021 12:20:13 -0000 > > @@ -8,6 +8,7 @@ DISTNAME = uTox-${V}-full > > PKGNAME = utox-${V} > > MASTER_SITES = https://github.com/uTox/uTox/releases/download/v${V}/ > > FIX_EXTRACT_PERMISSIONS = Yes > > +REVISION = 0 > > > > CATEGORIES = net > > > > @@ -25,7 +26,7 @@ RUN_DEPENDS = devel/desktop-file-utils \ > > x11/gtk+3,-guic > > > > LIB_DEPENDS += audio/openal \ > > - multimedia/libv4l \ > > + multimedia/libv4l,-main \ > > x11/dbus \ > > net/toxcore > > > > Index: multimedia/xine-lib/Makefile > > =================================================================== > > RCS file: /cvs/ports/multimedia/xine-lib/Makefile,v > > retrieving revision 1.148 > > diff -u -p -r1.148 Makefile > > --- multimedia/xine-lib/Makefile 8 Jul 2021 10:43:26 -0000 1.148 > > +++ multimedia/xine-lib/Makefile 14 Dec 2021 12:20:13 -0000 > > @@ -3,7 +3,7 @@ > > COMMENT= multimedia decoding library > > > > DISTNAME= xine-lib-1.2.11 > > -REVISION= 0 > > +REVISION= 1 > > CATEGORIES= multimedia > > MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xine/} > > EXTRACT_SUFX= .tar.xz > > @@ -55,7 +55,7 @@ LIB_DEPENDS= audio/flac \ > > multimedia/libbluray>=0.8.0 \ > > multimedia/libdvdnav \ > > multimedia/libtheora \ > > - multimedia/libv4l \ > > + multimedia/libv4l,-main \ > > x11/libxdg-basedir > > > > # Add back fast math flag since we override CFLAGS > > Index: multimedia/gstreamer1/plugins-good/Makefile > > =================================================================== > > RCS file: /cvs/ports/multimedia/gstreamer1/plugins-good/Makefile,v > > retrieving revision 1.73 > > diff -u -p -r1.73 Makefile > > --- multimedia/gstreamer1/plugins-good/Makefile 9 Sep 2021 10:12:20 > > -0000 1.73 > > +++ multimedia/gstreamer1/plugins-good/Makefile 14 Dec 2021 12:20:13 > > -0000 > > @@ -11,6 +11,7 @@ DISTNAME= gst-plugins-good-${V} > > PKGNAME= ${GST_PKGNAME_PREFIX}-plugins-good-${V} > > > > PKGNAME-main= ${PKGNAME} > > +REVISION-main= 0 > > PKGNAME-pulse= ${GST_PKGNAME_PREFIX}-plugins-pulse-${V} > > > > MASTER_SITES= ${MASTER_SITE_GST:=gst-plugins-good/} > > @@ -46,7 +47,7 @@ LIB_DEPENDS-main= ${LIB_DEPENDS} \ > > audio/twolame \ > > audio/wavpack \ > > devel/libsoup \ > > - multimedia/libv4l \ > > + multimedia/libv4l,-main \ > > multimedia/libvpx \ > > net/libshout \ > > x11/gtk+3 > > Index: graphics/sane-backends/Makefile > > =================================================================== > > RCS file: /cvs/ports/graphics/sane-backends/Makefile,v > > retrieving revision 1.103 > > diff -u -p -r1.103 Makefile > > --- graphics/sane-backends/Makefile 3 Sep 2021 11:48:53 -0000 1.103 > > +++ graphics/sane-backends/Makefile 14 Dec 2021 12:20:13 -0000 > > @@ -5,7 +5,7 @@ BROKEN-alpha= ICE hp5590.c:1141: error: > > COMMENT= API for accessing scanners, backends > > > > DISTNAME= sane-backends-1.0.32 > > -REVISION= 2 > > +REVISION= 3 > > > > SHARED_LIBS += sane 2.1 # unknown > > > > @@ -34,7 +34,7 @@ BUILD_DEPENDS= devel/gettext,-tools > > LIB_DEPENDS= devel/libusb1 \ > > graphics/png \ > > graphics/tiff \ > > - multimedia/libv4l \ > > + multimedia/libv4l,-main \ > > textproc/libxml > > > > FLAVORS= escl snmp > > Index: graphics/ffmpeg/Makefile > > =================================================================== > > RCS file: /cvs/ports/graphics/ffmpeg/Makefile,v > > retrieving revision 1.216 > > diff -u -p -r1.216 Makefile > > --- graphics/ffmpeg/Makefile 20 Nov 2021 14:34:35 -0000 1.216 > > +++ graphics/ffmpeg/Makefile 14 Dec 2021 12:20:13 -0000 > > @@ -4,7 +4,7 @@ COMMENT= audio/video converter and strea > > > > V= 4.4.1 > > DISTNAME= ffmpeg-${V} > > -REVISION= 0 > > +REVISION= 1 > > EPOCH= 1 > > CATEGORIES= graphics multimedia > > MASTER_SITES= https://ffmpeg.org/releases/ > > @@ -55,7 +55,7 @@ LIB_DEPENDS= archivers/bzip2 \ > > multimedia/dav1d \ > > multimedia/libass \ > > multimedia/libtheora \ > > - multimedia/libv4l \ > > + multimedia/libv4l,-main \ > > multimedia/libvidstab \ > > multimedia/libvpx \ > > multimedia/x264 \ > > Index: ./multimedia/libv4l/Makefile > > =================================================================== > > RCS file: /cvs/ports/multimedia/libv4l/Makefile,v > > retrieving revision 1.26 > > diff -u -p -r1.26 Makefile > > --- ./multimedia/libv4l/Makefile 9 Jun 2021 19:50:09 -0000 1.26 > > +++ ./multimedia/libv4l/Makefile 12 Dec 2021 18:28:10 -0000 > > @@ -1,11 +1,17 @@ > > # $OpenBSD: Makefile,v 1.26 2021/06/09 19:50:09 sthen Exp $ > > > > -COMMENT = libv4l userspace library > > +COMMENT-main = libv4l userspace library > > +COMMENT-compat = V4L ioctl header files > > > > VERSION = 1.20.0 > > DISTNAME = v4l-utils-${VERSION} > > -PKGNAME = libv4l-${VERSION} > > -REVISION = 0 > > +PKGNAME-main = libv4l-${VERSION} > > +PKGNAME-compat = v4l-compat-${VERSION} > > +REVISION-main = 1 > > + > > +PKG_ARCH-compat = * > > + > > +MULTI_PACKAGES = -main -compat > > > > SHARED_LIBS += v4l1 0.0 # 0.0 > > SHARED_LIBS += v4l2 0.0 # 0.0 > > @@ -21,14 +27,14 @@ MAINTAINER = Ingo Feinerer <feinerer@lo > > # LGPLv2+ > > PERMIT_PACKAGE = Yes > > > > -WANTLIB += c execinfo jpeg m pthread > > +WANTLIB-main += c execinfo jpeg m pthread > > > > MASTER_SITES = https://linuxtv.org/downloads/v4l-utils/ > > > > EXTRACT_SUFX = .tar.bz2 > > > > BUILD_DEPENDS = devel/argp-standalone > > -LIB_DEPENDS = graphics/jpeg>=1.5.0v0 > > +LIB_DEPENDS-main = graphics/jpeg>=1.5.0v0 > > > > SEPARATE_BUILD = Yes > > LIBTOOL_FLAGS = --tag=disable-static > > @@ -39,5 +45,8 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE > > LDFLAGS="-L${LOCALBASE}/lib" > > > > AUTOCONF_VERSION = 2.69 > > + > > +post-install: > > + cd ${WRKSRC}/contrib/freebsd && pax -rw include ${PREFIX}/ > > > > .include <bsd.port.mk> > > Index: > > ./multimedia/libv4l/patches/patch-contrib_freebsd_include_linux_input_h > > =================================================================== > > RCS file: > > ./multimedia/libv4l/patches/patch-contrib_freebsd_include_linux_input_h > > diff -N > > ./multimedia/libv4l/patches/patch-contrib_freebsd_include_linux_input_h > > --- /dev/null 1 Jan 1970 00:00:00 -0000 > > +++ ./multimedia/libv4l/patches/patch-contrib_freebsd_include_linux_input_h > > 12 Dec 2021 17:01:00 -0000 > > @@ -0,0 +1,16 @@ > > +$OpenBSD$ > > + > > +Treat OpenBSD like FreeBSD. > > + > > +Index: contrib/freebsd/include/linux/input.h > > +--- contrib/freebsd/include/linux/input.h.orig > > ++++ contrib/freebsd/include/linux/input.h > > +@@ -43,7 +43,7 @@ typedef int8_t __s8; > > + #endif > > + #endif > > + > > +-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) > > ++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || > > defined(__OpenBSD__) > > + #define __user > > + #define _IOC_READ IOC_OUT > > + #define _IOC_WRITE IOC_IN > > Index: > > ./multimedia/libv4l/patches/patch-contrib_freebsd_include_linux_v4l2-controls_h > > =================================================================== > > RCS file: > > ./multimedia/libv4l/patches/patch-contrib_freebsd_include_linux_v4l2-controls_h > > diff -N > > ./multimedia/libv4l/patches/patch-contrib_freebsd_include_linux_v4l2-controls_h > > --- /dev/null 1 Jan 1970 00:00:00 -0000 > > +++ > > ./multimedia/libv4l/patches/patch-contrib_freebsd_include_linux_v4l2-controls_h > > 12 Dec 2021 18:07:07 -0000 > > @@ -0,0 +1,17 @@ > > +$OpenBSD$ > > + > > +No <linux/types.h> on OpenBSD > > + > > +Index: contrib/freebsd/include/linux/v4l2-controls.h > > +--- contrib/freebsd/include/linux/v4l2-controls.h.orig > > ++++ contrib/freebsd/include/linux/v4l2-controls.h > > +@@ -50,7 +50,9 @@ > > + #ifndef __LINUX_V4L2_CONTROLS_H > > + #define __LINUX_V4L2_CONTROLS_H > > + > > ++#if !defined(__OpenBSD__) > > + #include <linux/types.h> > > ++#endif > > + > > + /* Control classes */ > > + #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' > > controls */ > > Index: ./multimedia/libv4l/pkg/DESCR > > =================================================================== > > RCS file: ./multimedia/libv4l/pkg/DESCR > > diff -N ./multimedia/libv4l/pkg/DESCR > > --- ./multimedia/libv4l/pkg/DESCR 7 Jan 2016 17:12:21 -0000 1.1.1.1 > > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > > @@ -1,4 +0,0 @@ > > -libv4l is a collection of libraries which adds a thin abstraction layer on > > top > > -of video4linux2 devices. The purpose of this (thin) layer is to make it > > easy > > -for application writers to support a wide variety of devices without > > having to > > -write separate code for different devices in the same class. > > Index: ./multimedia/libv4l/pkg/DESCR-compat > > =================================================================== > > RCS file: ./multimedia/libv4l/pkg/DESCR-compat > > diff -N ./multimedia/libv4l/pkg/DESCR-compat > > --- /dev/null 1 Jan 1970 00:00:00 -0000 > > +++ ./multimedia/libv4l/pkg/DESCR-compat 12 Dec 2021 17:08:12 -0000 > > @@ -0,0 +1 @@ > > +This package provides the Video4Linux user space API header files. > > Index: ./multimedia/libv4l/pkg/DESCR-main > > =================================================================== > > RCS file: ./multimedia/libv4l/pkg/DESCR-main > > diff -N ./multimedia/libv4l/pkg/DESCR-main > > --- /dev/null 1 Jan 1970 00:00:00 -0000 > > +++ ./multimedia/libv4l/pkg/DESCR-main 12 Dec 2021 17:06:50 -0000 > > @@ -0,0 +1,4 @@ > > +libv4l is a collection of libraries which adds a thin abstraction layer on > > top > > +of video4linux2 devices. The purpose of this (thin) layer is to make it > > easy > > +for application writers to support a wide variety of devices without > > having to > > +write separate code for different devices in the same class. > > Index: ./multimedia/libv4l/pkg/PLIST > > =================================================================== > > RCS file: ./multimedia/libv4l/pkg/PLIST > > diff -N ./multimedia/libv4l/pkg/PLIST > > --- ./multimedia/libv4l/pkg/PLIST 15 May 2020 09:55:55 -0000 1.5 > > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > > @@ -1,51 +0,0 @@ > > -@comment $OpenBSD: PLIST,v 1.5 2020/05/15 09:55:55 feinerer Exp $ > > -include/libv4l-plugin.h > > -include/libv4l1-videodev.h > > -include/libv4l1.h > > -include/libv4l2.h > > -include/libv4l2rds.h > > -include/libv4lconvert.h > > -lib/libv4l/ > > -@bin lib/libv4l/ov511-decomp > > -@bin lib/libv4l/ov518-decomp > > -lib/libv4l/plugins/ > > -@comment lib/libv4l/plugins/libv4l-mplane.la > > -@so lib/libv4l/plugins/libv4l-mplane.so > > -@comment lib/libv4l/v4l1compat.la > > -@so lib/libv4l/v4l1compat.so > > -@comment lib/libv4l/v4l2convert.la > > -@so lib/libv4l/v4l2convert.so > > -lib/libv4l1.la > > -@lib lib/libv4l1.so.${LIBv4l1_VERSION} > > -lib/libv4l2.la > > -@lib lib/libv4l2.so.${LIBv4l2_VERSION} > > -lib/libv4l2rds.la > > -@lib lib/libv4l2rds.so.${LIBv4l2rds_VERSION} > > -lib/libv4lconvert.la > > -@lib lib/libv4lconvert.so.${LIBv4lconvert_VERSION} > > -lib/pkgconfig/libv4l1.pc > > -lib/pkgconfig/libv4l2.pc > > -lib/pkgconfig/libv4l2rds.pc > > -lib/pkgconfig/libv4lconvert.pc > > -@so lib/v4l1compat.so > > -@so lib/v4l2convert.so > > -@comment share/locale/ > > -@comment share/locale/ca/ > > -@comment share/locale/ca/LC_MESSAGES/ > > -@comment share/locale/ca/LC_MESSAGES/libdvbv5.mo > > -@comment share/locale/ca/LC_MESSAGES/v4l-utils.mo > > -@comment share/locale/de/ > > -@comment share/locale/de/LC_MESSAGES/ > > -@comment share/locale/de/LC_MESSAGES/libdvbv5.mo > > -@comment share/locale/de/LC_MESSAGES/v4l-utils.mo > > -@comment share/locale/fr/ > > -@comment share/locale/fr/LC_MESSAGES/ > > -@comment share/locale/fr/LC_MESSAGES/v4l-utils.mo > > -@comment share/locale/pt_BR/ > > -@comment share/locale/pt_BR/LC_MESSAGES/ > > -@comment share/locale/pt_BR/LC_MESSAGES/libdvbv5.mo > > -@comment share/locale/pt_BR/LC_MESSAGES/v4l-utils.mo > > -@comment share/locale/uk/ > > -@comment share/locale/uk/LC_MESSAGES/ > > -@comment share/locale/uk/LC_MESSAGES/libdvbv5.mo > > -@comment share/locale/uk/LC_MESSAGES/v4l-utils.mo > > Index: ./multimedia/libv4l/pkg/PLIST-compat > > =================================================================== > > RCS file: ./multimedia/libv4l/pkg/PLIST-compat > > diff -N ./multimedia/libv4l/pkg/PLIST-compat > > --- /dev/null 1 Jan 1970 00:00:00 -0000 > > +++ ./multimedia/libv4l/pkg/PLIST-compat 12 Dec 2021 17:02:37 -0000 > > @@ -0,0 +1,9 @@ > > +@comment $OpenBSD: $ > > +include/linux/ > > +include/linux/input-event-codes.h > > +include/linux/input.h > > +include/linux/ivtv.h > > +include/linux/uinput.h > > +include/linux/v4l2-common.h > > +include/linux/v4l2-controls.h > > +include/linux/videodev2.h > > Index: ./multimedia/libv4l/pkg/PLIST-main > > =================================================================== > > RCS file: ./multimedia/libv4l/pkg/PLIST-main > > diff -N ./multimedia/libv4l/pkg/PLIST-main > > --- /dev/null 1 Jan 1970 00:00:00 -0000 > > +++ ./multimedia/libv4l/pkg/PLIST-main 12 Dec 2021 17:02:39 -0000 > > @@ -0,0 +1,52 @@ > > +@comment $OpenBSD: $ > > +@pkgpath multimedia/libv4l > > +include/libv4l-plugin.h > > +include/libv4l1-videodev.h > > +include/libv4l1.h > > +include/libv4l2.h > > +include/libv4l2rds.h > > +include/libv4lconvert.h > > +lib/libv4l/ > > +@bin lib/libv4l/ov511-decomp > > +@bin lib/libv4l/ov518-decomp > > +lib/libv4l/plugins/ > > +@comment lib/libv4l/plugins/libv4l-mplane.la > > +@so lib/libv4l/plugins/libv4l-mplane.so > > +@comment lib/libv4l/v4l1compat.la > > +@so lib/libv4l/v4l1compat.so > > +@comment lib/libv4l/v4l2convert.la > > +@so lib/libv4l/v4l2convert.so > > +lib/libv4l1.la > > +@lib lib/libv4l1.so.${LIBv4l1_VERSION} > > +lib/libv4l2.la > > +@lib lib/libv4l2.so.${LIBv4l2_VERSION} > > +lib/libv4l2rds.la > > +@lib lib/libv4l2rds.so.${LIBv4l2rds_VERSION} > > +lib/libv4lconvert.la > > +@lib lib/libv4lconvert.so.${LIBv4lconvert_VERSION} > > +lib/pkgconfig/libv4l1.pc > > +lib/pkgconfig/libv4l2.pc > > +lib/pkgconfig/libv4l2rds.pc > > +lib/pkgconfig/libv4lconvert.pc > > +@so lib/v4l1compat.so > > +@so lib/v4l2convert.so > > +@comment share/locale/ > > +@comment share/locale/ca/ > > +@comment share/locale/ca/LC_MESSAGES/ > > +@comment share/locale/ca/LC_MESSAGES/libdvbv5.mo > > +@comment share/locale/ca/LC_MESSAGES/v4l-utils.mo > > +@comment share/locale/de/ > > +@comment share/locale/de/LC_MESSAGES/ > > +@comment share/locale/de/LC_MESSAGES/libdvbv5.mo > > +@comment share/locale/de/LC_MESSAGES/v4l-utils.mo > > +@comment share/locale/fr/ > > +@comment share/locale/fr/LC_MESSAGES/ > > +@comment share/locale/fr/LC_MESSAGES/v4l-utils.mo > > +@comment share/locale/pt_BR/ > > +@comment share/locale/pt_BR/LC_MESSAGES/ > > +@comment share/locale/pt_BR/LC_MESSAGES/libdvbv5.mo > > +@comment share/locale/pt_BR/LC_MESSAGES/v4l-utils.mo > > +@comment share/locale/uk/ > > +@comment share/locale/uk/LC_MESSAGES/ > > +@comment share/locale/uk/LC_MESSAGES/libdvbv5.mo > > +@comment share/locale/uk/LC_MESSAGES/v4l-utils.mo > > >