From 2ff30026a8ac1105ad4683b87278bf46dcf70cd0 Mon Sep 17 00:00:00 2001 From: Nathan Owens Date: Sun, 29 Dec 2019 22:06:57 -0600 Subject: [PATCH] qv4l2: update to 1.18.0 Signed-off-by: Nathan Owens --- srcpkgs/qv4l2/patches/musl.patch | 95 ++++++++++++++++++++++++-------- srcpkgs/qv4l2/template | 8 +-- 2 files changed, 74 insertions(+), 29 deletions(-) diff --git a/srcpkgs/qv4l2/patches/musl.patch b/srcpkgs/qv4l2/patches/musl.patch index a346f4f1813dfa..af02c58a91f867 100644 --- a/srcpkgs/qv4l2/patches/musl.patch +++ b/srcpkgs/qv4l2/patches/musl.patch @@ -1,27 +1,74 @@ ---- utils/ir-ctl/ir-ctl.c.orig 2017-01-25 17:27:44.373665101 +0000 -+++ utils/ir-ctl/ir-ctl.c 2017-01-25 17:27:51.052665445 +0000 -@@ -44,6 +44,24 @@ - - # define N_(string) string - -+#ifndef TEMP_FAILURE_RETRY -+#define TEMP_FAILURE_RETRY(expression) \ -+ (__extension__ \ -+ ({ long int __result; \ -+ do __result = (long int) (expression); \ -+ while (__result == -1L && errno == EINTR); \ -+ __result; })) +diff --git utils/ir-ctl/keymap.h utils/ir-ctl/keymap.h +index f2b2963..51e4440 100644 +--- utils/ir-ctl/keymap.h ++++ utils/ir-ctl/keymap.h +@@ -1,6 +1,11 @@ + /* SPDX-License-Identifier: GPL-2.0 */ + #ifndef __KEYMAP_H + #define __KEYMAP_H ++#include ++#ifndef __error_t_defined ++# define __error_t_defined 1 ++typedef int error_t; +#endif -+ -+#ifndef strndupa -+#define strndupa(s, n) \ -+ (__extension__ ({const char *__in = (s); \ -+ size_t __len = strnlen (__in, (n)) + 1; \ -+ char *__out = (char *) alloca (__len); \ -+ __out[__len-1] = '\0'; \ -+ (char *) memcpy (__out, __in, __len-1);})) + + struct keymap { + struct keymap *next; +@@ -20,16 +25,16 @@ struct protocol_param { + + struct scancode_entry { + struct scancode_entry *next; +- u_int32_t scancode; ++ uint32_t scancode; + char *keycode; + }; + + struct raw_entry { + struct raw_entry *next; +- u_int32_t scancode; +- u_int32_t raw_length; ++ uint32_t scancode; ++ uint32_t raw_length; + char *keycode; +- u_int32_t raw[1]; ++ uint32_t raw[1]; + }; + + void free_keymap(struct keymap *map); +diff --git utils/keytable/keymap.h utils/keytable/keymap.h +index f2b2963..51e4440 100644 +--- utils/keytable/keymap.h ++++ utils/keytable/keymap.h +@@ -1,6 +1,11 @@ + /* SPDX-License-Identifier: GPL-2.0 */ + #ifndef __KEYMAP_H + #define __KEYMAP_H ++#include ++#ifndef __error_t_defined ++# define __error_t_defined 1 ++typedef int error_t; +#endif -+ - /* See drivers/media/rc/ir-lirc-codec.c line 23 */ - #define LIRCBUF_SIZE 512 + struct keymap { + struct keymap *next; +@@ -20,16 +25,16 @@ struct protocol_param { + + struct scancode_entry { + struct scancode_entry *next; +- u_int32_t scancode; ++ uint32_t scancode; + char *keycode; + }; + + struct raw_entry { + struct raw_entry *next; +- u_int32_t scancode; +- u_int32_t raw_length; ++ uint32_t scancode; ++ uint32_t raw_length; + char *keycode; +- u_int32_t raw[1]; ++ uint32_t raw[1]; + }; + + void free_keymap(struct keymap *map); diff --git a/srcpkgs/qv4l2/template b/srcpkgs/qv4l2/template index 62ff579961ca0a..38a2010506a200 100644 --- a/srcpkgs/qv4l2/template +++ b/srcpkgs/qv4l2/template @@ -1,6 +1,6 @@ # Template file for 'qv4l2' pkgname=qv4l2 -version=1.16.6 +version=1.18.0 revision=1 wrksrc="v4l-utils-${version}" build_style=gnu-configure @@ -13,9 +13,7 @@ maintainer="Orphaned " license="GPL-2.0-or-later, LGPL-2.1-or-later" homepage="https://linuxtv.org/" distfiles="https://linuxtv.org/downloads/v4l-utils/v4l-utils-${version}.tar.bz2" -checksum=f9dac1878e3d5636eab7f56bb209fdfc66b94ee8a2aae54dcb4282fe63a678ae - -nocross="detects X11/GL support incorrectly" +checksum=6cb60d822eeed20486a03cc23e0fc65956fbc1e85e0c1a7477f68bbd9802880d if [ "$CROSS_BUILD" ]; then hostmakedepends+=" qt5-host-tools qt5-devel" @@ -26,7 +24,7 @@ CFLAGS="-Wno-error=unused-function" case "$XBPS_TARGET_MACHINE" in *-musl) makedepends+=" argp-standalone" - CFLAGS+=" -D__off_t=off_t -D__off64_t=off_t" + CFLAGS+=" -D__off_t=off_t -D__off64_t=off_t -Du_int32_t=uint32_t" LDFLAGS+=" -largp" ;; esac