From a952f1046a495b63f98edeb5de131750aaa20918 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 31 Oct 2022 12:47:16 +0100 Subject: argp-standalone: replace with a maintained fork Remove two patches as issues fixed upstream, submit the third one. License-Update: argp.h is an import from glibc and has been refreshed to the latest version. It's still lgpl 2.1. (From OE-Core rev: 6ecd02e4aff8222b55cd94d5214ccd76c96b7387) Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- .../argp-standalone/argp-standalone_1.3.bb | 33 --------- .../argp-standalone/argp-standalone_1.4.1.bb | 31 ++++++++ .../files/0001-throw-in-funcdef.patch | 84 ---------------------- .../argp-standalone/files/0002-isprint.patch | 51 ------------- .../argp-standalone/files/out_of_tree_build.patch | 2 +- 5 files changed, 32 insertions(+), 169 deletions(-) delete mode 100644 meta/recipes-support/argp-standalone/argp-standalone_1.3.bb create mode 100644 meta/recipes-support/argp-standalone/argp-standalone_1.4.1.bb delete mode 100644 meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch delete mode 100644 meta/recipes-support/argp-standalone/files/0002-isprint.patch (limited to 'meta/recipes-support/argp-standalone') diff --git a/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb b/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb deleted file mode 100644 index 8d8122612a..0000000000 --- a/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2015 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Glibc hierarchical argument parsing standalone library" -DESCRIPTION = "Standalone version of arguments parsing functions from GLIBC" -HOMEPAGE = "http://www.lysator.liu.se/~nisse/misc/" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://argp.h;beginline=1;endline=20;md5=008b7e53dea6f9e1d9fdef0d9cf3184a" -SECTION = "libs" - -SRC_URI = "http://www.lysator.liu.se/~nisse/misc/argp-standalone-${PV}.tar.gz \ - file://0001-throw-in-funcdef.patch \ - file://0002-isprint.patch \ - file://out_of_tree_build.patch \ - " -SRC_URI[md5sum] = "720704bac078d067111b32444e24ba69" -SRC_URI[sha256sum] = "dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be" - -inherit autotools - -CFLAGS += "-fPIC -U__OPTIMIZE__" - -DEV_PKG_DEPENDENCY = "" -RDEPENDS:${PN}-staticdev = "" - -do_install() { - install -D -m 0644 ${B}/libargp.a ${D}${libdir}/libargp.a - install -D -m 0644 ${S}/argp.h ${D}${includedir}/argp.h -} -# -# We will skip parsing for non-musl systems -# -COMPATIBLE_HOST = ".*-musl.*" diff --git a/meta/recipes-support/argp-standalone/argp-standalone_1.4.1.bb b/meta/recipes-support/argp-standalone/argp-standalone_1.4.1.bb new file mode 100644 index 0000000000..00b6036502 --- /dev/null +++ b/meta/recipes-support/argp-standalone/argp-standalone_1.4.1.bb @@ -0,0 +1,31 @@ +# Copyright (C) 2015 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Glibc hierarchical argument parsing standalone library" +DESCRIPTION = "Standalone version of arguments parsing functions from GLIBC" +HOMEPAGE = "https://github.com/ericonr/argp-standalone" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://argp.h;beginline=1;endline=20;md5=464f2cfb1c35a5123f9e309d7afd79f8" +SECTION = "libs" + +SRC_URI = "git://github.com/ericonr/argp-standalone;branch=master;protocol=https \ + file://out_of_tree_build.patch \ + " +SRCREV = "e5fe9ad9e83e6765cf8fa787f903d4c6792338b5" +S = "${WORKDIR}/git" + +inherit autotools + +CFLAGS += "-fPIC -U__OPTIMIZE__" + +DEV_PKG_DEPENDENCY = "" +RDEPENDS:${PN}-staticdev = "" + +do_install() { + install -D -m 0644 ${B}/libargp.a ${D}${libdir}/libargp.a + install -D -m 0644 ${S}/argp.h ${D}${includedir}/argp.h +} +# +# We will skip parsing for non-musl systems +# +COMPATIBLE_HOST = ".*-musl.*" diff --git a/meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch b/meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch deleted file mode 100644 index a6e2759c5d..0000000000 --- a/meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch +++ /dev/null @@ -1,84 +0,0 @@ -# --- T2-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone -# Copyright (C) 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- T2-COPYRIGHT-NOTE-END --- - - -No __THROW in function implementation. - --jsaw - -Taken from buildroot - -Upstream-Status: Pending -Signed-off-by: Khem Raj - ---- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100 -+++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100 -@@ -560,17 +560,17 @@ - # endif - - # ifndef ARGP_EI --# define ARGP_EI extern __inline__ -+# define ARGP_EI extern inline - # endif - - ARGP_EI void --__argp_usage (__const struct argp_state *__state) __THROW -+__argp_usage (__const struct argp_state *__state) - { - __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); - } - - ARGP_EI int --__option_is_short (__const struct argp_option *__opt) __THROW -+__option_is_short (__const struct argp_option *__opt) - { - if (__opt->flags & OPTION_DOC) - return 0; -@@ -582,7 +582,7 @@ - } - - ARGP_EI int --__option_is_end (__const struct argp_option *__opt) __THROW -+__option_is_end (__const struct argp_option *__opt) - { - return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; - } ---- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100 -+++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100 -@@ -1290,13 +1290,13 @@ - /* Defined here, in case a user is not inlining the definitions in - * argp.h */ - void --__argp_usage (__const struct argp_state *__state) __THROW -+__argp_usage (__const struct argp_state *__state) - { - __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); - } - - int --__option_is_short (__const struct argp_option *__opt) __THROW -+__option_is_short (__const struct argp_option *__opt) - { - if (__opt->flags & OPTION_DOC) - return 0; -@@ -1310,7 +1310,7 @@ - } - - int --__option_is_end (__const struct argp_option *__opt) __THROW -+__option_is_end (__const struct argp_option *__opt) - { - return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; - } diff --git a/meta/recipes-support/argp-standalone/files/0002-isprint.patch b/meta/recipes-support/argp-standalone/files/0002-isprint.patch deleted file mode 100644 index 1c07eea3c1..0000000000 --- a/meta/recipes-support/argp-standalone/files/0002-isprint.patch +++ /dev/null @@ -1,51 +0,0 @@ -Subject: restrict value range passed to isprint function - -According to C standards isprint argument shall be representable as an -unsigned char or be equal to EOF, otherwise the behaviour is undefined. - -Passing arbitrary ints leads to segfault in nm program from elfutils. - -Restrict isprint argument range to values representable by unsigned char. - -Signed-off-by: Max Filippov - -Taken from buildroot - -Upstream-Status: Pending -Signed-off-by: Khem Raj - ---- -Index: b/argp.h -=================================================================== ---- a/argp.h -+++ b/argp.h -@@ -23,6 +23,7 @@ - - #include - #include -+#include - - #define __need_error_t - #include -@@ -577,7 +578,7 @@ - else - { - int __key = __opt->key; -- return __key > 0 && isprint (__key); -+ return __key > 0 && __key <= UCHAR_MAX && isprint (__key); - } - } - -Index: b/argp-parse.c -=================================================================== ---- a/argp-parse.c -+++ b/argp-parse.c -@@ -1292,7 +1292,7 @@ - int __key = __opt->key; - /* FIXME: whether or not a particular key implies a short option - * ought not to be locale dependent. */ -- return __key > 0 && isprint (__key); -+ return __key > 0 && __key <= UCHAR_MAX && isprint (__key); - } - } - diff --git a/meta/recipes-support/argp-standalone/files/out_of_tree_build.patch b/meta/recipes-support/argp-standalone/files/out_of_tree_build.patch index b7777cbd91..c863104430 100644 --- a/meta/recipes-support/argp-standalone/files/out_of_tree_build.patch +++ b/meta/recipes-support/argp-standalone/files/out_of_tree_build.patch @@ -2,7 +2,7 @@ Fix the testsuite to built out of tree in OE S != B Signed-off-by: Khem Raj -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/ericonr/argp-standalone/pull/9] Index: argp-standalone-1.3/testsuite/Makefile.am =================================================================== --- argp-standalone-1.3.orig/testsuite/Makefile.am -- cgit v1.2.3-54-g00ecf