From 99412acb947b4d6a77a53a396f214b2012098872 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 27 May 2024 16:23:05 -0500 Subject: user/v4l-utils: Update to 1.26.1 * Convert to Meson build system. * Use upstream provided .desktop/icon files. * Add qvidcap to qv4l2 package and auto-install when v4l-utils and Qt5::X11 are installed. * Remove patches which have all been applied to upstream. --- user/v4l-utils/APKBUILD | 54 ++++++++++++------------------------------ user/v4l-utils/getsubopt.patch | 35 --------------------------- user/v4l-utils/qv4l2.desktop | 12 ---------- user/v4l-utils/qv4l2.svg | 31 ------------------------ user/v4l-utils/time64.patch | 11 --------- user/v4l-utils/types.patch | 26 -------------------- 6 files changed, 15 insertions(+), 154 deletions(-) delete mode 100644 user/v4l-utils/getsubopt.patch delete mode 100644 user/v4l-utils/qv4l2.desktop delete mode 100644 user/v4l-utils/qv4l2.svg delete mode 100644 user/v4l-utils/time64.patch delete mode 100644 user/v4l-utils/types.patch diff --git a/user/v4l-utils/APKBUILD b/user/v4l-utils/APKBUILD index 2c6857f78..53a153fbc 100644 --- a/user/v4l-utils/APKBUILD +++ b/user/v4l-utils/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Leonardo Arena # Maintainer: pkgname=v4l-utils -pkgver=1.18.0 +pkgver=1.26.1 pkgrel=0 pkgdesc="Userspace tools and conversion library for Video 4 Linux" url="https://www.linuxtv.org/wiki/index.php/V4l-utils" @@ -9,47 +9,29 @@ arch="all" license="LGPL-2.0+" depends="" makedepends="qt5-qtbase-dev libjpeg-turbo-dev argp-standalone linux-headers - eudev-dev alsa-lib-dev" + eudev-dev alsa-lib-dev meson" subpackages="$pkgname-dev $pkgname-doc qv4l2 $pkgname-libs ir_keytable" -source="https://www.linuxtv.org/downloads/v4l-utils/$pkgname-$pkgver.tar.bz2 - qv4l2.svg - qv4l2.desktop - getsubopt.patch - time64.patch - types.patch - " +source="https://www.linuxtv.org/downloads/v4l-utils/$pkgname-$pkgver.tar.xz" build() { - export CFLAGS="$CFLAGS -D__off_t=off_t" - LIBS="-largp -lintl" ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --localstatedir=/var \ - --disable-libdvbv5 \ - --disable-static - make + meson setup -Dlibdvbv5=disabled -Dprefix=/usr build + meson compile -C build } check() { - make check + meson test -C build } package() { - make -j1 DESTDIR="$pkgdir" install - install -Dm644 "$srcdir"/qv4l2.desktop \ - "$pkgdir"/usr/share/applications/qv4l2.desktop - install -Dm644 "$srcdir"/qv4l2.svg \ - "$pkgdir"/usr/share/icons/hicolor/scalable/apps/qv4l2.svg + DESTDIR="$pkgdir" meson install -C build } qv4l2() { pkgdesc="Qt V4L2 test control and streaming test application" + install_if="qt5-qtbase-x11 v4l-utils" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/qv4l2 "$subpkgdir"/usr/bin/ + mv "$pkgdir"/usr/bin/qvidcap "$subpkgdir"/usr/bin/ mv "$pkgdir"/usr/share "$subpkgdir"/usr/ } @@ -62,23 +44,17 @@ libs() { ir_keytable() { pkgdesc="Alter keymaps of Remote Controller devices" - mkdir -p "$subpkgdir"/lib/udev/rc_keymaps \ - "$subpkgdir"/lib/udev/rules.d \ + mkdir -p "$subpkgdir"/lib/udev \ "$subpkgdir"/usr/bin \ "$subpkgdir"/etc - mv "$pkgdir"/lib/udev/rc_keymaps/* \ - "$subpkgdir"/lib/udev/rc_keymaps - mv "$pkgdir"/lib/udev/rules.d/* \ - "$subpkgdir"/lib/udev/rules.d + mv "$pkgdir"/lib/udev/rc_keymaps \ + "$subpkgdir"/lib/udev/ + mv "$pkgdir"/lib/udev/rules.d \ + "$subpkgdir"/lib/udev/ mv "$pkgdir"/usr/bin/ir-keytable \ "$subpkgdir"/usr/bin mv "$pkgdir"/etc/rc_maps.cfg \ "$subpkgdir"/etc } -sha512sums="749c804671f039d907bf782cba5d1c23fff48066f3b6d4a0249fb9b65c493ee3945b544ee2a306dda79973da04f0301278ee88775f798aba590e5d0f15226d49 v4l-utils-1.18.0.tar.bz2 -bc18280046c15b19984103f7c2bb44a0aea79715803c64f0c64bc932499c09022c956914c3b15ae59499adc09f6fbff5378be45707fe851250f495a26b63d682 qv4l2.svg -6f74aa524b3de420eeb8de788ff3f717020732a3f1f6530caee50e63aae7eddbe5f551ffc50065c9f5d6078c13bace089948ecdcacf01f8b82c1a44960e06315 qv4l2.desktop -a09554deebd7597355c688e52180e0f4030842ccb26a144d1ac8a426836374237725d7b6b555027ca72e10c11e37bd596c7d69d87ee2f6b6d951daf4e50137f8 getsubopt.patch -16154d57ea0b2e231217894495ef4ecf55d45e97c936034d4bbb0dab88f2d3e8779073302fbba759bd60e124a2cefe2b83675952cd50c413d957c81c9b0b8b53 time64.patch -ee1228cc06e399923953e5121a683347a7fe881c80c55faae0adf6ed836251da1b2c4d1561454daa6f42220c1171f827ca3e2b72cdac31b379495f23ff6c56bb types.patch" +sha512sums="a3b12b311977afec410db8b430696e923a24e04f003a5891cc77ddeb667d0b98666a06d31a439c95ce57d9e9c9c2593c5e9dd9e7cf2be002adb95db5b8f00ac8 v4l-utils-1.26.1.tar.xz" diff --git a/user/v4l-utils/getsubopt.patch b/user/v4l-utils/getsubopt.patch deleted file mode 100644 index 6ad142ae0..000000000 --- a/user/v4l-utils/getsubopt.patch +++ /dev/null @@ -1,35 +0,0 @@ -POSIX says that behavior when subopts list is empty is undefined. -musl libs will set value to NULL which leads to crash. - -Simply avoid getsubopt, since we cannot rely on it. - -diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp -index 3ea6cd3..291fb3e 100644 ---- a/utils/v4l2-ctl/v4l2-ctl-common.cpp -+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp -@@ -782,15 +782,17 @@ static bool parse_subset(char *optarg) - - static bool parse_next_subopt(char **subs, char **value) - { -- static char *const subopts[] = { -- NULL -- }; -- int opt = getsubopt(subs, subopts, value); -+ char *p = *subs; -+ *value = *subs; - -- if (opt < 0 || *value) -- return false; -- fprintf(stderr, "Missing suboption value\n"); -- return true; -+ while (*p && *p != ',') -+ p++; -+ -+ if (*p) -+ *p++ = '\0'; -+ -+ *subs = p; -+ return false; - } - - void common_cmd(const std::string &media_bus_info, int ch, char *optarg) diff --git a/user/v4l-utils/qv4l2.desktop b/user/v4l-utils/qv4l2.desktop deleted file mode 100644 index 55e369c7c..000000000 --- a/user/v4l-utils/qv4l2.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=QT V4L2 test Utility -Name[pt]=Utilitário de teste V4L2 -Comment=Allow testing Video4Linux devices -Comment[pt]=Permite testar dispositivos Video4Linux -Exec=qv4l2 -Icon=qv4l2 -Terminal=false -Type=Application -Categories=Application;AudioVideo; - diff --git a/user/v4l-utils/qv4l2.svg b/user/v4l-utils/qv4l2.svg deleted file mode 100644 index 3d4f375cc..000000000 --- a/user/v4l-utils/qv4l2.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - \ No newline at end of file diff --git a/user/v4l-utils/time64.patch b/user/v4l-utils/time64.patch deleted file mode 100644 index 42092a773..000000000 --- a/user/v4l-utils/time64.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- v4l-utils-1.18.0/utils/keytable/keytable.c.old 2019-09-22 09:22:54.000000000 +0000 -+++ v4l-utils-1.18.0/utils/keytable/keytable.c 2020-01-20 02:38:23.659004998 +0000 -@@ -1533,7 +1533,7 @@ - - for (i = 0; i < rd / sizeof(struct input_event); i++) { - printf(_("%ld.%06ld: event type %s(0x%02x)"), -- ev[i].time.tv_sec, ev[i].time.tv_usec, -+ ev[i].input_event_sec, ev[i].input_event_usec, - get_event_name(events_type, ev[i].type), ev[i].type); - - switch (ev[i].type) { diff --git a/user/v4l-utils/types.patch b/user/v4l-utils/types.patch deleted file mode 100644 index 56eb991a3..000000000 --- a/user/v4l-utils/types.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- v4l-utils-1.18.0/utils/keytable/keymap.h.old 2019-09-22 09:22:54.000000000 +0000 -+++ v4l-utils-1.18.0/utils/keytable/keymap.h 2019-10-05 03:45:16.795852895 +0000 -@@ -2,6 +2,10 @@ - #ifndef __KEYMAP_H - #define __KEYMAP_H - -+#include -+typedef uint32_t u_int32_t; -+typedef int error_t; -+ - struct keymap { - struct keymap *next; - char *name; ---- v4l-utils-1.18.0/utils/ir-ctl/keymap.h.old 2019-09-22 09:22:54.000000000 +0000 -+++ v4l-utils-1.18.0/utils/ir-ctl/keymap.h 2019-10-05 03:44:27.651163483 +0000 -@@ -2,6 +2,10 @@ - #ifndef __KEYMAP_H - #define __KEYMAP_H - -+#include -+typedef uint32_t u_int32_t; -+typedef int error_t; -+ - struct keymap { - struct keymap *next; - char *name; -- cgit v1.2.3-70-g09d2