From 5ca899dea9665001cbe401fbdc0c63364e434019 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 18 Jul 2018 23:50:41 -0500 Subject: user/v4l-utils: pull in, bump to 1.14.2, fix --- user/v4l-utils/APKBUILD | 82 ++++++++++++++++++++++++++++++++++++++++++ user/v4l-utils/getsubopt.patch | 36 +++++++++++++++++++ user/v4l-utils/qv4l2.desktop | 12 +++++++ user/v4l-utils/qv4l2.svg | 31 ++++++++++++++++ 4 files changed, 161 insertions(+) create mode 100644 user/v4l-utils/APKBUILD create mode 100644 user/v4l-utils/getsubopt.patch create mode 100644 user/v4l-utils/qv4l2.desktop create mode 100644 user/v4l-utils/qv4l2.svg (limited to 'user/v4l-utils') diff --git a/user/v4l-utils/APKBUILD b/user/v4l-utils/APKBUILD new file mode 100644 index 000000000..1ea8ea930 --- /dev/null +++ b/user/v4l-utils/APKBUILD @@ -0,0 +1,82 @@ +# Contributor: Leonardo Arena +# Maintainer: +pkgname=v4l-utils +pkgver=1.14.2 +pkgrel=0 +pkgdesc="Userspace tools and conversion library for Video 4 Linux" +url="https://www.linuxtv.org/wiki/index.php/V4l-utils" +arch="all" +license="LGPL-2.0+" +makedepends="qt5-qtbase-dev libjpeg-turbo-dev argp-standalone linux-headers + eudev-dev alsa-lib-dev" +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 + " + +build() { + cd "$builddir" + [ "$CLIBC" = "musl" ] && 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 +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + 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 +} + +qv4l2() { + pkgdesc="Qt V4L2 test control and streaming test application" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/qv4l2 "$subpkgdir"/usr/bin/ + mv "$pkgdir"/usr/share "$subpkgdir"/usr/ +} + +libs() { + pkgdesc="Collection of Video4Linux support libraries" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/* \ + "$subpkgdir"/usr/lib +} + +ir_keytable() { + pkgdesc="Alter keymaps of Remote Controller devices" + mkdir -p "$subpkgdir"/lib/udev/rc_keymaps \ + "$subpkgdir"/lib/udev/rules.d \ + "$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"/usr/bin/ir-keytable \ + "$subpkgdir"/usr/bin + mv "$pkgdir"/etc/rc_maps.cfg \ + "$subpkgdir"/etc +} + +sha512sums="5c469479deb7065768e0254d1c80d9096caf05e445ceeabc7649f7158f02fb2d11ff2ad8c82debc1dbe6bbd7776cc5aa2febb52d5da0328d2b60b54af67c7a27 v4l-utils-1.14.2.tar.bz2 +bc18280046c15b19984103f7c2bb44a0aea79715803c64f0c64bc932499c09022c956914c3b15ae59499adc09f6fbff5378be45707fe851250f495a26b63d682 qv4l2.svg +6f74aa524b3de420eeb8de788ff3f717020732a3f1f6530caee50e63aae7eddbe5f551ffc50065c9f5d6078c13bace089948ecdcacf01f8b82c1a44960e06315 qv4l2.desktop +9a4f6d0a44d30bb7afe4db8b40074d362f240cae1f1b13feb0eb2b1b666479fc6f73ef27542f6f80fb1b922c9540feadc9ff8563890ff3041d3f7fc62e504e29 getsubopt.patch" diff --git a/user/v4l-utils/getsubopt.patch b/user/v4l-utils/getsubopt.patch new file mode 100644 index 000000000..c476e5ed7 --- /dev/null +++ b/user/v4l-utils/getsubopt.patch @@ -0,0 +1,36 @@ +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 +@@ -692,16 +692,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, "No value given to suboption <%s>\n", +- subopts[opt]); +- return true; ++ while (*p && *p != ',') ++ p++; ++ ++ if (*p) ++ *p++ = '\0'; ++ ++ *subs = p; ++ return false; + } + + void common_cmd(int ch, char *optarg) diff --git a/user/v4l-utils/qv4l2.desktop b/user/v4l-utils/qv4l2.desktop new file mode 100644 index 000000000..55e369c7c --- /dev/null +++ b/user/v4l-utils/qv4l2.desktop @@ -0,0 +1,12 @@ +[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 new file mode 100644 index 000000000..3d4f375cc --- /dev/null +++ b/user/v4l-utils/qv4l2.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3-70-g09d2