From a375cb15b9dac5db64667168f0724e79d2792a09 Mon Sep 17 00:00:00 2001 From: Gyorgy Sarvari Date: Fri, 6 Jun 2025 15:31:18 +0200 Subject: bc: upgrade 1.08.1 -> 1.08.2 Changes: - Remove last vestages of K&R C; this allows gcc-15+ to compile the code without special options. - Some typo and formatting fixes in the documentation. The above change also allowed dropping the relevant patch, that fixed gcc15 compatibility: 0001-getopt-Add-missing-params-to-getopt-getenv-signature.patch License-Update: added copyright years to the file header. (From OE-Core rev: 83886335bd08f5fa147694e957b2467b19aea6bd) Signed-off-by: Gyorgy Sarvari Signed-off-by: Richard Purdie --- ...missing-params-to-getopt-getenv-signature.patch | 40 ---------------------- meta/recipes-extended/bc/bc_1.08.1.bb | 33 ------------------ meta/recipes-extended/bc/bc_1.08.2.bb | 32 +++++++++++++++++ 3 files changed, 32 insertions(+), 73 deletions(-) delete mode 100644 meta/recipes-extended/bc/bc/0001-getopt-Add-missing-params-to-getopt-getenv-signature.patch delete mode 100644 meta/recipes-extended/bc/bc_1.08.1.bb create mode 100644 meta/recipes-extended/bc/bc_1.08.2.bb diff --git a/meta/recipes-extended/bc/bc/0001-getopt-Add-missing-params-to-getopt-getenv-signature.patch b/meta/recipes-extended/bc/bc/0001-getopt-Add-missing-params-to-getopt-getenv-signature.patch deleted file mode 100644 index f43f336075..0000000000 --- a/meta/recipes-extended/bc/bc/0001-getopt-Add-missing-params-to-getopt-getenv-signature.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 493997b0d2c3dc6469f967d8f619ed934667c71e Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 22 Mar 2025 18:33:08 -0700 -Subject: [PATCH] getopt: Add missing params to getopt/getenv signatures - -This ensures it can compile with GCC 15 on musl - -Upstream-Status: Submitted [sent to bug-bc@gnu.org] -Signed-off-by: Khem Raj ---- - h/getopt.h | 2 +- - lib/getopt.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/h/getopt.h b/h/getopt.h -index cc45f46..5ea5eac 100644 ---- a/h/getopt.h -+++ b/h/getopt.h -@@ -141,7 +141,7 @@ struct option - errors, only prototype getopt for the GNU C library. */ - extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); - #else /* not __GNU_LIBRARY__ */ --extern int getopt (); -+extern int getopt (int, char * const*, const char *); - #endif /* __GNU_LIBRARY__ */ - - #ifndef __need_getopt -diff --git a/lib/getopt.c b/lib/getopt.c -index b270074..3e6d071 100644 ---- a/lib/getopt.c -+++ b/lib/getopt.c -@@ -197,7 +197,7 @@ static char *posixly_correct; - whose names are inconsistent. */ - - #ifndef getenv --extern char *getenv (); -+extern char *getenv (const char*); - #endif - - #endif /* not __GNU_LIBRARY__ */ diff --git a/meta/recipes-extended/bc/bc_1.08.1.bb b/meta/recipes-extended/bc/bc_1.08.1.bb deleted file mode 100644 index 5fbbe7ef6a..0000000000 --- a/meta/recipes-extended/bc/bc_1.08.1.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Arbitrary precision calculator language" -HOMEPAGE = "http://www.gnu.org/software/bc/bc.html" -DESCRIPTION = "bc is an arbitrary precision numeric processing language. Syntax is similar to C, but differs in many substantial areas. It supports interactive execution of statements." - -LICENSE = "GPL-3.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://bc/bcdefs.h;endline=17;md5=4295c06df9e833519a342f7b5d43db06 \ - file://dc/dc.h;endline=18;md5=bad31533d57fe5948c996f9ef6643206 \ - file://lib/number.c;endline=20;md5=cf43068cc88f837731dc53240456cfaf" - -SECTION = "base" -DEPENDS = "flex-native" - -SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ - file://0001-getopt-Add-missing-params-to-getopt-getenv-signature.patch \ - file://run-ptest" -SRC_URI[sha256sum] = "b71457ffeb210d7ea61825ff72b3e49dc8f2c1a04102bbe23591d783d1bfe996" - -inherit autotools texinfo update-alternatives ptest - -PACKAGECONFIG ??= "readline" -PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" -PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" - -do_install_ptest() { - install ${S}/Test/*.b ${D}${PTEST_PATH} -} - -ALTERNATIVE:${PN} = "bc dc" -ALTERNATIVE_PRIORITY = "100" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/bc/bc_1.08.2.bb b/meta/recipes-extended/bc/bc_1.08.2.bb new file mode 100644 index 0000000000..cebfed9642 --- /dev/null +++ b/meta/recipes-extended/bc/bc_1.08.2.bb @@ -0,0 +1,32 @@ +SUMMARY = "Arbitrary precision calculator language" +HOMEPAGE = "http://www.gnu.org/software/bc/bc.html" +DESCRIPTION = "bc is an arbitrary precision numeric processing language. Syntax is similar to C, but differs in many substantial areas. It supports interactive execution of statements." + +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://bc/bcdefs.h;endline=17;md5=f4a0239b216b8407783955e74938f190 \ + file://dc/dc.h;endline=18;md5=bad31533d57fe5948c996f9ef6643206 \ + file://lib/number.c;endline=20;md5=cf43068cc88f837731dc53240456cfaf" + +SECTION = "base" +DEPENDS = "flex-native" + +SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ + file://run-ptest" +SRC_URI[sha256sum] = "ae470fec429775653e042015edc928d07c8c3b2fc59765172a330d3d87785f86" + +inherit autotools texinfo update-alternatives ptest + +PACKAGECONFIG ??= "readline" +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" +PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" + +do_install_ptest() { + install ${S}/Test/*.b ${D}${PTEST_PATH} +} + +ALTERNATIVE:${PN} = "bc dc" +ALTERNATIVE_PRIORITY = "100" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf