package/libenca: bump to version 1.22 and migrate to new upstream
PATCH 1/3 package/libenca: bump to version 1.22 and migrate to new upstream
The original upstream site (http://cihar.com/software/enca/) has been deprecated. The project has been revived and is now maintained at:
https://github.com/Project-OSS-Revival/enca
Changes from 1.19 to 1.22:
- Project moved to GitHub under Project-OSS-Revival organization
- Updated build system and dependencies
- Various bug fixes and improvements
- Continued maintenance after original upstream abandonment
Updated:
- Version from 1.19 to 1.22
- Download site from dl.cihar.com to GitHub releases
- Homepage URL to new GitHub repository
https://github.com/Project-OSS-Revival/enca/releases
--- package/libenca/Config.in | 2 +- package/libenca/libenca.hash | 2 +- package/libenca/libenca.mk | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
package/libenca/Config.in +1 -1
@@ -3,4 +3,4 @@ config BR2_PACKAGE_LIBENCA help Extremely Naive Charset Analyser - http://cihar.com/software/enca/ + https://github.com/Project-OSS-Revival/enca
package/libenca/libenca.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 3a487eca40b41021e2e4b7a6440b97d822e6532db5464471f572ecf77295e8b8 enca-1.19.tar.xz +sha256 95a70dd21198e6427d77a1d79721f4f87dd8bd07fdefe71a2062c6f41eee39da enca-1.22.tar.xz sha256 87f1bd4a52b4029476b684fcdd51fed3c6b2540e462d3c2d3bfc9be4558b2825 COPYING
package/libenca/libenca.mk +2 -2
@@ -4,8 +4,8 @@ # ################################################################################ -LIBENCA_VERSION = 1.19 -LIBENCA_SITE = http://dl.cihar.com/enca +LIBENCA_VERSION = 1.22 +LIBENCA_SITE = https://github.com/Project-OSS-Revival/enca/releases/download/$(LIBENCA_VERSION) LIBENCA_SOURCE = enca-$(LIBENCA_VERSION).tar.xz LIBENCA_INSTALL_STAGING = YES LIBENCA_LICENSE = GPL-2.0
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/3 DEVELOPERS: add Shubham Chakraborty for libenca
--- DEVELOPERS | 1 + 1 file changed, 1 insertion(+)
DEVELOPERS +1 -0
@@ -3063,6 +3063,7 @@ F: package/wolfssl/ N: Shubham Chakraborty <[email protected]> F: package/ccache/ F: package/hyperfine/ +F: package/libenca/ N: Simon Dawson <[email protected]> F: boot/at91bootstrap3/
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedRe: [Buildroot] [PATCH 2/3] DEVELOPERS: add Shubham Chakraborty for libenca
Quoted 4 lines · Shubham Chakraborty
Signed-off-by Shubham Chakraborty <[email protected]>--- DEVELOPERS | 1 + 1 file changed, 1 insertion(+)
Thanks, applied to next!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 3/3 package/libenca: fix C23 compatibility for getenv/getopt prototypes
In reply to Shubham ChakrabortyGCC 15 defaults to C23, which removes support for K&R-style unprototyped function declarations. This causes build failures with strict modern C libraries.
Add proper function prototypes for getopt, getopt_long, getopt_long_only, getenv, and _getopt_internal to comply with C23 requirements.
Fixes build with musl libc and GCC 15.
Upstream: https://github.com/Project-OSS-Revival/enca/pull/97
--- ...atibility-for-getenv-getopt-prototyp.patch | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 package/libenca/0001-src-fix-C23-compatibility-for-getenv-getopt-prototyp.patch
package/libenca/0001-src-fix-C23-compatibility-for-getenv-getopt-prototyp.patch new file +69 -0
@@ -0,0 +1,69 @@ +From 1782ea5dd749cd66b38b03aa02bd0c2f9d558f83 Mon Sep 17 00:00:00 2001 +From: Shubham Chakraborty <[email protected]> +Date: Sat, 18 Apr 2026 14:25:27 +0530 +Subject: [PATCH] src: fix C23 compatibility for getenv/getopt prototypes + +GCC 15 defaults to C23, which no longer supports unprototyped function +declarations (K&R style). This fixes conflicts with strict prototypes +in modern C libraries like musl. + +Build-tested in Buildroot using musl libc and C23. + +Upstream: https://github.com/Project-OSS-Revival/enca/pull/97 +Signed-off-by: Shubham Chakraborty <[email protected]> +--- + src/getopt.h | 16 +++++++++++----- + src/getopt_long.c | 2 +- + 2 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/src/getopt.h b/src/getopt.h +index 2eae587..91647ae 100644 +--- a/src/getopt.h ++++ b/src/getopt.h +@@ -144,7 +144,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 argc, char * const argv[], const char *shortopts); + # endif /* __GNU_LIBRARY__ */ + + # ifndef __need_getopt +@@ -161,12 +161,18 @@ extern int _getopt_internal (int __argc, char *const *__argv, + int __long_only); + # endif + #else /* not __STDC__ */ +-extern int getopt (); ++extern int getopt (int argc, char * const argv[], const char *shortopts); + # ifndef __need_getopt +-extern int getopt_long (); +-extern int getopt_long_only (); ++extern int getopt_long (int argc, char *const *argv, const char *shortopts, ++ const struct option *longopts, int *longind); ++extern int getopt_long_only (int argc, char *const *argv, ++ const char *shortopts, ++ const struct option *longopts, int *longind); + +-extern int _getopt_internal (); ++extern int _getopt_internal (int __argc, char *const *__argv, ++ const char *__shortopts, ++ const struct option *__longopts, int *__longind, ++ int __long_only); + # endif + #endif /* __STDC__ */ + +diff --git a/src/getopt_long.c b/src/getopt_long.c +index caba753..a55fe2a 100644 +--- a/src/getopt_long.c ++++ b/src/getopt_long.c +@@ -199,7 +199,7 @@ static char *posixly_correct; + whose names are inconsistent. */ + + #ifndef getenv +-extern char *getenv (); ++extern char *getenv (const char *name); + #endif + + static char * +-- +2.53.0
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 3/3] package/libenca: fix C23 compatibility for getenv/getopt prototypes
Hello,
Quoted 8 lines · Shubham Chakraborty
GCC 15 defaults to C23, which removes support for K&R-style unprototyped function declarations. This causes build failures with strict modern C libraries.
Add proper function prototypes for getopt,
getopt_long,getopt_long_only, getenv, and_getopt_internalto comply with C23 requirements.
Quoted 5 lines
Fixes build with musl libc and GCC 15.
Upstream: https://github.com/Project-OSS-Revival/enca/pull/97
Signed-off-by Shubham Chakraborty <[email protected]>
Thanks for this patch. Since it is a bugfix for an issue that exists in the current version of libenca in Buildroot, this patch should have been the first one in the series, before the version bump.
Also, this issue is visible in our autobuilders, so your commit log should have carried a reference to the autobuilder issue being fixed. I've added a reference to such a build failure, and applied your patch to master. Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Michal,
I think enca is/was(?) you project? I wanted to confirm, that you did indeed hand over maintenance of the project to the OSS-Revival org, before merging a patch, that switches the upstream in buildroot.
Best Marcus
Quoted 48 lines · Shubham Chakraborty
The original upstream site (http://cihar.com/software/enca/) has been deprecated. The project has been revived and is now maintained at:
https://github.com/Project-OSS-Revival/encaChanges from 1.19 to 1.22:
- Project moved to GitHub under Project-OSS-Revival organization
- Updated build system and dependencies
- Various bug fixes and improvements
- Continued maintenance after original upstream abandonmentUpdated:
- Version from 1.19 to 1.22
- Download site from dl.cihar.com to GitHub releases
- Homepage URL to new GitHub repositoryhttps://github.com/Project-OSS-Revival/enca/releases
Signed-off-by Shubham Chakraborty <[email protected]>--- package/libenca/Config.in | 2 +- package/libenca/libenca.hash | 2 +- package/libenca/libenca.mk | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)package/libenca/Config.in +1
-1@@ -3,4 +3,4 @@ config BR2_PACKAGE_LIBENCA help Extremely Naive Charset Analyser - http://cihar.com/software/enca/ + https://github.com/Project-OSS-Revival/encapackage/libenca/libenca.hash +1
-1@@ -1,3 +1,3 @@ # Locally calculated -sha256 3a487eca40b41021e2e4b7a6440b97d822e6532db5464471f572ecf77295e8b8 enca-1.19.tar.xz +sha256 95a70dd21198e6427d77a1d79721f4f87dd8bd07fdefe71a2062c6f41eee39da enca-1.22.tar.xz sha256 87f1bd4a52b4029476b684fcdd51fed3c6b2540e462d3c2d3bfc9be4558b2825 COPYINGpackage/libenca/libenca.mk +0
-0
package/libenca/libenca.mk line 11
Quoted 10 lines
package/libenca/libenca.mk +2
-2@@ -4,8 +4,8 @@ # ################################################################################ -LIBENCA_VERSION = 1.19 -LIBENCA_SITE = http://dl.cihar.com/enca +LIBENCA_VERSION = 1.22 +LIBENCA_SITE = https://github.com/Project-OSS-Revival/enca/releases/download/$(LIBENCA_VERSION) LIBENCA_SOURCE = enca-$(LIBENCA_VERSION).tar.xz LIBENCA_INSTALL_STAGING = YES LIBENCA_LICENSE = GPL-2.0
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 10 lines · Shubham Chakraborty
The original upstream site (http://cihar.com/software/enca/) has been deprecated. The project has been revived and is now maintained at:
https://github.com/Project-OSS-Revival/encaChanges from 1.19 to 1.22:
- Project moved to GitHub under Project-OSS-Revival organization
- Updated build system and dependencies
- Various bug fixes and improvements
- Continued maintenance after original upstream abandonment
Quoted 8 lines
Updated:
- Version from 1.19 to 1.22
- Download site from dl.cihar.com to GitHub releases
- Homepage URL to new GitHub repositoryhttps://github.com/Project-OSS-Revival/enca/releases
Signed-off-by Shubham Chakraborty <[email protected]>
Thanks, applied to next!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot