From f4e79e398dfcb5128f1819d2fb32f7e2ac163876 Mon Sep 17 00:00:00 2001 From: TBK Date: Fri, 29 Jan 2021 23:38:27 +0100 Subject: [PATCH] testing/hidrd: upgrade to 0.2.0_git20190603 Last release was in May 2010... --- testing/hidrd/APKBUILD | 19 +- ...af32bd0e72cf0c6dffff6c9c8852f065051e.patch | 108 ------------ testing/hidrd/fix-check.patch | 162 ++---------------- testing/hidrd/musl-fix-headers.patch | 2 +- 4 files changed, 27 insertions(+), 264 deletions(-) delete mode 100644 testing/hidrd/b622af32bd0e72cf0c6dffff6c9c8852f065051e.patch diff --git a/testing/hidrd/APKBUILD b/testing/hidrd/APKBUILD index e459870c699..24d93ab1dc1 100644 --- a/testing/hidrd/APKBUILD +++ b/testing/hidrd/APKBUILD @@ -1,23 +1,25 @@ # Maintainer: Natanael Copa pkgname=hidrd -pkgver=0.2.0 +pkgver=0.2.0_git20190603 pkgrel=0 +_commit=6c0ed39708a5777ac620f902f39c8a0e03eefe4e pkgdesc="HID report descriptor I/O library and conversion tool" url="https://github.com/DIGImend/hidrd" arch="all" license="GPL-2.0-or-later" -makedepends="musl-obstack-dev m4" +makedepends="automake autoconf libtool musl-obstack-dev m4" checkdepends="bash coreutils linux-headers" subpackages="$pkgname-dev" -source="https://github.com/DIGImend/hidrd/releases/download/$pkgver/hidrd-$pkgver.tar.gz +# source="https://github.com/DIGImend/hidrd/releases/download/$pkgver/hidrd-$pkgver.tar.gz +source="$pkgname-$pkgver.tar.gz::https://github.com/DIGImend/hidrd/archive/$_commit.tar.gz musl-fix-headers.patch - b622af32bd0e72cf0c6dffff6c9c8852f065051e.patch fix-check.patch " +builddir="$srcdir/$pkgname-$_commit" prepare() { default_prepare - update_config_sub + autoreconf -vfi } build() { @@ -40,7 +42,6 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="b2121904f7327766b17ade631d6862cea6c0010cee060620150480f70ed0fb00cebf06cd2c6623ab509e1579abe2a835920d8c5290c21bca4143b15c6a814e22 hidrd-0.2.0.tar.gz -43651cd05b01867eeba370786c6db06b6d7d31713607ee34c1529377463dcf12c8af4efbcbe9ee27018deef030e63ad324a364d2701fde5c369edd7206427ee1 musl-fix-headers.patch -c465828217427463f3e79d108a998a3afbf976de51a918732832271fc8a576a4f9efe84c691f078a440e414b8065d8d4f40a607f03c06db1872460a676325827 b622af32bd0e72cf0c6dffff6c9c8852f065051e.patch -4e4057ce5fd1ba79a3c120927351629487a5b8466fad5be359be46046b075bbfdc92b375de32d9fa0a0863df7701bb0d2f56aff96e421190c2f024d2a4d6e161 fix-check.patch" +sha512sums="baffd4a300e78a95c340a845d038aa71722ff21e5f6e8776db74d360da72e0fcfba68ac821085e45b6176b13b91771368501296cc126ce4662b738a567dba415 hidrd-0.2.0_git20190603.tar.gz +36bdfedbb49934ca8cf0df0bf31ff386142af53f66494f6af475c06716ab246b39c7a5d211fb3049eddcf64f16ac76452b4a8136dce3604d47c26600d290adb1 musl-fix-headers.patch +5f4f1996b4e4f2009d9ca9c84bb18eb96c0f2aedd1a0f5f948ea741f31fc3e5f96ab82471756b8535e492b4ee365b5b195c91f4cd1cbcb8e6787cab46d9179ce fix-check.patch" diff --git a/testing/hidrd/b622af32bd0e72cf0c6dffff6c9c8852f065051e.patch b/testing/hidrd/b622af32bd0e72cf0c6dffff6c9c8852f065051e.patch deleted file mode 100644 index 2374c4afc80..00000000000 --- a/testing/hidrd/b622af32bd0e72cf0c6dffff6c9c8852f065051e.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 40882553e8210dae0736c0bcb9d5d39d50ccdcfe Mon Sep 17 00:00:00 2001 -From: Klee Dienes -Date: Sat, 19 Mar 2016 07:21:52 -0400 -Subject: [PATCH] Add 'extern' keyword to hidrd_natv_sink. - -Otherwise the 'const' keyword gives it wonky linkage. With this change, -hidrd_natv_sink matches hidrd_natv_src. ---- - include/hidrd/fmt/natv/snk.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/hidrd/fmt/natv/snk.h b/include/hidrd/fmt/natv/snk.h -index 5d043bd..4b367ef 100644 ---- a/include/hidrd/fmt/natv/snk.h -+++ b/include/hidrd/fmt/natv/snk.h -@@ -34,7 +34,7 @@ extern "C" { - #endif - - /** Native sink type */ --const hidrd_snk_type hidrd_natv_snk; -+extern const hidrd_snk_type hidrd_natv_snk; - - /** Native sink error code */ - typedef enum hidrd_natv_snk_err { - -From b622af32bd0e72cf0c6dffff6c9c8852f065051e Mon Sep 17 00:00:00 2001 -From: Nikolai Kondrashov -Date: Sat, 18 Jun 2016 19:20:31 +0300 -Subject: [PATCH] Add missing extern to declarations - -Add "extern" to several missing declarations throughout the code, in -particular to avoid uninitialized copies of variables. This fixes an -assertion failure upon "hidrd-convert -h" invocation. ---- - include/hidrd/fmt/code/snk.h | 2 +- - include/hidrd/fmt/spec/snk.h | 2 +- - include/hidrd/usage/id_desc_list.h.m4 | 4 ++-- - include/hidrd/usage/page_desc_list.h.m4 | 4 ++-- - 5 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/include/hidrd/fmt/code/snk.h b/include/hidrd/fmt/code/snk.h -index e595f64..4d826fe 100644 ---- a/include/hidrd/fmt/code/snk.h -+++ b/include/hidrd/fmt/code/snk.h -@@ -34,7 +34,7 @@ extern "C" { - #endif - - /** Source code sink type */ --const hidrd_snk_type hidrd_code_snk; -+extern const hidrd_snk_type hidrd_code_snk; - - /** Source code sink instance */ - typedef struct hidrd_code_snk_inst { -diff --git a/include/hidrd/fmt/spec/snk.h b/include/hidrd/fmt/spec/snk.h -index 56974f4..ca073d4 100644 ---- a/include/hidrd/fmt/spec/snk.h -+++ b/include/hidrd/fmt/spec/snk.h -@@ -51,7 +51,7 @@ extern bool hidrd_spec_snk_flush(hidrd_snk *snk); - extern void hidrd_spec_snk_clnp(hidrd_snk *snk); - - /** Specification example sink type */ --const hidrd_snk_type hidrd_spec_snk; -+extern const hidrd_snk_type hidrd_spec_snk; - - /** Specification example sink item state table */ - typedef struct hidrd_spec_snk_state hidrd_spec_snk_state; -diff --git a/include/hidrd/usage/id_desc_list.h.m4 b/include/hidrd/usage/id_desc_list.h.m4 -index bc57082..1cde027 100644 ---- a/include/hidrd/usage/id_desc_list.h.m4 -+++ b/include/hidrd/usage/id_desc_list.h.m4 -@@ -68,13 +68,13 @@ extern "C" { - extern bool hidrd_usage_id_desc_list_valid(const hidrd_usage_id_desc *list, - size_t num); - --const hidrd_usage_id_desc *hidrd_usage_id_desc_list_lkp_by_value( -+extern const hidrd_usage_id_desc *hidrd_usage_id_desc_list_lkp_by_value( - const hidrd_usage_id_desc *list, - size_t num, - hidrd_usage_id value); - - #ifdef HIDRD_WITH_TOKENS --const hidrd_usage_id_desc *hidrd_usage_id_desc_list_lkp_by_token( -+extern const hidrd_usage_id_desc *hidrd_usage_id_desc_list_lkp_by_token( - const hidrd_usage_id_desc *list, - size_t num, - const char *token); -diff --git a/include/hidrd/usage/page_desc_list.h.m4 b/include/hidrd/usage/page_desc_list.h.m4 -index 7331d56..f83ebd1 100644 ---- a/include/hidrd/usage/page_desc_list.h.m4 -+++ b/include/hidrd/usage/page_desc_list.h.m4 -@@ -80,7 +80,7 @@ popdef(`page_num')dnl - * - * @return Page description or NULL, if not found. - */ --const hidrd_usage_page_desc *hidrd_usage_page_desc_list_lkp_by_value( -+extern const hidrd_usage_page_desc *hidrd_usage_page_desc_list_lkp_by_value( - hidrd_usage_page value); - - #ifdef HIDRD_WITH_TOKENS -@@ -91,7 +91,7 @@ const hidrd_usage_page_desc *hidrd_usage_page_desc_list_lkp_by_value( - * - * @return Page description or NULL, if not found. - */ --const hidrd_usage_page_desc *hidrd_usage_page_desc_list_lkp_by_token( -+extern const hidrd_usage_page_desc *hidrd_usage_page_desc_list_lkp_by_token( - const char *token); - #endif /* HIDRD_WITH_TOKENS */ - diff --git a/testing/hidrd/fix-check.patch b/testing/hidrd/fix-check.patch index 5da1daf8385..0628ad67f02 100644 --- a/testing/hidrd/fix-check.patch +++ b/testing/hidrd/fix-check.patch @@ -5,7 +5,7 @@ and the stranded error.{h,c} implementation https://www.openwall.com/lists/musl/ --- a/lib/fmt/xml_test.c +++ b/lib/fmt/xml_test.c -@@ -27,7 +27,11 @@ +@@ -25,7 +25,11 @@ #include #include #include @@ -19,7 +19,7 @@ and the stranded error.{h,c} implementation https://www.openwall.com/lists/musl/ --- a/lib/item/any_test.c +++ b/lib/item/any_test.c -@@ -29,7 +29,11 @@ +@@ -27,7 +27,11 @@ #include #include #include @@ -33,7 +33,7 @@ and the stranded error.{h,c} implementation https://www.openwall.com/lists/musl/ --- a/lib/opt/test.c +++ b/lib/opt/test.c -@@ -28,7 +28,11 @@ +@@ -26,7 +26,11 @@ #include #include #include @@ -47,7 +47,7 @@ and the stranded error.{h,c} implementation https://www.openwall.com/lists/musl/ #include "hidrd/opt/list.h" --- a/lib/util/num_test.c +++ b/lib/util/num_test.c -@@ -25,7 +25,11 @@ +@@ -23,7 +23,11 @@ */ #include @@ -61,7 +61,7 @@ and the stranded error.{h,c} implementation https://www.openwall.com/lists/musl/ #include "hidrd/util/num.h" --- a/lib/util/ttbl_test.c +++ b/lib/util/ttbl_test.c -@@ -26,7 +26,11 @@ +@@ -24,7 +24,11 @@ #include #include @@ -73,7 +73,17 @@ and the stranded error.{h,c} implementation https://www.openwall.com/lists/musl/ #include #include #include -Only in src/hidrd-0.2.0/lib/: error +--- a/lib/opt/Makefile.am ++++ b/lib/opt/Makefile.am +@@ -36,7 +36,7 @@ + + TESTS = hidrd_opt_test + +-hidrd_opt_test_SOURCES = test.c ++hidrd_opt_test_SOURCES = test.c ../util/error_at_line.c + hidrd_opt_test_LDADD = $(lib_LTLIBRARIES) + + bin_PROGRAMS = --- a/lib/util/Makefile.am +++ b/lib/util/Makefile.am @@ -39,10 +39,10 @@ @@ -89,43 +99,6 @@ Only in src/hidrd-0.2.0/lib/: error hidrd_ttbl_test_LDADD = $(lib_LTLIBRARIES) TESTS = hidrd_num_test hidrd_ttbl_test ---- a/lib/util/Makefile.in -+++ b/lib/util/Makefile.in -@@ -102,10 +102,12 @@ - am__EXEEXT_1 = hidrd_num_test$(EXEEXT) hidrd_ttbl_test$(EXEEXT) - @ENABLE_TESTS_INSTALL_TRUE@am__EXEEXT_2 = $(am__EXEEXT_1) - PROGRAMS = $(bin_PROGRAMS) --am_hidrd_num_test_OBJECTS = num_test.$(OBJEXT) -+am_hidrd_num_test_OBJECTS = num_test.$(OBJEXT) \ -+ error_at_line.$(OBJEXT) - hidrd_num_test_OBJECTS = $(am_hidrd_num_test_OBJECTS) - hidrd_num_test_DEPENDENCIES = $(lib_LTLIBRARIES) --am_hidrd_ttbl_test_OBJECTS = ttbl_test.$(OBJEXT) -+am_hidrd_ttbl_test_OBJECTS = ttbl_test.$(OBJEXT) \ -+ error_at_line.$(OBJEXT) - hidrd_ttbl_test_OBJECTS = $(am_hidrd_ttbl_test_OBJECTS) - hidrd_ttbl_test_DEPENDENCIES = $(lib_LTLIBRARIES) - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -@@ -247,9 +249,9 @@ - lib_LTLIBRARIES = libhidrd_util.la - libhidrd_util_la_SOURCES = bool.c buf.c char.c dec.c fd.c fmt.c hex.c \ - num.c str.c ttbl.c unit.c $(am__append_1) --hidrd_num_test_SOURCES = num_test.c -+hidrd_num_test_SOURCES = num_test.c error_at_line.c - hidrd_num_test_LDADD = $(lib_LTLIBRARIES) --hidrd_ttbl_test_SOURCES = ttbl_test.c -+hidrd_ttbl_test_SOURCES = ttbl_test.c error_at_line.c - hidrd_ttbl_test_LDADD = $(lib_LTLIBRARIES) - all: all-am - -@@ -387,6 +389,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buf.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/char.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dec.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error_at_line.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hex.Plo@am__quote@ --- /dev/null +++ b/lib/util/error_at_line.c @@ -0,0 +1,69 @@ @@ -222,107 +195,4 @@ Only in src/hidrd-0.2.0/lib/: error +#endif + +#endif ---- a/lib/opt/Makefile.am -+++ b/lib/opt/Makefile.am -@@ -36,7 +36,7 @@ - - TESTS = hidrd_opt_test - --hidrd_opt_test_SOURCES = test.c -+hidrd_opt_test_SOURCES = test.c ../util/error_at_line.c - hidrd_opt_test_LDADD = $(lib_LTLIBRARIES) - - bin_PROGRAMS = ---- a/lib/opt/Makefile.in -+++ b/lib/opt/Makefile.in -@@ -98,7 +98,8 @@ - am__EXEEXT_1 = hidrd_opt_test$(EXEEXT) - @ENABLE_TESTS_INSTALL_TRUE@am__EXEEXT_2 = $(am__EXEEXT_1) - PROGRAMS = $(bin_PROGRAMS) --am_hidrd_opt_test_OBJECTS = test.$(OBJEXT) -+am_hidrd_opt_test_OBJECTS = test.$(OBJEXT) \ -+ error_at_line.$(OBJEXT) - hidrd_opt_test_OBJECTS = $(am_hidrd_opt_test_OBJECTS) - hidrd_opt_test_DEPENDENCIES = $(lib_LTLIBRARIES) - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -@@ -251,7 +252,7 @@ - libhidrd_opt_la_LIBADD = \ - ../util/libhidrd_util.la - --hidrd_opt_test_SOURCES = test.c -+hidrd_opt_test_SOURCES = test.c ../util/error_at_line.c - hidrd_opt_test_LDADD = $(lib_LTLIBRARIES) - all: all-am - -@@ -382,6 +383,7 @@ - distclean-compile: - -rm -f *.tab.c - -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error_at_line.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inst.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/name_tkn.Plo@am__quote@ -@@ -415,6 +417,20 @@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -+error_at_line.o: ../util/error_at_line.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error_at_line.o -MD -MP -MF $(DEPDIR)/error_at_line.Tpo -c -o error_at_line.o `test -f '../util/error_at_line.c' || echo '$(srcdir)/'`../util/error_at_line.c -+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/error_at_line.Tpo $(DEPDIR)/error_at_line.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../util/error_at_line.c' object='error_at_line.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error_at_line.o `test -f '../util/error_at_line.c' || echo '$(srcdir)/'`../util/error_at_line.c -+ -+error_at_line.obj: ../util/error_at_line.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error_at_line.obj -MD -MP -MF $(DEPDIR)/error_at_line.Tpo -c -o error_at_line.obj `if test -f '../util/error_at_line.c'; then $(CYGPATH_W) '../util/error_at_line.c'; else $(CYGPATH_W) '$(srcdir)/../util/error_at_line.c'; fi` -+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/error_at_line.Tpo $(DEPDIR)/error_at_line.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../util/error_at_line.c' object='error_at_line.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error_at_line.obj `if test -f '../util/error_at_line.c'; then $(CYGPATH_W) '../util/error_at_line.c'; else $(CYGPATH_W) '$(srcdir)/../util/error_at_line.c'; fi` -+ - mostlyclean-libtool: - -rm -f *.lo - -From f876ac085a86cc932c7d3093a7d007c78bff4751 Mon Sep 17 00:00:00 2001 -From: Jason Gerecke -Date: Tue, 26 Apr 2016 13:28:04 -0700 -Subject: [PATCH] Replace use of 'tempfile' with 'mktemp' in tests -The 'tempfile' command has been deprecated in Debian for many years -at this point and may not even be available on modern systems. Use -'mktemp' as the recommended replacement. ---- - lib/fmt/hidrd_read_test | 6 +++--- - lib/fmt/hidrd_write_test | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/lib/fmt/hidrd_read_test b/lib/fmt/hidrd_read_test -index 8ae1350..6b30f6b 100755 ---- a/lib/fmt/hidrd_read_test -+++ b/lib/fmt/hidrd_read_test -@@ -39,9 +39,9 @@ function run () - local input="$1"; shift - local output="$1"; shift - local output_basename="`basename \"$output\"`" -- local test_output="`tempfile -s\"_$output_basename.test\"`" -- local txt_output="`tempfile -s\"_$output_basename.txt\"`" -- local test_txt_output="`tempfile -s\"_$output_basename.txt.test\"`" -+ local test_output="`mktemp --suffix=\"_$output_basename.test\"`" -+ local txt_output="`mktemp --suffix=\"_$output_basename.txt\"`" -+ local test_txt_output="`mktemp --suffix=\"_$output_basename.txt.test\"`" - local status - - echo "Checking \"$format\" reading from \"$input\"" \ -diff --git a/lib/fmt/hidrd_write_test b/lib/fmt/hidrd_write_test -index 3cfb0aa..73dddd8 100755 ---- a/lib/fmt/hidrd_write_test -+++ b/lib/fmt/hidrd_write_test -@@ -34,7 +34,7 @@ function run () - local input="$1"; shift - local output="$1"; shift - local output_basename="`basename \"$output\"`" -- local test_output="`tempfile -s\"_$output_basename.test\"`" -+ local test_output="`mktemp --suffix=\"_$output_basename.test\"`" - local status - - echo "Checking \"$format\" writing of \"$input\"" \ diff --git a/testing/hidrd/musl-fix-headers.patch b/testing/hidrd/musl-fix-headers.patch index d6de2e3b716..434c28818d6 100644 --- a/testing/hidrd/musl-fix-headers.patch +++ b/testing/hidrd/musl-fix-headers.patch @@ -2,7 +2,7 @@ diff --git a/lib/util/ttbl.c b/lib/util/ttbl.c index 12bf5c7..f98ebed 100644 --- a/lib/util/ttbl.c +++ b/lib/util/ttbl.c -@@ -28,6 +28,7 @@ +@@ -26,6 +26,7 @@ #include #include #include