aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs
diff options
context:
space:
mode:
Diffstat (limited to 'package/libs')
-rw-r--r--package/libs/argp-standalone/Makefile19
-rw-r--r--package/libs/elfutils/Makefile39
-rw-r--r--package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch34
-rw-r--r--package/libs/elfutils/patches/003-libintl-compatibility.patch56
-rw-r--r--package/libs/elfutils/patches/005-build_only_libs.patch8
-rw-r--r--package/libs/elfutils/patches/006-Fix-build-on-aarch64-musl.patch6
-rw-r--r--package/libs/elfutils/patches/100-musl-compat.patch48
-rw-r--r--package/libs/elfutils/patches/101-no-fts.patch6
-rw-r--r--package/libs/elfutils/patches/110-no-cdefs.patch51
-rw-r--r--package/libs/gettext-full/Makefile106
-rw-r--r--package/libs/gettext-full/patches/001-autotools.patch2
-rw-r--r--package/libs/gettext-full/patches/001-no_examples_and_tests.patch22
-rw-r--r--package/libs/gettext-full/patches/010-m4.patch382
-rw-r--r--package/libs/gettext-full/patches/100-libxml-no-force-included.patch31
-rw-r--r--package/libs/gettext-full/patches/150-disable_libxml_iconv.patch22
-rw-r--r--package/libs/gettext-full/patches/200-libunistring-missing-link.patch21
-rw-r--r--package/libs/gettext/Makefile63
-rw-r--r--package/libs/gettext/src/LICENSE7
-rw-r--r--package/libs/gettext/src/include/libintl.h53
-rw-r--r--package/libs/gettext/src/m4/codeset.m421
-rw-r--r--package/libs/gettext/src/m4/gettext.m4383
-rw-r--r--package/libs/gettext/src/m4/intl.m4294
-rw-r--r--package/libs/gettext/src/m4/intldir.m419
-rw-r--r--package/libs/gettext/src/m4/intlmacosx.m451
-rw-r--r--package/libs/gettext/src/m4/lcmessage.m431
-rw-r--r--package/libs/gettext/src/m4/nls.m432
-rw-r--r--package/libs/gettext/src/m4/po.m4449
-rw-r--r--package/libs/gmp/Makefile7
-rw-r--r--package/libs/jansson/Makefile19
-rw-r--r--package/libs/libaudit/Makefile4
-rw-r--r--package/libs/libbpf/Makefile76
-rw-r--r--package/libs/libbpf/patches/001-cflags.patch10
-rw-r--r--package/libs/libbsd/Makefile10
-rw-r--r--package/libs/libbsd/patches/001-fix-libpath.patch13
-rw-r--r--package/libs/libcap/Makefile7
-rw-r--r--package/libs/libcap/patches/300-disable-tests.patch2
-rw-r--r--package/libs/libcap/patches/900-use-more-compatible-shebang.patch8
-rw-r--r--package/libs/libevent2/Makefile6
-rw-r--r--package/libs/libiconv-full/Makefile11
-rw-r--r--package/libs/libiconv/COPYING504
-rw-r--r--package/libs/libiconv/COPYRIGHT20
-rw-r--r--package/libs/libiconv/Makefile79
-rw-r--r--package/libs/libiconv/src/LICENSE6
-rw-r--r--package/libs/libiconv/src/iconv.c449
-rw-r--r--package/libs/libiconv/src/include/charmaps.h80
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-10.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-13.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-14.h25
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-16.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-2.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-3.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-4.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-5.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-6.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-7.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-8.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/iso-8859-9.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/koi8-r.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/windows-1250.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/windows-1251.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/windows-1252.h25
-rw-r--r--package/libs/libiconv/src/include/charmaps/windows-1253.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/windows-1254.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/windows-1255.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/windows-1256.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/windows-1257.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/windows-1258.h24
-rw-r--r--package/libs/libiconv/src/include/charmaps/windows-874.h24
-rw-r--r--package/libs/libiconv/src/include/iconv.h36
-rw-r--r--package/libs/libiconv/src/m4/iconv.m4214
-rw-r--r--package/libs/libjson-c/Makefile14
-rw-r--r--package/libs/libjson-c/patches/000-libm.patch45
-rw-r--r--package/libs/libjson-c/patches/001-dont-build-docs.patch8
-rw-r--r--package/libs/libmd/Makefile47
-rw-r--r--package/libs/libmnl/Makefile7
-rw-r--r--package/libs/libmnl/patches/001-fix_build.patch11
-rw-r--r--package/libs/libnetfilter-conntrack/Makefile7
-rw-r--r--package/libs/libnetfilter-conntrack/patches/0001-conntrack-fix-build-with-kernel-5_15-and-musl.patch49
-rw-r--r--package/libs/libnfnetlink/Makefile7
-rw-r--r--package/libs/libnfnetlink/patches/100-missing_include.patch20
-rw-r--r--package/libs/libnftnl/Makefile11
-rw-r--r--package/libs/libnl-tiny/Makefile12
-rw-r--r--package/libs/libnl/Makefile34
-rw-r--r--package/libs/libnl/patches/100-build-add-Libs.private-field-in-libnl-pkg-config-file.patch25
-rw-r--r--package/libs/libpcap/Makefile29
-rw-r--r--package/libs/libpcap/patches/100-no-openssl.patch2
-rw-r--r--package/libs/libpcap/patches/102-skip-manpages.patch2
-rw-r--r--package/libs/libpcap/patches/201-space_optimization.patch26
-rw-r--r--package/libs/libpcap/patches/300-Add-support-for-B.A.T.M.A.N.-Advanced.patch642
-rw-r--r--package/libs/libselinux/Makefile20
-rw-r--r--package/libs/libsemanage/Makefile8
-rw-r--r--package/libs/libsepol/Makefile9
-rw-r--r--package/libs/libtool/Makefile6
-rw-r--r--package/libs/libtraceevent/Makefile74
-rw-r--r--package/libs/libtracefs/Makefile49
-rw-r--r--package/libs/libubox/Makefile16
-rw-r--r--package/libs/libunistring/Makefile64
-rw-r--r--package/libs/libunwind/Makefile6
-rw-r--r--package/libs/libusb/Makefile37
-rw-r--r--package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch29
-rw-r--r--package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch61
-rw-r--r--package/libs/libxml2/Makefile206
-rw-r--r--package/libs/mbedtls/Config.in193
-rw-r--r--package/libs/mbedtls/Makefile112
-rw-r--r--package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch197
-rw-r--r--package/libs/mbedtls/patches/101-remove-test.patch15
-rw-r--r--package/libs/mbedtls/patches/200-config.patch245
-rw-r--r--package/libs/mpfr/Makefile64
-rw-r--r--package/libs/mpfr/patches/001-only-src.patch22
-rw-r--r--package/libs/musl-fts/Makefile3
-rw-r--r--package/libs/ncurses/Makefile8
-rw-r--r--package/libs/ncurses/patches/100-ncurses-5.6-20080112-urxvt.patch2
-rw-r--r--package/libs/ncurses/patches/101-ncurses-5.6-20080628-kbs.patch38
-rw-r--r--package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch4
-rw-r--r--package/libs/ncurses/patches/103-ncurses-ar-determinism.patch32
-rw-r--r--package/libs/ncurses/patches/900-terminfo.patch2
-rw-r--r--package/libs/nettle/Makefile10
-rw-r--r--package/libs/nettle/patches/100-portability.patch8
-rw-r--r--package/libs/openssl/Config.in84
-rw-r--r--package/libs/openssl/Makefile122
-rw-r--r--package/libs/openssl/files/afalg.cnf3
-rw-r--r--package/libs/openssl/files/devcrypto.cnf34
-rw-r--r--package/libs/openssl/files/legacy.cnf3
-rwxr-xr-xpackage/libs/openssl/files/openssl.init72
-rw-r--r--package/libs/openssl/files/padlock.cnf3
-rw-r--r--package/libs/openssl/patches/100-Configure-afalg-support.patch6
-rw-r--r--package/libs/openssl/patches/110-openwrt_targets.patch17
-rw-r--r--package/libs/openssl/patches/120-strip-cflags-from-binary.patch12
-rw-r--r--package/libs/openssl/patches/130-dont-build-fuzz-docs.patch20
-rw-r--r--package/libs/openssl/patches/130-dont-build-tests-fuzz.patch31
-rw-r--r--package/libs/openssl/patches/140-allow-prefer-chacha20.patch66
-rw-r--r--package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch133
-rw-r--r--package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch60
-rw-r--r--package/libs/openssl/patches/410-eng_devcrypto-add-configuration-options.patch569
-rw-r--r--package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch275
-rw-r--r--package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch348
-rw-r--r--package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch6
-rw-r--r--package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch6
-rw-r--r--package/libs/pcre/Config.in11
-rw-r--r--package/libs/pcre/Makefile115
-rw-r--r--package/libs/pcre2/Config.in30
-rw-r--r--package/libs/pcre2/Makefile109
-rw-r--r--package/libs/popt/Makefile14
-rw-r--r--package/libs/popt/patches/100-configure.ac-remove-require-gettext-version.patch26
-rw-r--r--package/libs/readline/Makefile6
-rw-r--r--package/libs/sysfsutils/Makefile3
-rw-r--r--package/libs/sysfsutils/files/sysfsutils3
-rw-r--r--package/libs/toolchain/Makefile26
-rw-r--r--package/libs/uclibc++/Makefile105
-rw-r--r--package/libs/uclibc++/files/config.default58
-rw-r--r--package/libs/uclibc++/patches/001-no-ansi.patch10
-rw-r--r--package/libs/uclibc++/patches/002-undef-functions.patch35
-rw-r--r--package/libs/uclibc++/patches/003-no-fPIC.patch10
-rw-r--r--package/libs/uclibc++/patches/004-uClibc-Make-long-long-available-to-C-11.patch143
-rw-r--r--package/libs/uclibc++/patches/005-istream_helpers-Fix-sscanf-typo.patch37
-rw-r--r--package/libs/uclient/Makefile6
-rw-r--r--package/libs/udebug/Makefile82
-rw-r--r--package/libs/udebug/files/udebug.config30
-rwxr-xr-xpackage/libs/udebug/files/udebug.init55
-rw-r--r--package/libs/ustream-ssl/Makefile10
-rw-r--r--package/libs/wolfssl/Config.in64
-rw-r--r--package/libs/wolfssl/Makefile150
-rw-r--r--package/libs/wolfssl/patches/100-disable-hardening-check.patch6
-rw-r--r--package/libs/wolfssl/patches/200-ecc-rng.patch50
-rw-r--r--package/libs/zlib/Makefile8
-rw-r--r--package/libs/zlib/patches/001-neon-implementation-of-adler32.patch253
-rw-r--r--package/libs/zlib/patches/002-arm-specific-optimisations-for-inflate.patch6
-rw-r--r--package/libs/zlib/patches/003-arm-specific-optimisations-for-inflate.patch31
-rw-r--r--package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch4
169 files changed, 3215 insertions, 7060 deletions
diff --git a/package/libs/argp-standalone/Makefile b/package/libs/argp-standalone/Makefile
index 8fad739d85d..23e51697964 100644
--- a/package/libs/argp-standalone/Makefile
+++ b/package/libs/argp-standalone/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=argp-standalone
PKG_VERSION:=1.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.lysator.liu.se/~nisse/misc/
@@ -19,7 +19,10 @@ PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE:=Makefile.am
+PKG_BUILD_FLAGS:=no-lto
+
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
define Package/argp-standalone
SECTION:=libs
@@ -33,8 +36,10 @@ define Package/argp-standalone/description
endef
MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) $(FPIC)"
+ CFLAGS="$(TARGET_CFLAGS) $(FPIC) -std=gnu89"
+HOST_MAKE_FLAGS += \
+ CFLAGS="$(HOST_CFLAGS) $(FPIC) -std=gnu89"
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
@@ -45,4 +50,14 @@ define Build/InstallDev
$(1)/usr/lib/
endef
+define Host/Install
+ $(INSTALL_DIR) $(1)/include
+ $(CP) $(HOST_BUILD_DIR)/argp.h \
+ $(1)/include/
+ $(INSTALL_DIR) $(1)/lib
+ $(CP) $(HOST_BUILD_DIR)/libargp.a \
+ $(1)/lib/
+endef
+
$(eval $(call BuildPackage,argp-standalone))
+$(eval $(call HostBuild))
diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
index 3e36dc27b84..f7364c36be2 100644
--- a/package/libs/elfutils/Makefile
+++ b/package/libs/elfutils/Makefile
@@ -7,12 +7,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=elfutils
-PKG_VERSION:=0.180
-PKG_RELEASE:=2
+PKG_VERSION:=0.189
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
-PKG_HASH:=b827b6e35c59d188ba97d7cf148fa8dc6f5c68eb6c5981888dfdbb758c0b569d
+PKG_HASH:=39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-3.0-or-later
@@ -21,7 +21,6 @@ PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
-PKG_USE_MIPS16:=1
PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
include $(INCLUDE_DIR)/package.mk
@@ -43,7 +42,7 @@ endef
define Package/libdw
$(call Package/elfutils/Default)
- DEPENDS:=+libelf +libbz2
+ DEPENDS:=+libelf +libbz2 +USE_MUSL:musl-fts
TITLE+= (libdw)
endef
@@ -60,12 +59,38 @@ else
CONFIGURE_ARGS += --disable-nls
endif
+HOST_CONFIGURE_ARGS += \
+ --disable-shared \
+ --disable-nls \
+ --disable-debuginfod \
+ --disable-libdebuginfod \
+ --without-bzlib \
+ --without-lzma \
+ --without-zstd
+
CONFIGURE_ARGS += \
--program-prefix=eu- \
--disable-debuginfod \
- --without-lzma
+ --disable-libdebuginfod \
+ --without-bzlib \
+ --without-lzma \
+ --without-zstd
+
+HOST_CONFIGURE_VARS += \
+ ac_cv_search__obstack_free=yes
-TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
+CONFIGURE_VARS += \
+ ac_cv_search__obstack_free=yes
+
+TARGET_CFLAGS += \
+ -D_GNU_SOURCE \
+ -Wno-unused-result \
+ -Wno-format-nonliteral
+
+ifneq ($(CONFIG_GCC_USE_VERSION_11),y)
+TARGET_CFLAGS += \
+ -Wno-error=use-after-free
+endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
diff --git a/package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch b/package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch
deleted file mode 100644
index 904da2b44ef..00000000000
--- a/package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From http://cgit.openembedded.org/openembedded-core/plain/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch
-
-From 2e2232d0935bf8ef6e66ebffba3be68a73b5b3e5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 8 Sep 2019 15:57:59 -0700
-Subject: [PATCH] ppc_initreg.c: Incliude asm/ptrace.h for pt_regs definition
-
-Fixes
-| ../../elfutils-0.176/backends/ppc_initreg.c:79:22: error: field 'r' has incomplete type
-| struct pt_regs r;
-| ^
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- backends/ppc_initreg.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
-index 0e0d359..e5cca7e 100644
---- a/backends/ppc_initreg.c
-+++ b/backends/ppc_initreg.c
-@@ -33,6 +33,7 @@
- #include <stdlib.h>
- #if defined(__powerpc__) && defined(__linux__)
- # include <sys/ptrace.h>
-+# include <asm/ptrace.h>
- # include <sys/user.h>
- #endif
-
---
-2.23.0
-
diff --git a/package/libs/elfutils/patches/003-libintl-compatibility.patch b/package/libs/elfutils/patches/003-libintl-compatibility.patch
index e883a302e61..1271796af54 100644
--- a/package/libs/elfutils/patches/003-libintl-compatibility.patch
+++ b/package/libs/elfutils/patches/003-libintl-compatibility.patch
@@ -8,12 +8,12 @@
+Libs: -L${libdir} -lelf @intl_LDFLAGS@
Cflags: -I${includedir}
- Requires.private: zlib
+ Requires.private: zlib @LIBZSTD@
--- a/configure.ac
+++ b/configure.ac
-@@ -586,6 +586,9 @@ AC_CONFIG_FILES([config/libelf.pc config
- AC_SUBST(USE_NLS, yes)
- AM_PO_SUBDIRS
+@@ -717,6 +717,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo
+ AM_GNU_GETTEXT_VERSION([0.19.6])
+ AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
+case "$USE_NLS" in yes) intl_LDFLAGS="-lintl" ;; esac
+AC_SUBST([intl_LDFLAGS])
@@ -21,51 +21,3 @@
dnl Appended to the config.h file.
dnl We hide all kinds of configuration magic in lib/eu-config.h.
AH_BOTTOM([#include <eu-config.h>])
---- a/libasm/libasmP.h
-+++ b/libasm/libasmP.h
-@@ -36,6 +36,9 @@
-
- #include "libdwelf.h"
-
-+#ifdef _ /* fix libintl-stub */
-+#undef _
-+#endif
- /* gettext helper macros. */
- #define _(Str) dgettext ("elfutils", Str)
-
---- a/libdw/libdwP.h
-+++ b/libdw/libdwP.h
-@@ -37,6 +37,9 @@
- #include <dwarf.h>
- #include "atomics.h"
-
-+#ifdef _ /* fix libintl-stub */
-+#undef _
-+#endif
-
- /* gettext helper macros. */
- #define _(Str) dgettext ("elfutils", Str)
---- a/libdwfl/libdwflP.h
-+++ b/libdwfl/libdwflP.h
-@@ -44,6 +44,9 @@
-
- typedef struct Dwfl_Process Dwfl_Process;
-
-+#ifdef _ /* fix libintl-stub */
-+#undef _
-+#endif
- /* gettext helper macros. */
- #define _(Str) dgettext ("elfutils", Str)
-
---- a/libelf/libelfP.h
-+++ b/libelf/libelfP.h
-@@ -39,6 +39,9 @@
- #include <stdio.h>
- #include <string.h>
-
-+#ifdef _ /* fix libintl-stub */
-+#undef _
-+#endif
- /* gettext helper macros. */
- #define _(Str) dgettext ("elfutils", Str)
-
diff --git a/package/libs/elfutils/patches/005-build_only_libs.patch b/package/libs/elfutils/patches/005-build_only_libs.patch
index a81d1d2cabe..304b85c47a1 100644
--- a/package/libs/elfutils/patches/005-build_only_libs.patch
+++ b/package/libs/elfutils/patches/005-build_only_libs.patch
@@ -3,9 +3,9 @@
@@ -27,7 +27,7 @@ AM_MAKEFLAGS = --no-print-directory
pkginclude_HEADERS = version.h
- SUBDIRS = config m4 lib libelf libcpu backends libebl libdwelf libdwfl libdw \
-- libasm src po doc tests
+ SUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl libdw \
+- libasm debuginfod src po doc tests
+ libasm
- if DEBUGINFOD
- SUBDIRS += debuginfod
+ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
+ COPYING COPYING-GPLV2 COPYING-LGPLV3
diff --git a/package/libs/elfutils/patches/006-Fix-build-on-aarch64-musl.patch b/package/libs/elfutils/patches/006-Fix-build-on-aarch64-musl.patch
index 6f7956c5ae3..d8066c5ca71 100644
--- a/package/libs/elfutils/patches/006-Fix-build-on-aarch64-musl.patch
+++ b/package/libs/elfutils/patches/006-Fix-build-on-aarch64-musl.patch
@@ -22,8 +22,6 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
backends/arm_initreg.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
-diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c
-index daf6f37..6445276 100644
--- a/backends/aarch64_initreg.c
+++ b/backends/aarch64_initreg.c
@@ -33,7 +33,7 @@
@@ -35,7 +33,7 @@ index daf6f37..6445276 100644
# include <sys/user.h>
# include <sys/ptrace.h>
/* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
-@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
+@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t
Dwarf_Word dwarf_fregs[32];
for (int r = 0; r < 32; r++)
@@ -44,8 +42,6 @@ index daf6f37..6445276 100644
if (! setfunc (64, 32, dwarf_fregs, arg))
return false;
-diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c
-index efcabaf..062bb9e 100644
--- a/backends/arm_initreg.c
+++ b/backends/arm_initreg.c
@@ -38,7 +38,7 @@
diff --git a/package/libs/elfutils/patches/100-musl-compat.patch b/package/libs/elfutils/patches/100-musl-compat.patch
index 508ff9e946f..3fa095bd74d 100644
--- a/package/libs/elfutils/patches/100-musl-compat.patch
+++ b/package/libs/elfutils/patches/100-musl-compat.patch
@@ -1,27 +1,3 @@
-https://sourceware.org/bugzilla/show_bug.cgi?id=21002
-
---- a/lib/system.h
-+++ b/lib/system.h
-@@ -30,7 +30,18 @@
- #define LIB_SYSTEM_H 1
-
- #include <errno.h>
--#include <error.h>
-+#ifdef HAVE_ERROR_H
-+#include "error.h"
-+#else
-+#include "err.h"
-+#include <stdio.h>
-+#define error(status, errno, ...) \
-+ do { \
-+ fflush(stdout); \
-+ warn(__VA_ARGS__); \
-+ if (status) exit(status); \
-+ } while(0)
-+#endif
- #include <stddef.h>
- #include <stdint.h>
- #include <sys/param.h>
--- a/libdw/libdw_alloc.c
+++ b/libdw/libdw_alloc.c
@@ -152,5 +152,5 @@ __attribute ((noreturn)) attribute_hidde
@@ -33,15 +9,21 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002
}
--- a/libdwfl/dwfl_error.c
+++ b/libdwfl/dwfl_error.c
-@@ -154,7 +154,11 @@ dwfl_errmsg (int error)
- switch (error &~ 0xffff)
- {
- case OTHER_ERROR (ERRNO):
+@@ -139,6 +139,7 @@ __libdwfl_seterrno (Dwfl_Error error)
+ static const char *
+ errnomsg(int error)
+ {
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
- return strerror_r (error & 0xffff, "bad", 0);
+ /* Won't be changed by strerror_r, but not const so compiler doesn't throw warning */
+ static char unknown[] = "unknown error";
+
+@@ -149,6 +150,9 @@ errnomsg(int error)
+ static __thread char msg[128];
+ return strerror_r (error, msg, sizeof (msg)) ? unknown : msg;
+ #endif
+#else
-+ return strerror (error & 0xffff);
++ return strerror (error & 0xffff);
+#endif
- case OTHER_ERROR (LIBELF):
- return elf_errmsg (error & 0xffff);
- case OTHER_ERROR (LIBDW):
+ }
+
+ const char *
diff --git a/package/libs/elfutils/patches/101-no-fts.patch b/package/libs/elfutils/patches/101-no-fts.patch
index 29ec9ecac04..29a6c4b36cb 100644
--- a/package/libs/elfutils/patches/101-no-fts.patch
+++ b/package/libs/elfutils/patches/101-no-fts.patch
@@ -1,6 +1,6 @@
--- a/libdwfl/argp-std.c
+++ b/libdwfl/argp-std.c
-@@ -56,9 +56,6 @@ static const struct argp_option options[
+@@ -51,9 +51,6 @@ static const struct argp_option options[
{ "linux-process-map", 'M', "FILE", 0,
N_("Find addresses in files mapped as read from FILE"
" in Linux /proc/PID/maps format"), 0 },
@@ -10,7 +10,7 @@
{ "debuginfo-path", OPT_DEBUGINFO, "PATH", 0,
N_("Search path for separate debuginfo files"), 0 },
{ NULL, 0, NULL, 0, NULL, 0 }
-@@ -85,15 +82,6 @@ static const Dwfl_Callbacks proc_callbac
+@@ -80,15 +77,6 @@ static const Dwfl_Callbacks proc_callbac
.find_elf = INTUSE(dwfl_linux_proc_find_elf),
};
@@ -26,7 +26,7 @@
/* Structure held at state->HOOK. */
struct parse_opt
{
-@@ -226,43 +214,6 @@ parse_opt (int key, char *arg, struct ar
+@@ -221,43 +209,6 @@ parse_opt (int key, char *arg, struct ar
}
break;
diff --git a/package/libs/elfutils/patches/110-no-cdefs.patch b/package/libs/elfutils/patches/110-no-cdefs.patch
deleted file mode 100644
index f95625a9131..00000000000
--- a/package/libs/elfutils/patches/110-no-cdefs.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From e399540ab67ffe83ca3c4cb768a2f0f2f32a9057 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 5 Apr 2020 15:56:59 -0700
-Subject: [PATCH] libelf: remove usage of sys/cdefs
-
-sys/cdefs is a deprecated glibc header that is unavailable with other
-libc implementations such as musl.
-
-features.h under glibc includes sys/cdefs whereas it does not under musl.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- lib/fixedsizehash.h | 1 -
- libelf/elf.h | 10 ++++++----
- 2 files changed, 6 insertions(+), 5 deletions(-)
-
---- a/lib/fixedsizehash.h
-+++ b/lib/fixedsizehash.h
-@@ -30,7 +30,6 @@
- #include <errno.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/cdefs.h>
-
- #include <system.h>
-
---- a/libelf/elf.h
-+++ b/libelf/elf.h
-@@ -19,9 +19,9 @@
- #ifndef _ELF_H
- #define _ELF_H 1
-
--#include <features.h>
--
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Standard ELF types. */
-
-@@ -4103,6 +4103,8 @@ enum
- #define R_ARC_TLS_LE_S9 0x4a
- #define R_ARC_TLS_LE_32 0x4b
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-
- #endif /* elf.h */
diff --git a/package/libs/gettext-full/Makefile b/package/libs/gettext-full/Makefile
index 8111a36f5f8..eb5b6d31bd2 100644
--- a/package/libs/gettext-full/Makefile
+++ b/package/libs/gettext-full/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gettext-full
-PKG_VERSION:=0.21
+PKG_VERSION:=0.21.1
PKG_RELEASE:=2
PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/gettext
-PKG_HASH:=d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192
+PKG_HASH:=50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6
PKG_BUILD_DIR:=$(BUILD_DIR)/gettext-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/gettext-$(PKG_VERSION)
@@ -21,11 +21,43 @@ PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=GPL-3.0-or-later
PKG_CPE_ID:=cpe:/a:gnu:gettext
-PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
-PKG_BUILD_DEPENDS:=gettext-full/host
-PKG_BUILD_PARALLEL:=1
-HOST_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=gettext-full/host libunistring libxml2
+PKG_BUILD_PARALLEL:=0
+
+PKG_FIXUP:=autoreconf
+
+HOST_BUILD_DEPENDS:=gperf/host libunistring/host libxml2/host
+HOST_BUILD_PARALLEL:=0
+
+PKG_SUBDIRS:= \
+ $$$$(foreach dir, \
+ intl \
+ intl-csharp \
+ intl-java \
+ its \
+ gnulib-lib \
+ gnulib-local \
+ lib \
+ $$$$(SUBDIR_libasprintf) \
+ libgettextpo \
+ libgrep \
+ libtextstyle \
+ m4 \
+ misc \
+ po \
+ projects \
+ src \
+ styles \
+ gettext-runtime \
+ gettext-tools \
+ ,$$$$(wildcard $$$$(dir)) )
+
+PKG_MAKEFILES_FAKE:= \
+ gnulib-local/m4/Makefile \
+ libtextstyle/gnulib-local/Makefile \
+ libtextstyle/m4/Makefile \
+ m4/Makefile
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
@@ -38,6 +70,8 @@ define Package/libintl-full
ABI_VERSION:=8
endef
+export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
+
TARGET_CFLAGS += $(FPIC)
ifneq ($(HOST_OS),Linux)
TARGET_CFLAGS += -I$(STAGING_DIR_HOSTPKG)/include
@@ -55,6 +89,8 @@ CONFIGURE_ARGS += \
--with-included-gettext \
--without-libintl-prefix \
--without-libexpat-prefix \
+ --with-libunistring-prefix=$(STAGING_DIR)/usr \
+ --with-libxml2-prefix=$(STAGING_DIR) \
--without-emacs
HOST_CONFIGURE_ARGS += \
@@ -65,7 +101,8 @@ HOST_CONFIGURE_ARGS += \
--disable-java \
--disable-openmp \
--without-emacs \
- --without-libxml2-prefix
+ --with-libunistring-prefix=$(STAGING_DIR_HOSTPKG) \
+ --with-libxml2-prefix=$(STAGING_DIR_HOSTPKG)
HOST_CONFIGURE_VARS += \
EMACS="no" \
@@ -75,6 +112,52 @@ HOST_CONFIGURE_VARS += \
HOST_CFLAGS += $(HOST_FPIC)
+define Host/Bootstrap
+ ( \
+ cd $(HOST_BUILD_DIR); \
+ $(AM_TOOL_PATHS) \
+ ./autogen.sh \
+ )
+endef
+
+define Host/Prepare
+ $(call Host/Prepare/Default)
+ $(if $(QUILT),,$(call Host/Bootstrap))
+endef
+
+define Host/Configure
+ $(if $(QUILT),$(call Host/Bootstrap))
+ $(call Host/Configure/Default)
+endef
+
+define Host/Compile
+ $(foreach makefile,$(PKG_MAKEFILES_FAKE),printf '%s\n%s\n' 'all:' 'install:' > $(HOST_BUILD_DIR)/$(makefile); )
+ $(call Host/Compile/Default,SUBDIRS='$(PKG_SUBDIRS)')
+endef
+
+define Build/Bootstrap
+ ( \
+ cd $(PKG_BUILD_DIR); \
+ $(AM_TOOL_PATHS) \
+ ./autogen.sh \
+ )
+endef
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ $(if $(QUILT),,$(call Build/Bootstrap))
+endef
+
+define Build/Configure
+ $(if $(QUILT),$(call Build/Bootstrap))
+ $(call Build/Configure/Default)
+endef
+
+define Build/Compile
+ $(foreach makefile,$(PKG_MAKEFILES_FAKE),printf '%s\n%s\n' 'all:' 'install:' > $(PKG_BUILD_DIR)/$(makefile); )
+ $(call Build/Compile/Default,SUBDIRS='$(PKG_SUBDIRS)')
+endef
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib/libintl-full/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libintl.h $(1)/usr/lib/libintl-full/include/
@@ -88,6 +171,15 @@ define Build/InstallDev
$(SED) '/read dummy/d' $(STAGING_DIR_HOSTPKG)/bin/gettextize
endef
+define Host/Install
+ $(call Host/Compile/Default,install SUBDIRS='$(PKG_SUBDIRS)')
+ $(LN) msgfmt $(STAGING_DIR_HOSTPKG)/bin/gmsgfmt
+endef
+
+define Build/Install
+ $(call Build/Install/Default,install SUBDIRS='$(PKG_SUBDIRS)')
+endef
+
define Package/libintl-full/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so.* $(1)/usr/lib/
diff --git a/package/libs/gettext-full/patches/001-autotools.patch b/package/libs/gettext-full/patches/001-autotools.patch
index 034fc938a3b..7e1f005dc55 100644
--- a/package/libs/gettext-full/patches/001-autotools.patch
+++ b/package/libs/gettext-full/patches/001-autotools.patch
@@ -12,7 +12,7 @@
$(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \
--- a/gettext-tools/man/Makefile.am
+++ b/gettext-tools/man/Makefile.am
-@@ -157,8 +157,7 @@ recode-sr-latin.1.html: recode-sr-latin.
+@@ -158,8 +158,7 @@ recode-sr-latin.1.html: recode-sr-latin.
gettextize.1.html: gettextize.1
autopoint.1.html: autopoint.1
diff --git a/package/libs/gettext-full/patches/001-no_examples_and_tests.patch b/package/libs/gettext-full/patches/001-no_examples_and_tests.patch
deleted file mode 100644
index d813d20ed64..00000000000
--- a/package/libs/gettext-full/patches/001-no_examples_and_tests.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/gettext-runtime/Makefile.am
-+++ b/gettext-runtime/Makefile.am
-@@ -27,7 +27,7 @@ SUBDIR_libasprintf = libasprintf
- else
- SUBDIR_libasprintf =
- endif
--SUBDIRS = doc intl intl-java intl-csharp gnulib-lib $(SUBDIR_libasprintf) src po man m4 tests
-+SUBDIRS = intl intl-java intl-csharp gnulib-lib $(SUBDIR_libasprintf) src po m4
-
- EXTRA_DIST = BUGS
-
---- a/gettext-tools/Makefile.am
-+++ b/gettext-tools/Makefile.am
-@@ -19,7 +19,7 @@
- AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
- ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
-
--SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
-+SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles misc m4
-
- EXTRA_DIST = misc/DISCLAIM
- MOSTLYCLEANFILES = core *.stackdump
diff --git a/package/libs/gettext-full/patches/010-m4.patch b/package/libs/gettext-full/patches/010-m4.patch
deleted file mode 100644
index 6d08835e37d..00000000000
--- a/package/libs/gettext-full/patches/010-m4.patch
+++ /dev/null
@@ -1,382 +0,0 @@
---- a/gettext-runtime/gnulib-m4/stddef_h.m4
-+++ b/gettext-runtime/gnulib-m4/stddef_h.m4
-@@ -8,7 +8,7 @@ dnl with or without modifications, as lo
- AC_DEFUN([gl_STDDEF_H],
- [
- AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
- STDDEF_H=
-
- dnl Test whether the type max_align_t exists and whether its alignment
---- a/gettext-runtime/gnulib-m4/stdint.m4
-+++ b/gettext-runtime/gnulib-m4/stdint.m4
-@@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-
- AC_REQUIRE([gl_LIMITS_H])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
-
- dnl For backward compatibility. Some packages may still be testing these
- dnl macros.
---- a/gettext-runtime/gnulib-m4/wchar_h.m4
-+++ b/gettext-runtime/gnulib-m4/wchar_h.m4
-@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H],
-
- AC_REQUIRE([gl_FEATURES_H])
-
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- if test $gt_cv_c_wint_t = yes; then
- HAVE_WINT_T=1
- else
---- a/gettext-runtime/gnulib-m4/wchar_t.m4
-+++ b/gettext-runtime/gnulib-m4/wchar_t.m4
-@@ -8,7 +8,7 @@ dnl From Bruno Haible.
- dnl Test whether <stddef.h> has the 'wchar_t' type.
- dnl Prerequisite: AC_PROG_CC
-
--AC_DEFUN([gt_TYPE_WCHAR_T],
-+AC_DEFUN([gt_TYPE_WCHAR_T_GT],
- [
- AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
- [AC_COMPILE_IFELSE(
---- a/gettext-runtime/gnulib-m4/wctype_h.m4
-+++ b/gettext-runtime/gnulib-m4/wctype_h.m4
-@@ -22,7 +22,7 @@ AC_DEFUN([gl_WCTYPE_H],
- fi
- AC_SUBST([HAVE_ISWCNTRL])
-
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- if test $gt_cv_c_wint_t = yes; then
- HAVE_WINT_T=1
- else
---- a/gettext-runtime/gnulib-m4/wcwidth.m4
-+++ b/gettext-runtime/gnulib-m4/wcwidth.m4
-@@ -12,8 +12,8 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
- dnl Persuade glibc <wchar.h> to declare wcwidth().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
-
- AC_CHECK_HEADERS_ONCE([wchar.h])
- AC_CHECK_FUNCS_ONCE([wcwidth])
---- a/gettext-runtime/gnulib-m4/wint_t.m4
-+++ b/gettext-runtime/gnulib-m4/wint_t.m4
-@@ -9,7 +9,7 @@ dnl Test whether <wchar.h> has the 'wint
- dnl <wchar.h> or <wctype.h> would, if present, override 'wint_t'.
- dnl Prerequisite: AC_PROG_CC
-
--AC_DEFUN([gt_TYPE_WINT_T],
-+AC_DEFUN([gt_TYPE_WINT_T_GT],
- [
- AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
- [AC_COMPILE_IFELSE(
---- a/gettext-runtime/intl/Makefile.am
-+++ b/gettext-runtime/intl/Makefile.am
-@@ -274,7 +274,7 @@ libgnuintl.h: $(srcdir)/libgnuintl.in.h
- -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
- -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
- -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
-- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
-+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
- -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
- < $(srcdir)/libgnuintl.in.h \
- | if test '@WOE32DLL@' = yes; then \
-@@ -294,7 +294,7 @@ libintl.h: $(srcdir)/libgnuintl.in.h
- -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
- -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
- -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
-- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
-+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
- -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
- < $(srcdir)/libgnuintl.in.h > libintl.h
- MOSTLYCLEANFILES += libintl.h
---- a/gettext-runtime/libasprintf/configure.ac
-+++ b/gettext-runtime/libasprintf/configure.ac
-@@ -76,8 +76,8 @@ dnl Checks for typedefs, structures, and
- AC_C_INLINE
- AC_TYPE_SIZE_T
- AC_TYPE_LONG_LONG_INT
--gt_TYPE_WCHAR_T
--gt_TYPE_WINT_T
-+gt_TYPE_WCHAR_T_GT
-+gt_TYPE_WINT_T_GT
- AC_TYPE_MBSTATE_T
- AC_CHECK_TYPE([ptrdiff_t], ,
- [AC_DEFINE([ptrdiff_t], [long],
---- a/gettext-runtime/libasprintf/gnulib-m4/wchar_t.m4
-+++ b/gettext-runtime/libasprintf/gnulib-m4/wchar_t.m4
-@@ -8,7 +8,7 @@ dnl From Bruno Haible.
- dnl Test whether <stddef.h> has the 'wchar_t' type.
- dnl Prerequisite: AC_PROG_CC
-
--AC_DEFUN([gt_TYPE_WCHAR_T],
-+AC_DEFUN([gt_TYPE_WCHAR_T_GT],
- [
- AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
- [AC_COMPILE_IFELSE(
---- a/gettext-runtime/libasprintf/gnulib-m4/wint_t.m4
-+++ b/gettext-runtime/libasprintf/gnulib-m4/wint_t.m4
-@@ -9,7 +9,7 @@ dnl Test whether <wchar.h> has the 'wint
- dnl <wchar.h> or <wctype.h> would, if present, override 'wint_t'.
- dnl Prerequisite: AC_PROG_CC
-
--AC_DEFUN([gt_TYPE_WINT_T],
-+AC_DEFUN([gt_TYPE_WINT_T_GT],
- [
- AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
- [AC_COMPILE_IFELSE(
---- a/gettext-runtime/m4/intl.m4
-+++ b/gettext-runtime/m4/intl.m4
-@@ -31,8 +31,8 @@ AC_DEFUN([AM_INTL_SUBDIR],
- AC_REQUIRE([gl_VISIBILITY])dnl
- AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
- AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
-- AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
-- AC_REQUIRE([gt_TYPE_WINT_T])dnl
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])dnl
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])dnl
- AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
- AC_REQUIRE([gt_TYPE_INTMAX_T])
- AC_REQUIRE([gt_PRINTF_POSIX])
---- a/gettext-tools/gnulib-m4/gnulib-comp.m4
-+++ b/gettext-tools/gnulib-m4/gnulib-comp.m4
-@@ -1843,8 +1843,8 @@ changequote([, ])dnl
- AC_REQUIRE([gl_SOCKETS])
- gl_TYPE_SOCKLEN_T
- gl_STDALIGN_H
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- gl_FUNC_STRERROR_R
- if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
- AC_LIBOBJ([strerror_r])
---- a/gettext-tools/gnulib-m4/stddef_h.m4
-+++ b/gettext-tools/gnulib-m4/stddef_h.m4
-@@ -8,7 +8,7 @@ dnl with or without modifications, as lo
- AC_DEFUN([gl_STDDEF_H],
- [
- AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
- STDDEF_H=
-
- dnl Test whether the type max_align_t exists and whether its alignment
---- a/gettext-tools/gnulib-m4/stdint.m4
-+++ b/gettext-tools/gnulib-m4/stdint.m4
-@@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-
- AC_REQUIRE([gl_LIMITS_H])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
-
- dnl For backward compatibility. Some packages may still be testing these
- dnl macros.
---- a/gettext-tools/gnulib-m4/vasnprintf.m4
-+++ b/gettext-tools/gnulib-m4/vasnprintf.m4
-@@ -32,16 +32,16 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
- # Prerequisites of lib/printf-args.h, lib/printf-args.c.
- AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
- [
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- ])
-
- # Prerequisites of lib/printf-parse.h, lib/printf-parse.c.
- AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
- [
- AC_REQUIRE([gl_FEATURES_H])
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- AC_REQUIRE([AC_TYPE_SIZE_T])
- AC_CHECK_TYPE([ptrdiff_t], ,
- [AC_DEFINE([ptrdiff_t], [long],
-@@ -54,8 +54,8 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
- AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
- [
- AC_REQUIRE([AC_FUNC_ALLOCA])
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
- dnl Use the _snprintf function only if it is declared (because on NetBSD it
- dnl is defined as a weak alias of snprintf; we prefer to use the latter).
---- a/gettext-tools/gnulib-m4/wchar_h.m4
-+++ b/gettext-tools/gnulib-m4/wchar_h.m4
-@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H],
-
- AC_REQUIRE([gl_FEATURES_H])
-
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- if test $gt_cv_c_wint_t = yes; then
- HAVE_WINT_T=1
- else
---- a/gettext-tools/gnulib-m4/wchar_t.m4
-+++ b/gettext-tools/gnulib-m4/wchar_t.m4
-@@ -8,7 +8,7 @@ dnl From Bruno Haible.
- dnl Test whether <stddef.h> has the 'wchar_t' type.
- dnl Prerequisite: AC_PROG_CC
-
--AC_DEFUN([gt_TYPE_WCHAR_T],
-+AC_DEFUN([gt_TYPE_WCHAR_T_GT],
- [
- AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
- [AC_COMPILE_IFELSE(
---- a/gettext-tools/gnulib-m4/wctype_h.m4
-+++ b/gettext-tools/gnulib-m4/wctype_h.m4
-@@ -22,7 +22,7 @@ AC_DEFUN([gl_WCTYPE_H],
- fi
- AC_SUBST([HAVE_ISWCNTRL])
-
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- if test $gt_cv_c_wint_t = yes; then
- HAVE_WINT_T=1
- else
---- a/gettext-tools/gnulib-m4/wcwidth.m4
-+++ b/gettext-tools/gnulib-m4/wcwidth.m4
-@@ -12,8 +12,8 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
- dnl Persuade glibc <wchar.h> to declare wcwidth().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
-
- AC_CHECK_HEADERS_ONCE([wchar.h])
- AC_CHECK_FUNCS_ONCE([wcwidth])
---- a/gettext-tools/gnulib-m4/wint_t.m4
-+++ b/gettext-tools/gnulib-m4/wint_t.m4
-@@ -9,7 +9,7 @@ dnl Test whether <wchar.h> has the 'wint
- dnl <wchar.h> or <wctype.h> would, if present, override 'wint_t'.
- dnl Prerequisite: AC_PROG_CC
-
--AC_DEFUN([gt_TYPE_WINT_T],
-+AC_DEFUN([gt_TYPE_WINT_T_GT],
- [
- AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
- [AC_COMPILE_IFELSE(
---- a/gettext-tools/intl/Makefile.am
-+++ b/gettext-tools/intl/Makefile.am
-@@ -274,7 +274,7 @@ libgnuintl.h: $(srcdir)/libgnuintl.in.h
- -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
- -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
- -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
-- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
-+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
- -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
- < $(srcdir)/libgnuintl.in.h \
- | if test '@WOE32DLL@' = yes; then \
-@@ -294,7 +294,7 @@ libintl.h: $(srcdir)/libgnuintl.in.h
- -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
- -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
- -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
-- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
-+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
- -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
- < $(srcdir)/libgnuintl.in.h > libintl.h
- MOSTLYCLEANFILES += libintl.h
---- a/libtextstyle/gnulib-m4/stddef_h.m4
-+++ b/libtextstyle/gnulib-m4/stddef_h.m4
-@@ -8,7 +8,7 @@ dnl with or without modifications, as lo
- AC_DEFUN([gl_STDDEF_H],
- [
- AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
- STDDEF_H=
-
- dnl Test whether the type max_align_t exists and whether its alignment
---- a/libtextstyle/gnulib-m4/stdint.m4
-+++ b/libtextstyle/gnulib-m4/stdint.m4
-@@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-
- AC_REQUIRE([gl_LIMITS_H])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
-
- dnl For backward compatibility. Some packages may still be testing these
- dnl macros.
---- a/libtextstyle/gnulib-m4/vasnprintf.m4
-+++ b/libtextstyle/gnulib-m4/vasnprintf.m4
-@@ -32,16 +32,16 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
- # Prerequisites of lib/printf-args.h, lib/printf-args.c.
- AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
- [
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- ])
-
- # Prerequisites of lib/printf-parse.h, lib/printf-parse.c.
- AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
- [
- AC_REQUIRE([gl_FEATURES_H])
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- AC_REQUIRE([AC_TYPE_SIZE_T])
- AC_CHECK_TYPE([ptrdiff_t], ,
- [AC_DEFINE([ptrdiff_t], [long],
-@@ -54,8 +54,8 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
- AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
- [
- AC_REQUIRE([AC_FUNC_ALLOCA])
-- AC_REQUIRE([gt_TYPE_WCHAR_T])
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
- dnl Use the _snprintf function only if it is declared (because on NetBSD it
- dnl is defined as a weak alias of snprintf; we prefer to use the latter).
---- a/libtextstyle/gnulib-m4/wchar_h.m4
-+++ b/libtextstyle/gnulib-m4/wchar_h.m4
-@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H],
-
- AC_REQUIRE([gl_FEATURES_H])
-
-- AC_REQUIRE([gt_TYPE_WINT_T])
-+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
- if test $gt_cv_c_wint_t = yes; then
- HAVE_WINT_T=1
- else
---- a/libtextstyle/gnulib-m4/wchar_t.m4
-+++ b/libtextstyle/gnulib-m4/wchar_t.m4
-@@ -8,7 +8,7 @@ dnl From Bruno Haible.
- dnl Test whether <stddef.h> has the 'wchar_t' type.
- dnl Prerequisite: AC_PROG_CC
-
--AC_DEFUN([gt_TYPE_WCHAR_T],
-+AC_DEFUN([gt_TYPE_WCHAR_T_GT],
- [
- AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
- [AC_COMPILE_IFELSE(
---- a/libtextstyle/gnulib-m4/wint_t.m4
-+++ b/libtextstyle/gnulib-m4/wint_t.m4
-@@ -9,7 +9,7 @@ dnl Test whether <wchar.h> has the 'wint
- dnl <wchar.h> or <wctype.h> would, if present, override 'wint_t'.
- dnl Prerequisite: AC_PROG_CC
-
--AC_DEFUN([gt_TYPE_WINT_T],
-+AC_DEFUN([gt_TYPE_WINT_T_GT],
- [
- AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
- [AC_COMPILE_IFELSE(
diff --git a/package/libs/gettext-full/patches/100-libxml-no-force-included.patch b/package/libs/gettext-full/patches/100-libxml-no-force-included.patch
new file mode 100644
index 00000000000..af5c0a47ee8
--- /dev/null
+++ b/package/libs/gettext-full/patches/100-libxml-no-force-included.patch
@@ -0,0 +1,31 @@
+--- a/libtextstyle/gnulib-local/modules/libxml.diff
++++ /dev/null
+@@ -1,28 +0,0 @@
+-*** libxml.orig 2018-10-28 14:37:07.007164889 +0100
+---- libxml 2019-02-14 22:19:29.994771110 +0100
+-***************
+-*** 118,124 ****
+- fabs
+-
+- configure.ac:
+-! gl_LIBXML
+-
+- Makefile.am:
+- if INCLUDED_LIBXML
+---- 118,133 ----
+- fabs
+-
+- configure.ac:
+-! # In libtextstyle, we don't want to use an external libxml, because its
+-! # dependencies and their dynamic relocations have an impact on the startup
+-! # time of a program that is linked with it. As you can see by using
+-! # 'readelf -r ... | wc -l' and 'readelf -d ... | grep NEEDED':
+-! # - libxml2.so has more than 3300 relocations and depends on libicuuc.
+-! # - libicuuc.so has more than 4900 relocations and depends on libstdc++.
+-! # - libstdc++.so has more than 4600 relocations.
+-! # These are more than 12800 relocations, to perform at program startup.
+-! # So, force the use of the included libxml part.
+-! gl_LIBXML([yes])
+-
+- Makefile.am:
+- if INCLUDED_LIBXML
diff --git a/package/libs/gettext-full/patches/150-disable_libxml_iconv.patch b/package/libs/gettext-full/patches/150-disable_libxml_iconv.patch
deleted file mode 100644
index bf60ecbdb5e..00000000000
--- a/package/libs/gettext-full/patches/150-disable_libxml_iconv.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/gettext-tools/gnulib-lib/libxml/xmlversion.in.h
-+++ b/gettext-tools/gnulib-lib/libxml/xmlversion.in.h
-@@ -302,7 +302,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(i
- *
- * Whether iconv support is available
- */
--#if 1
-+#if 0
- #define LIBXML_ICONV_ENABLED
- #endif
-
---- a/gnulib-local/lib/libxml/xmlversion.in.h
-+++ b/gnulib-local/lib/libxml/xmlversion.in.h
-@@ -302,7 +302,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(i
- *
- * Whether iconv support is available
- */
--#if 1
-+#if 0
- #define LIBXML_ICONV_ENABLED
- #endif
-
diff --git a/package/libs/gettext-full/patches/200-libunistring-missing-link.patch b/package/libs/gettext-full/patches/200-libunistring-missing-link.patch
new file mode 100644
index 00000000000..2e1dbf84e87
--- /dev/null
+++ b/package/libs/gettext-full/patches/200-libunistring-missing-link.patch
@@ -0,0 +1,21 @@
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -78,6 +78,7 @@ if ! $skip_gnulib; then
+ getopt-gnu
+ gettext-h
+ havelib
++ libunistring-optional
+ memmove
+ noreturn
+ progname
+--- a/gettext-runtime/src/Makefile.am
++++ b/gettext-runtime/src/Makefile.am
+@@ -40,7 +40,7 @@ envsubst_SOURCES = envsubst.c
+
+ # Link dependencies.
+ # Need @LTLIBICONV@ because striconv.c uses iconv().
+-LDADD = ../gnulib-lib/libgrt.a @LTLIBINTL@ @LTLIBICONV@ $(WOE32_LDADD)
++LDADD = ../gnulib-lib/libgrt.a $(LTLIBUNISTRING) @LTLIBINTL@ @LTLIBICONV@ $(WOE32_LDADD)
+
+ # Specify installation directory, for --enable-relocatable.
+ gettext_CFLAGS = -DINSTALLDIR=\"$(bindir)\"
diff --git a/package/libs/gettext/Makefile b/package/libs/gettext/Makefile
deleted file mode 100644
index f37c4e4e740..00000000000
--- a/package/libs/gettext/Makefile
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# Copyright (C) 2010 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=gettext
-PKG_RELEASE:=2
-
-PKG_LICENSE:=FSFULLR
-PKG_LICENSE_FILES:=LICENSE
-
-PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/host-build.mk
-
-define Package/libintl
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=Stub header for the GNU Internationalization library
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/lib/libintl-stub/include
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/include/libintl.h $(1)/usr/lib/libintl-stub/include/
-
- $(INSTALL_DIR) $(1)/usr/share/aclocal
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/
-endef
-
-define Host/Prepare
- mkdir -p $(HOST_BUILD_DIR)
-endef
-
-define Host/Compile
-
-endef
-
-define Host/Install
- $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/include
- $(INSTALL_DATA) ./src/include/libintl.h $(STAGING_DIR_HOSTPKG)/include/
-
- $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/aclocal
- $(INSTALL_DATA) ./src/m4/* $(STAGING_DIR_HOSTPKG)/share/aclocal/
-endef
-
-define Package/libintl/install
- $(INSTALL_DIR) $(1)/tmp
- touch $(1)/tmp/.libintl-placeholder
-endef
-
-$(eval $(call HostBuild))
-$(eval $(call BuildPackage,libintl))
diff --git a/package/libs/gettext/src/LICENSE b/package/libs/gettext/src/LICENSE
deleted file mode 100644
index d1a59b05ec4..00000000000
--- a/package/libs/gettext/src/LICENSE
+++ /dev/null
@@ -1,7 +0,0 @@
-Each source file contains the following message:
-
-Copyright (C) 1995-2010 Free Software Foundation, Inc.
-This file is free software; the Free Software Foundation
-gives unlimited permission to copy and/or distribute it,
-with or without modifications, as long as this notice is preserved.
-
diff --git a/package/libs/gettext/src/include/libintl.h b/package/libs/gettext/src/include/libintl.h
deleted file mode 100644
index a1157a44533..00000000000
--- a/package/libs/gettext/src/include/libintl.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * This code is lifted from http://permalink.gmane.org/gmane.linux.gentoo.embedded/3218
- */
-
-#ifndef _LIBINTL_H
-#define _LIBINTL_H 1
-
-#include <locale.h>
-
-/* Undef gettext macros, if any... */
-#undef gettext
-#undef dgettext
-#undef dcgettext
-#undef ngettext
-#undef dngettext
-#undef dcngettext
-#undef textdomain
-#undef bindtextdomain
-#undef bind_textdomain_codeset
-
-/* part of locale.h */
-/* #undef setlocale */
-
-#undef _
-#undef N_
-
-/* Define gettext stubs that map back to the original strings */
-#define gettext(String) (String)
-#define dgettext(Domain, String) (String)
-#define dcgettext(Domain, String, Type) (String)
-
-#define ngettext(Singular, Plural, Count) \
- ((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
-
-#define dngettext(Domain, Singular, Plural, Count) \
- ((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
-
-#define dcngettext(Domain, Singular, Plural, Count, Category) \
- ((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
-
-#define _(String) (String)
-#define N_(String) String
-
-#ifndef _LOCALE_H
-/* #define setlocale(Category, Locale) ((char *)NULL) */
-#endif
-
-/* No-ops for textdomain operations */
-#define bindtextdomain(Domain, Directory) (Domain)
-#define bind_textdomain_codeset(Domain, Codeset) (Codeset)
-#define textdomain(String) (String) ?: "messages"
-
-#endif /* _LIBINTL_H */
diff --git a/package/libs/gettext/src/m4/codeset.m4 b/package/libs/gettext/src/m4/codeset.m4
deleted file mode 100644
index a53c04260c0..00000000000
--- a/package/libs/gettext/src/m4/codeset.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-# codeset.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([AM_LANGINFO_CODESET],
-[
- AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
- [AC_TRY_LINK([#include <langinfo.h>],
- [char* cs = nl_langinfo(CODESET); return !cs;],
- [am_cv_langinfo_codeset=yes],
- [am_cv_langinfo_codeset=no])
- ])
- if test $am_cv_langinfo_codeset = yes; then
- AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
- [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
- fi
-])
diff --git a/package/libs/gettext/src/m4/gettext.m4 b/package/libs/gettext/src/m4/gettext.m4
deleted file mode 100644
index f84e6a5d753..00000000000
--- a/package/libs/gettext/src/m4/gettext.m4
+++ /dev/null
@@ -1,383 +0,0 @@
-# gettext.m4 serial 63 (gettext-0.18)
-dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
-
-dnl Macro to add for using GNU gettext.
-
-dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
-dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
-dnl default (if it is not specified or empty) is 'no-libtool'.
-dnl INTLSYMBOL should be 'external' for packages with no intl directory,
-dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
-dnl If INTLSYMBOL is 'use-libtool', then a libtool library
-dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
-dnl depending on --{enable,disable}-{shared,static} and on the presence of
-dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
-dnl $(top_builddir)/intl/libintl.a will be created.
-dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
-dnl implementations (in libc or libintl) without the ngettext() function
-dnl will be ignored. If NEEDSYMBOL is specified and is
-dnl 'need-formatstring-macros', then GNU gettext implementations that don't
-dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
-dnl INTLDIR is used to find the intl libraries. If empty,
-dnl the value `$(top_builddir)/intl/' is used.
-dnl
-dnl The result of the configuration is one of three cases:
-dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
-dnl and used.
-dnl Catalog format: GNU --> install in $(datadir)
-dnl Catalog extension: .mo after installation, .gmo in source tree
-dnl 2) GNU gettext has been found in the system's C library.
-dnl Catalog format: GNU --> install in $(datadir)
-dnl Catalog extension: .mo after installation, .gmo in source tree
-dnl 3) No internationalization, always use English msgid.
-dnl Catalog format: none
-dnl Catalog extension: none
-dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
-dnl The use of .gmo is historical (it was needed to avoid overwriting the
-dnl GNU format catalogs when building on a platform with an X/Open gettext),
-dnl but we keep it in order not to force irrelevant filename changes on the
-dnl maintainers.
-dnl
-AC_DEFUN([AM_GNU_GETTEXT],
-[
- dnl Argument checking.
- ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
- [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
-])])])])])
- ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
- [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
- ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
- [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
-])])])])
- define([gt_included_intl],
- ifelse([$1], [external],
- ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
- [yes]))
- define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
- gt_NEEDS_INIT
- AM_GNU_GETTEXT_NEED([$2])
-
- AC_REQUIRE([AM_PO_SUBDIRS])dnl
- ifelse(gt_included_intl, yes, [
- AC_REQUIRE([AM_INTL_SUBDIR])dnl
- ])
-
- dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
-
- dnl Sometimes libintl requires libiconv, so first search for libiconv.
- dnl Ideally we would do this search only after the
- dnl if test "$USE_NLS" = "yes"; then
- dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
- dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
- dnl the configure script would need to contain the same shell code
- dnl again, outside any 'if'. There are two solutions:
- dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
- dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
- dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
- dnl documented, we avoid it.
- ifelse(gt_included_intl, yes, , [
- AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
- ])
-
- dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
- gt_INTL_MACOSX
-
- dnl Set USE_NLS.
- AC_REQUIRE([AM_NLS])
-
- ifelse(gt_included_intl, yes, [
- BUILD_INCLUDED_LIBINTL=no
- USE_INCLUDED_LIBINTL=no
- ])
- LIBINTL=
- LTLIBINTL=
- POSUB=
-
- dnl Add a version number to the cache macros.
- case " $gt_needs " in
- *" need-formatstring-macros "*) gt_api_version=3 ;;
- *" need-ngettext "*) gt_api_version=2 ;;
- *) gt_api_version=1 ;;
- esac
- gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
- gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
-
- dnl If we use NLS figure out what method
- if test "$USE_NLS" = "yes"; then
- gt_use_preinstalled_gnugettext=no
- ifelse(gt_included_intl, yes, [
- AC_MSG_CHECKING([whether included gettext is requested])
- AC_ARG_WITH([included-gettext],
- [ --with-included-gettext use the GNU gettext library included here],
- nls_cv_force_use_gnu_gettext=$withval,
- nls_cv_force_use_gnu_gettext=no)
- AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- ])
- dnl User does not insist on using GNU NLS library. Figure out what
- dnl to use. If GNU gettext is available we use this. Else we have
- dnl to fall back to GNU NLS library.
-
- if test $gt_api_version -ge 3; then
- gt_revision_test_code='
-#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-#endif
-changequote(,)dnl
-typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-changequote([,])dnl
-'
- else
- gt_revision_test_code=
- fi
- if test $gt_api_version -ge 2; then
- gt_expression_test_code=' + * ngettext ("", "", 0)'
- else
- gt_expression_test_code=
- fi
-
- AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
- [AC_TRY_LINK([#include <libintl.h>
-$gt_revision_test_code
-extern int _nl_msg_cat_cntr;
-extern int *_nl_domain_bindings;],
- [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
- [eval "$gt_func_gnugettext_libc=yes"],
- [eval "$gt_func_gnugettext_libc=no"])])
-
- if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
- dnl Sometimes libintl requires libiconv, so first search for libiconv.
- ifelse(gt_included_intl, yes, , [
- AM_ICONV_LINK
- ])
- dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
- dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
- dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
- dnl even if libiconv doesn't exist.
- AC_LIB_LINKFLAGS_BODY([intl])
- AC_CACHE_CHECK([for GNU gettext in libintl],
- [$gt_func_gnugettext_libintl],
- [gt_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $INCINTL"
- gt_save_LIBS="$LIBS"
- LIBS="$LIBS $LIBINTL"
- dnl Now see whether libintl exists and does not depend on libiconv.
- AC_TRY_LINK([#include <libintl.h>
-$gt_revision_test_code
-extern int _nl_msg_cat_cntr;
-extern
-#ifdef __cplusplus
-"C"
-#endif
-const char *_nl_expand_alias (const char *);],
- [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
- [eval "$gt_func_gnugettext_libintl=yes"],
- [eval "$gt_func_gnugettext_libintl=no"])
- dnl Now see whether libintl exists and depends on libiconv.
- if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
- LIBS="$LIBS $LIBICONV"
- AC_TRY_LINK([#include <libintl.h>
-$gt_revision_test_code
-extern int _nl_msg_cat_cntr;
-extern
-#ifdef __cplusplus
-"C"
-#endif
-const char *_nl_expand_alias (const char *);],
- [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
- [LIBINTL="$LIBINTL $LIBICONV"
- LTLIBINTL="$LTLIBINTL $LTLIBICONV"
- eval "$gt_func_gnugettext_libintl=yes"
- ])
- fi
- CPPFLAGS="$gt_save_CPPFLAGS"
- LIBS="$gt_save_LIBS"])
- fi
-
- dnl If an already present or preinstalled GNU gettext() is found,
- dnl use it. But if this macro is used in GNU gettext, and GNU
- dnl gettext is already preinstalled in libintl, we update this
- dnl libintl. (Cf. the install rule in intl/Makefile.in.)
- if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
- || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
- && test "$PACKAGE" != gettext-runtime \
- && test "$PACKAGE" != gettext-tools; }; then
- gt_use_preinstalled_gnugettext=yes
- else
- dnl Reset the values set by searching for libintl.
- LIBINTL=
- LTLIBINTL=
- INCINTL=
- fi
-
- ifelse(gt_included_intl, yes, [
- if test "$gt_use_preinstalled_gnugettext" != "yes"; then
- dnl GNU gettext is not found in the C library.
- dnl Fall back on included GNU gettext library.
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- dnl Mark actions used to generate GNU NLS library.
- BUILD_INCLUDED_LIBINTL=yes
- USE_INCLUDED_LIBINTL=yes
- LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
- LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
- LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
- fi
-
- CATOBJEXT=
- if test "$gt_use_preinstalled_gnugettext" = "yes" \
- || test "$nls_cv_use_gnu_gettext" = "yes"; then
- dnl Mark actions to use GNU gettext tools.
- CATOBJEXT=.gmo
- fi
- ])
-
- if test -n "$INTL_MACOSX_LIBS"; then
- if test "$gt_use_preinstalled_gnugettext" = "yes" \
- || test "$nls_cv_use_gnu_gettext" = "yes"; then
- dnl Some extra flags are needed during linking.
- LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
- LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
- fi
- fi
-
- if test "$gt_use_preinstalled_gnugettext" = "yes" \
- || test "$nls_cv_use_gnu_gettext" = "yes"; then
- AC_DEFINE([ENABLE_NLS], [1],
- [Define to 1 if translation of program messages to the user's native language
- is requested.])
- else
- USE_NLS=no
- fi
- fi
-
- AC_MSG_CHECKING([whether to use NLS])
- AC_MSG_RESULT([$USE_NLS])
- if test "$USE_NLS" = "yes"; then
- AC_MSG_CHECKING([where the gettext function comes from])
- if test "$gt_use_preinstalled_gnugettext" = "yes"; then
- if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
- gt_source="external libintl"
- else
- gt_source="libc"
- fi
- else
- gt_source="included intl directory"
- fi
- AC_MSG_RESULT([$gt_source])
- fi
-
- if test "$USE_NLS" = "yes"; then
-
- if test "$gt_use_preinstalled_gnugettext" = "yes"; then
- if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
- AC_MSG_CHECKING([how to link with libintl])
- AC_MSG_RESULT([$LIBINTL])
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
- fi
-
- dnl For backward compatibility. Some packages may be using this.
- AC_DEFINE([HAVE_GETTEXT], [1],
- [Define if the GNU gettext() function is already present or preinstalled.])
- AC_DEFINE([HAVE_DCGETTEXT], [1],
- [Define if the GNU dcgettext() function is already present or preinstalled.])
- fi
-
- dnl We need to process the po/ directory.
- POSUB=po
- fi
-
- ifelse(gt_included_intl, yes, [
- dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
- dnl to 'yes' because some of the testsuite requires it.
- if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
- BUILD_INCLUDED_LIBINTL=yes
- fi
-
- dnl Make all variables we use known to autoconf.
- AC_SUBST([BUILD_INCLUDED_LIBINTL])
- AC_SUBST([USE_INCLUDED_LIBINTL])
- AC_SUBST([CATOBJEXT])
-
- dnl For backward compatibility. Some configure.ins may be using this.
- nls_cv_header_intl=
- nls_cv_header_libgt=
-
- dnl For backward compatibility. Some Makefiles may be using this.
- DATADIRNAME=share
- AC_SUBST([DATADIRNAME])
-
- dnl For backward compatibility. Some Makefiles may be using this.
- INSTOBJEXT=.mo
- AC_SUBST([INSTOBJEXT])
-
- dnl For backward compatibility. Some Makefiles may be using this.
- GENCAT=gencat
- AC_SUBST([GENCAT])
-
- dnl For backward compatibility. Some Makefiles may be using this.
- INTLOBJS=
- if test "$USE_INCLUDED_LIBINTL" = yes; then
- INTLOBJS="\$(GETTOBJS)"
- fi
- AC_SUBST([INTLOBJS])
-
- dnl Enable libtool support if the surrounding package wishes it.
- INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
- AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
- ])
-
- dnl For backward compatibility. Some Makefiles may be using this.
- INTLLIBS="$LIBINTL"
- AC_SUBST([INTLLIBS])
-
- dnl Make all documented variables known to autoconf.
- AC_SUBST([LIBINTL])
- AC_SUBST([LTLIBINTL])
- AC_SUBST([POSUB])
-])
-
-
-dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
-m4_define([gt_NEEDS_INIT],
-[
- m4_divert_text([DEFAULTS], [gt_needs=])
- m4_define([gt_NEEDS_INIT], [])
-])
-
-
-dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
-AC_DEFUN([AM_GNU_GETTEXT_NEED],
-[
- m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
-])
-
-
-dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
-AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/package/libs/gettext/src/m4/intl.m4 b/package/libs/gettext/src/m4/intl.m4
deleted file mode 100644
index 335b23c20ce..00000000000
--- a/package/libs/gettext/src/m4/intl.m4
+++ /dev/null
@@ -1,294 +0,0 @@
-# intl.m4 serial 17 (gettext-0.18)
-dnl Copyright (C) 1995-2009 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009.
-
-AC_PREREQ([2.52])
-
-dnl Checks for all prerequisites of the intl subdirectory,
-dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
-dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
-AC_DEFUN([AM_INTL_SUBDIR],
-[
- AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_CANONICAL_HOST])dnl
- AC_REQUIRE([gt_GLIBC2])dnl
- AC_REQUIRE([AC_PROG_RANLIB])dnl
- AC_REQUIRE([gl_VISIBILITY])dnl
- AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
- AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
- AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
- AC_REQUIRE([gt_TYPE_WINT_T])dnl
- AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
- AC_REQUIRE([gt_TYPE_INTMAX_T])
- AC_REQUIRE([gt_PRINTF_POSIX])
- AC_REQUIRE([gl_GLIBC21])dnl
- AC_REQUIRE([gl_XSIZE])dnl
- AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl
- AC_REQUIRE([gt_INTL_MACOSX])dnl
-
- dnl Support for automake's --enable-silent-rules.
- case "$enable_silent_rules" in
- yes) INTL_DEFAULT_VERBOSITY=0;;
- no) INTL_DEFAULT_VERBOSITY=1;;
- *) INTL_DEFAULT_VERBOSITY=1;;
- esac
- AC_SUBST([INTL_DEFAULT_VERBOSITY])
-
- AC_CHECK_TYPE([ptrdiff_t], ,
- [AC_DEFINE([ptrdiff_t], [long],
- [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
- ])
- AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
- AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \
- snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
-
- dnl Use the _snprintf function only if it is declared (because on NetBSD it
- dnl is defined as a weak alias of snprintf; we prefer to use the latter).
- gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
- gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
-
- dnl Use the *_unlocked functions only if they are declared.
- dnl (because some of them were defined without being declared in Solaris
- dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
- dnl on Solaris 2.5.1 to run on Solaris 2.6).
- dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
- gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
-
- case $gt_cv_func_printf_posix in
- *yes) HAVE_POSIX_PRINTF=1 ;;
- *) HAVE_POSIX_PRINTF=0 ;;
- esac
- AC_SUBST([HAVE_POSIX_PRINTF])
- if test "$ac_cv_func_asprintf" = yes; then
- HAVE_ASPRINTF=1
- else
- HAVE_ASPRINTF=0
- fi
- AC_SUBST([HAVE_ASPRINTF])
- if test "$ac_cv_func_snprintf" = yes; then
- HAVE_SNPRINTF=1
- else
- HAVE_SNPRINTF=0
- fi
- AC_SUBST([HAVE_SNPRINTF])
- if test "$ac_cv_func_newlocale" = yes; then
- HAVE_NEWLOCALE=1
- else
- HAVE_NEWLOCALE=0
- fi
- AC_SUBST([HAVE_NEWLOCALE])
- if test "$ac_cv_func_wprintf" = yes; then
- HAVE_WPRINTF=1
- else
- HAVE_WPRINTF=0
- fi
- AC_SUBST([HAVE_WPRINTF])
-
- AM_LANGINFO_CODESET
- gt_LC_MESSAGES
-
- dnl Compilation on mingw and Cygwin needs special Makefile rules, because
- dnl 1. when we install a shared library, we must arrange to export
- dnl auxiliary pointer variables for every exported variable,
- dnl 2. when we install a shared library and a static library simultaneously,
- dnl the include file specifies __declspec(dllimport) and therefore we
- dnl must arrange to define the auxiliary pointer variables for the
- dnl exported variables _also_ in the static library.
- if test "$enable_shared" = yes; then
- case "$host_os" in
- mingw* | cygwin*) is_woe32dll=yes ;;
- *) is_woe32dll=no ;;
- esac
- else
- is_woe32dll=no
- fi
- WOE32DLL=$is_woe32dll
- AC_SUBST([WOE32DLL])
-
- dnl On mingw and Cygwin, we can activate special Makefile rules which add
- dnl version information to the shared libraries and executables.
- case "$host_os" in
- mingw* | cygwin*) is_woe32=yes ;;
- *) is_woe32=no ;;
- esac
- WOE32=$is_woe32
- AC_SUBST([WOE32])
- if test $WOE32 = yes; then
- dnl Check for a program that compiles Windows resource files.
- AC_CHECK_TOOL([WINDRES], [windres])
- fi
-
- dnl Determine whether when creating a library, "-lc" should be passed to
- dnl libtool or not. On many platforms, it is required for the libtool option
- dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool
- dnl in the *.la files - makes it impossible to create multithreaded programs,
- dnl because libtool also reorders the -lc to come before the -pthread, and
- dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>.
- case "$host_os" in
- hpux*) LTLIBC="" ;;
- *) LTLIBC="-lc" ;;
- esac
- AC_SUBST([LTLIBC])
-
- dnl Rename some macros and functions used for locking.
- AH_BOTTOM([
-#define __libc_lock_t gl_lock_t
-#define __libc_lock_define gl_lock_define
-#define __libc_lock_define_initialized gl_lock_define_initialized
-#define __libc_lock_init gl_lock_init
-#define __libc_lock_lock gl_lock_lock
-#define __libc_lock_unlock gl_lock_unlock
-#define __libc_lock_recursive_t gl_recursive_lock_t
-#define __libc_lock_define_recursive gl_recursive_lock_define
-#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized
-#define __libc_lock_init_recursive gl_recursive_lock_init
-#define __libc_lock_lock_recursive gl_recursive_lock_lock
-#define __libc_lock_unlock_recursive gl_recursive_lock_unlock
-#define glthread_in_use libintl_thread_in_use
-#define glthread_lock_init_func libintl_lock_init_func
-#define glthread_lock_lock_func libintl_lock_lock_func
-#define glthread_lock_unlock_func libintl_lock_unlock_func
-#define glthread_lock_destroy_func libintl_lock_destroy_func
-#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded
-#define glthread_rwlock_init_func libintl_rwlock_init_func
-#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded
-#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func
-#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded
-#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func
-#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded
-#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func
-#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded
-#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func
-#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded
-#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func
-#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded
-#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func
-#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded
-#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func
-#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded
-#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func
-#define glthread_once_func libintl_once_func
-#define glthread_once_singlethreaded libintl_once_singlethreaded
-#define glthread_once_multithreaded libintl_once_multithreaded
-])
-])
-
-
-dnl Checks for the core files of the intl subdirectory:
-dnl dcigettext.c
-dnl eval-plural.h
-dnl explodename.c
-dnl finddomain.c
-dnl gettextP.h
-dnl gmo.h
-dnl hash-string.h hash-string.c
-dnl l10nflist.c
-dnl libgnuintl.h.in (except the *printf stuff)
-dnl loadinfo.h
-dnl loadmsgcat.c
-dnl localealias.c
-dnl log.c
-dnl plural-exp.h plural-exp.c
-dnl plural.y
-dnl Used by libglocale.
-AC_DEFUN([gt_INTL_SUBDIR_CORE],
-[
- AC_REQUIRE([AC_C_INLINE])dnl
- AC_REQUIRE([AC_TYPE_SIZE_T])dnl
- AC_REQUIRE([gl_AC_HEADER_STDINT_H])
- AC_REQUIRE([AC_FUNC_ALLOCA])dnl
- AC_REQUIRE([AC_FUNC_MMAP])dnl
- AC_REQUIRE([gt_INTDIV0])dnl
- AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
- AC_REQUIRE([gt_INTTYPES_PRI])dnl
- AC_REQUIRE([gl_LOCK])dnl
-
- AC_TRY_LINK(
- [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
- [],
- [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1],
- [Define to 1 if the compiler understands __builtin_expect.])])
-
- AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
- AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
- stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \
- argz_stringify argz_next __fsetlocking])
-
- dnl Use the *_unlocked functions only if they are declared.
- dnl (because some of them were defined without being declared in Solaris
- dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
- dnl on Solaris 2.5.1 to run on Solaris 2.6).
- dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
- gt_CHECK_DECL([feof_unlocked], [#include <stdio.h>])
- gt_CHECK_DECL([fgets_unlocked], [#include <stdio.h>])
-
- AM_ICONV
-
- dnl intl/plural.c is generated from intl/plural.y. It requires bison,
- dnl because plural.y uses bison specific features. It requires at least
- dnl bison-1.26 because earlier versions generate a plural.c that doesn't
- dnl compile.
- dnl bison is only needed for the maintainer (who touches plural.y). But in
- dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
- dnl the rule in general Makefile. Now, some people carelessly touch the
- dnl files or have a broken "make" program, hence the plural.c rule will
- dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
- dnl present or too old.
- AC_CHECK_PROGS([INTLBISON], [bison])
- if test -z "$INTLBISON"; then
- ac_verc_fail=yes
- else
- dnl Found it, now check the version.
- AC_MSG_CHECKING([version of bison])
-changequote(<<,>>)dnl
- ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
-changequote([,])dnl
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
- esac
- AC_MSG_RESULT([$ac_prog_version])
- fi
- if test $ac_verc_fail = yes; then
- INTLBISON=:
- fi
-])
-
-
-dnl gt_CHECK_DECL(FUNC, INCLUDES)
-dnl Check whether a function is declared.
-AC_DEFUN([gt_CHECK_DECL],
-[
- AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1],
- [AC_TRY_COMPILE([$2], [
-#ifndef $1
- char *p = (char *) $1;
-#endif
-], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
- if test $ac_cv_have_decl_$1 = yes; then
- gt_value=1
- else
- gt_value=0
- fi
- AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
- [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
-])
diff --git a/package/libs/gettext/src/m4/intldir.m4 b/package/libs/gettext/src/m4/intldir.m4
deleted file mode 100644
index ebae76d3617..00000000000
--- a/package/libs/gettext/src/m4/intldir.m4
+++ /dev/null
@@ -1,19 +0,0 @@
-# intldir.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-AC_PREREQ([2.52])
-
-dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory.
-AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], [])
diff --git a/package/libs/gettext/src/m4/intlmacosx.m4 b/package/libs/gettext/src/m4/intlmacosx.m4
deleted file mode 100644
index dd910259627..00000000000
--- a/package/libs/gettext/src/m4/intlmacosx.m4
+++ /dev/null
@@ -1,51 +0,0 @@
-# intlmacosx.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Checks for special options needed on MacOS X.
-dnl Defines INTL_MACOSX_LIBS.
-AC_DEFUN([gt_INTL_MACOSX],
-[
- dnl Check for API introduced in MacOS X 10.2.
- AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
- [gt_cv_func_CFPreferencesCopyAppValue],
- [gt_save_LIBS="$LIBS"
- LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
- AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
- [CFPreferencesCopyAppValue(NULL, NULL)],
- [gt_cv_func_CFPreferencesCopyAppValue=yes],
- [gt_cv_func_CFPreferencesCopyAppValue=no])
- LIBS="$gt_save_LIBS"])
- if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
- AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
- [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
- fi
- dnl Check for API introduced in MacOS X 10.3.
- AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
- [gt_save_LIBS="$LIBS"
- LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
- AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
- [gt_cv_func_CFLocaleCopyCurrent=yes],
- [gt_cv_func_CFLocaleCopyCurrent=no])
- LIBS="$gt_save_LIBS"])
- if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
- AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
- [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
- fi
- INTL_MACOSX_LIBS=
- if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
- INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
- fi
- AC_SUBST([INTL_MACOSX_LIBS])
-])
diff --git a/package/libs/gettext/src/m4/lcmessage.m4 b/package/libs/gettext/src/m4/lcmessage.m4
deleted file mode 100644
index 1a705431a99..00000000000
--- a/package/libs/gettext/src/m4/lcmessage.m4
+++ /dev/null
@@ -1,31 +0,0 @@
-# lcmessage.m4 serial 6 (gettext-0.18)
-dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation,
-dnl Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-
-AC_DEFUN([gt_LC_MESSAGES],
-[
- AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])])
- if test $gt_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE([HAVE_LC_MESSAGES], [1],
- [Define if your <locale.h> file defines LC_MESSAGES.])
- fi
-])
diff --git a/package/libs/gettext/src/m4/nls.m4 b/package/libs/gettext/src/m4/nls.m4
deleted file mode 100644
index 003704c4b93..00000000000
--- a/package/libs/gettext/src/m4/nls.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-# nls.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
-dnl Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-
-AC_PREREQ([2.50])
-
-AC_DEFUN([AM_NLS],
-[
- AC_MSG_CHECKING([whether NLS is requested])
- dnl Default is enabled NLS
- AC_ARG_ENABLE([nls],
- [ --disable-nls do not use Native Language Support],
- USE_NLS=$enableval, USE_NLS=yes)
- AC_MSG_RESULT([$USE_NLS])
- AC_SUBST([USE_NLS])
-])
diff --git a/package/libs/gettext/src/m4/po.m4 b/package/libs/gettext/src/m4/po.m4
deleted file mode 100644
index 47f36a41a07..00000000000
--- a/package/libs/gettext/src/m4/po.m4
+++ /dev/null
@@ -1,449 +0,0 @@
-# po.m4 serial 17 (gettext-0.18)
-dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-
-AC_PREREQ([2.50])
-
-dnl Checks for all prerequisites of the po subdirectory.
-AC_DEFUN([AM_PO_SUBDIRS],
-[
- AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
- AC_REQUIRE([AM_NLS])dnl
-
- dnl Release version of the gettext macros. This is used to ensure that
- dnl the gettext macros and po/Makefile.in.in are in sync.
- AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
-
- dnl Perform the following tests also if --disable-nls has been given,
- dnl because they are needed for "make dist" to work.
-
- dnl Search for GNU msgfmt in the PATH.
- dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
- dnl The second test excludes FreeBSD msgfmt.
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
- (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
- :)
- AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
-
- dnl Test whether it is GNU msgfmt >= 0.15.
-changequote(,)dnl
- case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
- '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
- *) MSGFMT_015=$MSGFMT ;;
- esac
-changequote([,])dnl
- AC_SUBST([MSGFMT_015])
-changequote(,)dnl
- case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
- '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
- *) GMSGFMT_015=$GMSGFMT ;;
- esac
-changequote([,])dnl
- AC_SUBST([GMSGFMT_015])
-
- dnl Search for GNU xgettext 0.12 or newer in the PATH.
- dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
- dnl The second test excludes FreeBSD xgettext.
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
- (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
- :)
- dnl Remove leftover from FreeBSD xgettext call.
- rm -f messages.po
-
- dnl Test whether it is GNU xgettext >= 0.15.
-changequote(,)dnl
- case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
- '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
- *) XGETTEXT_015=$XGETTEXT ;;
- esac
-changequote([,])dnl
- AC_SUBST([XGETTEXT_015])
-
- dnl Search for GNU msgmerge 0.11 or newer in the PATH.
- AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
- [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
-
- dnl Installation directories.
- dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
- dnl have to define it here, so that it can be used in po/Makefile.
- test -n "$localedir" || localedir='${datadir}/locale'
- AC_SUBST([localedir])
-
- dnl Support for AM_XGETTEXT_OPTION.
- test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
- AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
-
- AC_CONFIG_COMMANDS([po-directories], [[
- for ac_file in $CONFIG_FILES; do
- # Support "outfile[:infile[:infile...]]"
- case "$ac_file" in
- *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- esac
- # PO directories have a Makefile.in generated from Makefile.in.in.
- case "$ac_file" in */Makefile.in)
- # Adjust a relative srcdir.
- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
- # In autoconf-2.13 it is called $ac_given_srcdir.
- # In autoconf-2.50 it is called $srcdir.
- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
- # Treat a directory as a PO directory if and only if it has a
- # POTFILES.in file. This allows packages to have multiple PO
- # directories under different names or in different locations.
- if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
- rm -f "$ac_dir/POTFILES"
- test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
- POMAKEFILEDEPS="POTFILES.in"
- # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
- # on $ac_dir but don't depend on user-specified configuration
- # parameters.
- if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
- # The LINGUAS file contains the set of available languages.
- if test -n "$OBSOLETE_ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
- fi
- ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
- eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
- POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
- else
- # The set of available languages was given in configure.in.
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
- eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
- fi
- # Compute POFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
- # Compute UPDATEPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
- # Compute DUMMYPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
- # Compute GMOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
- case "$ac_given_srcdir" in
- .) srcdirpre= ;;
- *) srcdirpre='$(srcdir)/' ;;
- esac
- POFILES=
- UPDATEPOFILES=
- DUMMYPOFILES=
- GMOFILES=
- for lang in $ALL_LINGUAS; do
- POFILES="$POFILES $srcdirpre$lang.po"
- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
- DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
- GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
- done
- # CATALOGS depends on both $ac_dir and the user's LINGUAS
- # environment variable.
- INST_LINGUAS=
- if test -n "$ALL_LINGUAS"; then
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "$LINGUAS"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang"*) useit=yes;;
- esac
- done
- if test $useit = yes; then
- INST_LINGUAS="$INST_LINGUAS $presentlang"
- fi
- done
- fi
- CATALOGS=
- if test -n "$INST_LINGUAS"; then
- for lang in $INST_LINGUAS; do
- CATALOGS="$CATALOGS $lang.gmo"
- done
- fi
- test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
- sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
- for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
- if test -f "$f"; then
- case "$f" in
- *.orig | *.bak | *~) ;;
- *) cat "$f" >> "$ac_dir/Makefile" ;;
- esac
- fi
- done
- fi
- ;;
- esac
- done]],
- [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
- # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
- # from automake < 1.5.
- eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
- # Capture the value of LINGUAS because we need it to compute CATALOGS.
- LINGUAS="${LINGUAS-%UNSET%}"
- ])
-])
-
-dnl Postprocesses a Makefile in a directory containing PO files.
-AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
-[
- # When this code is run, in config.status, two variables have already been
- # set:
- # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
- # - LINGUAS is the value of the environment variable LINGUAS at configure
- # time.
-
-changequote(,)dnl
- # Adjust a relative srcdir.
- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
- # In autoconf-2.13 it is called $ac_given_srcdir.
- # In autoconf-2.50 it is called $srcdir.
- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- # Find a way to echo strings without interpreting backslash.
- if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
- gt_echo='echo'
- else
- if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
- gt_echo='printf %s\n'
- else
- echo_func () {
- cat <<EOT
-$*
-EOT
- }
- gt_echo='echo_func'
- fi
- fi
-
- # A sed script that extracts the value of VARIABLE from a Makefile.
- sed_x_variable='
-# Test if the hold space is empty.
-x
-s/P/P/
-x
-ta
-# Yes it was empty. Look if we have the expected variable definition.
-/^[ ]*VARIABLE[ ]*=/{
- # Seen the first line of the variable definition.
- s/^[ ]*VARIABLE[ ]*=//
- ba
-}
-bd
-:a
-# Here we are processing a line from the variable definition.
-# Remove comment, more precisely replace it with a space.
-s/#.*$/ /
-# See if the line ends in a backslash.
-tb
-:b
-s/\\$//
-# Print the line, without the trailing backslash.
-p
-tc
-# There was no trailing backslash. The end of the variable definition is
-# reached. Clear the hold space.
-s/^.*$//
-x
-bd
-:c
-# A trailing backslash means that the variable definition continues in the
-# next line. Put a nonempty string into the hold space to indicate this.
-s/^.*$/P/
-x
-:d
-'
-changequote([,])dnl
-
- # Set POTFILES to the value of the Makefile variable POTFILES.
- sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
- POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
- # Compute POTFILES_DEPS as
- # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
- POTFILES_DEPS=
- for file in $POTFILES; do
- POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
- done
- POMAKEFILEDEPS=""
-
- if test -n "$OBSOLETE_ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
- fi
- if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
- # The LINGUAS file contains the set of available languages.
- ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
- else
- # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
- sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
- ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
- fi
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
- eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
- # Compute POFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
- # Compute UPDATEPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
- # Compute DUMMYPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
- # Compute GMOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
- # Compute PROPERTIESFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
- # Compute CLASSFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
- # Compute QMFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
- # Compute MSGFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
- # Compute RESOURCESDLLFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
- case "$ac_given_srcdir" in
- .) srcdirpre= ;;
- *) srcdirpre='$(srcdir)/' ;;
- esac
- POFILES=
- UPDATEPOFILES=
- DUMMYPOFILES=
- GMOFILES=
- PROPERTIESFILES=
- CLASSFILES=
- QMFILES=
- MSGFILES=
- RESOURCESDLLFILES=
- for lang in $ALL_LINGUAS; do
- POFILES="$POFILES $srcdirpre$lang.po"
- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
- DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
- GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
- PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
- CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
- QMFILES="$QMFILES $srcdirpre$lang.qm"
- frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
- MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
- frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
- RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
- done
- # CATALOGS depends on both $ac_dir and the user's LINGUAS
- # environment variable.
- INST_LINGUAS=
- if test -n "$ALL_LINGUAS"; then
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "$LINGUAS"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang"*) useit=yes;;
- esac
- done
- if test $useit = yes; then
- INST_LINGUAS="$INST_LINGUAS $presentlang"
- fi
- done
- fi
- CATALOGS=
- JAVACATALOGS=
- QTCATALOGS=
- TCLCATALOGS=
- CSHARPCATALOGS=
- if test -n "$INST_LINGUAS"; then
- for lang in $INST_LINGUAS; do
- CATALOGS="$CATALOGS $lang.gmo"
- JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
- QTCATALOGS="$QTCATALOGS $lang.qm"
- frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
- TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
- frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
- CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
- done
- fi
-
- sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
- if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
- # Add dependencies that cannot be formulated as a simple suffix rule.
- for lang in $ALL_LINGUAS; do
- frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
- cat >> "$ac_file.tmp" <<EOF
-$frobbedlang.msg: $lang.po
- @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
- \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-EOF
- done
- fi
- if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
- # Add dependencies that cannot be formulated as a simple suffix rule.
- for lang in $ALL_LINGUAS; do
- frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
- cat >> "$ac_file.tmp" <<EOF
-$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
- @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
- \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-EOF
- done
- fi
- if test -n "$POMAKEFILEDEPS"; then
- cat >> "$ac_file.tmp" <<EOF
-Makefile: $POMAKEFILEDEPS
-EOF
- fi
- mv "$ac_file.tmp" "$ac_file"
-])
-
-dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
-AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
-[
- XGETTEXT_EXTRA_OPTIONS=
-])
-
-dnl Registers an option to be passed to xgettext in the po subdirectory.
-AC_DEFUN([AM_XGETTEXT_OPTION],
-[
- AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
-])
diff --git a/package/libs/gmp/Makefile b/package/libs/gmp/Makefile
index eb7d808139f..6bcee784ed8 100644
--- a/package/libs/gmp/Makefile
+++ b/package/libs/gmp/Makefile
@@ -8,19 +8,20 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gmp
-PKG_VERSION:=6.2.1
+PKG_VERSION:=6.3.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_REVISION).tar.xz
PKG_SOURCE_URL:=@GNU/gmp/
-PKG_HASH:=fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2
+PKG_HASH:=a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
PKG_LICENSE:=GPL-2.0-or-later
+PKG_CPE_ID:=cpe:/a:gmplib:gmp
-PKG_USE_MIPS16:=0
+PKG_BUILD_FLAGS:=no-mips16
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
diff --git a/package/libs/jansson/Makefile b/package/libs/jansson/Makefile
index 5799a362dd5..e2b5206acb3 100644
--- a/package/libs/jansson/Makefile
+++ b/package/libs/jansson/Makefile
@@ -8,14 +8,18 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=jansson
-PKG_VERSION:=2.13.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.14
+PKG_RELEASE:=3
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/akheron/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=c739578bf6b764aa0752db9a2fdadcfe921c78f1228c7ec0bb47fa804c55d17b
+
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:jansson_project:jansson
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://www.digip.org/jansson/releases/
-PKG_HASH:=ee90a0f879d2b7b7159124ff22b937a2a9a8c36d3bb65d1da7dd3f04370a10bd
+PKG_BUILD_FLAGS:=lto
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
@@ -39,12 +43,9 @@ define Package/jansson/description
Jansson is a C library for encoding, decoding and manipulating JSON data
endef
-TARGET_CFLAGS += -flto
-TARGET_LDFLAGS += -flto
-
define Package/jansson/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson*so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson*so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,jansson))
diff --git a/package/libs/libaudit/Makefile b/package/libs/libaudit/Makefile
index d0cca1350a5..0d79c253657 100644
--- a/package/libs/libaudit/Makefile
+++ b/package/libs/libaudit/Makefile
@@ -11,7 +11,7 @@ PKG_RELEASE:=1
PKG_SOURCE_NAME:=audit
PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://people.redhat.com/sgrubb/audit
+PKG_SOURCE_URL:=https://people.redhat.com/sgrubb/audit
PKG_HASH:=0e5d4103646e00f8d1981e1cd2faea7a2ae28e854c31a803e907a383c5e2ecb7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
@@ -22,7 +22,7 @@ PKG_CPE_ID:=cpe:/a:linux_audit_project:linux_audit
PKG_FIXUP:=autoreconf
-PKG_USE_MIPS16:=0
+PKG_BUILD_FLAGS:=no-mips16
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
diff --git a/package/libs/libbpf/Makefile b/package/libs/libbpf/Makefile
new file mode 100644
index 00000000000..240eb51d68e
--- /dev/null
+++ b/package/libs/libbpf/Makefile
@@ -0,0 +1,76 @@
+#
+# Copyright (C) 2020-2023 Tony Ambardar <itugrok@yahoo.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libbpf
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://github.com/libbpf/libbpf
+PKG_MIRROR_HASH:=ff597a3635c2c099419d7e9e8bc44084f7f9e0c4ba2dcd571130165a19ed4ef4
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=v1.3.0
+PKG_ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION)))
+
+PKG_MAINTAINER:=Tony Ambardar <itugrok@yahoo.com>
+PKG_CPE_ID:=cpe:/a:libbpf_project:libbpf
+
+PKG_BUILD_FLAGS:=no-mips16
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/libbpf
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=libbpf - eBPF helper library
+ LICENSE:=LGPL-2.1 OR BSD-2-Clause
+ ABI_VERSION:=$(PKG_ABI_VERSION)
+ URL:=http://www.kernel.org
+ DEPENDS:=+libelf
+endef
+
+define Package/libbpf/description
+ libbpf is a library for loading eBPF programs and reading and manipulating eBPF objects from user-space.
+endef
+
+MAKE_VARS = \
+ EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)"
+
+MAKE_FLAGS += \
+ $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
+ LIBSUBDIR=lib
+
+MAKE_PATH = src
+
+define Build/InstallDev/libbpf
+ $(INSTALL_DIR) $(1)/usr/include/bpf
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/bpf/*.h $(1)/usr/include/bpf/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbpf.{a,so*} \
+ $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libbpf.pc \
+ $(1)/usr/lib/pkgconfig/
+ $(SED) 's,/usr/include,$$$${prefix}/include,g' \
+ $(1)/usr/lib/pkgconfig/libbpf.pc
+ $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' \
+ $(1)/usr/lib/pkgconfig/libbpf.pc
+endef
+
+Build/InstallDev=$(Build/InstallDev/libbpf)
+
+define Package/libbpf/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbpf.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libbpf))
diff --git a/package/libs/libbpf/patches/001-cflags.patch b/package/libs/libbpf/patches/001-cflags.patch
new file mode 100644
index 00000000000..4c0e93a75bb
--- /dev/null
+++ b/package/libs/libbpf/patches/001-cflags.patch
@@ -0,0 +1,10 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -34,6 +34,7 @@ ALL_CFLAGS := $(INCLUDES)
+
+ SHARED_CFLAGS += -fPIC -fvisibility=hidden -DSHARED
+
++CFLAGS = $(EXTRA_CFLAGS)
+ CFLAGS ?= -g -O2 -Werror -Wall -std=gnu89
+ ALL_CFLAGS += $(CFLAGS) \
+ -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
diff --git a/package/libs/libbsd/Makefile b/package/libs/libbsd/Makefile
index 26e05f79a16..3c42d64aba6 100644
--- a/package/libs/libbsd/Makefile
+++ b/package/libs/libbsd/Makefile
@@ -1,18 +1,21 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libbsd
-PKG_VERSION:=0.10.0
+PKG_VERSION:=0.11.8
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://libbsd.freedesktop.org/releases
-PKG_HASH:=34b8adc726883d0e85b3118fa13605e179a62b31ba51f676136ecb2d0bc1a887
+PKG_HASH:=55fdfa2696fb4d55a592fa9ad14a9df897c7b0008ddb3b30c419914841f85f33
PKG_LICENSE:=BSD-4-Clause
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:freedesktop:libbsd
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS := libmd
+PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
@@ -27,6 +30,8 @@ define Package/libbsd/description
This library provides useful functions commonly found on BSD systems, and lacking on others like GNU systems, thus making it easier to port projects with strong BSD origins, without needing to embed the same code over and over again on each project.
endef
+TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
@@ -42,4 +47,3 @@ define Package/libbsd/install
endef
$(eval $(call BuildPackage,libbsd))
-
diff --git a/package/libs/libbsd/patches/001-fix-libpath.patch b/package/libs/libbsd/patches/001-fix-libpath.patch
new file mode 100644
index 00000000000..ec72f776240
--- /dev/null
+++ b/package/libs/libbsd/patches/001-fix-libpath.patch
@@ -0,0 +1,13 @@
+do not use host path to fix cross compiling
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -230,7 +230,7 @@ if NEED_TRANSPARENT_LIBMD
+ (echo '/* GNU ld script'; \
+ echo ' * The MD5 functions are provided by the libmd library. */'; \
+ cat format.ld; \
+- echo "GROUP($(runtimelibdir)/$$soname AS_NEEDED($(MD5_LIBS)))"; \
++ echo "GROUP($$soname AS_NEEDED($(MD5_LIBS)))"; \
+ )>$(DESTDIR)$(libdir)/libbsd.so
+ else
+ if [ "$(libdir)" != "$(runtimelibdir)" ]; then \
diff --git a/package/libs/libcap/Makefile b/package/libs/libcap/Makefile
index b8e45a52c77..989209302a4 100644
--- a/package/libs/libcap/Makefile
+++ b/package/libs/libcap/Makefile
@@ -6,16 +6,17 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libcap
-PKG_VERSION:=2.48
+PKG_VERSION:=2.69
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
-PKG_HASH:=4de9590ee09a87c282d558737ffb5b6175ccbfd26d580add10df44d0f047f6c2
+PKG_HASH:=f311f8f3dad84699d0566d1d6f7ec943a9298b28f714cae3c931dfd57492d7eb
PKG_MAINTAINER:=Paul Wassi <p.wassi@gmx.at>
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=License
+PKG_CPE_ID:=cpe:/a:libcap_project:libcap
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
@@ -74,6 +75,8 @@ MAKE_FLAGS += \
DYNAMIC="yes" \
lib="lib"
+TARGET_CFLAGS += $(FPIC)
+
ifneq ($(CONFIG_PACKAGE_libcap-bin-capsh-shell),)
TARGET_CFLAGS += -DSHELL='\"$(CONFIG_PACKAGE_libcap-bin-capsh-shell)\"'
endif
diff --git a/package/libs/libcap/patches/300-disable-tests.patch b/package/libs/libcap/patches/300-disable-tests.patch
index c1779e28ecf..1cf9cc4ea6a 100644
--- a/package/libs/libcap/patches/300-disable-tests.patch
+++ b/package/libs/libcap/patches/300-disable-tests.patch
@@ -7,4 +7,4 @@
- $(MAKE) -C tests $@
$(MAKE) -C progs $@
$(MAKE) -C doc $@
- $(MAKE) -C kdebug $@
+
diff --git a/package/libs/libcap/patches/900-use-more-compatible-shebang.patch b/package/libs/libcap/patches/900-use-more-compatible-shebang.patch
new file mode 100644
index 00000000000..454c703fbe7
--- /dev/null
+++ b/package/libs/libcap/patches/900-use-more-compatible-shebang.patch
@@ -0,0 +1,8 @@
+--- a/progs/mkcapshdoc.sh
++++ b/progs/mkcapshdoc.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ # This script generates some C code for inclusion in the capsh binary.
+ # The Makefile generally only generates the .c code and compares it
+ # with the checked in code in the progs directory.
diff --git a/package/libs/libevent2/Makefile b/package/libs/libevent2/Makefile
index 85c159c2a69..92602607aea 100644
--- a/package/libs/libevent2/Makefile
+++ b/package/libs/libevent2/Makefile
@@ -26,6 +26,8 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_libevent2-pthreads \
CONFIG_PACKAGE_libevent2-mbedtls
+PKG_BUILD_FLAGS:=gc-sections lto
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
@@ -112,8 +114,8 @@ define Package/libevent2-pthreads/description
threading & locking.
endef
-TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
-TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -flto
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -Wl,--as-needed
CMAKE_OPTIONS += \
-DEVENT__DISABLE_BENCHMARK:BOOL=ON \
diff --git a/package/libs/libiconv-full/Makefile b/package/libs/libiconv-full/Makefile
index e4f925a1ae0..0c793973a05 100644
--- a/package/libs/libiconv-full/Makefile
+++ b/package/libs/libiconv-full/Makefile
@@ -8,13 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libiconv-full
-PKG_VERSION:=1.16
+PKG_VERSION:=1.17
PKG_RELEASE:=1
PKG_SOURCE:=libiconv-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/libiconv
-PKG_HASH:=e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
+PKG_HASH:=8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313
PKG_BUILD_DIR:=$(BUILD_DIR)/libiconv-$(PKG_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/libiconv-$(PKG_VERSION)
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=LGPL-2.1-or-later
@@ -25,6 +26,7 @@ PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
define Package/libiconv-full/Default
URL:=https://www.gnu.org/software/libiconv/
@@ -61,6 +63,10 @@ CONFIGURE_ARGS += \
--disable-rpath \
--enable-relocatable
+HOST_CONFIGURE_ARGS += \
+ --disable-shared \
+ --with-pic
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib/libiconv-full/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/iconv.h $(1)/usr/lib/libiconv-full/include/
@@ -88,3 +94,4 @@ endef
$(eval $(call BuildPackage,libcharset))
$(eval $(call BuildPackage,libiconv-full))
$(eval $(call BuildPackage,iconv))
+$(eval $(call HostBuild))
diff --git a/package/libs/libiconv/COPYING b/package/libs/libiconv/COPYING
deleted file mode 100644
index 223ede7de3e..00000000000
--- a/package/libs/libiconv/COPYING
+++ /dev/null
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/package/libs/libiconv/COPYRIGHT b/package/libs/libiconv/COPYRIGHT
deleted file mode 100644
index d228af3550b..00000000000
--- a/package/libs/libiconv/COPYRIGHT
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright status on all included code:
-
-All files which have no copyright comments are original works
-Copyright (C) 2005-2006 Rich Felker. The decision to exclude such
-comments is intentional, as it should be possible to carry around the
-complete source code on tiny storage media. All public header files
-(include/*) should be treated as Public Domain as they intentionally
-contain no content which can be covered by copyright. Some source
-modules may fall in this category as well. If you believe that a file
-is so trivial that it should be in the Public Domain, please contact
-me and, if I agree, I will explicitly release it from copyright.
-
-Some code has been modified by the OpenWrt project, this includes
-the conversion from char map files to C arrays and the iconv.h header
-file in particular.
-
-The library as a whole is licensed under the GNU LGPL version 2.1.
-See the file COPYING for the text of this license.
-
-The original source can be accessed at svn://svn.mplayerhq.hu/libc/trunk
diff --git a/package/libs/libiconv/Makefile b/package/libs/libiconv/Makefile
deleted file mode 100644
index 4d7dcd34985..00000000000
--- a/package/libs/libiconv/Makefile
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Copyright (C) 2010-2012 OpenWrt.org
-#
-# This Makefile and the code shipped in src/ is free software, licensed
-# under the GNU Lesser General Public License, version 2.1 and later.
-# See src/COPYING for more information.
-#
-# Refer to src/COPYRIGHT for copyright statements on the source files.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=libiconv
-PKG_RELEASE:=8
-
-PKG_LICENSE:=LGPL-2.1
-PKG_LICENSE_FILES:=LICENSE
-
-PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/host-build.mk
-
-define Package/libiconv
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=Tiny drop-in replacement for the GNU Character set conversion library
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
- $(TARGET_CC) $(TARGET_CFLAGS) -c $(PKG_BUILD_DIR)/iconv.c -o $(PKG_BUILD_DIR)/iconv.o -I$(PKG_BUILD_DIR)/include $(FPIC)
- $(TARGET_CROSS)ar rcs $(PKG_BUILD_DIR)/libiconv.a $(PKG_BUILD_DIR)/iconv.o
-endef
-
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/lib
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/libiconv.a $(1)/usr/lib/libiconv-stub/lib/
-
- $(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/include
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/include/iconv.h $(1)/usr/lib/libiconv-stub/include/
-
- $(INSTALL_DIR) $(1)/usr/share/aclocal
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/
-endef
-
-define Package/libiconv/install
- $(INSTALL_DIR) $(1)/tmp
- touch $(1)/tmp/.libiconv-placeholder
-endef
-
-define Host/Prepare
- mkdir -p $(HOST_BUILD_DIR)
-endef
-
-define Host/Configure
-
-endef
-
-define Host/Compile
- $(HOSTCC) -c src/iconv.c -o $(HOST_BUILD_DIR)/iconv.o -Isrc/include -fPIC
- ar rcs $(HOST_BUILD_DIR)/libiconv.a $(HOST_BUILD_DIR)/iconv.o
-endef
-
-define Host/Install
- $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib
- $(INSTALL_DATA) $(HOST_BUILD_DIR)/libiconv.a $(STAGING_DIR_HOSTPKG)/lib/
-
- $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/include
- $(INSTALL_DATA) ./src/include/iconv.h $(STAGING_DIR_HOSTPKG)/include/
-
- $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/aclocal
- $(INSTALL_DATA) ./src/m4/* $(STAGING_DIR_HOSTPKG)/share/aclocal/
-endef
-
-$(eval $(call HostBuild))
-$(eval $(call BuildPackage,libiconv))
diff --git a/package/libs/libiconv/src/LICENSE b/package/libs/libiconv/src/LICENSE
deleted file mode 100644
index b59e7be47cb..00000000000
--- a/package/libs/libiconv/src/LICENSE
+++ /dev/null
@@ -1,6 +0,0 @@
-The source file iconv.m4 contains the following message
-
-Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
-This file is free software; the Free Software Foundation
-gives unlimited permission to copy and/or distribute it,
-with or without modifications, as long as this notice is preserved.
diff --git a/package/libs/libiconv/src/iconv.c b/package/libs/libiconv/src/iconv.c
deleted file mode 100644
index c3cfefa3cc9..00000000000
--- a/package/libs/libiconv/src/iconv.c
+++ /dev/null
@@ -1,449 +0,0 @@
-#include <iconv.h>
-#include <errno.h>
-#include <wchar.h>
-#include <string.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <limits.h>
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <stdint.h>
-
-/* builtin charmaps */
-#include "charmaps.h"
-
-/* only 0-7 are valid as dest charset */
-#define UTF_16BE 000
-#define UTF_16LE 001
-#define UTF_32BE 002
-#define UTF_32LE 003
-#define WCHAR_T 004
-#define UTF_8 005
-#define US_ASCII 006
-#define LATIN_1 007
-
-/* additional charsets with algorithmic conversion */
-#define LATIN_9 010
-#define TIS_620 011
-#define JIS_0201 012
-
-/* some programs like php need this */
-int _libiconv_version = _LIBICONV_VERSION;
-
-/* these must match the constants above */
-static const unsigned char charsets[] =
- "\005" "UTF-8" "\0"
- "\004" "WCHAR_T" "\0"
- "\000" "UTF-16BE" "\0"
- "\001" "UTF-16LE" "\0"
- "\002" "UTF-32BE" "\0"
- "\003" "UTF-32LE" "\0"
- "\006" "ASCII" "\0"
- "\006" "US-ASCII" "\0"
- "\006" "ISO646-US" "\0"
- "\006" "ISO_646.IRV:1991" "\0"
- "\006" "ISO-IR-6" "\0"
- "\006" "ANSI_X3.4-1968" "\0"
- "\006" "ANSI_X3.4-1986" "\0"
- "\006" "CP367" "\0"
- "\006" "IBM367" "\0"
- "\006" "US" "\0"
- "\006" "CSASCII" "\0"
- "\007" "ISO-8859-1" "\0"
- "\007" "LATIN1" "\0"
- "\010" "ISO-8859-15""\0"
- "\010" "LATIN9" "\0"
- "\011" "ISO-8859-11""\0"
- "\011" "TIS-620" "\0"
- "\012" "JIS-0201" "\0"
- "\377";
-
-/* separate identifiers for sbcs/dbcs/etc map type */
-#define UCS2_8BIT 000
-#define UCS3_8BIT 001
-#define EUC 002
-#define EUC_TW 003
-#define SHIFT_JIS 004
-#define BIG5 005
-#define GBK 006
-
-/* FIXME: these are not implemented yet
-// EUC: A1-FE A1-FE
-// GBK: 81-FE 40-7E,80-FE
-// Big5: A1-FE 40-7E,A1-FE
-*/
-
-static const unsigned short maplen[] = {
- [UCS2_8BIT] = 4+ 2* 128,
- [UCS3_8BIT] = 4+ 3* 128,
- [EUC] = 4+ 2* 94*94,
- [SHIFT_JIS] = 4+ 2* 94*94,
- [BIG5] = 4+ 2* 94*157,
- [GBK] = 4+ 2* 126*190,
- [EUC_TW] = 4+ 2* 2*94*94,
-};
-
-static int find_charmap(const char *name)
-{
- int i;
- for (i = 0; i < (sizeof(charmaps) / sizeof(charmaps[0])); i++)
- if (!strcasecmp(charmaps[i].name, name))
- return i;
- return -1;
-}
-
-static int find_charset(const char *name)
-{
- const unsigned char *s;
- for (s=charsets; *s<0xff && strcasecmp(s+1, name); s+=strlen(s)+1);
- return *s;
-}
-
-iconv_t iconv_open(const char *to, const char *from)
-{
- unsigned f, t;
- int m;
-
- if ((t = find_charset(to)) > 8)
- return -1;
-
- if ((f = find_charset(from)) < 255)
- return 0 | (t<<1) | (f<<8);
-
- if ((m = find_charmap(from)) > -1)
- return 1 | (t<<1) | (m<<8);
-
- return -1;
-}
-
-int iconv_close(iconv_t cd)
-{
- return 0;
-}
-
-static inline wchar_t get_16(const unsigned char *s, int endian)
-{
- endian &= 1;
- return s[endian]<<8 | s[endian^1];
-}
-
-static inline void put_16(unsigned char *s, wchar_t c, int endian)
-{
- endian &= 1;
- s[endian] = c>>8;
- s[endian^1] = c;
-}
-
-static inline int utf8enc_wchar(char *outb, wchar_t c)
-{
- if (c <= 0x7F) {
- *outb = c;
- return 1;
- }
- else if (c <= 0x7FF) {
- *outb++ = ((c >> 6) & 0x1F) | 0xC0;
- *outb++ = ( c & 0x3F) | 0x80;
- return 2;
- }
- else if (c <= 0xFFFF) {
- *outb++ = ((c >> 12) & 0x0F) | 0xE0;
- *outb++ = ((c >> 6) & 0x3F) | 0x80;
- *outb++ = ( c & 0x3F) | 0x80;
- return 3;
- }
- else if (c <= 0x10FFFF) {
- *outb++ = ((c >> 18) & 0x07) | 0xF0;
- *outb++ = ((c >> 12) & 0x3F) | 0x80;
- *outb++ = ((c >> 6) & 0x3F) | 0x80;
- *outb++ = ( c & 0x3F) | 0x80;
- return 4;
- }
- else {
- *outb++ = '?';
- return 1;
- }
-}
-
-static inline int utf8seq_is_overlong(char *s, int n)
-{
- switch (n)
- {
- case 2:
- /* 1100000x (10xxxxxx) */
- return (((*s >> 1) == 0x60) &&
- ((*(s+1) >> 6) == 0x02));
-
- case 3:
- /* 11100000 100xxxxx (10xxxxxx) */
- return ((*s == 0xE0) &&
- ((*(s+1) >> 5) == 0x04) &&
- ((*(s+2) >> 6) == 0x02));
-
- case 4:
- /* 11110000 1000xxxx (10xxxxxx 10xxxxxx) */
- return ((*s == 0xF0) &&
- ((*(s+1) >> 4) == 0x08) &&
- ((*(s+2) >> 6) == 0x02) &&
- ((*(s+3) >> 6) == 0x02));
- }
-
- return 0;
-}
-
-static inline int utf8seq_is_surrogate(char *s, int n)
-{
- return ((n == 3) && (*s == 0xED) && (*(s+1) >= 0xA0) && (*(s+1) <= 0xBF));
-}
-
-static inline int utf8seq_is_illegal(char *s, int n)
-{
- return ((n == 3) && (*s == 0xEF) && (*(s+1) == 0xBF) &&
- (*(s+2) >= 0xBE) && (*(s+2) <= 0xBF));
-}
-
-static inline int utf8dec_wchar(wchar_t *c, unsigned char *in, size_t inb)
-{
- int i;
- int n = -1;
-
- /* trivial char */
- if (*in <= 0x7F) {
- *c = *in;
- return 1;
- }
-
- /* find utf8 sequence length */
- if ((*in & 0xE0) == 0xC0) n = 2;
- else if ((*in & 0xF0) == 0xE0) n = 3;
- else if ((*in & 0xF8) == 0xF0) n = 4;
- else if ((*in & 0xFC) == 0xF8) n = 5;
- else if ((*in & 0xFE) == 0xFC) n = 6;
-
- /* starved? */
- if (n > inb)
- return -2;
-
- /* decode ... */
- if (n > 1 && n < 5) {
- /* reject invalid sequences */
- if (utf8seq_is_overlong(in, n) ||
- utf8seq_is_surrogate(in, n) ||
- utf8seq_is_illegal(in, n))
- return -1;
-
- /* decode ... */
- *c = (char)(*in++ & (0x7F >> n));
-
- for (i = 1; i < n; i++) {
- /* illegal continuation byte */
- if (*in < 0x80 || *in > 0xBF)
- return -1;
-
- *c = (*c << 6) | (*in++ & 0x3F);
- }
-
- return n;
- }
-
- /* unmapped sequence (> 4) */
- return -1;
-}
-
-static inline wchar_t latin9_translit(wchar_t c)
-{
- /* a number of trivial iso-8859-15 <> utf-8 transliterations */
- switch (c) {
- case 0x20AC: return 0xA4; /* Euro */
- case 0x0160: return 0xA6; /* S caron */
- case 0x0161: return 0xA8; /* s caron */
- case 0x017D: return 0xB4; /* Z caron */
- case 0x017E: return 0xB8; /* z caron */
- case 0x0152: return 0xBC; /* OE */
- case 0x0153: return 0xBD; /* oe */
- case 0x0178: return 0xBE; /* Y diaeresis */
- default: return 0xFFFD; /* cannot translate */
- }
-}
-
-size_t iconv(iconv_t cd, char **in, size_t *inb, char **out, size_t *outb)
-{
- size_t x=0;
- unsigned char to = (cd>>1)&127;
- unsigned char from = 255;
- const unsigned char *map = 0;
- char tmp[MB_LEN_MAX];
- wchar_t c, d;
- size_t k, l;
- int err;
-
- if (!in || !*in || !*inb) return 0;
-
- if (cd & 1)
- map = charmaps[cd>>8].map;
- else
- from = cd>>8;
-
- for (; *inb; *in+=l, *inb-=l) {
- c = *(unsigned char *)*in;
- l = 1;
- if (from >= UTF_8 && c < 0x80) goto charok;
- switch (from) {
- case WCHAR_T:
- l = sizeof(wchar_t);
- if (*inb < l) goto starved;
- c = *(wchar_t *)*in;
- break;
- case UTF_8:
- l = utf8dec_wchar(&c, *in, *inb);
- if (!l) l++;
- else if (l == (size_t)-1) goto ilseq;
- else if (l == (size_t)-2) goto starved;
- break;
- case US_ASCII:
- goto ilseq;
- case LATIN_9:
- if ((unsigned)c - 0xa4 <= 0xbe - 0xa4) {
- static const unsigned char map[] = {
- 0, 0x60, 0, 0x61, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0x7d, 0, 0, 0, 0x7e, 0, 0, 0,
- 0x52, 0x53, 0x78
- };
- if (c == 0xa4) c = 0x20ac;
- else if (map[c-0xa5]) c = 0x100 | map[c-0xa5];
- }
- case LATIN_1:
- goto charok;
- case TIS_620:
- if (c >= 0xa1) c += 0x0e01-0xa1;
- goto charok;
- case JIS_0201:
- if (c >= 0xa1) {
- if (c <= 0xdf) c += 0xff61-0xa1;
- else goto ilseq;
- }
- goto charok;
- case UTF_16BE:
- case UTF_16LE:
- l = 2;
- if (*inb < 2) goto starved;
- c = get_16(*in, from);
- if ((unsigned)(c-0xdc00) < 0x400) goto ilseq;
- if ((unsigned)(c-0xd800) < 0x400) {
- l = 4;
- if (*inb < 4) goto starved;
- d = get_16(*in + 2, from);
- if ((unsigned)(c-0xdc00) >= 0x400) goto ilseq;
- c = ((c-0xd800)<<10) | (d-0xdc00);
- }
- break;
- case UTF_32BE:
- case UTF_32LE:
- l = 4;
- if (*inb < 4) goto starved;
- // FIXME
- // c = get_32(*in, from);
- break;
- default:
- /* only support ascii supersets */
- if (c < 0x80) break;
- switch (map[0]) {
- case UCS2_8BIT:
- c -= 0x80;
- break;
- case EUC:
- if ((unsigned)c - 0xa1 >= 94) goto ilseq;
- if ((unsigned)in[0][1] - 0xa1 >= 94) goto ilseq;
- c = (c-0xa1)*94 + (in[0][1]-0xa1);
- l = 2;
- break;
- case SHIFT_JIS:
- if ((unsigned)c - 0xa1 <= 0xdf-0xa1) {
- c += 0xff61-0xa1;
- goto charok;
- }
- // FIXME...
- l = 2;
- break;
- default:
- goto badf;
- }
- c = get_16(map + 4 + 2*c, 0);
- if (c == 0xffff) goto ilseq;
- goto charok;
- }
-
- if ((unsigned)c - 0xd800 < 0x800 || (unsigned)c >= 0x110000)
- goto ilseq;
-charok:
- switch (to) {
- case WCHAR_T:
- if (*outb < sizeof(wchar_t)) goto toobig;
- *(wchar_t *)*out = c;
- *out += sizeof(wchar_t);
- *outb -= sizeof(wchar_t);
- break;
- case UTF_8:
- if (*outb < 4) {
- k = utf8enc_wchar(tmp, c);
- if (*outb < k) goto toobig;
- memcpy(*out, tmp, k);
- } else k = utf8enc_wchar(*out, c);
- *out += k;
- *outb -= k;
- break;
- case US_ASCII:
- if (c > 0x7f) c = 0xfffd;
- /* fall thru and count replacement in latin1 case */
- case LATIN_9:
- if (c >= 0x100 && c != 0xfffd)
- c = latin9_translit(c);
- /* fall through */
- case LATIN_1:
- if (c > 0xff) goto ilseq;
- if (!*outb) goto toobig;
- **out = c;
- ++*out;
- --*outb;
- break;
- case UTF_16BE:
- case UTF_16LE:
- if (c < 0x10000) {
- if (*outb < 2) goto toobig;
- put_16(*out, c, to);
- *out += 2;
- *outb -= 2;
- break;
- }
- if (*outb < 4) goto toobig;
- put_16(*out, (c>>10)|0xd800, to);
- put_16(*out + 2, (c&0x3ff)|0xdc00, to);
- *out += 4;
- *outb -= 4;
- break;
- default:
- goto badf;
- }
- }
- return x;
-ilseq:
- err = EILSEQ;
- x = -1;
- goto end;
-badf:
- err = EBADF;
- x = -1;
- goto end;
-toobig:
- err = E2BIG;
- x = -1;
- goto end;
-starved:
- err = EINVAL;
-end:
- errno = err;
- return x;
-}
diff --git a/package/libs/libiconv/src/include/charmaps.h b/package/libs/libiconv/src/include/charmaps.h
deleted file mode 100644
index 083cd699f1a..00000000000
--- a/package/libs/libiconv/src/include/charmaps.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#include "charmaps/iso-8859-2.h"
-#include "charmaps/iso-8859-10.h"
-#include "charmaps/windows-874.h"
-#include "charmaps/windows-1250.h"
-#include "charmaps/koi8-r.h"
-
-#ifdef ALL_CHARSETS
-#include "charmaps/iso-8859-3.h"
-#include "charmaps/iso-8859-4.h"
-#include "charmaps/iso-8859-5.h"
-#include "charmaps/iso-8859-6.h"
-#include "charmaps/iso-8859-7.h"
-#include "charmaps/iso-8859-8.h"
-#include "charmaps/iso-8859-9.h"
-#include "charmaps/iso-8859-13.h"
-#include "charmaps/iso-8859-14.h"
-#include "charmaps/iso-8859-16.h"
-#include "charmaps/windows-1251.h"
-#include "charmaps/windows-1252.h"
-#include "charmaps/windows-1253.h"
-#include "charmaps/windows-1254.h"
-#include "charmaps/windows-1255.h"
-#include "charmaps/windows-1256.h"
-#include "charmaps/windows-1257.h"
-#include "charmaps/windows-1258.h"
-#endif
-
-
-struct charmap {
- const char name[13];
- const unsigned char *map;
-};
-
-static struct charmap charmaps[] = {
- { "ISO-8859-2", map_iso_8859_2 },
- { "ISO-8859-10", map_iso_8859_10 },
-
-#ifdef ALL_CHARSETS
- { "ISO-8859-3", map_iso_8859_3 },
- { "ISO-8859-4", map_iso_8859_4 },
- { "ISO-8859-5", map_iso_8859_5 },
- { "ISO-8859-6", map_iso_8859_6 },
- { "ISO-8859-7", map_iso_8859_7 },
- { "ISO-8859-8", map_iso_8859_8 },
- { "ISO-8859-9", map_iso_8859_9 },
- { "ISO-8859-13", map_iso_8859_13 },
- { "ISO-8859-14", map_iso_8859_14 },
- { "ISO-8859-16", map_iso_8859_16 },
-#endif
-
- { "WINDOWS-874", map_windows_874 },
- { "WINDOWS-1250", map_windows_1250 },
-
-#ifdef ALL_CHARSETS
- { "WINDOWS-1251", map_windows_1251 },
- { "WINDOWS-1252", map_windows_1252 },
- { "WINDOWS-1253", map_windows_1253 },
- { "WINDOWS-1254", map_windows_1254 },
- { "WINDOWS-1255", map_windows_1255 },
- { "WINDOWS-1256", map_windows_1256 },
- { "WINDOWS-1257", map_windows_1257 },
- { "WINDOWS-1258", map_windows_1258 },
-#endif
-
- { "KOI8-R", map_koi8_r },
-
- /* Aliases */
- { "LATIN2", map_iso_8859_2 },
- { "LATIN6", map_iso_8859_10 },
-
-#ifdef ALL_CHARSETS
- { "ARABIC", map_iso_8859_6 },
- { "CYRILLIC", map_iso_8859_5 },
- { "GREEK", map_iso_8859_7 },
- { "HEBREW", map_iso_8859_8 },
- { "LATIN3", map_iso_8859_3 },
- { "LATIN4", map_iso_8859_4 },
- { "LATIN5", map_iso_8859_9 },
-#endif
-};
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-10.h b/package/libs/libiconv/src/include/charmaps/iso-8859-10.h
deleted file mode 100644
index cb93d027d14..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-10.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_iso_8859_10[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
- 0x01, 0x12, 0x01, 0x22, 0x01, 0x2a, 0x01, 0x28, 0x01, 0x36, 0x00, 0xa7,
- 0x01, 0x3b, 0x01, 0x10, 0x01, 0x60, 0x01, 0x66, 0x01, 0x7d, 0x00, 0xad,
- 0x01, 0x6a, 0x01, 0x4a, 0x00, 0xb0, 0x01, 0x05, 0x01, 0x13, 0x01, 0x23,
- 0x01, 0x2b, 0x01, 0x29, 0x01, 0x37, 0x00, 0xb7, 0x01, 0x3c, 0x01, 0x11,
- 0x01, 0x61, 0x01, 0x67, 0x01, 0x7e, 0x20, 0x15, 0x01, 0x6b, 0x01, 0x4b,
- 0x01, 0x00, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
- 0x00, 0xc6, 0x01, 0x2e, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
- 0x01, 0x16, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x01, 0x45,
- 0x01, 0x4c, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x01, 0x68,
- 0x00, 0xd8, 0x01, 0x72, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd,
- 0x00, 0xde, 0x00, 0xdf, 0x01, 0x01, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
- 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x01, 0x2f, 0x01, 0x0d, 0x00, 0xe9,
- 0x01, 0x19, 0x00, 0xeb, 0x01, 0x17, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
- 0x00, 0xf0, 0x01, 0x46, 0x01, 0x4d, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
- 0x00, 0xf6, 0x01, 0x69, 0x00, 0xf8, 0x01, 0x73, 0x00, 0xfa, 0x00, 0xfb,
- 0x00, 0xfc, 0x00, 0xfd, 0x00, 0xfe, 0x01, 0x38
-};
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-13.h b/package/libs/libiconv/src/include/charmaps/iso-8859-13.h
deleted file mode 100644
index b44d1b4346a..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-13.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_iso_8859_13[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x20, 0x1d,
- 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x20, 0x1e, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xd8, 0x00, 0xa9, 0x01, 0x56, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x00, 0xc6, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
- 0x20, 0x1c, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xf8, 0x00, 0xb9,
- 0x01, 0x57, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xe6,
- 0x01, 0x04, 0x01, 0x2e, 0x01, 0x00, 0x01, 0x06, 0x00, 0xc4, 0x00, 0xc5,
- 0x01, 0x18, 0x01, 0x12, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x79, 0x01, 0x16,
- 0x01, 0x22, 0x01, 0x36, 0x01, 0x2a, 0x01, 0x3b, 0x01, 0x60, 0x01, 0x43,
- 0x01, 0x45, 0x00, 0xd3, 0x01, 0x4c, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
- 0x01, 0x72, 0x01, 0x41, 0x01, 0x5a, 0x01, 0x6a, 0x00, 0xdc, 0x01, 0x7b,
- 0x01, 0x7d, 0x00, 0xdf, 0x01, 0x05, 0x01, 0x2f, 0x01, 0x01, 0x01, 0x07,
- 0x00, 0xe4, 0x00, 0xe5, 0x01, 0x19, 0x01, 0x13, 0x01, 0x0d, 0x00, 0xe9,
- 0x01, 0x7a, 0x01, 0x17, 0x01, 0x23, 0x01, 0x37, 0x01, 0x2b, 0x01, 0x3c,
- 0x01, 0x61, 0x01, 0x44, 0x01, 0x46, 0x00, 0xf3, 0x01, 0x4d, 0x00, 0xf5,
- 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x73, 0x01, 0x42, 0x01, 0x5b, 0x01, 0x6b,
- 0x00, 0xfc, 0x01, 0x7c, 0x01, 0x7e, 0x20, 0x19
-};
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-14.h b/package/libs/libiconv/src/include/charmaps/iso-8859-14.h
deleted file mode 100644
index 76cead98c7e..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-14.h
+++ /dev/null
@@ -1,25 +0,0 @@
-static const unsigned char map_iso_8859_14[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x1e, 0x02,
- 0x1e, 0x03, 0x00, 0xa3, 0x01, 0x0a, 0x01, 0x0b, 0x1e, 0x0a, 0x00, 0xa7,
- 0x1e, 0x80, 0x00, 0xa9, 0x1e, 0x82, 0x1e, 0x0b, 0x1e, 0xf2, 0x00, 0xad,
- 0x00, 0xae, 0x01, 0x78, 0x1e, 0x1e, 0x1e, 0x1f, 0x01, 0x20, 0x01, 0x21,
- 0x1e, 0x40, 0x1e, 0x41, 0x00, 0xb6, 0x1e, 0x56, 0x1e, 0x81, 0x1e, 0x57,
- 0x1e, 0x83, 0x1e, 0x60, 0x1e, 0xf3, 0x1e, 0x84, 0x1e, 0x85, 0x1e, 0x61,
- 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
- 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
- 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x74, 0x00, 0xd1,
- 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x1e, 0x6a,
- 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd,
- 0x01, 0x76, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
- 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
- 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
- 0x01, 0x75, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
- 0x00, 0xf6, 0x1e, 0x6b, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
- 0x00, 0xfc, 0x00, 0xfd, 0x01, 0x77, 0x00, 0xff
-};
-
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-16.h b/package/libs/libiconv/src/include/charmaps/iso-8859-16.h
deleted file mode 100644
index 4437a41f05d..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-16.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_iso_8859_16[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
- 0x01, 0x05, 0x01, 0x41, 0x20, 0xac, 0x20, 0x1e, 0x01, 0x60, 0x00, 0xa7,
- 0x01, 0x61, 0x00, 0xa9, 0x02, 0x18, 0x00, 0xab, 0x01, 0x79, 0x00, 0xad,
- 0x01, 0x7a, 0x01, 0x7b, 0x00, 0xb0, 0x00, 0xb1, 0x01, 0x0c, 0x01, 0x42,
- 0x01, 0x7d, 0x20, 0x1d, 0x00, 0xb6, 0x00, 0xb7, 0x01, 0x7e, 0x01, 0x0d,
- 0x02, 0x19, 0x00, 0xbb, 0x01, 0x52, 0x01, 0x53, 0x01, 0x78, 0x01, 0x7c,
- 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x06,
- 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
- 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x10, 0x01, 0x43,
- 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x01, 0x5a,
- 0x01, 0x70, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x18,
- 0x02, 0x1a, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
- 0x00, 0xe4, 0x01, 0x07, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
- 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
- 0x01, 0x11, 0x01, 0x44, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51,
- 0x00, 0xf6, 0x01, 0x5b, 0x01, 0x71, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
- 0x00, 0xfc, 0x01, 0x19, 0x02, 0x1b, 0x00, 0xff
-};
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-2.h b/package/libs/libiconv/src/include/charmaps/iso-8859-2.h
deleted file mode 100644
index 631610e17c9..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-2.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_iso_8859_2[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
- 0x02, 0xd8, 0x01, 0x41, 0x00, 0xa4, 0x01, 0x3d, 0x01, 0x5a, 0x00, 0xa7,
- 0x00, 0xa8, 0x01, 0x60, 0x01, 0x5e, 0x01, 0x64, 0x01, 0x79, 0x00, 0xad,
- 0x01, 0x7d, 0x01, 0x7b, 0x00, 0xb0, 0x01, 0x05, 0x02, 0xdb, 0x01, 0x42,
- 0x00, 0xb4, 0x01, 0x3e, 0x01, 0x5b, 0x02, 0xc7, 0x00, 0xb8, 0x01, 0x61,
- 0x01, 0x5f, 0x01, 0x65, 0x01, 0x7a, 0x02, 0xdd, 0x01, 0x7e, 0x01, 0x7c,
- 0x01, 0x54, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x39,
- 0x01, 0x06, 0x00, 0xc7, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
- 0x01, 0x1a, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x0e, 0x01, 0x10, 0x01, 0x43,
- 0x01, 0x47, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x00, 0xd7,
- 0x01, 0x58, 0x01, 0x6e, 0x00, 0xda, 0x01, 0x70, 0x00, 0xdc, 0x00, 0xdd,
- 0x01, 0x62, 0x00, 0xdf, 0x01, 0x55, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
- 0x00, 0xe4, 0x01, 0x3a, 0x01, 0x07, 0x00, 0xe7, 0x01, 0x0d, 0x00, 0xe9,
- 0x01, 0x19, 0x00, 0xeb, 0x01, 0x1b, 0x00, 0xed, 0x00, 0xee, 0x01, 0x0f,
- 0x01, 0x11, 0x01, 0x44, 0x01, 0x48, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51,
- 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x59, 0x01, 0x6f, 0x00, 0xfa, 0x01, 0x71,
- 0x00, 0xfc, 0x00, 0xfd, 0x01, 0x63, 0x02, 0xd9
-};
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-3.h b/package/libs/libiconv/src/include/charmaps/iso-8859-3.h
deleted file mode 100644
index cd76d59c65a..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-3.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_iso_8859_3[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x26,
- 0x02, 0xd8, 0x00, 0xa3, 0x00, 0xa4, 0xff, 0xff, 0x01, 0x24, 0x00, 0xa7,
- 0x00, 0xa8, 0x01, 0x30, 0x01, 0x5e, 0x01, 0x1e, 0x01, 0x34, 0x00, 0xad,
- 0xff, 0xff, 0x01, 0x7b, 0x00, 0xb0, 0x01, 0x27, 0x00, 0xb2, 0x00, 0xb3,
- 0x00, 0xb4, 0x00, 0xb5, 0x01, 0x25, 0x00, 0xb7, 0x00, 0xb8, 0x01, 0x31,
- 0x01, 0x5f, 0x01, 0x1f, 0x01, 0x35, 0x00, 0xbd, 0xff, 0xff, 0x01, 0x7c,
- 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0x01, 0x0a,
- 0x01, 0x08, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
- 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1,
- 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x20, 0x00, 0xd6, 0x00, 0xd7,
- 0x01, 0x1c, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x6c,
- 0x01, 0x5c, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0xff, 0xff,
- 0x00, 0xe4, 0x01, 0x0b, 0x01, 0x09, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
- 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
- 0xff, 0xff, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x21,
- 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x1d, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
- 0x00, 0xfc, 0x01, 0x6d, 0x01, 0x5d, 0x02, 0xd9
-};
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-4.h b/package/libs/libiconv/src/include/charmaps/iso-8859-4.h
deleted file mode 100644
index 5db2f778079..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-4.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_iso_8859_4[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
- 0x01, 0x38, 0x01, 0x56, 0x00, 0xa4, 0x01, 0x28, 0x01, 0x3b, 0x00, 0xa7,
- 0x00, 0xa8, 0x01, 0x60, 0x01, 0x12, 0x01, 0x22, 0x01, 0x66, 0x00, 0xad,
- 0x01, 0x7d, 0x00, 0xaf, 0x00, 0xb0, 0x01, 0x05, 0x02, 0xdb, 0x01, 0x57,
- 0x00, 0xb4, 0x01, 0x29, 0x01, 0x3c, 0x02, 0xc7, 0x00, 0xb8, 0x01, 0x61,
- 0x01, 0x13, 0x01, 0x23, 0x01, 0x67, 0x01, 0x4a, 0x01, 0x7e, 0x01, 0x4b,
- 0x01, 0x00, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
- 0x00, 0xc6, 0x01, 0x2e, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
- 0x01, 0x16, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x2a, 0x01, 0x10, 0x01, 0x45,
- 0x01, 0x4c, 0x01, 0x36, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
- 0x00, 0xd8, 0x01, 0x72, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x68,
- 0x01, 0x6a, 0x00, 0xdf, 0x01, 0x01, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
- 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x01, 0x2f, 0x01, 0x0d, 0x00, 0xe9,
- 0x01, 0x19, 0x00, 0xeb, 0x01, 0x17, 0x00, 0xed, 0x00, 0xee, 0x01, 0x2b,
- 0x01, 0x11, 0x01, 0x46, 0x01, 0x4d, 0x01, 0x37, 0x00, 0xf4, 0x00, 0xf5,
- 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x01, 0x73, 0x00, 0xfa, 0x00, 0xfb,
- 0x00, 0xfc, 0x01, 0x69, 0x01, 0x6b, 0x02, 0xd9
-};
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-5.h b/package/libs/libiconv/src/include/charmaps/iso-8859-5.h
deleted file mode 100644
index d9fe684a345..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-5.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_iso_8859_5[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x04, 0x01,
- 0x04, 0x02, 0x04, 0x03, 0x04, 0x04, 0x04, 0x05, 0x04, 0x06, 0x04, 0x07,
- 0x04, 0x08, 0x04, 0x09, 0x04, 0x0a, 0x04, 0x0b, 0x04, 0x0c, 0x00, 0xad,
- 0x04, 0x0e, 0x04, 0x0f, 0x04, 0x10, 0x04, 0x11, 0x04, 0x12, 0x04, 0x13,
- 0x04, 0x14, 0x04, 0x15, 0x04, 0x16, 0x04, 0x17, 0x04, 0x18, 0x04, 0x19,
- 0x04, 0x1a, 0x04, 0x1b, 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e, 0x04, 0x1f,
- 0x04, 0x20, 0x04, 0x21, 0x04, 0x22, 0x04, 0x23, 0x04, 0x24, 0x04, 0x25,
- 0x04, 0x26, 0x04, 0x27, 0x04, 0x28, 0x04, 0x29, 0x04, 0x2a, 0x04, 0x2b,
- 0x04, 0x2c, 0x04, 0x2d, 0x04, 0x2e, 0x04, 0x2f, 0x04, 0x30, 0x04, 0x31,
- 0x04, 0x32, 0x04, 0x33, 0x04, 0x34, 0x04, 0x35, 0x04, 0x36, 0x04, 0x37,
- 0x04, 0x38, 0x04, 0x39, 0x04, 0x3a, 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d,
- 0x04, 0x3e, 0x04, 0x3f, 0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43,
- 0x04, 0x44, 0x04, 0x45, 0x04, 0x46, 0x04, 0x47, 0x04, 0x48, 0x04, 0x49,
- 0x04, 0x4a, 0x04, 0x4b, 0x04, 0x4c, 0x04, 0x4d, 0x04, 0x4e, 0x04, 0x4f,
- 0x21, 0x16, 0x04, 0x51, 0x04, 0x52, 0x04, 0x53, 0x04, 0x54, 0x04, 0x55,
- 0x04, 0x56, 0x04, 0x57, 0x04, 0x58, 0x04, 0x59, 0x04, 0x5a, 0x04, 0x5b,
- 0x04, 0x5c, 0x00, 0xa7, 0x04, 0x5e, 0x04, 0x5f
-};
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-6.h b/package/libs/libiconv/src/include/charmaps/iso-8859-6.h
deleted file mode 100644
index 820020fd919..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-6.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_iso_8859_6[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x06, 0x0c, 0x00, 0xad,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x06, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x06, 0x1f,
- 0xff, 0xff, 0x06, 0x21, 0x06, 0x22, 0x06, 0x23, 0x06, 0x24, 0x06, 0x25,
- 0x06, 0x26, 0x06, 0x27, 0x06, 0x28, 0x06, 0x29, 0x06, 0x2a, 0x06, 0x2b,
- 0x06, 0x2c, 0x06, 0x2d, 0x06, 0x2e, 0x06, 0x2f, 0x06, 0x30, 0x06, 0x31,
- 0x06, 0x32, 0x06, 0x33, 0x06, 0x34, 0x06, 0x35, 0x06, 0x36, 0x06, 0x37,
- 0x06, 0x38, 0x06, 0x39, 0x06, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x06, 0x40, 0x06, 0x41, 0x06, 0x42, 0x06, 0x43,
- 0x06, 0x44, 0x06, 0x45, 0x06, 0x46, 0x06, 0x47, 0x06, 0x48, 0x06, 0x49,
- 0x06, 0x4a, 0x06, 0x4b, 0x06, 0x4c, 0x06, 0x4d, 0x06, 0x4e, 0x06, 0x4f,
- 0x06, 0x50, 0x06, 0x51, 0x06, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
-};
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-7.h b/package/libs/libiconv/src/include/charmaps/iso-8859-7.h
deleted file mode 100644
index 174f9d3cbc1..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-7.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_iso_8859_7[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x20, 0x18,
- 0x20, 0x19, 0x00, 0xa3, 0x20, 0xac, 0x20, 0xaf, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xa8, 0x00, 0xa9, 0x03, 0x7a, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0xff, 0xff, 0x20, 0x15, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
- 0x03, 0x84, 0x03, 0x85, 0x03, 0x86, 0x00, 0xb7, 0x03, 0x88, 0x03, 0x89,
- 0x03, 0x8a, 0x00, 0xbb, 0x03, 0x8c, 0x00, 0xbd, 0x03, 0x8e, 0x03, 0x8f,
- 0x03, 0x90, 0x03, 0x91, 0x03, 0x92, 0x03, 0x93, 0x03, 0x94, 0x03, 0x95,
- 0x03, 0x96, 0x03, 0x97, 0x03, 0x98, 0x03, 0x99, 0x03, 0x9a, 0x03, 0x9b,
- 0x03, 0x9c, 0x03, 0x9d, 0x03, 0x9e, 0x03, 0x9f, 0x03, 0xa0, 0x03, 0xa1,
- 0xff, 0xff, 0x03, 0xa3, 0x03, 0xa4, 0x03, 0xa5, 0x03, 0xa6, 0x03, 0xa7,
- 0x03, 0xa8, 0x03, 0xa9, 0x03, 0xaa, 0x03, 0xab, 0x03, 0xac, 0x03, 0xad,
- 0x03, 0xae, 0x03, 0xaf, 0x03, 0xb0, 0x03, 0xb1, 0x03, 0xb2, 0x03, 0xb3,
- 0x03, 0xb4, 0x03, 0xb5, 0x03, 0xb6, 0x03, 0xb7, 0x03, 0xb8, 0x03, 0xb9,
- 0x03, 0xba, 0x03, 0xbb, 0x03, 0xbc, 0x03, 0xbd, 0x03, 0xbe, 0x03, 0xbf,
- 0x03, 0xc0, 0x03, 0xc1, 0x03, 0xc2, 0x03, 0xc3, 0x03, 0xc4, 0x03, 0xc5,
- 0x03, 0xc6, 0x03, 0xc7, 0x03, 0xc8, 0x03, 0xc9, 0x03, 0xca, 0x03, 0xcb,
- 0x03, 0xcc, 0x03, 0xcd, 0x03, 0xce, 0xff, 0xff
-};
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-8.h b/package/libs/libiconv/src/include/charmaps/iso-8859-8.h
deleted file mode 100644
index 66d4a5ec1fc..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-8.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_iso_8859_8[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0xff, 0xff,
- 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xd7, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
- 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
- 0x00, 0xf7, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x20, 0x17, 0x05, 0xd0, 0x05, 0xd1, 0x05, 0xd2, 0x05, 0xd3,
- 0x05, 0xd4, 0x05, 0xd5, 0x05, 0xd6, 0x05, 0xd7, 0x05, 0xd8, 0x05, 0xd9,
- 0x05, 0xda, 0x05, 0xdb, 0x05, 0xdc, 0x05, 0xdd, 0x05, 0xde, 0x05, 0xdf,
- 0x05, 0xe0, 0x05, 0xe1, 0x05, 0xe2, 0x05, 0xe3, 0x05, 0xe4, 0x05, 0xe5,
- 0x05, 0xe6, 0x05, 0xe7, 0x05, 0xe8, 0x05, 0xe9, 0x05, 0xea, 0xff, 0xff,
- 0xff, 0xff, 0x20, 0x0e, 0x20, 0x0f, 0xff, 0xff
-};
diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-9.h b/package/libs/libiconv/src/include/charmaps/iso-8859-9.h
deleted file mode 100644
index f1a86460622..00000000000
--- a/package/libs/libiconv/src/include/charmaps/iso-8859-9.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_iso_8859_9[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
- 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
- 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
- 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
- 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
- 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1,
- 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
- 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
- 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
- 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
- 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
- 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x1e, 0x00, 0xd1,
- 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
- 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x30,
- 0x01, 0x5e, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
- 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
- 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
- 0x01, 0x1f, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
- 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
- 0x00, 0xfc, 0x01, 0x31, 0x01, 0x5f, 0x00, 0xff
-};
diff --git a/package/libs/libiconv/src/include/charmaps/koi8-r.h b/package/libs/libiconv/src/include/charmaps/koi8-r.h
deleted file mode 100644
index c2453a53194..00000000000
--- a/package/libs/libiconv/src/include/charmaps/koi8-r.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_koi8_r[] = {
- 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x25, 0x02, 0x25, 0x0c, 0x25, 0x10,
- 0x25, 0x14, 0x25, 0x18, 0x25, 0x1c, 0x25, 0x24, 0x25, 0x2c, 0x25, 0x34,
- 0x25, 0x3c, 0x25, 0x80, 0x25, 0x84, 0x25, 0x88, 0x25, 0x8c, 0x25, 0x90,
- 0x25, 0x91, 0x25, 0x92, 0x25, 0x93, 0x23, 0x20, 0x25, 0xa0, 0x22, 0x19,
- 0x22, 0x1a, 0x22, 0x48, 0x22, 0x64, 0x22, 0x65, 0x00, 0xa0, 0x23, 0x21,
- 0x00, 0xb0, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xf7, 0x25, 0x50, 0x25, 0x51,
- 0x25, 0x52, 0x04, 0x51, 0x25, 0x53, 0x25, 0x54, 0x25, 0x55, 0x25, 0x56,
- 0x25, 0x57, 0x25, 0x58, 0x25, 0x59, 0x25, 0x5a, 0x25, 0x5b, 0x25, 0x5c,
- 0x25, 0x5d, 0x25, 0x5e, 0x25, 0x5f, 0x25, 0x60, 0x25, 0x61, 0x04, 0x01,
- 0x25, 0x62, 0x25, 0x63, 0x25, 0x64, 0x25, 0x65, 0x25, 0x66, 0x25, 0x67,
- 0x25, 0x68, 0x25, 0x69, 0x25, 0x6a, 0x25, 0x6b, 0x25, 0x6c, 0x00, 0xa9,
- 0x04, 0x4e, 0x04, 0x30, 0x04, 0x31, 0x04, 0x46, 0x04, 0x34, 0x04, 0x35,
- 0x04, 0x44, 0x04, 0x33, 0x04, 0x45, 0x04, 0x38, 0x04, 0x39, 0x04, 0x3a,
- 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d, 0x04, 0x3e, 0x04, 0x3f, 0x04, 0x4f,
- 0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43, 0x04, 0x36, 0x04, 0x32,
- 0x04, 0x4c, 0x04, 0x4b, 0x04, 0x37, 0x04, 0x48, 0x04, 0x4d, 0x04, 0x49,
- 0x04, 0x47, 0x04, 0x4a, 0x04, 0x2e, 0x04, 0x10, 0x04, 0x11, 0x04, 0x26,
- 0x04, 0x14, 0x04, 0x15, 0x04, 0x24, 0x04, 0x13, 0x04, 0x25, 0x04, 0x18,
- 0x04, 0x19, 0x04, 0x1a, 0x04, 0x1b, 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e,
- 0x04, 0x1f, 0x04, 0x2f, 0x04, 0x20, 0x04, 0x21, 0x04, 0x22, 0x04, 0x23,
- 0x04, 0x16, 0x04, 0x12, 0x04, 0x2c, 0x04, 0x2b, 0x04, 0x17, 0x04, 0x28,
- 0x04, 0x2d, 0x04, 0x29, 0x04, 0x27, 0x04, 0x2a
-};
diff --git a/package/libs/libiconv/src/include/charmaps/windows-1250.h b/package/libs/libiconv/src/include/charmaps/windows-1250.h
deleted file mode 100644
index 8e4723e48dd..00000000000
--- a/package/libs/libiconv/src/include/charmaps/windows-1250.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_windows_1250[] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0xff, 0xff,
- 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30,
- 0x01, 0x60, 0x20, 0x39, 0x01, 0x5a, 0x01, 0x64, 0x01, 0x7d, 0x01, 0x79,
- 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
- 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a,
- 0x01, 0x5b, 0x01, 0x65, 0x01, 0x7e, 0x01, 0x7a, 0x00, 0xa0, 0x02, 0xc7,
- 0x02, 0xd8, 0x01, 0x41, 0x00, 0xa4, 0x01, 0x04, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xa8, 0x00, 0xa9, 0x01, 0x5e, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x01, 0x7b, 0x00, 0xb0, 0x00, 0xb1, 0x02, 0xdb, 0x01, 0x42,
- 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x01, 0x05,
- 0x01, 0x5f, 0x00, 0xbb, 0x01, 0x3d, 0x02, 0xdd, 0x01, 0x3e, 0x01, 0x7c,
- 0x01, 0x54, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x39,
- 0x01, 0x06, 0x00, 0xc7, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
- 0x01, 0x1a, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x0e, 0x01, 0x10, 0x01, 0x43,
- 0x01, 0x47, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x00, 0xd7,
- 0x01, 0x58, 0x01, 0x6e, 0x00, 0xda, 0x01, 0x70, 0x00, 0xdc, 0x00, 0xdd,
- 0x01, 0x62, 0x00, 0xdf, 0x01, 0x55, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
- 0x00, 0xe4, 0x01, 0x3a, 0x01, 0x07, 0x00, 0xe7, 0x01, 0x0d, 0x00, 0xe9,
- 0x01, 0x19, 0x00, 0xeb, 0x01, 0x1b, 0x00, 0xed, 0x00, 0xee, 0x01, 0x0f,
- 0x01, 0x11, 0x01, 0x44, 0x01, 0x48, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51,
- 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x59, 0x01, 0x6f, 0x00, 0xfa, 0x01, 0x71,
- 0x00, 0xfc, 0x00, 0xfd, 0x01, 0x63, 0x02, 0xd9
-};
diff --git a/package/libs/libiconv/src/include/charmaps/windows-1251.h b/package/libs/libiconv/src/include/charmaps/windows-1251.h
deleted file mode 100644
index e2788507278..00000000000
--- a/package/libs/libiconv/src/include/charmaps/windows-1251.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_windows_1251[] = {
- 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x04, 0x03, 0x20, 0x1a, 0x04, 0x53,
- 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x20, 0xac, 0x20, 0x30,
- 0x04, 0x09, 0x20, 0x39, 0x04, 0x0a, 0x04, 0x0c, 0x04, 0x0b, 0x04, 0x0f,
- 0x04, 0x52, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
- 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0x04, 0x59, 0x20, 0x3a,
- 0x04, 0x5a, 0x04, 0x5c, 0x04, 0x5b, 0x04, 0x5f, 0x00, 0xa0, 0x04, 0x0e,
- 0x04, 0x5e, 0x04, 0x08, 0x00, 0xa4, 0x04, 0x90, 0x00, 0xa6, 0x00, 0xa7,
- 0x04, 0x01, 0x00, 0xa9, 0x04, 0x04, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x04, 0x07, 0x00, 0xb0, 0x00, 0xb1, 0x04, 0x06, 0x04, 0x56,
- 0x04, 0x91, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x04, 0x51, 0x21, 0x16,
- 0x04, 0x54, 0x00, 0xbb, 0x04, 0x58, 0x04, 0x05, 0x04, 0x55, 0x04, 0x57,
- 0x04, 0x10, 0x04, 0x11, 0x04, 0x12, 0x04, 0x13, 0x04, 0x14, 0x04, 0x15,
- 0x04, 0x16, 0x04, 0x17, 0x04, 0x18, 0x04, 0x19, 0x04, 0x1a, 0x04, 0x1b,
- 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e, 0x04, 0x1f, 0x04, 0x20, 0x04, 0x21,
- 0x04, 0x22, 0x04, 0x23, 0x04, 0x24, 0x04, 0x25, 0x04, 0x26, 0x04, 0x27,
- 0x04, 0x28, 0x04, 0x29, 0x04, 0x2a, 0x04, 0x2b, 0x04, 0x2c, 0x04, 0x2d,
- 0x04, 0x2e, 0x04, 0x2f, 0x04, 0x30, 0x04, 0x31, 0x04, 0x32, 0x04, 0x33,
- 0x04, 0x34, 0x04, 0x35, 0x04, 0x36, 0x04, 0x37, 0x04, 0x38, 0x04, 0x39,
- 0x04, 0x3a, 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d, 0x04, 0x3e, 0x04, 0x3f,
- 0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43, 0x04, 0x44, 0x04, 0x45,
- 0x04, 0x46, 0x04, 0x47, 0x04, 0x48, 0x04, 0x49, 0x04, 0x4a, 0x04, 0x4b,
- 0x04, 0x4c, 0x04, 0x4d, 0x04, 0x4e, 0x04, 0x4f
-};
diff --git a/package/libs/libiconv/src/include/charmaps/windows-1252.h b/package/libs/libiconv/src/include/charmaps/windows-1252.h
deleted file mode 100644
index a6dad8a05af..00000000000
--- a/package/libs/libiconv/src/include/charmaps/windows-1252.h
+++ /dev/null
@@ -1,25 +0,0 @@
-static const unsigned char map_windows_1252[] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
- 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
- 0x01, 0x60, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0x01, 0x7d, 0xff, 0xff,
- 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
- 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a,
- 0x01, 0x53, 0xff, 0xff, 0x01, 0x7e, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1,
- 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
- 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
- 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
- 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
- 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
- 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1,
- 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
- 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd,
- 0x00, 0xde, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
- 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
- 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
- 0x00, 0xf0, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
- 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
- 0x00, 0xfc, 0x00, 0xfd, 0x00, 0xfe, 0x00, 0xff
-};
-
diff --git a/package/libs/libiconv/src/include/charmaps/windows-1253.h b/package/libs/libiconv/src/include/charmaps/windows-1253.h
deleted file mode 100644
index b0bdf1eb36f..00000000000
--- a/package/libs/libiconv/src/include/charmaps/windows-1253.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_windows_1253[] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
- 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30,
- 0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
- 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x03, 0x85,
- 0x03, 0x86, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xa8, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x20, 0x15, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
- 0x03, 0x84, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x03, 0x88, 0x03, 0x89,
- 0x03, 0x8a, 0x00, 0xbb, 0x03, 0x8c, 0x00, 0xbd, 0x03, 0x8e, 0x03, 0x8f,
- 0x03, 0x90, 0x03, 0x91, 0x03, 0x92, 0x03, 0x93, 0x03, 0x94, 0x03, 0x95,
- 0x03, 0x96, 0x03, 0x97, 0x03, 0x98, 0x03, 0x99, 0x03, 0x9a, 0x03, 0x9b,
- 0x03, 0x9c, 0x03, 0x9d, 0x03, 0x9e, 0x03, 0x9f, 0x03, 0xa0, 0x03, 0xa1,
- 0xff, 0xff, 0x03, 0xa3, 0x03, 0xa4, 0x03, 0xa5, 0x03, 0xa6, 0x03, 0xa7,
- 0x03, 0xa8, 0x03, 0xa9, 0x03, 0xaa, 0x03, 0xab, 0x03, 0xac, 0x03, 0xad,
- 0x03, 0xae, 0x03, 0xaf, 0x03, 0xb0, 0x03, 0xb1, 0x03, 0xb2, 0x03, 0xb3,
- 0x03, 0xb4, 0x03, 0xb5, 0x03, 0xb6, 0x03, 0xb7, 0x03, 0xb8, 0x03, 0xb9,
- 0x03, 0xba, 0x03, 0xbb, 0x03, 0xbc, 0x03, 0xbd, 0x03, 0xbe, 0x03, 0xbf,
- 0x03, 0xc0, 0x03, 0xc1, 0x03, 0xc2, 0x03, 0xc3, 0x03, 0xc4, 0x03, 0xc5,
- 0x03, 0xc6, 0x03, 0xc7, 0x03, 0xc8, 0x03, 0xc9, 0x03, 0xca, 0x03, 0xcb,
- 0x03, 0xcc, 0x03, 0xcd, 0x03, 0xce, 0xff, 0xff
-};
diff --git a/package/libs/libiconv/src/include/charmaps/windows-1254.h b/package/libs/libiconv/src/include/charmaps/windows-1254.h
deleted file mode 100644
index be226007972..00000000000
--- a/package/libs/libiconv/src/include/charmaps/windows-1254.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_windows_1254[] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
- 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
- 0x01, 0x60, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
- 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a,
- 0x01, 0x53, 0xff, 0xff, 0xff, 0xff, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1,
- 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
- 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
- 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
- 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
- 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
- 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x1e, 0x00, 0xd1,
- 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
- 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x30,
- 0x01, 0x5e, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
- 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
- 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
- 0x01, 0x1f, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
- 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
- 0x00, 0xfc, 0x01, 0x31, 0x01, 0x5f, 0x00, 0xff
-};
diff --git a/package/libs/libiconv/src/include/charmaps/windows-1255.h b/package/libs/libiconv/src/include/charmaps/windows-1255.h
deleted file mode 100644
index 28bf513d46c..00000000000
--- a/package/libs/libiconv/src/include/charmaps/windows-1255.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_windows_1255[] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
- 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
- 0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
- 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x00, 0xa1,
- 0x00, 0xa2, 0x00, 0xa3, 0x20, 0xaa, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xd7, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
- 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
- 0x00, 0xf7, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
- 0x05, 0xb0, 0x05, 0xb1, 0x05, 0xb2, 0x05, 0xb3, 0x05, 0xb4, 0x05, 0xb5,
- 0x05, 0xb6, 0x05, 0xb7, 0x05, 0xb8, 0x05, 0xb9, 0xff, 0xff, 0x05, 0xbb,
- 0x05, 0xbc, 0x05, 0xbd, 0x05, 0xbe, 0x05, 0xbf, 0x05, 0xc0, 0x05, 0xc1,
- 0x05, 0xc2, 0x05, 0xc3, 0x05, 0xf0, 0x05, 0xf1, 0x05, 0xf2, 0x05, 0xf3,
- 0x05, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x05, 0xd0, 0x05, 0xd1, 0x05, 0xd2, 0x05, 0xd3,
- 0x05, 0xd4, 0x05, 0xd5, 0x05, 0xd6, 0x05, 0xd7, 0x05, 0xd8, 0x05, 0xd9,
- 0x05, 0xda, 0x05, 0xdb, 0x05, 0xdc, 0x05, 0xdd, 0x05, 0xde, 0x05, 0xdf,
- 0x05, 0xe0, 0x05, 0xe1, 0x05, 0xe2, 0x05, 0xe3, 0x05, 0xe4, 0x05, 0xe5,
- 0x05, 0xe6, 0x05, 0xe7, 0x05, 0xe8, 0x05, 0xe9, 0x05, 0xea, 0xff, 0xff,
- 0xff, 0xff, 0x20, 0x0e, 0x20, 0x0f, 0xff, 0xff
-};
diff --git a/package/libs/libiconv/src/include/charmaps/windows-1256.h b/package/libs/libiconv/src/include/charmaps/windows-1256.h
deleted file mode 100644
index fbca315eff3..00000000000
--- a/package/libs/libiconv/src/include/charmaps/windows-1256.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_windows_1256[] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0x06, 0x7e, 0x20, 0x1a, 0x01, 0x92,
- 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
- 0x06, 0x79, 0x20, 0x39, 0x01, 0x52, 0x06, 0x86, 0x06, 0x98, 0x06, 0x88,
- 0x06, 0xaf, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
- 0x20, 0x13, 0x20, 0x14, 0x06, 0xa9, 0x21, 0x22, 0x06, 0x91, 0x20, 0x3a,
- 0x01, 0x53, 0x20, 0x0c, 0x20, 0x0d, 0x06, 0xba, 0x00, 0xa0, 0x06, 0x0c,
- 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xa8, 0x00, 0xa9, 0x06, 0xbe, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
- 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
- 0x06, 0x1b, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x06, 0x1f,
- 0x06, 0xc1, 0x06, 0x21, 0x06, 0x22, 0x06, 0x23, 0x06, 0x24, 0x06, 0x25,
- 0x06, 0x26, 0x06, 0x27, 0x06, 0x28, 0x06, 0x29, 0x06, 0x2a, 0x06, 0x2b,
- 0x06, 0x2c, 0x06, 0x2d, 0x06, 0x2e, 0x06, 0x2f, 0x06, 0x30, 0x06, 0x31,
- 0x06, 0x32, 0x06, 0x33, 0x06, 0x34, 0x06, 0x35, 0x06, 0x36, 0x00, 0xd7,
- 0x06, 0x37, 0x06, 0x38, 0x06, 0x39, 0x06, 0x3a, 0x06, 0x40, 0x06, 0x41,
- 0x06, 0x42, 0x06, 0x43, 0x00, 0xe0, 0x06, 0x44, 0x00, 0xe2, 0x06, 0x45,
- 0x06, 0x46, 0x06, 0x47, 0x06, 0x48, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
- 0x00, 0xea, 0x00, 0xeb, 0x06, 0x49, 0x06, 0x4a, 0x00, 0xee, 0x00, 0xef,
- 0x06, 0x4b, 0x06, 0x4c, 0x06, 0x4d, 0x06, 0x4e, 0x00, 0xf4, 0x06, 0x4f,
- 0x06, 0x50, 0x00, 0xf7, 0x06, 0x51, 0x00, 0xf9, 0x06, 0x52, 0x00, 0xfb,
- 0x00, 0xfc, 0x20, 0x0e, 0x20, 0x0f, 0x06, 0xd2
-};
diff --git a/package/libs/libiconv/src/include/charmaps/windows-1257.h b/package/libs/libiconv/src/include/charmaps/windows-1257.h
deleted file mode 100644
index 69d4474bc26..00000000000
--- a/package/libs/libiconv/src/include/charmaps/windows-1257.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_windows_1257[] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0xff, 0xff,
- 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30,
- 0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0x00, 0xa8, 0x02, 0xc7, 0x00, 0xb8,
- 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
- 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
- 0xff, 0xff, 0x00, 0xaf, 0x02, 0xdb, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff,
- 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xd8, 0x00, 0xa9, 0x01, 0x56, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x00, 0xc6, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
- 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xf8, 0x00, 0xb9,
- 0x01, 0x57, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xe6,
- 0x01, 0x04, 0x01, 0x2e, 0x01, 0x00, 0x01, 0x06, 0x00, 0xc4, 0x00, 0xc5,
- 0x01, 0x18, 0x01, 0x12, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x79, 0x01, 0x16,
- 0x01, 0x22, 0x01, 0x36, 0x01, 0x2a, 0x01, 0x3b, 0x01, 0x60, 0x01, 0x43,
- 0x01, 0x45, 0x00, 0xd3, 0x01, 0x4c, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
- 0x01, 0x72, 0x01, 0x41, 0x01, 0x5a, 0x01, 0x6a, 0x00, 0xdc, 0x01, 0x7b,
- 0x01, 0x7d, 0x00, 0xdf, 0x01, 0x05, 0x01, 0x2f, 0x01, 0x01, 0x01, 0x07,
- 0x00, 0xe4, 0x00, 0xe5, 0x01, 0x19, 0x01, 0x13, 0x01, 0x0d, 0x00, 0xe9,
- 0x01, 0x7a, 0x01, 0x17, 0x01, 0x23, 0x01, 0x37, 0x01, 0x2b, 0x01, 0x3c,
- 0x01, 0x61, 0x01, 0x44, 0x01, 0x46, 0x00, 0xf3, 0x01, 0x4d, 0x00, 0xf5,
- 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x73, 0x01, 0x42, 0x01, 0x5b, 0x01, 0x6b,
- 0x00, 0xfc, 0x01, 0x7c, 0x01, 0x7e, 0x02, 0xd9
-};
diff --git a/package/libs/libiconv/src/include/charmaps/windows-1258.h b/package/libs/libiconv/src/include/charmaps/windows-1258.h
deleted file mode 100644
index 5bbd737aecb..00000000000
--- a/package/libs/libiconv/src/include/charmaps/windows-1258.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_windows_1258[] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
- 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
- 0xff, 0xff, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
- 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
- 0x01, 0x53, 0xff, 0xff, 0xff, 0xff, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1,
- 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
- 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
- 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
- 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
- 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
- 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x00, 0xc5,
- 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
- 0x03, 0x00, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x10, 0x00, 0xd1,
- 0x03, 0x09, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0xa0, 0x00, 0xd6, 0x00, 0xd7,
- 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0xaf,
- 0x03, 0x03, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
- 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
- 0x00, 0xea, 0x00, 0xeb, 0x03, 0x01, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
- 0x01, 0x11, 0x00, 0xf1, 0x03, 0x23, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0xa1,
- 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
- 0x00, 0xfc, 0x01, 0xb0, 0x20, 0xab, 0x00, 0xff
-};
diff --git a/package/libs/libiconv/src/include/charmaps/windows-874.h b/package/libs/libiconv/src/include/charmaps/windows-874.h
deleted file mode 100644
index 5749280a5e9..00000000000
--- a/package/libs/libiconv/src/include/charmaps/windows-874.h
+++ /dev/null
@@ -1,24 +0,0 @@
-static const unsigned char map_windows_874[] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x20, 0x26, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
- 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x0e, 0x01,
- 0x0e, 0x02, 0x0e, 0x03, 0x0e, 0x04, 0x0e, 0x05, 0x0e, 0x06, 0x0e, 0x07,
- 0x0e, 0x08, 0x0e, 0x09, 0x0e, 0x0a, 0x0e, 0x0b, 0x0e, 0x0c, 0x0e, 0x0d,
- 0x0e, 0x0e, 0x0e, 0x0f, 0x0e, 0x10, 0x0e, 0x11, 0x0e, 0x12, 0x0e, 0x13,
- 0x0e, 0x14, 0x0e, 0x15, 0x0e, 0x16, 0x0e, 0x17, 0x0e, 0x18, 0x0e, 0x19,
- 0x0e, 0x1a, 0x0e, 0x1b, 0x0e, 0x1c, 0x0e, 0x1d, 0x0e, 0x1e, 0x0e, 0x1f,
- 0x0e, 0x20, 0x0e, 0x21, 0x0e, 0x22, 0x0e, 0x23, 0x0e, 0x24, 0x0e, 0x25,
- 0x0e, 0x26, 0x0e, 0x27, 0x0e, 0x28, 0x0e, 0x29, 0x0e, 0x2a, 0x0e, 0x2b,
- 0x0e, 0x2c, 0x0e, 0x2d, 0x0e, 0x2e, 0x0e, 0x2f, 0x0e, 0x30, 0x0e, 0x31,
- 0x0e, 0x32, 0x0e, 0x33, 0x0e, 0x34, 0x0e, 0x35, 0x0e, 0x36, 0x0e, 0x37,
- 0x0e, 0x38, 0x0e, 0x39, 0x0e, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x0e, 0x3f, 0x0e, 0x40, 0x0e, 0x41, 0x0e, 0x42, 0x0e, 0x43,
- 0x0e, 0x44, 0x0e, 0x45, 0x0e, 0x46, 0x0e, 0x47, 0x0e, 0x48, 0x0e, 0x49,
- 0x0e, 0x4a, 0x0e, 0x4b, 0x0e, 0x4c, 0x0e, 0x4d, 0x0e, 0x4e, 0x0e, 0x4f,
- 0x0e, 0x50, 0x0e, 0x51, 0x0e, 0x52, 0x0e, 0x53, 0x0e, 0x54, 0x0e, 0x55,
- 0x0e, 0x56, 0x0e, 0x57, 0x0e, 0x58, 0x0e, 0x59, 0x0e, 0x5a, 0x0e, 0x5b,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
-};
diff --git a/package/libs/libiconv/src/include/iconv.h b/package/libs/libiconv/src/include/iconv.h
deleted file mode 100644
index 8767be42eec..00000000000
--- a/package/libs/libiconv/src/include/iconv.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef _LIBICONV_H
-#define _LIBICONV_H 1
-
-#define _LIBICONV_VERSION 0x010B /* version number: (major<<8) + minor */
-
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern int _libiconv_version; /* Likewise */
-
-typedef long iconv_t;
-
-#define iconv_open libiconv_open
-#define iconv libiconv
-#define iconv_close libiconv_close
-
-extern iconv_t
-iconv_open(const char *tocode, const char *fromcode);
-
-extern size_t
-iconv(iconv_t cd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft);
-
-extern int
-iconv_close(iconv_t cd);
-
-#define libiconv_set_relocation_prefix(...) do {} while(0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _LIBICONV_H */
diff --git a/package/libs/libiconv/src/m4/iconv.m4 b/package/libs/libiconv/src/m4/iconv.m4
deleted file mode 100644
index e2041b9b49f..00000000000
--- a/package/libs/libiconv/src/m4/iconv.m4
+++ /dev/null
@@ -1,214 +0,0 @@
-# iconv.m4 serial 11 (gettext-0.18.1)
-dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
-[
- dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
-
- dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([iconv])
-])
-
-AC_DEFUN([AM_ICONV_LINK],
-[
- dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
- dnl those with the standalone portable GNU libiconv installed).
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-
- dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
- dnl accordingly.
- AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
-
- dnl Add $INCICONV to CPPFLAGS before performing the following checks,
- dnl because if the user has installed libiconv and not disabled its use
- dnl via --without-libiconv-prefix, he wants to use it. The first
- dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
- am_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
-
- AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
- am_cv_func_iconv="no, consider installing GNU libiconv"
- am_cv_lib_iconv=no
- AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- [am_cv_func_iconv=yes])
- if test "$am_cv_func_iconv" != yes; then
- am_save_LIBS="$LIBS"
- LIBS="$LIBS $LIBICONV"
- AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- [am_cv_lib_iconv=yes]
- [am_cv_func_iconv=yes])
- LIBS="$am_save_LIBS"
- fi
- ])
- if test "$am_cv_func_iconv" = yes; then
- AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
- dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
- am_save_LIBS="$LIBS"
- if test $am_cv_lib_iconv = yes; then
- LIBS="$LIBS $LIBICONV"
- fi
- AC_TRY_RUN([
-#include <iconv.h>
-#include <string.h>
-int main ()
-{
- /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
- returns. */
- {
- iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
- if (cd_utf8_to_88591 != (iconv_t)(-1))
- {
- static const char input[] = "\342\202\254"; /* EURO SIGN */
- char buf[10];
- const char *inptr = input;
- size_t inbytesleft = strlen (input);
- char *outptr = buf;
- size_t outbytesleft = sizeof (buf);
- size_t res = iconv (cd_utf8_to_88591,
- (char **) &inptr, &inbytesleft,
- &outptr, &outbytesleft);
- if (res == 0)
- return 1;
- }
- }
- /* Test against Solaris 10 bug: Failures are not distinguishable from
- successful returns. */
- {
- iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
- if (cd_ascii_to_88591 != (iconv_t)(-1))
- {
- static const char input[] = "\263";
- char buf[10];
- const char *inptr = input;
- size_t inbytesleft = strlen (input);
- char *outptr = buf;
- size_t outbytesleft = sizeof (buf);
- size_t res = iconv (cd_ascii_to_88591,
- (char **) &inptr, &inbytesleft,
- &outptr, &outbytesleft);
- if (res == 0)
- return 1;
- }
- }
-#if 0 /* This bug could be worked around by the caller. */
- /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
- {
- iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
- if (cd_88591_to_utf8 != (iconv_t)(-1))
- {
- static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
- char buf[50];
- const char *inptr = input;
- size_t inbytesleft = strlen (input);
- char *outptr = buf;
- size_t outbytesleft = sizeof (buf);
- size_t res = iconv (cd_88591_to_utf8,
- (char **) &inptr, &inbytesleft,
- &outptr, &outbytesleft);
- if ((int)res > 0)
- return 1;
- }
- }
-#endif
- /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
- provided. */
- if (/* Try standardized names. */
- iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
- /* Try IRIX, OSF/1 names. */
- && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
- /* Try AIX names. */
- && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
- /* Try HP-UX names. */
- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
- return 1;
- return 0;
-}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
- [case "$host_os" in
- aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
- *) am_cv_func_iconv_works="guessing yes" ;;
- esac])
- LIBS="$am_save_LIBS"
- ])
- case "$am_cv_func_iconv_works" in
- *no) am_func_iconv=no am_cv_lib_iconv=no ;;
- *) am_func_iconv=yes ;;
- esac
- else
- am_func_iconv=no am_cv_lib_iconv=no
- fi
- if test "$am_func_iconv" = yes; then
- AC_DEFINE([HAVE_ICONV], [1],
- [Define if you have the iconv() function and it works.])
- fi
- if test "$am_cv_lib_iconv" = yes; then
- AC_MSG_CHECKING([how to link with libiconv])
- AC_MSG_RESULT([$LIBICONV])
- else
- dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
- dnl either.
- CPPFLAGS="$am_save_CPPFLAGS"
- LIBICONV=
- LTLIBICONV=
- fi
- AC_SUBST([LIBICONV])
- AC_SUBST([LTLIBICONV])
-])
-
-dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
-dnl avoid warnings like
-dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
-dnl This is tricky because of the way 'aclocal' is implemented:
-dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
-dnl Otherwise aclocal's initial scan pass would miss the macro definition.
-dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
-dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
-dnl warnings.
-m4_define([gl_iconv_AC_DEFUN],
- m4_version_prereq([2.64],
- [[AC_DEFUN_ONCE(
- [$1], [$2])]],
- [[AC_DEFUN(
- [$1], [$2])]]))
-gl_iconv_AC_DEFUN([AM_ICONV],
-[
- AM_ICONV_LINK
- if test "$am_cv_func_iconv" = yes; then
- AC_MSG_CHECKING([for iconv declaration])
- AC_CACHE_VAL([am_cv_proto_iconv], [
- AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
- am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
- am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
- AC_MSG_RESULT([
- $am_cv_proto_iconv])
- AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
- [Define as const if the declaration of iconv() needs const.])
- fi
-])
diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile
index 63cc2144389..063cf264427 100644
--- a/package/libs/libjson-c/Makefile
+++ b/package/libs/libjson-c/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=json-c
-PKG_VERSION:=0.15
-PKG_RELEASE:=2
+PKG_VERSION:=0.17
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz
PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/
-PKG_HASH:=99bca4f944b8ced8ae0bbc6310d6a3528ca715e69541793a1ef51f8c5b4b0878
+PKG_HASH:=8df3b66597333dd365762cab2de2ff68e41e3808a04b692e696e0550648eefaa
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=MIT
@@ -27,9 +27,11 @@ include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_HOST_OPTIONS += \
- -DCMAKE_SKIP_RPATH=FALSE \
- -DCMAKE_MACOSX_RPATH=1 \
- -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOST}/lib"
+ -DDISABLE_EXTRA_LIBS=TRUE \
+ -DBUILD_SHARED_LIBS=FALSE
+
+CMAKE_OPTIONS += \
+ -DDISABLE_EXTRA_LIBS=TRUE
define Package/libjson-c
SECTION:=libs
diff --git a/package/libs/libjson-c/patches/000-libm.patch b/package/libs/libjson-c/patches/000-libm.patch
deleted file mode 100644
index c6ff5f4766d..00000000000
--- a/package/libs/libjson-c/patches/000-libm.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- a/math_compat.h
-+++ b/math_compat.h
-@@ -6,38 +6,9 @@
- * @brief Do not use, json-c internal, may be changed or removed at any time.
- */
-
--/* Define isnan, isinf, infinity and nan on Windows/MSVC */
--
--#ifndef HAVE_DECL_ISNAN
--#ifdef HAVE_DECL__ISNAN
--#include <float.h>
--#define isnan(x) _isnan(x)
--#else
--/* On platforms like AIX and "IBM i" we need to provide our own isnan */
--#define isnan(x) ((x) != (x))
--#endif
--#endif
--
--#ifndef HAVE_DECL_ISINF
--#ifdef HAVE_DECL__FINITE
--#include <float.h>
--#define isinf(x) (!_finite(x))
--#else
--#include <float.h>
--/* On platforms like AIX and "IBM i" we need to provide our own isinf */
--#define isinf(x) ((x) < -DBL_MAX || (x) > DBL_MAX)
--#endif
--#endif
--
--#ifndef HAVE_DECL_INFINITY
--#include <float.h>
--#define INFINITY (DBL_MAX + DBL_MAX)
--#define HAVE_DECL_INFINITY
--#endif
--
--#ifndef HAVE_DECL_NAN
--#define NAN (INFINITY - INFINITY)
--#define HAVE_DECL_NAN
--#endif
-+#undef isnan
-+#define isnan(x) __builtin_isnan(x)
-+#undef isinf
-+#define isinf(x) __builtin_isinf(x)
-
- #endif
diff --git a/package/libs/libjson-c/patches/001-dont-build-docs.patch b/package/libs/libjson-c/patches/001-dont-build-docs.patch
index 1aa0da4f598..1de420f8b87 100644
--- a/package/libs/libjson-c/patches/001-dont-build-docs.patch
+++ b/package/libs/libjson-c/patches/001-dont-build-docs.patch
@@ -1,11 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -401,8 +401,6 @@ set(JSON_C_SOURCES
+@@ -451,8 +451,6 @@ configure_file(json.h.cmakein ${PROJECT_
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_BINARY_DIR})
-add_subdirectory(doc)
-
- # uninstall
- add_custom_target(uninstall
- COMMAND cat ${PROJECT_BINARY_DIR}/install_manifest.txt | xargs rm
+ # "uninstall" custom target for make generators in unix like operating systems
+ # and if that target is not present
+ if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
diff --git a/package/libs/libmd/Makefile b/package/libs/libmd/Makefile
new file mode 100644
index 00000000000..06e516cef93
--- /dev/null
+++ b/package/libs/libmd/Makefile
@@ -0,0 +1,47 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libmd
+PKG_VERSION:=1.1.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://archive.hadrons.org/software/libmd/
+PKG_HASH:=1bd6aa42275313af3141c7cf2e5b964e8b1fd488025caf2f971f43b00776b332
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+ --enable-static
+
+define Package/libmd
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Message Digest functions from BSD systems
+ ABI_VERSION:=0
+endef
+
+define Package/libmd/description
+ This library provides message digest functions found on BSD systems either
+ on their libc or libmd libraries and lacking on others like GNU systems,
+ thus making it easier to port projects with strong BSD origins, without
+ needing to embed the same code over and over again on each project.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmd.a $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmd*.pc $(1)/usr/lib/pkgconfig/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+endef
+
+$(eval $(call BuildPackage,libmd))
diff --git a/package/libs/libmnl/Makefile b/package/libs/libmnl/Makefile
index 13628728e6f..06f79d5384c 100644
--- a/package/libs/libmnl/Makefile
+++ b/package/libs/libmnl/Makefile
@@ -8,20 +8,21 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libmnl
-PKG_VERSION:=1.0.4
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.5
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
http://www.netfilter.org/projects/libmnl/files \
ftp://ftp.netfilter.org/pub/libmnl
-PKG_HASH:=171f89699f286a5854b72b91d06e8f8e3683064c5901fb09d954a9ab6f551f81
+PKG_HASH:=274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_LICENSE:=LGPL-2.1+
+PKG_CPE_ID:=cpe:/a:netfilter:libmnl
include $(INCLUDE_DIR)/package.mk
diff --git a/package/libs/libmnl/patches/001-fix_build.patch b/package/libs/libmnl/patches/001-fix_build.patch
new file mode 100644
index 00000000000..d095ec89d0f
--- /dev/null
+++ b/package/libs/libmnl/patches/001-fix_build.patch
@@ -0,0 +1,11 @@
+--- a/doxygen/Makefile.am
++++ b/doxygen/Makefile.am
+@@ -21,7 +21,7 @@ doxyfile.stamp: $(doc_srcs) Makefile.am
+ # The command has to be a single line so the functions work
+ # and so `make` gives all lines to `bash -c`
+ # (hence ";\" at the end of every line but the last).
+- /bin/bash -p -c 'declare -A renamed_page;\
++ bash -p -c 'declare -A renamed_page;\
+ main(){ set -e; cd man/man3; rm -f _*;\
+ count_real_pages;\
+ rename_real_pages;\
diff --git a/package/libs/libnetfilter-conntrack/Makefile b/package/libs/libnetfilter-conntrack/Makefile
index 2020709d01d..97197b4a619 100644
--- a/package/libs/libnetfilter-conntrack/Makefile
+++ b/package/libs/libnetfilter-conntrack/Makefile
@@ -8,16 +8,17 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libnetfilter_conntrack
-PKG_VERSION:=1.0.8
-PKG_RELEASE:=1
+PKG_VERSION:=1.0.9
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.netfilter.org/projects/libnetfilter_conntrack/files
-PKG_HASH:=0cd13be008923528687af6c6b860f35392d49251c04ee0648282d36b1faec1cf
+PKG_HASH:=67bd9df49fe34e8b82144f6dfb93b320f384a8ea59727e92ff8d18b5f4b579a8
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:netfilter:libnetfilter_conntrack
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
diff --git a/package/libs/libnetfilter-conntrack/patches/0001-conntrack-fix-build-with-kernel-5_15-and-musl.patch b/package/libs/libnetfilter-conntrack/patches/0001-conntrack-fix-build-with-kernel-5_15-and-musl.patch
new file mode 100644
index 00000000000..d04f4b5e425
--- /dev/null
+++ b/package/libs/libnetfilter-conntrack/patches/0001-conntrack-fix-build-with-kernel-5_15-and-musl.patch
@@ -0,0 +1,49 @@
+From 21ee35dde73aec5eba35290587d479218c6dd824 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko@gmail.com>
+Date: Thu, 24 Feb 2022 15:01:11 +0100
+Subject: conntrack: fix build with kernel 5.15 and musl
+
+Currently, with kernel 5.15 headers and musl building is failing with
+redefinition errors due to a conflict between the kernel and musl headers.
+
+Musl is able to suppres the conflicting kernel header definitions if they
+are included after the standard libc ones, however since ICMP definitions
+were moved into a separate internal header to avoid duplication this has
+stopped working and is breaking the builds.
+
+It seems that the issue is that <netinet/in.h> which contains the UAPI
+suppression defines is included in the internal.h header and not in the
+proto.h which actually includes the kernel ICMP headers and thus UAPI
+supression defines are not present.
+
+Solve this by moving the <netinet/in.h> include before the ICMP kernel
+includes in the proto.h
+
+Fixes: bc1cb4b11403 ("conntrack: Move icmp request>reply type mapping to common file")
+Signed-off-by: Robert Marko <robimarko@gmail.com>
+Signed-off-by: Florian Westphal <fw@strlen.de>
+---
+ include/internal/internal.h | 1 -
+ include/internal/proto.h | 1 +
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/internal/internal.h
++++ b/include/internal/internal.h
+@@ -14,7 +14,6 @@
+ #include <arpa/inet.h>
+ #include <time.h>
+ #include <errno.h>
+-#include <netinet/in.h>
+
+ #include <libnfnetlink/libnfnetlink.h>
+ #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
+--- a/include/internal/proto.h
++++ b/include/internal/proto.h
+@@ -2,6 +2,7 @@
+ #define _NFCT_PROTO_H_
+
+ #include <stdint.h>
++#include <netinet/in.h>
+ #include <linux/icmp.h>
+ #include <linux/icmpv6.h>
+
diff --git a/package/libs/libnfnetlink/Makefile b/package/libs/libnfnetlink/Makefile
index bc64ff111d1..be1eba6517d 100644
--- a/package/libs/libnfnetlink/Makefile
+++ b/package/libs/libnfnetlink/Makefile
@@ -8,16 +8,17 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libnfnetlink
-PKG_VERSION:=1.0.1
-PKG_RELEASE:=4
+PKG_VERSION:=1.0.2
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
http://www.netfilter.org/projects/libnfnetlink/files/ \
ftp://ftp.netfilter.org/pub/libnfnetlink/
-PKG_HASH:=f270e19de9127642d2a11589ef2ec97ef90a649a74f56cf9a96306b04817b51a
+PKG_HASH:=b064c7c3d426efb4786e60a8e6859b82ee2f2c5e49ffeea640cfe4fe33cbc376
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=GPL-2.0+
+PKG_CPE_ID:=cpe:/a:netfilter:libnfnetlink
PKG_FIXUP:=autoreconf
diff --git a/package/libs/libnfnetlink/patches/100-missing_include.patch b/package/libs/libnfnetlink/patches/100-missing_include.patch
deleted file mode 100644
index 163307d895e..00000000000
--- a/package/libs/libnfnetlink/patches/100-missing_include.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/include/libnfnetlink/libnfnetlink.h
-+++ b/include/libnfnetlink/libnfnetlink.h
-@@ -15,6 +15,7 @@
- #define aligned_u64 unsigned long long __attribute__((aligned(8)))
- #endif
-
-+#include <sys/types.h>
- #include <sys/socket.h> /* for sa_family_t */
- #include <linux/netlink.h>
- #include <libnfnetlink/linux_nfnetlink.h>
---- a/include/libnfnetlink/linux_nfnetlink.h
-+++ b/include/libnfnetlink/linux_nfnetlink.h
-@@ -1,6 +1,6 @@
- #ifndef _NFNETLINK_H
- #define _NFNETLINK_H
--#include <linux/types.h>
-+#include <sys/types.h>
- #include <libnfnetlink/linux_nfnetlink_compat.h>
-
- enum nfnetlink_groups {
diff --git a/package/libs/libnftnl/Makefile b/package/libs/libnftnl/Makefile
index 198e01ba222..b512d4d58fe 100644
--- a/package/libs/libnftnl/Makefile
+++ b/package/libs/libnftnl/Makefile
@@ -8,12 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libnftnl
-PKG_VERSION:=1.1.8
+PKG_CPE_ID:=cpe:/a:netfilter:libnftnl
+PKG_VERSION:=1.2.6
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
-PKG_HASH:=04a3fa5b08b736268f7e65836b9f05d9d5f438181467bee3c76c3c4a4f3ab711
+PKG_HASH:=ceeaea2cd92147da19f13a35a7f1a4bc2767ff897e838e4b479cf54b59c777f4
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
PKG_LICENSE:=GPL-2.0-or-later
@@ -21,6 +22,7 @@ PKG_LICENSE_FILES:=COPYING
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
+PKG_BUILD_FLAGS:=lto
include $(INCLUDE_DIR)/package.mk
@@ -40,8 +42,7 @@ define Package/libnftnl/description
programming interface (API) to the in-kernel nf_tables subsystem.
endef
-TARGET_CFLAGS += $(FPIC) -flto
-TARGET_LDFLAGS += -flto
+TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-static \
diff --git a/package/libs/libnl-tiny/Makefile b/package/libs/libnl-tiny/Makefile
index bdb496c48e6..a0c6efe517e 100644
--- a/package/libs/libnl-tiny/Makefile
+++ b/package/libs/libnl-tiny/Makefile
@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libnl-tiny
-PKG_RELEASE:=2
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libnl-tiny.git
-PKG_SOURCE_DATE:=2020-08-05
-PKG_SOURCE_VERSION:=c291088f631d1694f7ba0444b59677b194348da8
-PKG_MIRROR_HASH:=99bcce12701bb34dadb39689d95c2c5cf1e27719d0ecfd645d3957a8947025ac
+PKG_SOURCE_DATE:=2023-12-05
+PKG_SOURCE_VERSION:=965c4bf49658342ced0bd6e7cb069571b4a1ddff
+PKG_MIRROR_HASH:=93596c2686926a470b6bf322f6c166a420a08abe1ea715b4ae8c9df3de00eb28
CMAKE_INSTALL:=1
PKG_LICENSE:=LGPL-2.1
@@ -37,13 +37,13 @@ endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(1)/usr/include/libnl-tiny
$(CP) $(PKG_INSTALL_DIR)/usr/include/libnl-tiny/* $(1)/usr/include/libnl-tiny
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libnl-tiny.so $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-tiny.so* $(1)/usr/lib/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libnl-tiny.pc $(1)/usr/lib/pkgconfig
endef
define Package/libnl-tiny/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libnl-tiny.so $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-tiny.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libnl-tiny))
diff --git a/package/libs/libnl/Makefile b/package/libs/libnl/Makefile
index db0c65c7a73..93817e5f404 100644
--- a/package/libs/libnl/Makefile
+++ b/package/libs/libnl/Makefile
@@ -1,24 +1,27 @@
+# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2006-2013 OpenWrt.org
#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
include $(TOPDIR)/rules.mk
PKG_NAME:=libnl
-PKG_VERSION:=3.5.0
+PKG_VERSION:=3.9.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/thom311/libnl/releases/download/libnl$(subst .,_,$(PKG_VERSION))
-PKG_HASH:=352133ec9545da76f77e70ccb48c9d7e5324d67f6474744647a7ed382b5e05fa
+PKG_HASH:=aed507004d728a5cf11eab48ca4bf9e6e1874444e33939b9d3dfed25018ee9bb
+
PKG_LICENSE:=LGPL-2.1
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libnl_project:libnl
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
+PKG_BUILD_FLAGS:=gc-sections
+
include $(INCLUDE_DIR)/package.mk
define Package/libnl/default
@@ -52,10 +55,16 @@ $(call Package/libnl/default)
DEPENDS:=+libnl-route
endef
+define Package/libnl-cli
+$(call Package/libnl/default)
+ TITLE:=CLI Netlink Library
+ DEPENDS:=+libnl-genl +libnl-nf
+endef
+
define Package/libnl
$(call Package/libnl/default)
TITLE:=Full Netlink Library
- DEPENDS:=+libnl-genl +libnl-route +libnl-nf
+ DEPENDS:=+libnl-genl +libnl-route +libnl-nf +libnl-cli
endef
define Package/libnl-core/description
@@ -74,12 +83,16 @@ define Package/libnl-nf/description
Netfilter Netlink Library Functions
endef
+define Package/libnl-cli/description
+ CLI Netlink Library Functions
+endef
+
define Package/libnl/description
Socket handling, connection management, sending and receiving of data,
message construction and parsing, object caching system, etc.
endef
-TARGET_CFLAGS += -ffunction-sections -fdata-sections $(FPIC)
+TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--disable-debug
@@ -95,6 +108,7 @@ define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so $(1)/usr/lib/libnl-genl.so
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so $(1)/usr/lib/libnl-nf.so
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so $(1)/usr/lib/libnl-route.so
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-cli-3.so $(1)/usr/lib/libnl-cli.so
endef
define Package/libnl-core/install
@@ -117,6 +131,11 @@ define Package/libnl-nf/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so.* $(1)/usr/lib/
endef
+define Package/libnl-cli/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-cli-3.so.* $(1)/usr/lib/
+endef
+
define Package/libnl/install
:
endef
@@ -125,4 +144,5 @@ $(eval $(call BuildPackage,libnl-core))
$(eval $(call BuildPackage,libnl-genl))
$(eval $(call BuildPackage,libnl-route))
$(eval $(call BuildPackage,libnl-nf))
+$(eval $(call BuildPackage,libnl-cli))
$(eval $(call BuildPackage,libnl))
diff --git a/package/libs/libnl/patches/100-build-add-Libs.private-field-in-libnl-pkg-config-file.patch b/package/libs/libnl/patches/100-build-add-Libs.private-field-in-libnl-pkg-config-file.patch
deleted file mode 100644
index cec720b8e84..00000000000
--- a/package/libs/libnl/patches/100-build-add-Libs.private-field-in-libnl-pkg-config-file.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From db0d59cd06f3ffd350379847c0885e1bfb85af0f Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Sat, 7 Mar 2015 11:34:42 +0100
-Subject: [PATCH 2/2] build: add Libs.private field in libnl pkg-config file
-
-In order to support static linking, the libnl pkg-config file should
-indicate in its Libs.private field the libraries that libnl-3.0.a
-requires. The LIBS variable contains the appropriate list of
-libraries: -lm in all cases, and -lpthread when pthread support is
-enabled. This allows to statically link applications against libnl
-properly.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- libnl-3.0.pc.in | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/libnl-3.0.pc.in
-+++ b/libnl-3.0.pc.in
-@@ -7,4 +7,5 @@ Name: libnl
- Description: Convenience library for netlink sockets
- Version: @PACKAGE_VERSION@
- Libs: -L${libdir} -lnl-@MAJ_VERSION@
-+Libs.private: @LIBS@
- Cflags: -I${includedir}/libnl@MAJ_VERSION@
diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile
index 8c082590554..d7358e32d03 100644
--- a/package/libs/libpcap/Makefile
+++ b/package/libs/libpcap/Makefile
@@ -8,20 +8,22 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libpcap
-PKG_VERSION:=1.10.0
+PKG_VERSION:=1.10.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
- http://www.tcpdump.org/release/
-PKG_HASH:=8d12b42623eeefee872f123bd0dc85d535b00df4d42e865f993c40f7bfc92b1e
+PKG_SOURCE_URL:=https://www.tcpdump.org/release/
+PKG_HASH:=ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:tcpdump:libpcap
PKG_ASLR_PIE_REGULAR:=1
+PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_rpcapd
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
@@ -43,6 +45,19 @@ define Package/libpcap/config
source "$(SOURCE)/Config.in"
endef
+define Package/rpcapd
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Capture daemon to be controlled by a remote libpcap application
+ URL:=http://www.tcpdump.org/
+ DEPENDS+= +libpcap
+endef
+
+ifdef CONFIG_PACKAGE_rpcapd
+ CMAKE_OPTIONS += \
+ -DENABLE_REMOTE=ON
+endif
+
CMAKE_OPTIONS += \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_WITH_LIBNL=OFF \
@@ -81,4 +96,10 @@ define Package/libpcap/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
endef
+define Package/rpcapd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rpcapd $(1)/usr/sbin/
+endef
+
$(eval $(call BuildPackage,libpcap))
+$(eval $(call BuildPackage,rpcapd))
diff --git a/package/libs/libpcap/patches/100-no-openssl.patch b/package/libs/libpcap/patches/100-no-openssl.patch
index 6424cf8c6fe..434f1ce006a 100644
--- a/package/libs/libpcap/patches/100-no-openssl.patch
+++ b/package/libs/libpcap/patches/100-no-openssl.patch
@@ -1,6 +1,6 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1006,7 +1006,6 @@ endif()
+@@ -1325,7 +1325,6 @@ endif()
#
# OpenSSL/libressl.
#
diff --git a/package/libs/libpcap/patches/102-skip-manpages.patch b/package/libs/libpcap/patches/102-skip-manpages.patch
index 57b780c1fee..43d393ac5f6 100644
--- a/package/libs/libpcap/patches/102-skip-manpages.patch
+++ b/package/libs/libpcap/patches/102-skip-manpages.patch
@@ -9,7 +9,7 @@ Subject: [PATCH] skip manpages
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -2701,57 +2701,6 @@ if(NOT MSVC)
+@@ -3325,57 +3325,6 @@ if(NOT MSVC)
if(MINGW)
find_program(LINK_EXECUTABLE ln)
endif(MINGW)
diff --git a/package/libs/libpcap/patches/201-space_optimization.patch b/package/libs/libpcap/patches/201-space_optimization.patch
deleted file mode 100644
index bf9374dd542..00000000000
--- a/package/libs/libpcap/patches/201-space_optimization.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/pcap-common.c
-+++ b/pcap-common.c
-@@ -1662,14 +1662,23 @@ swap_pseudo_headers(int linktype, struct
- break;
-
- case DLT_USB_LINUX:
-+#ifndef PCAP_SUPPORT_USB
-+ return;
-+#endif
- swap_linux_usb_header(hdr, data, 0);
- break;
-
- case DLT_USB_LINUX_MMAPPED:
-+#ifndef PCAP_SUPPORT_USB
-+ return;
-+#endif
- swap_linux_usb_header(hdr, data, 1);
- break;
-
- case DLT_NFLOG:
-+#ifndef PCAP_SUPPORT_NETFILTER
-+ return;
-+#endif
- swap_nflog_header(hdr, data);
- break;
- }
diff --git a/package/libs/libpcap/patches/300-Add-support-for-B.A.T.M.A.N.-Advanced.patch b/package/libs/libpcap/patches/300-Add-support-for-B.A.T.M.A.N.-Advanced.patch
new file mode 100644
index 00000000000..b3ff25286d7
--- /dev/null
+++ b/package/libs/libpcap/patches/300-Add-support-for-B.A.T.M.A.N.-Advanced.patch
@@ -0,0 +1,642 @@
+From 3d8d268320d2381021a409ff8d03533698dd6242 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@c0d3.blue>
+Date: Mon, 23 Nov 2020 00:38:22 +0100
+Subject: [PATCH] Add support for B.A.T.M.A.N. Advanced
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This adds support for the layer 2 mesh routing protocol
+B.A.T.M.A.N. Advanced. "batadv" can be used to filter on batman-adv
+packets. It also allows later filters to look at frames inside the
+tunnel when both "version" and "type" are specified.
+
+Documentation for the batman-adv protocol can be found at the following
+locations:
+
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/batman-adv.rst
+https://www.open-mesh.org/
+
+Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
+---
+ Makefile.in | 2 +
+ batadv_legacy_packet.h | 77 +++++++++++++++++++
+ batadv_packet.h | 78 ++++++++++++++++++++
+ ethertype.h | 3 +
+ gencode.c | 164 +++++++++++++++++++++++++++++++++++++++++
+ gencode.h | 3 +
+ grammar.y.in | 32 +++++++-
+ nametoaddr.c | 59 +++++++++++++++
+ pcap-filter.manmisc.in | 35 ++++++++-
+ pcap/namedb.h | 2 +
+ scanner.l | 1 +
+ 11 files changed, 453 insertions(+), 3 deletions(-)
+ create mode 100644 batadv_legacy_packet.h
+ create mode 100644 batadv_packet.h
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -133,6 +133,8 @@ PUBHDR = \
+ HDR = $(PUBHDR) \
+ arcnet.h \
+ atmuni31.h \
++ batadv_legacy_packet.h \
++ batadv_packet.h \
+ diag-control.h \
+ ethertype.h \
+ extract.h \
+--- /dev/null
++++ b/batadv_legacy_packet.h
+@@ -0,0 +1,77 @@
++/* SPDX-License-Identifier: BSD-3 */
++/* Copyright (C) 2020 Linus Lüssing */
++
++#ifndef _BATADV_LEGACY_PACKET_H_
++#define _BATADV_LEGACY_PACKET_H_
++
++enum batadv_legacy_packettype {
++ BATADV_LEGACY_IV_OGM = 0x01,
++ BATADV_LEGACY_ICMP = 0x02,
++ BATADV_LEGACY_UNICAST = 0x03,
++ BATADV_LEGACY_BCAST = 0x04,
++ BATADV_LEGACY_VIS = 0x05,
++ BATADV_LEGACY_UNICAST_FRAG = 0x06,
++ BATADV_LEGACY_TT_QUERY = 0x07,
++ BATADV_LEGACY_ROAM_ADV = 0x08,
++ BATADV_LEGACY_UNICAST_4ADDR = 0x09,
++ BATADV_LEGACY_CODED = 0x0a,
++};
++
++#define ETH_ALEN 6
++
++struct batadv_legacy_unicast_packet {
++ uint8_t packet_type;
++ uint8_t version;
++ uint8_t ttl;
++ uint8_t ttvn;
++ uint8_t dest[ETH_ALEN];
++};
++
++struct batadv_legacy_unicast_4addr_packet {
++ uint8_t packet_type;
++ uint8_t version;
++ uint8_t ttl;
++ uint8_t src[ETH_ALEN];
++ uint8_t subtype;
++ uint8_t reserved;
++};
++
++struct batadv_legacy_unicast_frag_packet {
++ uint8_t packet_type;
++ uint8_t version;
++ uint8_t ttl;
++ uint8_t ttvn;
++ uint8_t dest[ETH_ALEN];
++ uint8_t flags;
++ uint8_t align;
++ uint8_t orig[ETH_ALEN];
++ uint8_t seqno[2]; /* 2-byte integral value */
++};
++
++struct batadv_legacy_bcast_packet {
++ uint8_t packet_type;
++ uint8_t version;
++ uint8_t ttl;
++ uint8_t reserved;
++ uint8_t seqno[4]; /* 4-byte integral value */
++ uint8_t orig[ETH_ALEN];
++};
++
++struct batadv_legacy_coded_packet {
++ uint8_t packet_type;
++ uint8_t version;
++ uint8_t ttl;
++ uint8_t first_ttvn;
++ uint8_t first_source[ETH_ALEN];
++ uint8_t first_orig_dest[ETH_ALEN];
++ uint8_t first_crc[4]; /* 4-byte integral value */
++ uint8_t second_ttl;
++ uint8_t second_ttvn;
++ uint8_t second_dest[ETH_ALEN];
++ uint8_t second_source[ETH_ALEN];
++ uint8_t second_orig_dest[ETH_ALEN];
++ uint8_t second_crc[4]; /* 4-byte integral value */
++ uint8_t coded_len[2]; /* 2-byte integral value */
++};
++
++#endif /* _BATADV_LEGACY_PACKET_H_ */
+--- /dev/null
++++ b/batadv_packet.h
+@@ -0,0 +1,78 @@
++/* SPDX-License-Identifier: BSD-3 */
++/* Copyright (C) 2020 Linus Lüssing */
++
++#ifndef _BATADV_PACKET_H_
++#define _BATADV_PACKET_H_
++
++/* For the definitive and most recent packet format definition,
++ * see the batadv_packet.h in the Linux kernel.
++ */
++
++enum batadv_packettype {
++ BATADV_IV_OGM = 0x00,
++ BATADV_BCAST = 0x01,
++ BATADV_CODED = 0x02,
++ BATADV_ELP = 0x03,
++ BATADV_OGM2 = 0x04,
++ BATADV_UNICAST = 0x40,
++ BATADV_UNICAST_FRAG = 0x41,
++ BATADV_UNICAST_4ADDR = 0x42,
++ BATADV_ICMP = 0x43,
++ BATADV_UNICAST_TVLV = 0x44,
++};
++
++#define ETH_ALEN 6
++
++struct batadv_unicast_packet {
++ uint8_t packet_type;
++ uint8_t version;
++ uint8_t ttl;
++ uint8_t ttvn;
++ uint8_t dest[ETH_ALEN];
++};
++
++struct batadv_unicast_4addr_packet {
++ struct batadv_unicast_packet u;
++ uint8_t src[ETH_ALEN];
++ uint8_t subtype;
++ uint8_t reserved;
++};
++
++struct batadv_frag_packet {
++ uint8_t packet_type;
++ uint8_t version;
++ uint8_t ttl;
++ uint8_t num_pri; /* number and priority */
++ uint8_t dest[ETH_ALEN];
++ uint8_t orig[ETH_ALEN];
++ uint8_t seqno[2]; /* 2-byte integral value */
++ uint8_t total_size[2]; /* 2-byte integral value */
++};
++
++struct batadv_bcast_packet {
++ uint8_t packet_type;
++ uint8_t version;
++ uint8_t ttl;
++ uint8_t reserved;
++ uint8_t seqno[4]; /* 4-byte integral value */
++ uint8_t orig[ETH_ALEN];
++};
++
++struct batadv_coded_packet {
++ uint8_t packet_type;
++ uint8_t version;
++ uint8_t ttl;
++ uint8_t first_ttvn;
++ uint8_t first_source[ETH_ALEN];
++ uint8_t first_orig_dest[ETH_ALEN];
++ uint8_t first_crc[4]; /* 4-byte integral value */
++ uint8_t second_ttl;
++ uint8_t second_ttvn;
++ uint8_t second_dest[ETH_ALEN];
++ uint8_t second_source[ETH_ALEN];
++ uint8_t second_orig_dest[ETH_ALEN];
++ uint8_t second_crc[4]; /* 4-byte integral value */
++ uint8_t coded_len[2]; /* 2-byte integral value */
++};
++
++#endif /* _BATADV_PACKET_H_ */
+--- a/ethertype.h
++++ b/ethertype.h
+@@ -49,6 +49,9 @@
+ #ifndef ETHERTYPE_TRAIL
+ #define ETHERTYPE_TRAIL 0x1000
+ #endif
++#ifndef ETHERTYPE_BATMAN
++#define ETHERTYPE_BATMAN 0x4305 /* B.A.T.M.A.N. Advanced */
++#endif
+ #ifndef ETHERTYPE_MOPDL
+ #define ETHERTYPE_MOPDL 0x6001
+ #endif
+--- a/gencode.c
++++ b/gencode.c
+@@ -60,6 +60,8 @@
+ #include "sunatmpos.h"
+ #include "pflog.h"
+ #include "ppp.h"
++#include "batadv_packet.h"
++#include "batadv_legacy_packet.h"
+ #include "pcap/sll.h"
+ #include "pcap/ipnet.h"
+ #include "arcnet.h"
+@@ -9436,6 +9438,168 @@ gen_geneve(compiler_state_t *cstate, bpf
+ return b1;
+ }
+
++static struct block *
++gen_batadv_check_version(compiler_state_t *cstate, struct block *b0, bpf_u_int32 version)
++{
++ struct block *b1;
++
++ if (version > UINT8_MAX)
++ bpf_error(cstate,
++ "batman-adv compatibility version number %u unsupported",
++ version);
++
++ b1 = gen_cmp(cstate, OR_LINKPL, 1, BPF_B, version);
++ gen_and(b0, b1);
++
++ return b1;
++}
++
++static struct block *
++gen_batadv_check_type(compiler_state_t *cstate, struct block *b0,
++ bpf_u_int32 version, bpf_u_int32 type)
++{
++ struct block *b1;
++
++ switch (version) {
++ case 14:
++ case 15:
++ if (type > UINT8_MAX)
++ bpf_error(cstate,
++ "batman-adv packet type %u unsupported for compatibility version %u",
++ type, version);
++
++ b1 = gen_cmp(cstate, OR_LINKPL, 0, BPF_B, type);
++ gen_and(b0, b1);
++ b0 = b1;
++
++ break;
++ default:
++ bpf_error(cstate,
++ "batman-adv compatibility version number %u unsupported",
++ version);
++ }
++
++ return b0;
++}
++
++
++static void gen_batadv_push_offset(compiler_state_t *cstate, u_int offset)
++{
++ PUSH_LINKHDR(cstate, DLT_EN10MB, cstate->off_linkpl.is_variable,
++ cstate->off_linkpl.constant_part + cstate->off_nl + offset,
++ cstate->off_linkpl.reg);
++
++ cstate->off_linktype.constant_part += cstate->off_linkhdr.constant_part;
++ cstate->off_linkpl.constant_part += cstate->off_linkhdr.constant_part;
++
++ cstate->off_nl = 0;
++ cstate->off_nl_nosnap = 0; /* no 802.2 LLC */
++}
++
++static void
++gen_batadv_offsets_v14(compiler_state_t *cstate, bpf_u_int32 type)
++{
++ size_t offset;
++
++ switch (type) {
++ case BATADV_LEGACY_UNICAST: /* 0x03 */
++ offset = sizeof(struct batadv_legacy_unicast_packet);
++ break;
++ case BATADV_LEGACY_BCAST: /* 0x04 */
++ offset = sizeof(struct batadv_legacy_bcast_packet);
++ break;
++ case BATADV_LEGACY_UNICAST_FRAG: /* 0x06 */
++ offset = sizeof(struct batadv_legacy_unicast_frag_packet);
++ break;
++ case BATADV_LEGACY_UNICAST_4ADDR: /* 0x09 */
++ offset = sizeof(struct batadv_legacy_unicast_4addr_packet);
++ break;
++ case BATADV_LEGACY_CODED: /* 0x0a */
++ offset = sizeof(struct batadv_legacy_coded_packet);
++ break;
++ default:
++ offset = 0;
++ }
++
++ if (offset)
++ gen_batadv_push_offset(cstate, (u_int)offset);
++}
++
++static void
++gen_batadv_offsets_v15(compiler_state_t *cstate, bpf_u_int32 type)
++{
++ size_t offset;
++
++ switch (type) {
++ case BATADV_BCAST: /* 0x01 */
++ offset = sizeof(struct batadv_bcast_packet);
++ break;
++ case BATADV_CODED: /* 0x02 */
++ offset = sizeof(struct batadv_coded_packet);
++ break;
++ case BATADV_UNICAST: /* 0x40 */
++ offset = sizeof(struct batadv_unicast_packet);
++ break;
++ case BATADV_UNICAST_FRAG: /* 0x41 */
++ offset = sizeof(struct batadv_frag_packet);
++ break;
++ case BATADV_UNICAST_4ADDR: /* 0x42 */
++ offset = sizeof(struct batadv_unicast_4addr_packet);
++ break;
++ case BATADV_UNICAST_TVLV:
++ /* unsupported for now, needs variable offset to
++ * take tvlv_len into account
++ */
++ /* fall through */
++ default:
++ offset = 0;
++ }
++
++ if (offset)
++ gen_batadv_push_offset(cstate, (u_int)offset);
++}
++
++static void
++gen_batadv_offsets(compiler_state_t *cstate, bpf_u_int32 version, bpf_u_int32 type)
++{
++ switch (version) {
++ case 14:
++ gen_batadv_offsets_v14(cstate, type);
++ break;
++ case 15:
++ gen_batadv_offsets_v15(cstate, type);
++ break;
++ default:
++ break;
++ }
++}
++
++struct block *
++gen_batadv(compiler_state_t *cstate, bpf_u_int32 version, int has_version,
++ bpf_u_int32 type, int has_type)
++{
++ struct block *b0;
++
++ /*
++ * Catch errors reported by us and routines below us, and return NULL
++ * on an error.
++ */
++ if (setjmp(cstate->top_ctx))
++ return (NULL);
++
++ b0 = gen_linktype(cstate, ETHERTYPE_BATMAN);
++
++ if (has_version)
++ b0 = gen_batadv_check_version(cstate, b0, version);
++
++ if (has_type) {
++ b0 = gen_batadv_check_type(cstate, b0, version, type);
++ gen_batadv_offsets(cstate, version, type);
++ }
++
++ return b0;
++}
++
+ /* Check that the encapsulated frame has a link layer header
+ * for Ethernet filters. */
+ static struct block *
+--- a/gencode.h
++++ b/gencode.h
+@@ -358,6 +358,9 @@ struct block *gen_pppoes(compiler_state_
+
+ struct block *gen_geneve(compiler_state_t *, bpf_u_int32, int);
+
++struct block *gen_batadv(compiler_state_t *, bpf_u_int32, int,
++ bpf_u_int32, int);
++
+ struct block *gen_atmfield_code(compiler_state_t *, int, bpf_u_int32,
+ int, int);
+ struct block *gen_atmtype_abbrev(compiler_state_t *, int);
+--- a/grammar.y.in
++++ b/grammar.y.in
+@@ -375,6 +375,7 @@ DIAG_OFF_BISON_BYACC
+ %type <i> mtp2type
+ %type <blk> mtp3field
+ %type <blk> mtp3fieldvalue mtp3value mtp3listvalue
++%type <rblk> pbatadv
+
+
+ %token DST SRC HOST GATEWAY
+@@ -393,7 +394,7 @@ DIAG_OFF_BISON_BYACC
+ %token LEN
+ %token IPV6 ICMPV6 AH ESP
+ %token VLAN MPLS
+-%token PPPOED PPPOES GENEVE
++%token PPPOED PPPOES GENEVE BATADV
+ %token ISO ESIS CLNP ISIS L1 L2 IIH LSP SNP CSNP PSNP
+ %token STP
+ %token IPX
+@@ -620,11 +621,40 @@ other: pqual TK_BROADCAST { CHECK_PTR_
+ | PPPOES { CHECK_PTR_VAL(($$ = gen_pppoes(cstate, 0, 0))); }
+ | GENEVE pnum { CHECK_PTR_VAL(($$ = gen_geneve(cstate, $2, 1))); }
+ | GENEVE { CHECK_PTR_VAL(($$ = gen_geneve(cstate, 0, 0))); }
++ | BATADV pbatadv { $$ = $2; }
+ | pfvar { $$ = $1; }
+ | pqual p80211 { $$ = $2; }
+ | pllc { $$ = $1; }
+ ;
+
++pbatadv: { CHECK_PTR_VAL(($$ = gen_batadv(cstate, 0, 0, 0, 0))); }
++ | pnum { CHECK_PTR_VAL(($$ = gen_batadv(cstate, $1, 1, 0, 0))); }
++ | pnum pnum { CHECK_PTR_VAL(($$ = gen_batadv(cstate, $1, 1, $2, 1))); }
++ | pnum ID
++ {
++ int type;
++
++ switch ($1) {
++ case 14:
++ type = pcap_nametobatadvtype_v14($2);
++ break;
++ case 15:
++ type = pcap_nametobatadvtype_v15($2);
++ break;
++ default:
++ bpf_set_error(cstate, "batman-adv compatibility version number %u unsupported", $1);
++ YYABORT;
++ }
++
++ if (type == PROTO_UNDEF) {
++ bpf_set_error(cstate, "invalid batman-adv packet type value \"%s\"", $2);
++ YYABORT;
++ }
++
++ CHECK_PTR_VAL(($$ = gen_batadv(cstate, $1, 1, type, 1)));
++ }
++ ;
++
+ pfvar: PF_IFNAME ID { CHECK_PTR_VAL($2); CHECK_PTR_VAL(($$ = gen_pf_ifname(cstate, $2))); }
+ | PF_RSET ID { CHECK_PTR_VAL($2); CHECK_PTR_VAL(($$ = gen_pf_ruleset(cstate, $2))); }
+ | PF_RNR NUM { CHECK_PTR_VAL(($$ = gen_pf_rnr(cstate, $2))); }
+--- a/nametoaddr.c
++++ b/nametoaddr.c
+@@ -136,8 +136,12 @@
+
+ #include "diag-control.h"
+
++#include "batadv_packet.h"
++#include "batadv_legacy_packet.h"
++
+ #include "gencode.h"
+ #include <pcap/namedb.h>
++
+ #include "nametoaddr.h"
+
+ #ifdef HAVE_OS_PROTO_H
+@@ -604,6 +608,7 @@ PCAP_API_DEF struct eproto eproto_db[] =
+ { "moprc", ETHERTYPE_MOPRC },
+ { "rarp", ETHERTYPE_REVARP },
+ { "sca", ETHERTYPE_SCA },
++ { "batadv", ETHERTYPE_BATMAN },
+ { (char *)0, 0 }
+ };
+
+@@ -638,6 +643,60 @@ pcap_nametollc(const char *s)
+
+ while (p->s != 0) {
+ if (strcmp(p->s, s) == 0)
++ return p->p;
++ p += 1;
++ }
++ return PROTO_UNDEF;
++}
++
++/* Static data base of batman-adv v14 packet type values. */
++static struct eproto batadv_type_db_v14[] = {
++ { "iv_ogm", BATADV_LEGACY_IV_OGM },
++ { "icmp", BATADV_LEGACY_ICMP },
++ { "unicast", BATADV_LEGACY_UNICAST },
++ { "bcast", BATADV_LEGACY_BCAST },
++ { "vis", BATADV_LEGACY_VIS },
++ { "unicast_frag", BATADV_LEGACY_UNICAST_FRAG },
++ { "tt_query", BATADV_LEGACY_TT_QUERY },
++ { "roam_adv", BATADV_LEGACY_ROAM_ADV },
++ { "unicast_4addr", BATADV_LEGACY_UNICAST_4ADDR },
++ { "coded", BATADV_LEGACY_CODED },
++ { (char *)0, 0 }
++};
++
++int pcap_nametobatadvtype_v14(const char *s)
++{
++ struct eproto *p = batadv_type_db_v14;
++
++ while (p->s != 0) {
++ if (strcmp(p->s, s) == 0)
++ return p->p;
++ p += 1;
++ }
++ return PROTO_UNDEF;
++}
++
++/* Static data base of batman-adv v15 packet type values. */
++static struct eproto batadv_type_db_v15[] = {
++ { "iv_ogm", BATADV_IV_OGM },
++ { "bcast", BATADV_BCAST },
++ { "coded", BATADV_CODED },
++ { "elp", BATADV_ELP },
++ { "ogm2", BATADV_OGM2 },
++ { "unicast", BATADV_UNICAST },
++ { "unicast_frag", BATADV_UNICAST_FRAG },
++ { "unicast_4addr", BATADV_UNICAST_4ADDR },
++ { "icmp", BATADV_ICMP },
++ { "unicast_tvlv", BATADV_UNICAST_TVLV },
++ { (char *)0, 0 }
++};
++
++int pcap_nametobatadvtype_v15(const char *s)
++{
++ struct eproto *p = batadv_type_db_v15;
++
++ while (p->s != 0) {
++ if (strcmp(p->s, s) == 0)
+ return p->p;
+ p += 1;
+ }
+--- a/pcap-filter.manmisc.in
++++ b/pcap-filter.manmisc.in
+@@ -98,6 +98,7 @@ protocols are:
+ .BR arp ,
+ .BR rarp ,
+ .BR decnet ,
++.BR batadv ,
+ .BR sctp ,
+ .B tcp
+ and
+@@ -400,7 +401,7 @@ True if the packet is an IPv6 multicast
+ .IP "\fBether proto \fIprotocol\fR"
+ True if the packet is of ether type \fIprotocol\fR.
+ \fIProtocol\fP can be a number or one of the names
+-\fBaarp\fP, \fBarp\fP, \fBatalk\fP, \fBdecnet\fP, \fBip\fP, \fBip6\fP,
++\fBaarp\fP, \fBarp\fP, \fBatalk\fP, \fBbatadv\fP, \fBdecnet\fP, \fBip\fP, \fBip6\fP,
+ \fBipx\fP, \fBiso\fP, \fBlat\fP, \fBloopback\fP, \fBmopdl\fP, \fBmoprc\fP, \fBnetbeui\fP,
+ \fBrarp\fP, \fBsca\fP or \fBstp\fP.
+ Note these identifiers (except \fBloopback\fP) are also keywords
+@@ -454,7 +455,7 @@ the filter checks for the IPX etype in a
+ DSAP in the LLC header, the 802.3-with-no-LLC-header encapsulation of
+ IPX, and the IPX etype in a SNAP frame.
+ .RE
+-.IP "\fBip\fR, \fBip6\fR, \fBarp\fR, \fBrarp\fR, \fBatalk\fR, \fBaarp\fR, \fBdecnet\fR, \fBiso\fR, \fBstp\fR, \fBipx\fR, \fBnetbeui\fP"
++.IP "\fBip\fR, \fBip6\fR, \fBarp\fR, \fBrarp\fR, \fBatalk\fR, \fBaarp\fR, \fBdecnet\fR, \fBiso\fR, \fBstp\fR, \fBipx\fR, \fBnetbeui\fP, \fBbatadv\fP"
+ Abbreviations for:
+ .in +.5i
+ .nf
+@@ -792,6 +793,36 @@ For example:
+ filters IPv4 protocol encapsulated in Geneve with VNI 0xb. This will
+ match both IPv4 directly encapsulated in Geneve as well as IPv4 contained
+ inside an Ethernet frame.
++.IP "\fBbatadv \fI[version] \fI[type]\fR"
++True if the packet is a B.A.T.M.A.N. Advanced packet (Ethernet type 0x4305).
++If the optional \fIversion\fR is specified, only true if the packet has the
++specified batman-adv compatibility \fIversion\fR. If the optional \fIversion\fR
++and \fItype\fR are specified, only true if the packet has both the specified
++batman-adv compatibility \fIversion\fR and batman-adv packet \fItype\fR.
++.IP
++\fIversion\fR may be a number from 0 to 255, though only compatibility version
++14 and 15 were actually deployed in the wild. Version 15 is the current version,
++14 is considered deprecated.
++.IP
++\fItype\fR is currently only defined for compatibility \fIversion\fR 14 and 15.
++\fItype\fR may be a number from 0 to 255 for compatibility \fIversion\fR 14 and 15.
++.IP
++The following packet \fItype\fR aliases are available for compat \fIversion\fR 14:
++\fBiv_ogm\fP, \fBicmp\fP, \fBunicast\fP, \fBbcast\fP, \fBvis\fP, \fBunicast-frag\fP,
++\fBtt_query\fP, \fBroam_adv\fP, \fBunicast_4addr\fP, \fPcoded\fP.
++.IP
++The following packet \fItype\fR aliases are available for compat \fIversion\fR 15:
++\fBiv_ogm\fP, \fBbcast\fP, \fBcoded\fP, \fBelp\fP, \fBogm2\fP, \fBunicast\fP,
++\fBunicast_frag\fP, \fBunicast_4addr\fP, \fBicmp\fP, \fPunicast_tvlv\fP.
++.IP
++Note that when the \fBbatadv\fR keyword is encountered in an expression and
++a batman-adv packet \fItype\fR is provided which specifies an encapsulating
++packet type then it changes the decoding offsets for the remainder of the
++expression on the assumption that the packet is a batman-adv packet. For compat
++\fIversion\fR 14 these are packet \fItype\fRs \fBunicast\fP, \fBbcast\fP,
++\fBunicast_frag\fP, \fBunicast_4addr\fP and \fBcoded\fP. For compat \fIversion\fR
++15 these are currently packet \fItype\fRs \fBbcast\fP, \fBcoded\fP, \fBunicast\fP,
++\fBunicast_frag\fP and \fBunicast_4addr\fP.
+ .IP "\fBiso proto \fIprotocol\fR"
+ True if the packet is an OSI packet of protocol type \fIprotocol\fP.
+ \fIProtocol\fP can be a number or one of the names
+--- a/pcap/namedb.h
++++ b/pcap/namedb.h
+@@ -70,6 +70,8 @@ PCAP_API int pcap_nametoportrange(const
+ PCAP_API int pcap_nametoproto(const char *);
+ PCAP_API int pcap_nametoeproto(const char *);
+ PCAP_API int pcap_nametollc(const char *);
++PCAP_API int pcap_nametobatadvtype_v14(const char *);
++PCAP_API int pcap_nametobatadvtype_v15(const char *);
+ /*
+ * If a protocol is unknown, PROTO_UNDEF is returned.
+ * Also, pcap_nametoport() returns the protocol along with the port number.
+--- a/scanner.l
++++ b/scanner.l
+@@ -347,6 +347,7 @@ mpls return MPLS;
+ pppoed return PPPOED;
+ pppoes return PPPOES;
+ geneve return GENEVE;
++batadv return BATADV;
+
+ lane return LANE;
+ llc return LLC;
diff --git a/package/libs/libselinux/Makefile b/package/libs/libselinux/Makefile
index 0c5f9bacebd..f90d4993c83 100644
--- a/package/libs/libselinux/Makefile
+++ b/package/libs/libselinux/Makefile
@@ -6,17 +6,21 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libselinux
-PKG_VERSION:=3.2
+PKG_VERSION:=3.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2
-PKG_HASH:=df758ef1d9d4811051dd901ea6b029ae334ffd7c671c128beb16bce1e25ac161
-HOST_BUILD_DEPENDS:=libsepol/host pcre/host
+PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
+PKG_HASH:=9a3a3705ac13a2ccca2de6d652b6356fead10f36fb33115c185c5ccdf29eec19
PKG_LICENSE:=libselinux-1.0
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+PKG_CPE_ID:=cpe:/a:selinuxproject:libselinux
+
+PKG_BUILD_FLAGS:=no-lto
+
+HOST_BUILD_DEPENDS:=libsepol/host musl-fts/host pcre2/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
@@ -69,7 +73,7 @@ define Package/libselinux
$(call Package/libselinux/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libsepol +libpcre +USE_MUSL:musl-fts
+ DEPENDS:=+libsepol +libpcre2 +USE_MUSL:musl-fts
endef
define Package/libselinux/description
@@ -101,16 +105,18 @@ endef
$(foreach a,$(LIBSELINUX_UTILS),$(eval $(call GenUtilPkg,libselinux-$(a),$(a))))
# Needed to link libselinux utilities, which link against
-# libselinux.so, which indirectly depends on libpcre.so, installed in
+# libselinux.so, which indirectly depends on libpcre2.so, installed in
# $(STAGING_DIR_HOSTPKG).
HOST_LDFLAGS += -Wl,-rpath="$(STAGING_DIR_HOSTPKG)/lib"
HOST_MAKE_FLAGS += \
PREFIX=$(STAGING_DIR_HOSTPKG) \
- SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib
+ SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib \
+ FTS_LDLIBS=-lfts
ifeq ($(CONFIG_USE_MUSL),y)
MAKE_FLAGS += FTS_LDLIBS=-lfts
+TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
endif
MAKE_FLAGS += \
diff --git a/package/libs/libsemanage/Makefile b/package/libs/libsemanage/Makefile
index 2fde14c06c5..37e433b34cc 100644
--- a/package/libs/libsemanage/Makefile
+++ b/package/libs/libsemanage/Makefile
@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libsemanage
-PKG_VERSION:=3.2
-PKG_RELEASE:=2
+PKG_VERSION:=3.5
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2
-PKG_HASH:=d722a55ca4fe2d4e2b30527720db657e6238b28079e69e2e4affeb8e733ee511
+PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
+PKG_HASH:=f53534e50247538280ed0d76c6ce81d8fb3939bd64cadb89da10dba42e40dd9c
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING
diff --git a/package/libs/libsepol/Makefile b/package/libs/libsepol/Makefile
index c7950a9ba08..b1a34d293e0 100644
--- a/package/libs/libsepol/Makefile
+++ b/package/libs/libsepol/Makefile
@@ -6,14 +6,17 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libsepol
-PKG_VERSION:=3.2
+PKG_VERSION:=3.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2
-PKG_HASH:=dfc7f662af8000116e56a01de6a0394ed79be1b34b999e551346233c5dd19508
+PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
+PKG_HASH:=78fdaf69924db780bac78546e43d9c44074bad798c2c415d0b9bb96d065ee8a2
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+PKG_CPE_ID:=cpe:/a:selinuxproject:libsepol
+
+PKG_BUILD_FLAGS:=no-lto
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
diff --git a/package/libs/libtool/Makefile b/package/libs/libtool/Makefile
index 4b54ac495d0..f897f98c163 100644
--- a/package/libs/libtool/Makefile
+++ b/package/libs/libtool/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libtool
-PKG_VERSION:=2.4.6
-PKG_RELEASE:=2
+PKG_VERSION:=2.4.7
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/libtool
-PKG_HASH:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f
+PKG_HASH:=4f7f217f057ce655ff22559ad221a0fd8ef84ad1fc5fcb6990cecc333aa1635d
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
diff --git a/package/libs/libtraceevent/Makefile b/package/libs/libtraceevent/Makefile
new file mode 100644
index 00000000000..54e8652192e
--- /dev/null
+++ b/package/libs/libtraceevent/Makefile
@@ -0,0 +1,74 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libtraceevent
+PKG_VERSION:=1.8.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/
+PKG_HASH:=919f0c024c7b5059eace52d854d4df00ae7e361a4033e1b4d6fe01d97064a1b9
+
+PKG_MAINTAINER:=Nick Hainke <vincent@systemli.org>
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libtraceevent
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Linux kernel trace event library
+ URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git
+ ABI_VERSION:=0
+endef
+
+define Package/libtraceevent/description
+The libtraceevent library provides APIs to access kernel tracepoint events, located in
+the tracefs file system under the events directory.
+endef
+
+define Package/libtraceevent-extra
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Extra plugins for libtraceevent
+ DEPENDS:=
+endef
+
+CONFIGURE_ARGS+= \
+ --enable-shared \
+ --enable-static
+
+PLUGINS_DIR := $(PKG_BUILD_DIR)/plugins
+PLUGINS_MAIN := function hrtimer mac80211 sched_switch
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/include/traceevent $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/lib/libtraceevent.{a,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/libtraceevent.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libtraceevent/install
+ $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins
+ $(CP) $(PKG_BUILD_DIR)/lib/libtraceevent.so.* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) \
+ $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \
+ $(1)/usr/lib/traceevent/plugins
+endef
+
+define Package/libtraceevent-extra/install
+ $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins
+ $(CP) \
+ $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \
+ $$(filter-out $(PLUGINS_MAIN), \
+ $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \
+ $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \
+ $(1)/usr/lib/traceevent/plugins
+endef
+
+$(eval $(call BuildPackage,libtraceevent))
+$(eval $(call BuildPackage,libtraceevent-extra))
diff --git a/package/libs/libtracefs/Makefile b/package/libs/libtracefs/Makefile
new file mode 100644
index 00000000000..0496f5983e0
--- /dev/null
+++ b/package/libs/libtracefs/Makefile
@@ -0,0 +1,49 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libtracefs
+PKG_VERSION:=1.8.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/
+PKG_HASH:=f92475d5c4cb509983697fb359ee615bef4f08ed8bdc9c690f6118ba68886de0
+
+PKG_MAINTAINER:=Nick Hainke <vincent@systemli.org>
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libtracefs
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Linux kernel trace file system library
+ URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git
+ DEPENDS+=+libpthread +libtraceevent
+ ABI_VERSION:=0
+endef
+
+define Package/libtracefs/description
+The libtracefs library provides APIs to access kernel trace file system.
+endef
+
+CONFIGURE_ARGS+= \
+ --enable-shared \
+ --enable-static \
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/lib/libtracefs.{a,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/libtracefs.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libtracefs/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/lib/libtracefs.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libtracefs))
diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
index 42a3f4ac3c3..a987304ba16 100644
--- a/package/libs/libubox/Makefile
+++ b/package/libs/libubox/Makefile
@@ -1,13 +1,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libubox
-PKG_RELEASE=2
+PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
-PKG_MIRROR_HASH:=7dd1db1e0074a9c7c722db654cce3111b3bd3cff0bfd791c4497cb0f6c22d3ca
-PKG_SOURCE_DATE:=2021-05-16
-PKG_SOURCE_VERSION:=b14c4688612c05c78ce984d7bde633bce8703b1e
+PKG_MIRROR_HASH:=071139fed757bea240d4ba8f55a0ff5a81862d23e16b39fc871ae07da78ae6a4
+PKG_SOURCE_DATE:=2024-01-26
+PKG_SOURCE_VERSION:=c1be505732e6d254464973bdeacb955214c76c46
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
CMAKE_INSTALL:=1
@@ -105,6 +105,14 @@ CMAKE_HOST_OPTIONS += \
-DCMAKE_MACOSX_RPATH=1 \
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOST}/lib" \
+ifeq ($(HOST_OS),Darwin)
+ define Host/Install
+ $(Host/Install/Default)
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib
+ cd "$(STAGING_DIR_HOSTPKG)/lib" && ln -sf ../../host/lib/libubox.* .
+ endef
+endif
+
$(eval $(call BuildPackage,libubox))
$(eval $(call BuildPackage,libblobmsg-json))
$(eval $(call BuildPackage,jshn))
diff --git a/package/libs/libunistring/Makefile b/package/libs/libunistring/Makefile
new file mode 100644
index 00000000000..9b41cc3ce38
--- /dev/null
+++ b/package/libs/libunistring/Makefile
@@ -0,0 +1,64 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libunistring
+PKG_VERSION:=1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
+PKG_HASH:=827c1eb9cb6e7c738b171745dac0888aa58c5924df2e59239318383de0729b98
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:$(PKG_NAME)
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libunistring
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=libunistring
+ URL:=https://www.gnu.org/software/libunistring
+endef
+
+define Package/libunistring/description
+ This library provides functions for manipulating Unicode strings
+ and for manipulating C strings according to the Unicode standard.
+endef
+
+HOST_CFLAGS += $(HOST_FPIC)
+
+TARGET_CFLAGS += $(FPIC)
+
+HOST_CONFIGURE_ARGS += \
+ --enable-static \
+ --disable-shared \
+ --without-libiconv-prefix \
+ --with-pic
+
+CONFIGURE_ARGS += \
+ --enable-static \
+ --enable-shared \
+ --without-libiconv-prefix \
+ --with-pic
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/include/unistring
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/unistring/*.h $(1)/usr/include/unistring/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunistring.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libunistring/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunistring.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,libunistring))
diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile
index 7f79996d250..c676d501bd5 100644
--- a/package/libs/libunwind/Makefile
+++ b/package/libs/libunwind/Makefile
@@ -9,12 +9,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libunwind
-PKG_VERSION:=1.5.0
+PKG_VERSION:=1.6.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
-PKG_HASH:=90337653d92d4a13de590781371c604f9031cdb50520366aa1e3a91e1efb1017
+PKG_HASH:=4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
PKG_LICENSE:=X11
@@ -32,7 +32,7 @@ define Package/libunwind
CATEGORY:=Libraries
TITLE:=The libunwind project
URL:=http://www.nongnu.org/libunwind/
- DEPENDS:=@((mips||mipsel||mips64||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib
+ DEPENDS:=@((mips||mipsel||mips64||powerpc64||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib
ABI_VERSION:=8
endef
diff --git a/package/libs/libusb/Makefile b/package/libs/libusb/Makefile
index 6b80b3848d7..0c6de7cb618 100644
--- a/package/libs/libusb/Makefile
+++ b/package/libs/libusb/Makefile
@@ -8,18 +8,19 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libusb
-PKG_VERSION:=1.0.24
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=1.0.26
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=\
https://github.com/libusb/libusb/releases/download/v$(PKG_VERSION) \
@SF/$(PKG_NAME)
-PKG_HASH:=7efd2685f7b327326dcfb85cee426d9b871fd70e22caa15bb68d595ce2a2b12a
+PKG_HASH:=12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5
PKG_MAINTAINER:= Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libusb:libusb
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
@@ -30,7 +31,7 @@ define Package/libusb-1.0
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A library for accessing Linux USB devices
- DEPENDS:=+libpthread +librt
+ DEPENDS:=+libpthread +librt +libatomic
URL:=http://libusb.info/
ABI_VERSION:=0
endef
@@ -40,10 +41,26 @@ define Package/libusb-1.0/description
many different operating systems.
endef
+define Package/fxload
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=fxload firmware loader
+ URL:=http://linux-hotplug.sourceforge.net
+ DEPENDS:=+libusb-1.0
+endef
+
+define Package/fxload/description
+This program is conveniently able to download firmware into FX, FX2,
+and FX2LP EZ-USB devices, as well as the original AnchorChips EZ-USB.
+It is intended to be invoked by hotplug scripts when the unprogrammed
+device appears on the bus.
+endef
+
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
- --disable-udev \
- --disable-log
+ --enable-examples-build \
+ --disable-log \
+ --disable-udev
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/libusb-1.0
@@ -56,7 +73,13 @@ endef
define Package/libusb-1.0/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.so* $(1)/usr/lib/
+endef
+
+define Package/fxload/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/examples/.libs/fxload $(1)/usr/sbin
endef
$(eval $(call BuildPackage,libusb-1.0))
+$(eval $(call BuildPackage,fxload))
diff --git a/package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch b/package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch
deleted file mode 100644
index b17d6178d38..00000000000
--- a/package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 369af149e3ad92514a2d24f112cedfeb7acaf558 Mon Sep 17 00:00:00 2001
-From: Chris Dickens <christopher.a.dickens@gmail.com>
-Date: Sun, 13 Dec 2020 15:46:27 -0800
-Subject: [PATCH] Correct a typo in the Changelog and clean up a stray file
-
-Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
----
- ChangeLog | 2 +-
- libusb/version_nano.h | 2 +-
- test | 0
- 3 files changed, 2 insertions(+), 2 deletions(-)
- delete mode 100644 test
-
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -12,7 +12,7 @@ visit: http://log.libusb.info
- * Darwin (macOS): use IOUSBDevice as darwin_device_class explicitly (#693)
- * Linux: Drop support for kernel older than 2.6.32
- * Linux: Provide an event thread name (#689)
--* Linux: Wait until all USBs have been reaped before freeing them (#607)
-+* Linux: Wait until all URBs have been reaped before freeing them (#607)
- * NetBSD: Recognize device timeouts (#710)
- * OpenBSD: Allow opening ugen devices multiple times (#763)
- * OpenBSD: Support libusb_get_port_number() (#764)
---- a/libusb/version_nano.h
-+++ b/libusb/version_nano.h
-@@ -1 +1 @@
--#define LIBUSB_NANO 11584
-+#define LIBUSB_NANO 11585
diff --git a/package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch b/package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch
deleted file mode 100644
index a53a8900ded..00000000000
--- a/package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From f6d2cb561402c3b6d3627c0eb89e009b503d9067 Mon Sep 17 00:00:00 2001
-From: Chris Dickens <christopher.a.dickens@gmail.com>
-Date: Sun, 13 Dec 2020 15:49:19 -0800
-Subject: [PATCH] linux_usbfs: Fix parsing of descriptors for
- multi-configuration devices
-
-Commit e2be556bd2 ("linux_usbfs: Parse config descriptors during device
-initialization") introduced a regression for devices with multiple
-configurations. The logic that verifies the reported length of the
-configuration descriptors failed to count the length of the
-configuration descriptor itself and would truncate the actual length by
-9 bytes, leading to a parsing error for subsequent descriptors.
-
-Closes #825
-
-Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
----
- libusb/os/linux_usbfs.c | 12 ++++++++----
- libusb/version_nano.h | 2 +-
- 2 files changed, 9 insertions(+), 5 deletions(-)
-
---- a/libusb/os/linux_usbfs.c
-+++ b/libusb/os/linux_usbfs.c
-@@ -641,7 +641,12 @@ static int seek_to_next_config(struct li
- uint8_t *buffer, size_t len)
- {
- struct usbi_descriptor_header *header;
-- int offset = 0;
-+ int offset;
-+
-+ /* Start seeking past the config descriptor */
-+ offset = LIBUSB_DT_CONFIG_SIZE;
-+ buffer += LIBUSB_DT_CONFIG_SIZE;
-+ len -= LIBUSB_DT_CONFIG_SIZE;
-
- while (len > 0) {
- if (len < 2) {
-@@ -718,7 +723,7 @@ static int parse_config_descriptors(stru
- }
-
- if (priv->sysfs_dir) {
-- /*
-+ /*
- * In sysfs wTotalLength is ignored, instead the kernel returns a
- * config descriptor with verified bLength fields, with descriptors
- * with an invalid bLength removed.
-@@ -727,8 +732,7 @@ static int parse_config_descriptors(stru
- int offset;
-
- if (num_configs > 1 && idx < num_configs - 1) {
-- offset = seek_to_next_config(ctx, buffer + LIBUSB_DT_CONFIG_SIZE,
-- remaining - LIBUSB_DT_CONFIG_SIZE);
-+ offset = seek_to_next_config(ctx, buffer, remaining);
- if (offset < 0)
- return offset;
- sysfs_config_len = (uint16_t)offset;
---- a/libusb/version_nano.h
-+++ b/libusb/version_nano.h
-@@ -1 +1 @@
--#define LIBUSB_NANO 11585
-+#define LIBUSB_NANO 11586
diff --git a/package/libs/libxml2/Makefile b/package/libs/libxml2/Makefile
new file mode 100644
index 00000000000..86fa3707710
--- /dev/null
+++ b/package/libs/libxml2/Makefile
@@ -0,0 +1,206 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libxml2
+PKG_VERSION:=2.12.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
+PKG_HASH:=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:xmlsoft:libxml2
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/libxml2
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Gnome XML library
+ URL:=http://xmlsoft.org/
+ DEPENDS:=+libpthread +zlib $(ICONV_DEPENDS)
+endef
+
+define Package/libxml2/description
+ A library for manipulating XML and HTML resources.
+endef
+
+define Package/libxml2-dev
+ SECTION:=devel
+ CATEGORY:=Development
+ SUBMENU:=Libraries
+ TITLE:=Development files for libxml2
+ URL:=http://xmlsoft.org/
+ DEPENDS:=+libxml2
+endef
+
+define Package/libxml2-dev/description
+ A library for manipulating XML and HTML resources.
+
+ This package contains the headers and xml2-config binary.
+endef
+
+define Package/libxml2-utils
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=XML command line utilities (xmllint...)
+ URL:=http://xmlsoft.org/
+ DEPENDS:=+libxml2
+endef
+
+define Package/libxml2-utils/description
+ This package contains the binaries xmllint and xmlcatalog
+ from libxml2, a library for manipulating XML and HTML resources.
+endef
+
+CMAKE_HOST_OPTIONS += \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DLIBXML2_WITH_C14N=ON \
+ -DLIBXML2_WITH_CATALOG=OFF \
+ -DLIBXML2_WITH_DEBUG=ON \
+ -DLIBXML2_WITH_FTP=OFF \
+ -DLIBXML2_WITH_HTML=ON \
+ -DLIBXML2_WITH_HTTP=OFF \
+ -DLIBXML2_WITH_ICONV=ON \
+ -DLIBXML2_WITH_ICU=OFF \
+ -DLIBXML2_WITH_ISO8859X=OFF \
+ -DLIBXML2_WITH_LEGACY=OFF \
+ -DLIBXML2_WITH_LZMA=OFF \
+ -DLIBXML2_WITH_MEM_DEBUG=OFF \
+ -DLIBXML2_WITH_MODULES=OFF \
+ -DLIBXML2_WITH_OUTPUT=ON \
+ -DLIBXML2_WITH_PATTERN=ON \
+ -DLIBXML2_WITH_PROGRAMS=OFF \
+ -DLIBXML2_WITH_PUSH=ON \
+ -DLIBXML2_WITH_PYTHON=OFF \
+ -DLIBXML2_WITH_READER=ON \
+ -DLIBXML2_WITH_REGEXPS=ON \
+ -DLIBXML2_WITH_RUN_DEBUG=OFF \
+ -DLIBXML2_WITH_SAX1=ON \
+ -DLIBXML2_WITH_SCHEMAS=ON \
+ -DLIBXML2_WITH_SCHEMATRON=OFF \
+ -DLIBXML2_WITH_TESTS=OFF \
+ -DLIBXML2_WITH_THREADS=ON \
+ -DLIBXML2_WITH_THREAD_ALLOC=OFF \
+ -DLIBXML2_WITH_TREE=ON \
+ -DLIBXML2_WITH_VALID=ON \
+ -DLIBXML2_WITH_WRITER=ON \
+ -DLIBXML2_WITH_XINCLUDE=ON \
+ -DLIBXML2_WITH_XPATH=ON \
+ -DLIBXML2_WITH_XPTR=ON \
+ -DLIBXML2_WITH_XPTR_LOCS=ON \
+ -DLIBXML2_WITH_ZLIB=ON
+
+CMAKE_OPTIONS += \
+ -DBUILD_SHARED_LIBS=ON \
+ -DLIBXML2_WITH_C14N=ON \
+ -DLIBXML2_WITH_CATALOG=OFF \
+ -DLIBXML2_WITH_DEBUG=ON \
+ -DLIBXML2_WITH_FTP=OFF \
+ -DLIBXML2_WITH_HTML=ON \
+ -DLIBXML2_WITH_HTTP=OFF \
+ -DLIBXML2_WITH_ICONV=ON \
+ -DLIBXML2_WITH_ICU=OFF \
+ -DLIBXML2_WITH_ISO8859X=OFF \
+ -DLIBXML2_WITH_LEGACY=OFF \
+ -DLIBXML2_WITH_LZMA=OFF \
+ -DLIBXML2_WITH_MEM_DEBUG=OFF \
+ -DLIBXML2_WITH_MODULES=OFF \
+ -DLIBXML2_WITH_OUTPUT=ON \
+ -DLIBXML2_WITH_PATTERN=ON \
+ -DLIBXML2_WITH_PROGRAMS=ON \
+ -DLIBXML2_WITH_PUSH=ON \
+ -DLIBXML2_WITH_PYTHON=OFF \
+ -DLIBXML2_WITH_READER=ON \
+ -DLIBXML2_WITH_REGEXPS=ON \
+ -DLIBXML2_WITH_RUN_DEBUG=OFF \
+ -DLIBXML2_WITH_SAX1=ON \
+ -DLIBXML2_WITH_SCHEMAS=ON \
+ -DLIBXML2_WITH_SCHEMATRON=OFF \
+ -DLIBXML2_WITH_TESTS=OFF \
+ -DLIBXML2_WITH_THREADS=ON \
+ -DLIBXML2_WITH_THREAD_ALLOC=OFF \
+ -DLIBXML2_WITH_TREE=ON \
+ -DLIBXML2_WITH_VALID=ON \
+ -DLIBXML2_WITH_WRITER=ON \
+ -DLIBXML2_WITH_XINCLUDE=ON \
+ -DLIBXML2_WITH_XPATH=ON \
+ -DLIBXML2_WITH_XPTR=ON \
+ -DLIBXML2_WITH_XPTR_LOCS=ON \
+ -DLIBXML2_WITH_ZLIB=ON \
+ -DHAVE_LIBHISTORY=OFF \
+ -DHAVE_LIBREADLINE=OFF
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(2)/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config \
+ $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
+ $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
+ $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
+ $(LN) $(GNU_TARGET_NAME)-xml2-config $(2)/bin/xml2-config
+
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
+
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/cmake/libxml2
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2-$(PKG_VERSION)/*.cmake \
+ $(1)/usr/lib/cmake/libxml2
+
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
+
+ $(INSTALL_DIR) $(2)/share/aclocal/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
+endef
+
+define Host/Install
+ $(call Host/Install/Default)
+ mv $(1)/bin/xml2-config $(1)/bin/$(GNU_HOST_NAME)-xml2-config
+ $(LN) $(GNU_HOST_NAME)-xml2-config $(1)/bin/xml2-config
+endef
+
+define Package/libxml2/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
+endef
+
+define Package/libxml2-dev/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
+ $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/bin/xml2-config
+
+ $(INSTALL_DIR) $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/{cmake,pkgconfig}
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/{cmake,pkgconfig} $(1)/usr/lib/
+ $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/lib/pkgconfig/*.pc
+
+ $(INSTALL_DIR) $(1)/usr/share/aclocal
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
+endef
+
+define Package/libxml2-utils/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,libxml2))
+$(eval $(call BuildPackage,libxml2-dev))
+$(eval $(call BuildPackage,libxml2-utils))
diff --git a/package/libs/mbedtls/Config.in b/package/libs/mbedtls/Config.in
new file mode 100644
index 00000000000..9fbe9f8a4a0
--- /dev/null
+++ b/package/libs/mbedtls/Config.in
@@ -0,0 +1,193 @@
+if PACKAGE_libmbedtls
+
+comment "Option details in source code: include/mbedtls/mbedtls_config.h"
+
+comment "Ciphers - unselect old or less-used ciphers to reduce binary size"
+
+config MBEDTLS_AES_C
+ bool "MBEDTLS_AES_C"
+ default y
+
+config MBEDTLS_CAMELLIA_C
+ bool "MBEDTLS_CAMELLIA_C"
+ default n
+
+config MBEDTLS_CCM_C
+ bool "MBEDTLS_CCM_C"
+ default n
+
+config MBEDTLS_CMAC_C
+ bool "MBEDTLS_CMAC_C (old but used by hostapd)"
+ default y
+
+config MBEDTLS_DES_C
+ bool "MBEDTLS_DES_C (old but used by hostapd)"
+ default y
+
+config MBEDTLS_GCM_C
+ bool "MBEDTLS_GCM_C"
+ default y
+
+config MBEDTLS_NIST_KW_C
+ bool "MBEDTLS_NIST_KW_C (old but used by hostapd)"
+ default y
+
+config MBEDTLS_RIPEMD160_C
+ bool "MBEDTLS_RIPEMD160_C"
+ default n
+
+config MBEDTLS_XTEA_C
+ bool "MBEDTLS_XTEA_C"
+ default n
+
+config MBEDTLS_RSA_NO_CRT
+ bool "MBEDTLS_RSA_NO_CRT"
+ default y
+
+config MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
+ bool "MBEDTLS_KEY_EXCHANGE_PSK_ENABLED"
+ default y
+
+config MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
+ bool "MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED"
+ default n
+
+config MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
+ bool "MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED"
+ default y
+
+config MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
+ bool "MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED"
+ default n
+
+config MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
+ bool "MBEDTLS_KEY_EXCHANGE_RSA_ENABLED"
+ default n
+
+config MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
+ bool "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED"
+ default n
+
+config MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
+ bool "MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED"
+ default y
+
+config MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
+ bool "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED"
+ default y
+
+config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
+ bool "MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED"
+ default n
+
+config MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
+ bool "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED"
+ default n
+
+comment "Curves - unselect old or less-used curves to reduce binary size"
+
+config MBEDTLS_ECP_DP_SECP192R1_ENABLED
+ bool "MBEDTLS_ECP_DP_SECP192R1_ENABLED"
+ default n
+
+config MBEDTLS_ECP_DP_SECP224R1_ENABLED
+ bool "MBEDTLS_ECP_DP_SECP224R1_ENABLED"
+ default n
+
+config MBEDTLS_ECP_DP_SECP256R1_ENABLED
+ bool "MBEDTLS_ECP_DP_SECP256R1_ENABLED"
+ default y
+
+config MBEDTLS_ECP_DP_SECP384R1_ENABLED
+ bool "MBEDTLS_ECP_DP_SECP384R1_ENABLED"
+ default y
+
+config MBEDTLS_ECP_DP_SECP521R1_ENABLED
+ bool "MBEDTLS_ECP_DP_SECP521R1_ENABLED"
+ default y
+
+config MBEDTLS_ECP_DP_SECP192K1_ENABLED
+ bool "MBEDTLS_ECP_DP_SECP192K1_ENABLED"
+ default n
+
+config MBEDTLS_ECP_DP_SECP224K1_ENABLED
+ bool "MBEDTLS_ECP_DP_SECP224K1_ENABLED"
+ default n
+
+config MBEDTLS_ECP_DP_SECP256K1_ENABLED
+ bool "MBEDTLS_ECP_DP_SECP256K1_ENABLED"
+ default y
+
+config MBEDTLS_ECP_DP_BP256R1_ENABLED
+ bool "MBEDTLS_ECP_DP_BP256R1_ENABLED"
+ default n
+
+config MBEDTLS_ECP_DP_BP384R1_ENABLED
+ bool "MBEDTLS_ECP_DP_BP384R1_ENABLED"
+ default n
+
+config MBEDTLS_ECP_DP_BP512R1_ENABLED
+ bool "MBEDTLS_ECP_DP_BP512R1_ENABLED"
+ default n
+
+config MBEDTLS_ECP_DP_CURVE25519_ENABLED
+ bool "MBEDTLS_ECP_DP_CURVE25519_ENABLED"
+ default y
+
+config MBEDTLS_ECP_DP_CURVE448_ENABLED
+ bool "MBEDTLS_ECP_DP_CURVE448_ENABLED"
+ default n
+
+comment "Build Options - unselect features to reduce binary size"
+
+config MBEDTLS_CERTS_C
+ bool "MBEDTLS_CERTS_C"
+ default n
+
+config MBEDTLS_CIPHER_MODE_OFB
+ bool "MBEDTLS_CIPHER_MODE_OFB"
+ default n
+
+config MBEDTLS_CIPHER_MODE_XTS
+ bool "MBEDTLS_CIPHER_MODE_XTS"
+ default n
+
+config MBEDTLS_DEBUG_C
+ bool "MBEDTLS_DEBUG_C"
+ default n
+
+config MBEDTLS_HKDF_C
+ bool "MBEDTLS_HKDF_C"
+ default n
+
+config MBEDTLS_PLATFORM_C
+ bool "MBEDTLS_PLATFORM_C"
+ default n
+
+config MBEDTLS_SELF_TEST
+ bool "MBEDTLS_SELF_TEST"
+ default n
+
+config MBEDTLS_SSL_TRUNCATED_HMAC
+ bool "MBEDTLS_SSL_TRUNCATED_HMAC"
+ default n
+
+config MBEDTLS_VERSION_C
+ bool "MBEDTLS_VERSION_C"
+ default n
+
+config MBEDTLS_VERSION_FEATURES
+ bool "MBEDTLS_VERSION_FEATURES"
+ default n
+
+comment "Build Options"
+
+config MBEDTLS_ENTROPY_FORCE_SHA256
+ bool "MBEDTLS_ENTROPY_FORCE_SHA256"
+ default y
+
+config MBEDTLS_SSL_RENEGOTIATION
+ bool "MBEDTLS_SSL_RENEGOTIATION"
+ default n
+
+endif
diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index 2bac22b6acd..ad13bbe8463 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -8,21 +8,72 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mbedtls
-PKG_VERSION:=2.16.10
-PKG_RELEASE:=1
-PKG_USE_MIPS16:=0
+PKG_VERSION:=2.28.7
+PKG_RELEASE:=2
+PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=96257bb03b30300b2f35f861ffe204ed957e9fd0329d80646fe57fc49f589b29
+PKG_HASH:=1df6073f0cf6a4e1953890bf5e0de2a8c7e6be50d6d6c69fa9fefcb1d14e981a
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=gpl-2.0.txt
PKG_CPE_ID:=cpe:/a:arm:mbed_tls
-PKG_CONFIG_DEPENDS := \
- CONFIG_LIBMBEDTLS_DEBUG_C \
- CONFIG_LIBMBEDTLS_HKDF_C
+MBEDTLS_BUILD_OPTS_CURVES= \
+ CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED \
+ CONFIG_MBEDTLS_ECP_DP_CURVE448_ENABLED
+
+MBEDTLS_BUILD_OPTS_CIPHERS= \
+ CONFIG_MBEDTLS_AES_C \
+ CONFIG_MBEDTLS_CAMELLIA_C \
+ CONFIG_MBEDTLS_CCM_C \
+ CONFIG_MBEDTLS_CMAC_C \
+ CONFIG_MBEDTLS_DES_C \
+ CONFIG_MBEDTLS_GCM_C \
+ CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED \
+ CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED \
+ CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED \
+ CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED \
+ CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED \
+ CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED \
+ CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED \
+ CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED \
+ CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED \
+ CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED \
+ CONFIG_MBEDTLS_NIST_KW_C \
+ CONFIG_MBEDTLS_RIPEMD160_C \
+ CONFIG_MBEDTLS_RSA_NO_CRT \
+ CONFIG_MBEDTLS_XTEA_C
+
+MBEDTLS_BUILD_OPTS= \
+ $(MBEDTLS_BUILD_OPTS_CURVES) \
+ $(MBEDTLS_BUILD_OPTS_CIPHERS) \
+ CONFIG_MBEDTLS_CERTS_C \
+ CONFIG_MBEDTLS_CIPHER_MODE_OFB \
+ CONFIG_MBEDTLS_CIPHER_MODE_XTS \
+ CONFIG_MBEDTLS_DEBUG_C \
+ CONFIG_MBEDTLS_ENTROPY_FORCE_SHA256 \
+ CONFIG_MBEDTLS_HKDF_C \
+ CONFIG_MBEDTLS_PLATFORM_C \
+ CONFIG_MBEDTLS_SELF_TEST \
+ CONFIG_MBEDTLS_SSL_RENEGOTIATION \
+ CONFIG_MBEDTLS_SSL_TRUNCATED_HMAC \
+ CONFIG_MBEDTLS_VERSION_C \
+ CONFIG_MBEDTLS_VERSION_FEATURES
+
+PKG_CONFIG_DEPENDS := $(MBEDTLS_BUILD_OPTS)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
@@ -44,28 +95,11 @@ $(call Package/mbedtls/Default)
SUBMENU:=SSL
TITLE+= (library)
ABI_VERSION:=12
+ MENU:=1
endef
define Package/libmbedtls/config
-config LIBMBEDTLS_DEBUG_C
- depends on PACKAGE_libmbedtls
- bool "Enable debug functions"
- default n
- help
- This option enables mbedtls library's debug functions.
-
- It increases the uncompressed libmbedtls binary size
- by around 60 KiB (for an ARMv5 platform).
-
- Usually, you don't need this, so don't select this if you're unsure.
-
-config LIBMBEDTLS_HKDF_C
- depends on PACKAGE_libmbedtls
- bool "Enable the HKDF algorithm (RFC 5869)"
- default n
- help
- This option adds support for the Hashed Message Authentication Code
- (HMAC)-based key derivation function (HKDF).
+ source "$(SOURCE)/Config.in"
endef
define Package/mbedtls-util
@@ -87,30 +121,22 @@ This package contains mbedtls helper programs for private key and
CSR generation (gen_key, cert_req)
endef
-TARGET_CFLAGS += -ffunction-sections -fdata-sections
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
CMAKE_OPTIONS += \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \
-DENABLE_TESTING:Bool=OFF \
-DENABLE_PROGRAMS:Bool=ON
-define Build/Configure
- $(Build/Configure/Default)
-
- awk 'BEGIN { rc = 1 } \
- /#define MBEDTLS_DEBUG_C/ { $$$$0 = "$(if $(CONFIG_LIBMBEDTLS_DEBUG_C),,// )#define MBEDTLS_DEBUG_C"; rc = 0 } \
- { print } \
- END { exit(rc) }' $(PKG_BUILD_DIR)/include/mbedtls/config.h \
- >$(PKG_BUILD_DIR)/include/mbedtls/config.h.new && \
- mv $(PKG_BUILD_DIR)/include/mbedtls/config.h.new $(PKG_BUILD_DIR)/include/mbedtls/config.h
-
- awk 'BEGIN { rc = 1 } \
- /#define MBEDTLS_HKDF_C/ { $$$$0 = "$(if $(CONFIG_LIBMBEDTLS_HKDF_C),,// )#define MBEDTLS_HKDF_C"; rc = 0 } \
- { print } \
- END { exit(rc) }' $(PKG_BUILD_DIR)/include/mbedtls/config.h \
- >$(PKG_BUILD_DIR)/include/mbedtls/config.h.new && \
- mv $(PKG_BUILD_DIR)/include/mbedtls/config.h.new $(PKG_BUILD_DIR)/include/mbedtls/config.h
+define Build/Prepare
+ $(call Build/Prepare/Default)
+
+ $(if $(strip $(foreach opt,$(MBEDTLS_BUILD_OPTS),$($(opt)))),
+ $(foreach opt,$(MBEDTLS_BUILD_OPTS),
+ $(PKG_BUILD_DIR)/scripts/config.py \
+ -f $(PKG_BUILD_DIR)/include/mbedtls/config.h \
+ $(if $($(opt)),set,unset) $(patsubst CONFIG_%,%,$(opt))),)
endef
define Build/InstallDev
diff --git a/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch b/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch
new file mode 100644
index 00000000000..4ad2e8c7dbe
--- /dev/null
+++ b/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch
@@ -0,0 +1,197 @@
+From eb9d4fdf1846e688d51d86a9a50f0312aca2af25 Mon Sep 17 00:00:00 2001
+From: Glenn Strauss <gstrauss@gluelogic.com>
+Date: Sun, 23 Oct 2022 19:48:18 -0400
+Subject: [PATCH] x509 crt verify SAN iPAddress
+
+Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
+---
+ include/mbedtls/x509_crt.h | 2 +-
+ library/x509_crt.c | 126 ++++++++++++++++++++++++++++++-------
+ 2 files changed, 103 insertions(+), 25 deletions(-)
+
+--- a/include/mbedtls/x509_crt.h
++++ b/include/mbedtls/x509_crt.h
+@@ -608,7 +608,7 @@ int mbedtls_x509_crt_verify_info(char *b
+ * \param cn The expected Common Name. This will be checked to be
+ * present in the certificate's subjectAltNames extension or,
+ * if this extension is absent, as a CN component in its
+- * Subject name. Currently only DNS names are supported. This
++ * Subject name. DNS names and IP addresses are supported. This
+ * may be \c NULL if the CN need not be verified.
+ * \param flags The address at which to store the result of the verification.
+ * If the verification couldn't be completed, the flag value is
+--- a/library/x509_crt.c
++++ b/library/x509_crt.c
+@@ -57,6 +57,10 @@
+
+ #if defined(MBEDTLS_HAVE_TIME)
+ #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
++#define WIN32_LEAN_AND_MEAN
++#ifndef _WIN32_WINNT
++#define _WIN32_WINNT 0x0600
++#endif
+ #include <windows.h>
+ #else
+ #include <time.h>
+@@ -3002,6 +3006,61 @@ find_parent:
+ }
+ }
+
++#ifdef _WIN32
++#ifdef _MSC_VER
++#pragma comment(lib, "ws2_32.lib")
++#include <winsock2.h>
++#include <ws2tcpip.h>
++#elif (defined(__MINGW32__) || defined(__MINGW64__)) && _WIN32_WINNT >= 0x0600
++#include <winsock2.h>
++#include <ws2tcpip.h>
++#endif
++#elif defined(__sun)
++/* Solaris requires -lsocket -lnsl for inet_pton() */
++#elif defined(__has_include)
++#if __has_include(<sys/socket.h>)
++#include <sys/socket.h>
++#endif
++#if __has_include(<arpa/inet.h>)
++#include <arpa/inet.h>
++#endif
++#endif
++
++/* Use whether or not AF_INET6 is defined to indicate whether or not to use
++ * the platform inet_pton() or a local implementation (below). The local
++ * implementation may be used even in cases where the platform provides
++ * inet_pton(), e.g. when there are different includes required and/or the
++ * platform implementation requires dependencies on additional libraries.
++ * Specifically, Windows requires custom includes and additional link
++ * dependencies, and Solaris requires additional link dependencies.
++ * Also, as a coarse heuristic, use the local implementation if the compiler
++ * does not support __has_include(), or if the definition of AF_INET6 is not
++ * provided by headers included (or not) via __has_include() above. */
++#ifndef AF_INET6
++
++#define x509_cn_inet_pton(cn, dst) (0)
++
++#else
++
++static int x509_inet_pton_ipv6(const char *src, void *dst)
++{
++ return inet_pton(AF_INET6, src, dst) == 1 ? 0 : -1;
++}
++
++static int x509_inet_pton_ipv4(const char *src, void *dst)
++{
++ return inet_pton(AF_INET, src, dst) == 1 ? 0 : -1;
++}
++
++#endif /* AF_INET6 */
++
++static size_t x509_cn_inet_pton(const char *cn, void *dst)
++{
++ return strchr(cn, ':') == NULL
++ ? x509_inet_pton_ipv4(cn, dst) == 0 ? 4 : 0
++ : x509_inet_pton_ipv6(cn, dst) == 0 ? 16 : 0;
++}
++
+ /*
+ * Check for CN match
+ */
+@@ -3022,24 +3081,51 @@ static int x509_crt_check_cn(const mbedt
+ return -1;
+ }
+
++static int x509_crt_check_san_ip(const mbedtls_x509_sequence *san,
++ const char *cn, size_t cn_len)
++{
++ uint32_t ip[4];
++ cn_len = x509_cn_inet_pton(cn, ip);
++ if (cn_len == 0) {
++ return -1;
++ }
++
++ for (const mbedtls_x509_sequence *cur = san; cur != NULL; cur = cur->next) {
++ const unsigned char san_type = (unsigned char) cur->buf.tag &
++ MBEDTLS_ASN1_TAG_VALUE_MASK;
++ if (san_type == MBEDTLS_X509_SAN_IP_ADDRESS &&
++ cur->buf.len == cn_len && memcmp(cur->buf.p, ip, cn_len) == 0) {
++ return 0;
++ }
++ }
++
++ return -1;
++}
++
+ /*
+ * Check for SAN match, see RFC 5280 Section 4.2.1.6
+ */
+-static int x509_crt_check_san(const mbedtls_x509_buf *name,
++static int x509_crt_check_san(const mbedtls_x509_sequence *san,
+ const char *cn, size_t cn_len)
+ {
+- const unsigned char san_type = (unsigned char) name->tag &
+- MBEDTLS_ASN1_TAG_VALUE_MASK;
+-
+- /* dNSName */
+- if (san_type == MBEDTLS_X509_SAN_DNS_NAME) {
+- return x509_crt_check_cn(name, cn, cn_len);
++ int san_ip = 0;
++ for (const mbedtls_x509_sequence *cur = san; cur != NULL; cur = cur->next) {
++ switch ((unsigned char) cur->buf.tag & MBEDTLS_ASN1_TAG_VALUE_MASK) {
++ case MBEDTLS_X509_SAN_DNS_NAME: /* dNSName */
++ if (x509_crt_check_cn(&cur->buf, cn, cn_len) == 0) {
++ return 0;
++ }
++ break;
++ case MBEDTLS_X509_SAN_IP_ADDRESS: /* iPAddress */
++ san_ip = 1;
++ break;
++ /* (We may handle other types here later.) */
++ default: /* Unrecognized type */
++ break;
++ }
+ }
+
+- /* (We may handle other types here later.) */
+-
+- /* Unrecognized type */
+- return -1;
++ return san_ip ? x509_crt_check_san_ip(san, cn, cn_len) : -1;
+ }
+
+ /*
+@@ -3050,31 +3136,23 @@ static void x509_crt_verify_name(const m
+ uint32_t *flags)
+ {
+ const mbedtls_x509_name *name;
+- const mbedtls_x509_sequence *cur;
+ size_t cn_len = strlen(cn);
+
+ if (crt->ext_types & MBEDTLS_X509_EXT_SUBJECT_ALT_NAME) {
+- for (cur = &crt->subject_alt_names; cur != NULL; cur = cur->next) {
+- if (x509_crt_check_san(&cur->buf, cn, cn_len) == 0) {
+- break;
+- }
+- }
+-
+- if (cur == NULL) {
+- *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
++ if (x509_crt_check_san(&crt->subject_alt_names, cn, cn_len) == 0) {
++ return;
+ }
+ } else {
+ for (name = &crt->subject; name != NULL; name = name->next) {
+ if (MBEDTLS_OID_CMP(MBEDTLS_OID_AT_CN, &name->oid) == 0 &&
+ x509_crt_check_cn(&name->val, cn, cn_len) == 0) {
+- break;
++ return;
+ }
+ }
+
+- if (name == NULL) {
+- *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
+- }
+ }
++
++ *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
+ }
+
+ /*
diff --git a/package/libs/mbedtls/patches/101-remove-test.patch b/package/libs/mbedtls/patches/101-remove-test.patch
new file mode 100644
index 00000000000..e43f8757d71
--- /dev/null
+++ b/package/libs/mbedtls/patches/101-remove-test.patch
@@ -0,0 +1,15 @@
+--- a/programs/CMakeLists.txt
++++ b/programs/CMakeLists.txt
+@@ -1,12 +1,8 @@
+ add_subdirectory(aes)
+-if (NOT WIN32)
+- add_subdirectory(fuzz)
+-endif()
+ add_subdirectory(hash)
+ add_subdirectory(pkey)
+ add_subdirectory(psa)
+ add_subdirectory(random)
+ add_subdirectory(ssl)
+-add_subdirectory(test)
+ add_subdirectory(util)
+ add_subdirectory(x509)
diff --git a/package/libs/mbedtls/patches/200-config.patch b/package/libs/mbedtls/patches/200-config.patch
deleted file mode 100644
index 1e3d41f0eba..00000000000
--- a/package/libs/mbedtls/patches/200-config.patch
+++ /dev/null
@@ -1,245 +0,0 @@
---- a/include/mbedtls/config.h
-+++ b/include/mbedtls/config.h
-@@ -692,14 +692,14 @@
- *
- * Enable Output Feedback mode (OFB) for symmetric ciphers.
- */
--#define MBEDTLS_CIPHER_MODE_OFB
-+//#define MBEDTLS_CIPHER_MODE_OFB
-
- /**
- * \def MBEDTLS_CIPHER_MODE_XTS
- *
- * Enable Xor-encrypt-xor with ciphertext stealing mode (XTS) for AES.
- */
--#define MBEDTLS_CIPHER_MODE_XTS
-+//#define MBEDTLS_CIPHER_MODE_XTS
-
- /**
- * \def MBEDTLS_CIPHER_NULL_CIPHER
-@@ -816,19 +816,19 @@
- *
- * Comment macros to disable the curve and functions for it
- */
--#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
--#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
-+//#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
-+//#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
- #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
- #define MBEDTLS_ECP_DP_SECP384R1_ENABLED
--#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
--#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
--#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
-+//#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
-+//#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
-+//#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
- #define MBEDTLS_ECP_DP_SECP256K1_ENABLED
--#define MBEDTLS_ECP_DP_BP256R1_ENABLED
--#define MBEDTLS_ECP_DP_BP384R1_ENABLED
--#define MBEDTLS_ECP_DP_BP512R1_ENABLED
-+//#define MBEDTLS_ECP_DP_BP256R1_ENABLED
-+//#define MBEDTLS_ECP_DP_BP384R1_ENABLED
-+//#define MBEDTLS_ECP_DP_BP512R1_ENABLED
- #define MBEDTLS_ECP_DP_CURVE25519_ENABLED
--#define MBEDTLS_ECP_DP_CURVE448_ENABLED
-+//#define MBEDTLS_ECP_DP_CURVE448_ENABLED
-
- /**
- * \def MBEDTLS_ECP_NIST_OPTIM
-@@ -952,7 +952,7 @@
- * See dhm.h for more details.
- *
- */
--#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
-+//#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
-
- /**
- * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
-@@ -972,7 +972,7 @@
- * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
- * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
- */
--#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
-+//#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
-
- /**
- * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
-@@ -997,7 +997,7 @@
- * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
- * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
- */
--#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
-+//#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
-
- /**
- * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
-@@ -1131,7 +1131,7 @@
- * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
- * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
- */
--#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
-+//#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
-
- /**
- * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
-@@ -1155,7 +1155,7 @@
- * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
- * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
- */
--#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
-+//#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
-
- /**
- * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
-@@ -1259,7 +1259,7 @@
- * This option is only useful if both MBEDTLS_SHA256_C and
- * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
- */
--//#define MBEDTLS_ENTROPY_FORCE_SHA256
-+#define MBEDTLS_ENTROPY_FORCE_SHA256
-
- /**
- * \def MBEDTLS_ENTROPY_NV_SEED
-@@ -1354,14 +1354,14 @@
- * Uncomment this macro to disable the use of CRT in RSA.
- *
- */
--//#define MBEDTLS_RSA_NO_CRT
-+#define MBEDTLS_RSA_NO_CRT
-
- /**
- * \def MBEDTLS_SELF_TEST
- *
- * Enable the checkup functions (*_self_test).
- */
--#define MBEDTLS_SELF_TEST
-+//#define MBEDTLS_SELF_TEST
-
- /**
- * \def MBEDTLS_SHA256_SMALLER
-@@ -1515,7 +1515,7 @@
- * configuration of this extension).
- *
- */
--#define MBEDTLS_SSL_RENEGOTIATION
-+//#define MBEDTLS_SSL_RENEGOTIATION
-
- /**
- * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
-@@ -1690,7 +1690,7 @@
- *
- * Comment this macro to disable support for SSL session tickets
- */
--#define MBEDTLS_SSL_SESSION_TICKETS
-+//#define MBEDTLS_SSL_SESSION_TICKETS
-
- /**
- * \def MBEDTLS_SSL_EXPORT_KEYS
-@@ -1720,7 +1720,7 @@
- *
- * Comment this macro to disable support for truncated HMAC in SSL
- */
--#define MBEDTLS_SSL_TRUNCATED_HMAC
-+//#define MBEDTLS_SSL_TRUNCATED_HMAC
-
- /**
- * \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
-@@ -1796,7 +1796,7 @@
- *
- * Comment this to disable run-time checking and save ROM space
- */
--#define MBEDTLS_VERSION_FEATURES
-+//#define MBEDTLS_VERSION_FEATURES
-
- /**
- * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
-@@ -2126,7 +2126,7 @@
- * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
- * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
- */
--#define MBEDTLS_CAMELLIA_C
-+//#define MBEDTLS_CAMELLIA_C
-
- /**
- * \def MBEDTLS_ARIA_C
-@@ -2192,7 +2192,7 @@
- * This module enables the AES-CCM ciphersuites, if other requisites are
- * enabled as well.
- */
--#define MBEDTLS_CCM_C
-+//#define MBEDTLS_CCM_C
-
- /**
- * \def MBEDTLS_CERTS_C
-@@ -2204,7 +2204,7 @@
- *
- * This module is used for testing (ssl_client/server).
- */
--#define MBEDTLS_CERTS_C
-+//#define MBEDTLS_CERTS_C
-
- /**
- * \def MBEDTLS_CHACHA20_C
-@@ -2312,7 +2312,7 @@
- * \warning DES is considered a weak cipher and its use constitutes a
- * security risk. We recommend considering stronger ciphers instead.
- */
--#define MBEDTLS_DES_C
-+//#define MBEDTLS_DES_C
-
- /**
- * \def MBEDTLS_DHM_C
-@@ -2475,7 +2475,7 @@
- * This module adds support for the Hashed Message Authentication Code
- * (HMAC)-based key derivation function (HKDF).
- */
--#define MBEDTLS_HKDF_C
-+//#define MBEDTLS_HKDF_C
-
- /**
- * \def MBEDTLS_HMAC_DRBG_C
-@@ -2785,7 +2785,7 @@
- *
- * This module enables abstraction of common (libc) functions.
- */
--#define MBEDTLS_PLATFORM_C
-+//#define MBEDTLS_PLATFORM_C
-
- /**
- * \def MBEDTLS_POLY1305_C
-@@ -2806,7 +2806,7 @@
- * Caller: library/md.c
- *
- */
--#define MBEDTLS_RIPEMD160_C
-+//#define MBEDTLS_RIPEMD160_C
-
- /**
- * \def MBEDTLS_RSA_C
-@@ -2913,7 +2913,7 @@
- *
- * Requires: MBEDTLS_CIPHER_C
- */
--#define MBEDTLS_SSL_TICKET_C
-+//#define MBEDTLS_SSL_TICKET_C
-
- /**
- * \def MBEDTLS_SSL_CLI_C
-@@ -3013,7 +3013,7 @@
- *
- * This module provides run-time version information.
- */
--#define MBEDTLS_VERSION_C
-+//#define MBEDTLS_VERSION_C
-
- /**
- * \def MBEDTLS_X509_USE_C
-@@ -3123,7 +3123,7 @@
- * Module: library/xtea.c
- * Caller:
- */
--#define MBEDTLS_XTEA_C
-+//#define MBEDTLS_XTEA_C
-
- /* \} name SECTION: mbed TLS modules */
-
diff --git a/package/libs/mpfr/Makefile b/package/libs/mpfr/Makefile
new file mode 100644
index 00000000000..39d6a035ab1
--- /dev/null
+++ b/package/libs/mpfr/Makefile
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mpfr
+PKG_VERSION:=4.2.1
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=@GNU/mpfr http://www.mpfr.org/mpfr-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_HASH:=277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2
+
+PKG_LICENSE:=LGPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING.LESSER
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+PKG_CPE_ID:=cpe:/a:mpfr:gnu_mpfr
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libmpfr
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=GNU MPFR library
+ URL:=https://www.mpfr.org/
+ DEPENDS:=+libgmp
+ ABI_VERSION:=6
+endef
+
+define Package/libmpfr/description
+MPFR is a portable library written in C for arbitrary precision
+arithmetic on floating-point numbers. It is based on the GNU MP library.
+It aims to provide a class of floating-point numbers with precise
+semantics.
+endef
+
+CONFIGURE_ARGS += \
+ --enable-thread-safe
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/mpf* $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmpfr.{a,so*} $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mpfr.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libmpfr/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmpfr.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libmpfr))
diff --git a/package/libs/mpfr/patches/001-only-src.patch b/package/libs/mpfr/patches/001-only-src.patch
new file mode 100644
index 00000000000..bd9e38aefbd
--- /dev/null
+++ b/package/libs/mpfr/patches/001-only-src.patch
@@ -0,0 +1,22 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -38,7 +38,7 @@ AUTOMAKE_OPTIONS = gnu
+ # old Automake version.
+ ACLOCAL_AMFLAGS = -I m4
+
+-SUBDIRS = doc src tests tune tools/bench
++SUBDIRS = src
+
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = mpfr.pc
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -401,7 +401,7 @@ AUTOMAKE_OPTIONS = gnu
+ # libtoolize and in case some developer needs to switch back to an
+ # old Automake version.
+ ACLOCAL_AMFLAGS = -I m4
+-SUBDIRS = doc src tests tune tools/bench
++SUBDIRS = src
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = mpfr.pc
+ nobase_dist_doc_DATA = AUTHORS BUGS COPYING COPYING.LESSER NEWS TODO \
diff --git a/package/libs/musl-fts/Makefile b/package/libs/musl-fts/Makefile
index 494f700f8a6..72341cd3796 100644
--- a/package/libs/musl-fts/Makefile
+++ b/package/libs/musl-fts/Makefile
@@ -30,6 +30,7 @@ PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
define Package/musl-fts
SECTION:=libs
@@ -43,6 +44,7 @@ define Package/musl-fts/description
The musl-fts package implements the fts(3) functions fts_open, fts_read, fts_children, fts_set and fts_close, which are missing in musl libc.
endef
+HOST_CONFIGURE_ARGS += --disable-shared --with-pic
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
@@ -58,3 +60,4 @@ define Package/musl-fts/install
endef
$(eval $(call BuildPackage,musl-fts))
+$(eval $(call HostBuild))
diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile
index 04a9a38515b..4d8e685f35d 100644
--- a/package/libs/ncurses/Makefile
+++ b/package/libs/ncurses/Makefile
@@ -8,12 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ncurses
-PKG_VERSION:=6.2
+PKG_CPE_ID:=cpe:/a:gnu:ncurses
+PKG_VERSION:=6.4
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d
+PKG_HASH:=6931283d9ac87c5073f30b6290c4c75f21632bb4fc3603ac8100812bed248159
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=README
@@ -122,12 +123,15 @@ ifneq ($(HOST_OS),FreeBSD)
)
for file in \
a/ansi \
+ a/alacritty \
d/dumb \
l/linux \
r/rxvt \
r/rxvt-unicode \
s/screen \
s/screen-256color \
+ t/tmux \
+ t/tmux-256color \
v/vt100 \
v/vt102 \
x/xterm \
diff --git a/package/libs/ncurses/patches/100-ncurses-5.6-20080112-urxvt.patch b/package/libs/ncurses/patches/100-ncurses-5.6-20080112-urxvt.patch
index d654eb28f03..70d64bd8e10 100644
--- a/package/libs/ncurses/patches/100-ncurses-5.6-20080112-urxvt.patch
+++ b/package/libs/ncurses/patches/100-ncurses-5.6-20080112-urxvt.patch
@@ -1,6 +1,6 @@
--- a/misc/terminfo.src
+++ b/misc/terminfo.src
-@@ -6145,6 +6145,172 @@ rxvt-cygwin-native|rxvt terminal emulato
+@@ -6886,6 +6886,172 @@ rxvt-cygwin-native|rxvt terminal emulato
rxvt-16color|rxvt with 16 colors like aixterm,
ncv#32, use=ibm+16color, use=rxvt,
diff --git a/package/libs/ncurses/patches/101-ncurses-5.6-20080628-kbs.patch b/package/libs/ncurses/patches/101-ncurses-5.6-20080628-kbs.patch
index 835c0c53d6e..9f00350a468 100644
--- a/package/libs/ncurses/patches/101-ncurses-5.6-20080628-kbs.patch
+++ b/package/libs/ncurses/patches/101-ncurses-5.6-20080628-kbs.patch
@@ -1,48 +1,48 @@
--- a/misc/terminfo.src
+++ b/misc/terminfo.src
-@@ -4513,6 +4513,7 @@ xterm-xfree86|xterm terminal emulator (X
- # This version reflects the current xterm features.
- xterm-new|modern xterm terminal emulator,
+@@ -4984,6 +4984,7 @@ xterm-xfree86|xterm terminal emulator (X
+
+ xterm+nofkeys|building block for xterm fkey-variants,
npc,
+ kbs=\177,
- kcbt=\E[Z, kent=\EOM, use=ecma+index, use=ansi+rep,
- use=ecma+strikeout, use=xterm+keypad, use=vt420+lrmm,
- use=xterm+sm+1006, use=xterm+pcfkeys, use=xterm+tmux,
-@@ -5943,6 +5944,7 @@ mlterm-256color|mlterm 3.0 with xterm 25
+ kcbt=\E[Z, kent=\EOM, nel=\EE, use=ecma+index,
+ use=ansi+rep, use=ecma+strikeout, use=vt420+lrmm,
+ use=xterm+sm+1006, use=xterm+tmux, use=ecma+italics,
+@@ -6689,6 +6690,7 @@ mlterm-256color|mlterm 3.0 with xterm 25
rxvt-basic|rxvt terminal base (X Window System),
OTbs, am, bce, eo, mir, msgr, xenl, xon, XT,
cols#80, it#8, lines#24,
+ kbs=\177,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
- bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
- clear=\E[H\E[2J, cnorm=\E[?25h, cr=\r,
-@@ -5953,7 +5955,7 @@ rxvt-basic|rxvt terminal base (X Window
+ bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=\r,
+ csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
+@@ -6698,7 +6700,7 @@ rxvt-basic|rxvt terminal base (X Window
enacs=\E(B\E)0, flash=\E[?5h$<100/>\E[?5l, home=\E[H,
ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
ind=\n, is1=\E[?47l\E=\E[?1l,
- is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kbs=^H,
+ is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l,
kcbt=\E[Z, kmous=\E[M, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
- rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E>, rmso=\E[27m,
- rmul=\E[24m,
-@@ -7454,6 +7456,7 @@ dumb-emacs-ansi|Emacs dumb terminal with
- screen|VT 100/ANSI X3.64 virtual terminal,
+ rmir=\E[4l, rmkx=\E>, rmso=\E[27m, rmul=\E[24m,
+ rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H,
+@@ -8347,6 +8349,7 @@ dumb-emacs-ansi|Emacs dumb terminal with
+ screen-base|VT 100/ANSI X3.64 virtual terminal (base),
OTbs, OTpt, am, km, mir, msgr, xenl, G0,
colors#8, cols#80, it#8, lines#24, ncv@, pairs#64, U8#1,
+ kbs=\177,
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy
yzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
-@@ -7465,7 +7468,7 @@ screen|VT 100/ANSI X3.64 virtual termina
+@@ -8358,7 +8361,7 @@ screen-base|VT 100/ANSI X3.64 virtual te
dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
enacs=\E(B\E)0, flash=\Eg, home=\E[H, hpa=\E[%i%p1%dG,
ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
- ind=\n, indn=\E[%p1%dS, is2=\E)0, kbs=^H, kcbt=\E[Z,
+ ind=\n, indn=\E[%p1%dS, is2=\E)0, kcbt=\E[Z,
- kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
- kdch1=\E[3~, kend=\E[4~, kf1=\EOP, kf10=\E[21~,
- kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
-@@ -7594,6 +7597,7 @@ screen.xterm-r6|screen customized for X1
+ kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP,
+ kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR,
+ kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
+@@ -8500,6 +8503,7 @@ screen.xterm-r6|screen customized for X1
# on Solaris because Sun's curses implementation gets confused.
screen.teraterm|disable ncv in teraterm,
ncv#127,
diff --git a/package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch b/package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch
index 972b64977df..5f1461b7b04 100644
--- a/package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch
+++ b/package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch
@@ -15,7 +15,7 @@ Subject: [PATCH] ncurses 5.9 - patch 20141206
--- a/ncurses/base/MKlib_gen.sh
+++ b/ncurses/base/MKlib_gen.sh
-@@ -502,11 +502,22 @@ sed -n -f $ED1 \
+@@ -512,11 +512,22 @@ sed -n -f $ED1 \
-e 's/gen_$//' \
-e 's/ / /g' >>$TMP
@@ -39,6 +39,6 @@ Subject: [PATCH] ncurses 5.9 - patch 20141206
- -e 's/^ //' \
- -e 's/_Bool/NCURSES_BOOL/g' \
+| sed -f $ED1 \
- | $AWK -f $AW2 \
+ | "$AWK" -f $AW2 \
| sed -f $ED3 \
| sed \
diff --git a/package/libs/ncurses/patches/103-ncurses-ar-determinism.patch b/package/libs/ncurses/patches/103-ncurses-ar-determinism.patch
index 1bfa93e3aae..a4599130cc8 100644
--- a/package/libs/ncurses/patches/103-ncurses-ar-determinism.patch
+++ b/package/libs/ncurses/patches/103-ncurses-ar-determinism.patch
@@ -1,22 +1,22 @@
--- a/aclocal.m4
+++ b/aclocal.m4
-@@ -454,7 +454,7 @@ AC_REQUIRE([CF_PROG_AR])
+@@ -523,7 +523,7 @@ AC_CACHE_CHECK(for options to update arc
+ ;;
+ (*)
+ cf_cv_ar_flags=unknown
+- for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
++ for cf_ar_flags in -curvD -curv curv -crv crv -cqv cqv -rv rv
+ do
- AC_CACHE_CHECK(for options to update archives, cf_cv_ar_flags,[
- cf_cv_ar_flags=unknown
-- for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
-+ for cf_ar_flags in -curvD -curv curv -crv crv -cqv cqv -rv rv
- do
-
- # check if $ARFLAGS already contains this choice
+ # check if $ARFLAGS already contains this choice
--- a/configure
+++ b/configure
-@@ -4751,7 +4751,7 @@ if test "${cf_cv_ar_flags+set}" = set; t
- else
-
- cf_cv_ar_flags=unknown
-- for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
-+ for cf_ar_flags in -curvD -curv curv -crv crv -cqv cqv -rv rv
- do
+@@ -5110,7 +5110,7 @@ else
+ ;;
+ (*)
+ cf_cv_ar_flags=unknown
+- for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
++ for cf_ar_flags in -curvD -curv curv -crv crv -cqv cqv -rv rv
+ do
- # check if $ARFLAGS already contains this choice
+ # check if $ARFLAGS already contains this choice
diff --git a/package/libs/ncurses/patches/900-terminfo.patch b/package/libs/ncurses/patches/900-terminfo.patch
index 3c37183f28d..86e3bc16b2b 100644
--- a/package/libs/ncurses/patches/900-terminfo.patch
+++ b/package/libs/ncurses/patches/900-terminfo.patch
@@ -1,6 +1,6 @@
--- a/misc/terminfo.src
+++ b/misc/terminfo.src
-@@ -5802,12 +5802,11 @@ konsole-xf3x|KDE console window with key
+@@ -6514,12 +6514,11 @@ konsole-xf3x|KDE console window with key
# The value for kbs (see konsole-vt100) reflects local customization rather
# than the settings used for XFree86 xterm.
konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm,
diff --git a/package/libs/nettle/Makefile b/package/libs/nettle/Makefile
index b15ea0fa073..e8dcb8ba913 100644
--- a/package/libs/nettle/Makefile
+++ b/package/libs/nettle/Makefile
@@ -8,16 +8,17 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nettle
-PKG_VERSION:=3.6
+PKG_VERSION:=3.9.1
PKG_RELEASE:=1
-PKG_USE_MIPS16:=0
+PKG_BUILD_FLAGS:=no-mips16
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/nettle
-PKG_HASH:=d24c0d0f2abffbc8f4f34dcf114b0f131ec3774895f3555922fe2f40f3d5e3f1
+PKG_HASH:=ccfeff981b0ca71bbd6fbcb054f407c60ffb644389a5be80d6716d5b550c6ce3
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:nettle_project:nettle
PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS := CONFIG_LIBNETTLE_MINI
@@ -44,7 +45,8 @@ CONFIGURE_ARGS += \
--enable-fat \
--disable-openssl \
--disable-documentation \
- --enable-static
+ --enable-static \
+ $(if $(CONFIG_powerpc64), $(if $(CONFIG_USE_MUSL),--disable-assembler))
ifeq ($(CONFIG_LIBNETTLE_MINI),y)
CONFIGURE_ARGS += --enable-mini-gmp
diff --git a/package/libs/nettle/patches/100-portability.patch b/package/libs/nettle/patches/100-portability.patch
index 2849e53eab8..a44baa296d5 100644
--- a/package/libs/nettle/patches/100-portability.patch
+++ b/package/libs/nettle/patches/100-portability.patch
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
-@@ -4635,6 +4635,7 @@ $as_echo_n "checking build system compil
+@@ -4719,6 +4719,7 @@ $as_echo_n "checking build system compil
# remove anything that might look like compiler output to our "||" expression
rm -f conftest* a.out b.out a.exe a_out.exe
cat >conftest.c <<EOF
@@ -8,7 +8,7 @@
int
main ()
{
-@@ -4667,6 +4668,7 @@ $as_echo_n "checking build system compil
+@@ -4751,6 +4752,7 @@ $as_echo_n "checking build system compil
# remove anything that might look like compiler output to our "||" expression
rm -f conftest* a.out b.out a.exe a_out.exe
cat >conftest.c <<EOF
@@ -16,7 +16,7 @@
int
main ()
{
-@@ -4703,6 +4705,7 @@ $as_echo_n "checking build system compil
+@@ -4787,6 +4789,7 @@ $as_echo_n "checking build system compil
# remove anything that might look like compiler output to our "||" expression
rm -f conftest* a.out b.out a.exe a_out.exe
cat >conftest.c <<EOF
@@ -24,7 +24,7 @@
int
main ()
{
-@@ -4753,6 +4756,7 @@ else
+@@ -4837,6 +4840,7 @@ else
gmp_cv_prog_exeext_for_build="$EXEEXT"
else
cat >conftest.c <<EOF
diff --git a/package/libs/openssl/Config.in b/package/libs/openssl/Config.in
index bc2f0584b63..871080a4cbe 100644
--- a/package/libs/openssl/Config.in
+++ b/package/libs/openssl/Config.in
@@ -8,33 +8,33 @@ config OPENSSL_OPTIMIZE_SPEED
prompt "Enable optimization for speed instead of size"
select OPENSSL_WITH_ASM
help
- Enabling this option increases code size (around 20%) and
- performance. The increase in performance and size depends on the
- target CPU. EC and AES seem to benefit the most, with EC speed
- increased by 20%-50% (mipsel & x86).
- AES-GCM is supposed to be 3x faster on x86. YMMV.
+ Enabling this option increases code size and performance.
+ The increase in performance and size depends on the
+ target CPU. EC and AES seem to benefit the most.
+
+config OPENSSL_SMALL_FOOTPRINT
+ bool
+ depends on !OPENSSL_OPTIMIZE_SPEED
+ default y if SMALL_FLASH || LOW_MEMORY_FOOTPRINT
+ prompt "Build with OPENSSL_SMALL_FOOTPRINT (read help)"
+ help
+ This turns on -DOPENSSL_SMALL_FOOTPRINT. This will save only
+ 1-3% of of the ipk size. The performance drop depends on
+ architecture and algorithm. MIPS drops 13% of performance for
+ a 3% decrease in ipk size. On Aarch64, for a 1% reduction in
+ size, ghash and GCM performance decreases 90%, while
+ Chacha20-Poly1305 is 15% slower. X86_64 drops 1% of its size
+ for 3% of performance. Other arches have not been tested.
config OPENSSL_WITH_ASM
bool
- default y if !SMALL_FLASH || !arm
+ default y
prompt "Compile with optimized assembly code"
depends on !arc
help
Disabling this option will reduce code size and performance.
The increase in performance and size depends on the target
- CPU and on the algorithms being optimized. As of 1.1.0i*:
-
- Platform Pkg Inc. Algorithms where assembly is used - ~% Speed Increase
- aarch64 174K BN, aes, sha1, sha256, sha512, nist256, poly1305
- arm 152K BN, aes, sha1, sha256, sha512, nist256, poly1305
- i386 183K BN+147%, aes+300%, rc4+55%, sha1+160%, sha256+114%, sha512+270%, nist256+282%, poly1305+292%
- mipsel 1.5K BN+97%, aes+4%, sha1+94%, sha256+60%
- mips64 3.7K BN, aes, sha1, sha256, sha512, poly1305
- powerpc 20K BN, aes, sha1, sha256, sha512, poly1305
- x86_64 228K BN+220%, aes+173%, rc4+38%, sha1+40%, sha256+64%, sha512+31%, nist256+354%, poly1305+228%
-
- * Only most common algorithms shown. Your mileage may vary.
- BN (bignum) performance was measured using RSA sign/verify.
+ CPU and on the algorithms being optimized.
config OPENSSL_WITH_SSE2
bool
@@ -42,21 +42,17 @@ config OPENSSL_WITH_SSE2
prompt "Enable use of x86 SSE2 instructions"
depends on OPENSSL_WITH_ASM && i386
help
- Use of SSE2 instructions greatly increase performance (up to
- 3x faster) with a minimum (~0.2%, or 23KB) increase in package
- size, but it will bring no benefit if your hardware does not
- support them, such as Geode GX and LX. In this case you may
- save 23KB by saying yes here. AMD Geode NX, and Intel
- Pentium 4 and above support SSE2.
+ Use of SSE2 instructions greatly increase performance with a
+ minimum increase in package size, but it will bring no benefit
+ if your hardware does not support them, such as Geode GX and LX.
+ AMD Geode NX, and Intel Pentium 4 and above support SSE2.
config OPENSSL_WITH_DEPRECATED
bool
default y
- prompt "Include deprecated APIs (See help for a list of packages that need this)"
+ prompt "Include deprecated APIs"
help
- Since openssl 1.1.x is still new to openwrt, some packages
- requiring this option do not list it as a requirement yet:
- * freeswitch-stable, freeswitch, python, python3, squid.
+ This drops all deprecated API, including engine support.
config OPENSSL_NO_DEPRECATED
bool
@@ -64,7 +60,7 @@ config OPENSSL_NO_DEPRECATED
config OPENSSL_WITH_ERROR_MESSAGES
bool
- default y if !SMALL_FLASH && !LOW_MEMORY_FOOTPRINT
+ default y if !OPENSSL_SMALL_FOOTPRINT || (!SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
prompt "Include error messages"
help
This option aids debugging, but increases package size and
@@ -84,7 +80,6 @@ config OPENSSL_WITH_TLS13
protocol;
* to increase performance by reducing the number of round-trips
when performing a full handshake.
- It increases package size by ~4KB.
config OPENSSL_WITH_DTLS
bool
@@ -172,16 +167,24 @@ config OPENSSL_WITH_CAMELLIA
config OPENSSL_WITH_IDEA
bool
- prompt "Enable IDEA cipher support"
+ default y if !SMALL_FLASH
+ prompt "Enable IDEA cipher support (needs legacy provider)"
help
IDEA is a block cipher with 128-bit keys.
+ To use the cipher, one must install the libopenssl-legacy
+ package, using a main libopenssl package compiled with this
+ option enabled as well.
config OPENSSL_WITH_SEED
bool
- prompt "Enable SEED cipher support"
+ default y if !SMALL_FLASH
+ prompt "Enable SEED cipher support (needs legacy provider)"
help
SEED is a block cipher with 128-bit keys broadly used in
South Korea, but seldom found elsewhere.
+ To use the cipher, one must install the libopenssl-legacy
+ package, using a main libopenssl package compiled with this
+ option enabled as well.
config OPENSSL_WITH_SM234
bool
@@ -202,11 +205,21 @@ config OPENSSL_WITH_BLAKE2
config OPENSSL_WITH_MDC2
bool
- prompt "Enable MDC2 digest support"
+ default y if !SMALL_FLASH
+ prompt "Enable MDC2 digest support (needs legacy provider)"
+ help
+ To use the digest, one must install the libopenssl-legacy
+ package, using a main libopenssl package compiled with this
+ option enabled as well.
config OPENSSL_WITH_WHIRLPOOL
bool
- prompt "Enable Whirlpool digest support"
+ default y if !SMALL_FLASH
+ prompt "Enable Whirlpool digest support (needs legacy provider)"
+ help
+ To use the digest, one must install the libopenssl-legacy
+ package, using a main libopenssl package compiled with this
+ option enabled as well.
config OPENSSL_WITH_COMPRESSION
bool
@@ -233,6 +246,7 @@ comment "Engine/Hardware Support"
config OPENSSL_ENGINE
bool "Enable engine support"
+ select OPENSSL_WITH_DEPRECATED
default y
help
This enables alternative cryptography implementations,
diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 11e5ecfccbc..3bb60bc5ed7 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -8,15 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=openssl
-PKG_BASE:=1.1.1
-PKG_BUGFIX:=k
-PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
+PKG_VERSION:=3.0.13
PKG_RELEASE:=1
-PKG_USE_MIPS16:=0
-ENGINES_DIR=engines-1.1
+PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
PKG_BUILD_PARALLEL:=1
+PKG_BASE:=$(subst $(space),.,$(wordlist 1,2,$(subst .,$(space),$(PKG_VERSION))))
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \
http://www.openssl.org/source/ \
@@ -26,9 +24,9 @@ PKG_SOURCE_URL:= \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/
-PKG_HASH:=892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5
+PKG_HASH:=88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313
-PKG_LICENSE:=OpenSSL
+PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
PKG_CPE_ID:=cpe:/a:openssl:openssl
@@ -41,6 +39,7 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_NO_DEPRECATED \
CONFIG_OPENSSL_OPTIMIZE_SPEED \
CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM \
+ CONFIG_OPENSSL_SMALL_FOOTPRINT \
CONFIG_OPENSSL_WITH_ARIA \
CONFIG_OPENSSL_WITH_ASM \
CONFIG_OPENSSL_WITH_ASYNC \
@@ -65,6 +64,7 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_WITH_WHIRLPOOL
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/openssl-module.mk
ifneq ($(CONFIG_CCACHE),)
HOSTCC=$(HOSTCC_NOCACHE)
@@ -95,9 +95,10 @@ $(call Package/openssl/Default)
DEPENDS:=+OPENSSL_WITH_COMPRESSION:zlib \
+OPENSSL_ENGINE_BUILTIN_AFALG:kmod-crypto-user \
+OPENSSL_ENGINE_BUILTIN_DEVCRYPTO:kmod-cryptodev \
- +OPENSSL_ENGINE_BUILTIN_PADLOCK:kmod-crypto-hw-padlock
+ +OPENSSL_ENGINE_BUILTIN_PADLOCK:kmod-crypto-hw-padlock \
+ +(arm||armeb||mips||mipsel||powerpc||arc):libatomic
TITLE+= (libraries)
- ABI_VERSION:=1.1
+ ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION)))
MENU:=1
endef
@@ -128,6 +129,8 @@ endef
define Package/libopenssl-conf/conffiles
/etc/ssl/openssl.cnf
+$(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO),/etc/ssl/modules.cnf.d/devcrypto.cnf)
+$(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK),/etc/ssl/modules.cnf.d/padlock.cnf)
endef
define Package/libopenssl-conf/description
@@ -135,57 +138,87 @@ $(call Package/openssl/Default/description)
This package installs the OpenSSL configuration file /etc/ssl/openssl.cnf.
endef
+ifneq ($(CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK)$(CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO),)
+define Package/libopenssl-conf/postinst
+#!/bin/sh
+
+add_engine_config() {
+ if [ -z "$${IPKG_INSTROOT}" ] && uci -q get "openssl.$$1" >/dev/null; then
+ [ "$$(uci -q get "openssl.$$1.builtin")" = 1 ] && return
+ uci set "openssl.$$1.builtin=1" && uci commit openssl
+ return
+ fi
+}
+
+$(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO),add_engine_config devcrypto)
+$(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK),add_engine_config padlock)
+endef
+endif
+
+$(eval $(call Package/openssl/add-provider,legacy))
+define Package/libopenssl-legacy
+ $(call Package/openssl/Default)
+ $(call Package/openssl/module/Default)
+ TITLE:=OpenSSL legacy provider
+endef
+
+define Package/libopenssl-legacy/description
+The OpenSSL legacy provider supplies OpenSSL implementations of algorithms that
+have been deemed legacy. Such algorithms have commonly fallen out of use, have
+been deemed insecure by the cryptography community, or something similar. See
+https://www.openssl.org/docs/man3.0/man7/OSSL_PROVIDER-legacy.html
+endef
+
+$(eval $(call Package/openssl/add-engine,afalg))
define Package/libopenssl-afalg
$(call Package/openssl/Default)
- SUBMENU:=SSL
+ $(call Package/openssl/engine/Default)
TITLE:=AFALG hardware acceleration engine
- DEPENDS:=libopenssl @OPENSSL_ENGINE @KERNEL_AIO \
- +PACKAGE_libopenssl-afalg:kmod-crypto-user +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN
+ DEPENDS += @KERNEL_AIO +PACKAGE_libopenssl-afalg:kmod-crypto-user \
+ @!OPENSSL_ENGINE_BUILTIN
endef
define Package/libopenssl-afalg/description
This package adds an engine that enables hardware acceleration
through the AF_ALG kernel interface.
-To use it, you need to configure the engine in /etc/ssl/openssl.cnf
-See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module
+See https://www.openssl.org/docs/man3.0/man5/config.html#Engine-Configuration
and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators
The engine_id is "afalg"
endef
+$(eval $(call Package/openssl/add-engine,devcrypto))
define Package/libopenssl-devcrypto
$(call Package/openssl/Default)
- SUBMENU:=SSL
+ $(call Package/openssl/engine/Default)
TITLE:=/dev/crypto hardware acceleration engine
- DEPENDS:=libopenssl @OPENSSL_ENGINE +PACKAGE_libopenssl-devcrypto:kmod-cryptodev +libopenssl-conf \
- @!OPENSSL_ENGINE_BUILTIN
+ DEPENDS += +PACKAGE_libopenssl-devcrypto:kmod-cryptodev @!OPENSSL_ENGINE_BUILTIN
endef
define Package/libopenssl-devcrypto/description
This package adds an engine that enables hardware acceleration
through the /dev/crypto kernel interface.
-To use it, you need to configure the engine in /etc/ssl/openssl.cnf
-See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module
+See https://www.openssl.org/docs/man3.0/man5/config.html#Engine-Configuration
and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators
The engine_id is "devcrypto"
endef
+$(eval $(call Package/openssl/add-engine,padlock))
define Package/libopenssl-padlock
$(call Package/openssl/Default)
- SUBMENU:=SSL
+ $(call Package/openssl/engine/Default)
TITLE:=VIA Padlock hardware acceleration engine
- DEPENDS:=libopenssl @OPENSSL_ENGINE @TARGET_x86 +PACKAGE_libopenssl-padlock:kmod-crypto-hw-padlock \
- +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN
+ DEPENDS += @TARGET_x86 +PACKAGE_libopenssl-padlock:kmod-crypto-hw-padlock \
+ @!OPENSSL_ENGINE_BUILTIN
endef
define Package/libopenssl-padlock/description
This package adds an engine that enables VIA Padlock hardware acceleration.
-To use it, you need to configure it in /etc/ssl/openssl.cnf.
-See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module
+See https://www.openssl.org/docs/man3.0/man5/config.html#Engine-Configuration
and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators
The engine_id is "padlock"
endef
-OPENSSL_OPTIONS:= shared
+OPENSSL_OPTIONS:= shared no-tests
ifndef CONFIG_OPENSSL_WITH_BLAKE2
OPENSSL_OPTIONS += no-blake2
@@ -257,7 +290,9 @@ endif
ifeq ($(CONFIG_OPENSSL_OPTIMIZE_SPEED),y)
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
-else
+endif
+
+ifeq ($(CONFIG_OPENSSL_SMALL_FOOTPRINT),y)
OPENSSL_OPTIONS += -DOPENSSL_SMALL_FOOTPRINT
endif
@@ -271,7 +306,7 @@ ifdef CONFIG_OPENSSL_ENGINE
OPENSSL_OPTIONS += enable-devcryptoeng
endif
ifndef CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK
- OPENSSL_OPTIONS += no-hw-padlock
+ OPENSSL_OPTIONS += no-padlockeng
endif
else
ifdef CONFIG_PACKAGE_libopenssl-devcrypto
@@ -281,7 +316,7 @@ ifdef CONFIG_OPENSSL_ENGINE
OPENSSL_OPTIONS += no-afalgeng
endif
ifndef CONFIG_PACKAGE_libopenssl-padlock
- OPENSSL_OPTIONS += no-hw-padlock
+ OPENSSL_OPTIONS += no-padlockeng
endif
endif
else
@@ -331,6 +366,7 @@ define Build/Configure
--libdir=lib \
--openssldir=/etc/ssl \
--cross-compile-prefix="$(TARGET_CROSS)" \
+ $(TARGET_CFLAGS) \
$(TARGET_CPPFLAGS) \
$(TARGET_LDFLAGS) \
$(OPENSSL_OPTIONS) && \
@@ -338,8 +374,7 @@ define Build/Configure
)
endef
-TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
-TARGET_LDFLAGS += -Wl,--gc-sections
+TARGET_CFLAGS += $(FPIC)
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
@@ -376,8 +411,17 @@ define Package/libopenssl/install
endef
define Package/libopenssl-conf/install
- $(INSTALL_DIR) $(1)/etc/ssl
+ $(INSTALL_DIR) $(1)/etc/ssl/modules.cnf.d $(1)/etc/config $(1)/etc/init.d
$(CP) $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(1)/etc/ssl/
+ $(INSTALL_BIN) ./files/openssl.init $(1)/etc/init.d/openssl
+ $(SED) 's!%ENGINES_DIR%!/usr/lib/$(ENGINES_DIR)!' $(1)/etc/init.d/openssl
+ touch $(1)/etc/config/openssl
+ $(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO),
+ $(CP) ./files/devcrypto.cnf $(1)/etc/ssl/modules.cnf.d/
+ echo -e "config engine 'devcrypto'\n\toption enabled '1'\n\toption builtin '1'" >> $(1)/etc/config/openssl)
+ $(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK),
+ $(CP) ./files/padlock.cnf $(1)/etc/ssl/modules.cnf.d/
+ echo -e "\nconfig engine 'padlock'\n\toption enabled '1'\n\toption builtin '1'" >> $(1)/etc/config/openssl)
endef
define Package/openssl-util/install
@@ -385,24 +429,10 @@ define Package/openssl-util/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openssl $(1)/usr/bin/
endef
-define Package/libopenssl-afalg/install
- $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/afalg.so $(1)/usr/lib/$(ENGINES_DIR)
-endef
-
-define Package/libopenssl-devcrypto/install
- $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/devcrypto.so $(1)/usr/lib/$(ENGINES_DIR)
-endef
-
-define Package/libopenssl-padlock/install
- $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/*padlock.so $(1)/usr/lib/$(ENGINES_DIR)
-endef
-
$(eval $(call BuildPackage,libopenssl))
$(eval $(call BuildPackage,libopenssl-conf))
$(eval $(call BuildPackage,libopenssl-afalg))
$(eval $(call BuildPackage,libopenssl-devcrypto))
+$(eval $(call BuildPackage,libopenssl-legacy))
$(eval $(call BuildPackage,libopenssl-padlock))
$(eval $(call BuildPackage,openssl-util))
diff --git a/package/libs/openssl/files/afalg.cnf b/package/libs/openssl/files/afalg.cnf
new file mode 100644
index 00000000000..fd206361bf3
--- /dev/null
+++ b/package/libs/openssl/files/afalg.cnf
@@ -0,0 +1,3 @@
+[afalg_sect]
+default_algorithms = ALL
+
diff --git a/package/libs/openssl/files/devcrypto.cnf b/package/libs/openssl/files/devcrypto.cnf
new file mode 100644
index 00000000000..91d0eee17fa
--- /dev/null
+++ b/package/libs/openssl/files/devcrypto.cnf
@@ -0,0 +1,34 @@
+[devcrypto_sect]
+# Leave this alone and configure algorithms with CIPERS/DIGESTS below
+default_algorithms = ALL
+
+# Configuration commands:
+# Run 'openssl engine -t -c -vv -pre DUMP_INFO devcrypto' to see a
+# list of supported algorithms, along with their driver, whether they
+# are hw accelerated or not, and the engine's configuration commands.
+
+# USE_SOFTDRIVERS: specifies whether to use software (not accelerated)
+# drivers (0=use only accelerated drivers, 1=allow all drivers, 2=use
+# if acceleration can't be determined) [default=2]
+#USE_SOFTDRIVERS = 2
+
+# CIPHERS: either ALL, NONE, or a comma-separated list of ciphers to
+# enable [default=ALL]
+# It is recommended to disable the ECB ciphers; in most cases, it will
+# only be used for PRNG, in small blocks, where performance is poor,
+# and there may be problems with apps forking with open crypto
+# contexts, leading to failures. The CBC ciphers work well.
+CIPHERS=DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC, \
+ AES-128-CTR, AES-192-CTR, AES-256-CTR
+
+# DIGESTS: either ALL, NONE, or a comma-separated list of digests to
+# enable [default=NONE]
+# It is strongly recommended not to enable digests; their performance
+# is poor, and there are many cases in which they will not work,
+# especially when calling fork with open crypto contexts. Openssh,
+# for example, does this, and you may not be able to login.
+# Sysupgrade will fail as well. If you're adventurous enough to change
+# this, you should change it back to NONE, and reboot before running
+# sysupgrade!
+DIGESTS = NONE
+
diff --git a/package/libs/openssl/files/legacy.cnf b/package/libs/openssl/files/legacy.cnf
new file mode 100644
index 00000000000..4c20617444b
--- /dev/null
+++ b/package/libs/openssl/files/legacy.cnf
@@ -0,0 +1,3 @@
+[legacy_sect]
+activate = 1
+
diff --git a/package/libs/openssl/files/openssl.init b/package/libs/openssl/files/openssl.init
new file mode 100755
index 00000000000..1c1e8745ffe
--- /dev/null
+++ b/package/libs/openssl/files/openssl.init
@@ -0,0 +1,72 @@
+#!/bin/sh /etc/rc.common
+
+START=13
+ENGINES_CNF=/var/etc/ssl/engines.cnf
+ENGINES_DIR=%ENGINES_DIR%
+MODULES_DIR=/usr/lib/ossl-modules
+PROVIDERS_CNF=/var/etc/ssl/providers.cnf
+
+#1: cnf file
+write_cnf_header() {
+ mkdir -p "$(dirname "$1")" && \
+ echo "# This file is automatically generated from /etc/config/openssl." >"$1" || {
+ echo "Error writing to $1."
+ return 1
+ }
+}
+
+
+#1: module name
+#2: output cnf file
+#3: module.so
+enable_module() {
+ local builtin enabled force
+
+ config_get_bool builtin "$1" builtin 0
+ config_get_bool enabled "$1" enabled 1
+ config_get_bool force "$1" force 0
+
+ if [ "$enabled" = 0 ]; then
+ [ "$builtin" = 0 ] && return 1
+ echo "Engine $1 is built into the libcrypto library and can't be disabled through UCI."
+ echo "If the engine was not built-in, remove 'config builtin' from /etc/config/openssl."
+ elif [ "$force" = 1 ]; then
+ printf "[Forced] "
+ elif ! grep -q "\\[ *$1_sect *]" /etc/ssl/modules.cnf.d/*; then
+ echo "$1: Could not find section [$1] in config files."
+ return 1
+ elif [ "$builtin" = 1 ]; then
+ printf "[Builtin] "
+ elif [ ! -f "$3" ];then
+ echo "Skipping $1: $3 not found."
+ return 1
+ fi
+ echo "Enabling $1"
+ echo "$1=$1_sect" >>"$2"
+}
+
+config_engine() {
+ enable_module "$1" "$ENGINES_CNF" \
+ "${ENGINES_DIR}/${1}.so"
+}
+
+config_provider() {
+ enable_module "$1" "$PROVIDERS_CNF" \
+ "${MODULES_DIR}/${1}.so"
+}
+
+start() {
+ local ret=0
+
+ config_load openssl
+
+ echo Generating engines.cnf
+ write_cnf_header "${ENGINES_CNF}" && \
+ config_foreach config_engine engine || ret=$?
+
+ echo Generating providers.cnf
+ write_cnf_header "${PROVIDERS_CNF}" && \
+ config_foreach config_provider provider || ret=$?
+
+ return $ret
+}
diff --git a/package/libs/openssl/files/padlock.cnf b/package/libs/openssl/files/padlock.cnf
new file mode 100644
index 00000000000..f4085d907b4
--- /dev/null
+++ b/package/libs/openssl/files/padlock.cnf
@@ -0,0 +1,3 @@
+[padlock_sect]
+default_algorithms = ALL
+
diff --git a/package/libs/openssl/patches/100-Configure-afalg-support.patch b/package/libs/openssl/patches/100-Configure-afalg-support.patch
index 98944103b54..e9cd7bf9c1a 100644
--- a/package/libs/openssl/patches/100-Configure-afalg-support.patch
+++ b/package/libs/openssl/patches/100-Configure-afalg-support.patch
@@ -1,4 +1,4 @@
-From 559fbff13af9ce2fbc0b9bc5727a7323e1db6217 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Thu, 27 Sep 2018 08:29:21 -0300
Subject: Do not use host kernel version to disable AFALG
@@ -8,11 +8,9 @@ version to disable building the AFALG engine on openwrt targets.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-diff --git a/Configure b/Configure
-index 5a699836f3..74d057c219 100755
--- a/Configure
+++ b/Configure
-@@ -1545,7 +1545,9 @@ unless ($disabled{"crypto-mdebug-backtrace"})
+@@ -1677,7 +1677,9 @@ $config{CFLAGS} = [ map { $_ eq '--ossl-
unless ($disabled{afalgeng}) {
$config{afalgeng}="";
diff --git a/package/libs/openssl/patches/110-openwrt_targets.patch b/package/libs/openssl/patches/110-openwrt_targets.patch
index d0530b4661f..a97c603fa7c 100644
--- a/package/libs/openssl/patches/110-openwrt_targets.patch
+++ b/package/libs/openssl/patches/110-openwrt_targets.patch
@@ -1,4 +1,4 @@
-From 3d43acc6068f00dbfc0c9a06355e2c8f7d302d0f Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Thu, 27 Sep 2018 08:30:24 -0300
Subject: Add openwrt targets
@@ -7,12 +7,9 @@ Targets are named: linux-$(CONFIG_ARCH)-openwrt
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-diff --git a/Configurations/25-openwrt.conf b/Configurations/25-openwrt.conf
-new file mode 100644
-index 0000000000..86a86d31e4
--- /dev/null
+++ b/Configurations/25-openwrt.conf
-@@ -0,0 +1,48 @@
+@@ -0,0 +1,56 @@
+## Openwrt "CONFIG_ARCH" matching targets.
+
+# The targets need to end in '-openwrt' for the AFALG patch to work
@@ -26,7 +23,7 @@ index 0000000000..86a86d31e4
+ inherit_from => [ "linux-aarch64", "openwrt" ],
+ },
+ "linux-arc-openwrt" => {
-+ inherit_from => [ "linux-generic32", "openwrt" ],
++ inherit_from => [ "linux-latomic", "openwrt" ],
+ },
+ "linux-arm-openwrt" => {
+ inherit_from => [ "linux-armv4", "openwrt" ],
@@ -52,6 +49,14 @@ index 0000000000..86a86d31e4
+ "linux-powerpc-openwrt" => {
+ inherit_from => [ "linux-ppc", "openwrt" ],
+ },
++ "linux-powerpc64-openwrt" => {
++ inherit_from => [ "linux-ppc64", "openwrt" ],
++ perlasm_scheme => "linux64v2",
++ },
++ "linux-riscv64-openwrt" => {
++ inherit_from => [ "linux-generic64", "openwrt" ],
++ perlasm_scheme => "linux64",
++ },
+ "linux-x86_64-openwrt" => {
+ inherit_from => [ "linux-x86_64", "openwrt" ],
+ },
diff --git a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch
index 7faec9ab887..ebdb940b426 100644
--- a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch
+++ b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch
@@ -1,4 +1,4 @@
-From 4ad8f2fe6bf3b91df7904fcbe960e5fdfca36336 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Thu, 27 Sep 2018 08:31:38 -0300
Subject: Avoid exposing build directories
@@ -8,16 +8,14 @@ OpenSSL_version(OPENSSL_CFLAGS), or running openssl version -a
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-diff --git a/crypto/build.info b/crypto/build.info
-index 2c619c62e8..893128345a 100644
--- a/crypto/build.info
+++ b/crypto/build.info
-@@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
- ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl
+@@ -109,7 +109,7 @@ DEFINE[../libcrypto]=$UPLINKDEF
+ DEPEND[info.o]=buildinf.h
DEPEND[cversion.o]=buildinf.h
-GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)"
+GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(filter-out -I% -iremap% -fmacro-prefix-map% -ffile-prefix-map%,$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q))" "$(PLATFORM)"
- DEPEND[buildinf.h]=../configdata.pm
- GENERATE[uplink-x86.s]=../ms/uplink-x86.pl $(PERLASM_SCHEME)
+ GENERATE[uplink-x86.S]=../ms/uplink-x86.pl
+ GENERATE[uplink-x86_64.s]=../ms/uplink-x86_64.pl
diff --git a/package/libs/openssl/patches/130-dont-build-fuzz-docs.patch b/package/libs/openssl/patches/130-dont-build-fuzz-docs.patch
new file mode 100644
index 00000000000..60c46639239
--- /dev/null
+++ b/package/libs/openssl/patches/130-dont-build-fuzz-docs.patch
@@ -0,0 +1,20 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Thu, 27 Sep 2018 08:34:38 -0300
+Subject: Do not build tests and fuzz directories
+
+This shortens build time.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+
+--- a/build.info
++++ b/build.info
+@@ -1,7 +1,7 @@
+ # Note that some of these directories are filtered in Configure. Look for
+ # %skipdir there for further explanations.
+
+-SUBDIRS=crypto ssl apps util tools fuzz providers doc
++SUBDIRS=crypto ssl apps util tools providers
+ IF[{- !$disabled{tests} -}]
+ SUBDIRS=test
+ ENDIF
diff --git a/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch b/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch
deleted file mode 100644
index 7f33cb9daea..00000000000
--- a/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ba2fe646f2d9104a18b066e43582154049e9ffcb Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Thu, 27 Sep 2018 08:34:38 -0300
-Subject: Do not build tests and fuzz directories
-
-This shortens build time.
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-diff --git a/Configure b/Configure
-index 74d057c219..5813e9f8fe 100755
---- a/Configure
-+++ b/Configure
-@@ -318,7 +318,7 @@ my $auto_threads=1; # enable threads automatically? true by default
- my $default_ranlib;
-
- # Top level directories to build
--$config{dirs} = [ "crypto", "ssl", "engines", "apps", "test", "util", "tools", "fuzz" ];
-+$config{dirs} = [ "crypto", "ssl", "engines", "apps", "util", "tools" ];
- # crypto/ subdirectories to build
- $config{sdirs} = [
- "objects",
-@@ -330,7 +330,7 @@ $config{sdirs} = [
- "cms", "ts", "srp", "cmac", "ct", "async", "kdf", "store"
- ];
- # test/ subdirectories to build
--$config{tdirs} = [ "ossl_shim" ];
-+$config{tdirs} = [];
-
- # Known TLS and DTLS protocols
- my @tls = qw(ssl3 tls1 tls1_1 tls1_2 tls1_3);
diff --git a/package/libs/openssl/patches/140-allow-prefer-chacha20.patch b/package/libs/openssl/patches/140-allow-prefer-chacha20.patch
index b293db28f7e..fb7bc843617 100644
--- a/package/libs/openssl/patches/140-allow-prefer-chacha20.patch
+++ b/package/libs/openssl/patches/140-allow-prefer-chacha20.patch
@@ -1,4 +1,4 @@
-From 4f7ab2040bb71f03a8f8388911144559aa2a5b60 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Thu, 27 Sep 2018 08:44:39 -0300
Subject: Add OPENSSL_PREFER_CHACHA_OVER_GCM option
@@ -14,34 +14,9 @@ when the client has it on top of its ciphersuite preference.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
-index 6724ccf2d2..96d959427e 100644
---- a/include/openssl/ssl.h
-+++ b/include/openssl/ssl.h
-@@ -173,9 +173,15 @@ extern "C" {
- # define SSL_DEFAULT_CIPHER_LIST "ALL:!COMPLEMENTOFDEFAULT:!eNULL"
- /* This is the default set of TLSv1.3 ciphersuites */
- # if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
--# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
-- "TLS_CHACHA20_POLY1305_SHA256:" \
-- "TLS_AES_128_GCM_SHA256"
-+# ifdef OPENSSL_PREFER_CHACHA_OVER_GCM
-+# define TLS_DEFAULT_CIPHERSUITES "TLS_CHACHA20_POLY1305_SHA256:" \
-+ "TLS_AES_256_GCM_SHA384:" \
-+ "TLS_AES_128_GCM_SHA256"
-+# else
-+# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
-+ "TLS_CHACHA20_POLY1305_SHA256:" \
-+ "TLS_AES_128_GCM_SHA256"
-+# endif
- # else
- # define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
- "TLS_AES_128_GCM_SHA256"
-diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
-index 27a1b2ec68..7039811323 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
-@@ -1467,11 +1467,29 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
+@@ -1506,11 +1506,29 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
&tail);
@@ -71,7 +46,7 @@ index 27a1b2ec68..7039811323 100644
/*
* ...and generally, our preferred cipher is AES.
-@@ -1527,7 +1545,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
+@@ -1565,7 +1583,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
* Within each group, ciphers remain sorted by strength and previous
* preference, i.e.,
* 1) ECDHE > DHE
@@ -80,3 +55,38 @@ index 27a1b2ec68..7039811323 100644
* 3) AES > rest
* 4) TLS 1.2 > legacy
*
+@@ -2236,7 +2254,13 @@ const char *OSSL_default_cipher_list(voi
+ */
+ const char *OSSL_default_ciphersuites(void)
+ {
++#ifdef OPENSSL_PREFER_CHACHA_OVER_GCM
++ return "TLS_CHACHA20_POLY1305_SHA256:"
++ "TLS_AES_256_GCM_SHA384:"
++ "TLS_AES_128_GCM_SHA256";
++#else
+ return "TLS_AES_256_GCM_SHA384:"
+ "TLS_CHACHA20_POLY1305_SHA256:"
+ "TLS_AES_128_GCM_SHA256";
++#endif
+ }
+--- a/include/openssl/ssl.h.in
++++ b/include/openssl/ssl.h.in
+@@ -195,9 +195,15 @@ extern "C" {
+ * DEPRECATED IN 3.0.0, in favor of OSSL_default_ciphersuites()
+ * Update both macro and function simultaneously
+ */
+-# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
+- "TLS_CHACHA20_POLY1305_SHA256:" \
+- "TLS_AES_128_GCM_SHA256"
++# ifdef OPENSSL_PREFER_CHACHA_OVER_GCM
++# define TLS_DEFAULT_CIPHERSUITES "TLS_CHACHA20_POLY1305_SHA256:" \
++ "TLS_AES_256_GCM_SHA384:" \
++ "TLS_AES_128_GCM_SHA256"
++# else
++# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
++ "TLS_CHACHA20_POLY1305_SHA256:" \
++ "TLS_AES_128_GCM_SHA256"
++# endif
+ # endif
+ /*
+ * As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always
diff --git a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch
index c90fce24427..9fe9cdf590c 100644
--- a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch
+++ b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch
@@ -1,102 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cotequeiroz@gmail.com>
+Date: Sat, 27 Mar 2021 17:43:25 -0300
+Subject: openssl.cnf: add engine configuration
+
+This adds configuration options for engines, loading all cnf files under
+/etc/ssl/engines.cnf.d/.
+
+Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
+
--- a/apps/openssl.cnf
+++ b/apps/openssl.cnf
-@@ -22,6 +22,99 @@ oid_section = new_oids
- # (Alternatively, use a configuration file that has only
- # X.509v3 extensions in its main [= default] section.)
+@@ -52,10 +52,13 @@ tsa_policy3 = 1.2.3.4.5.7
-+openssl_conf=openssl_conf
-+
-+[openssl_conf]
-+engines=engines
-+
-+[engines]
-+# To enable an engine, install the package, and uncomment it here:
-+#devcrypto=devcrypto
-+#afalg=afalg
-+#padlock=padlock
-+##gost=gost
-+
-+[afalg]
-+# Leave this alone and configure algorithms with CIPERS/DIGESTS below
-+default_algorithms = ALL
-+
-+# The following commands are only available if using the alternative
-+# (sync) AFALG engine
-+# Configuration commands:
-+# Run 'openssl engine -t -c -vv -pre DUMP_INFO devcrypto' to see a
-+# list of supported algorithms, along with their driver, whether they
-+# are hw accelerated or not, and the engine's configuration commands.
-+
-+# USE_SOFTDRIVERS: specifies whether to use software (not accelerated)
-+# drivers (0=use only accelerated drivers, 1=allow all drivers, 2=use
-+# if acceleration can't be determined) [default=2]
-+#USE_SOFTDRIVERS = 2
-+
-+# CIPHERS: either ALL, NONE, NO_ECB (all except ECB-mode) or a
-+# comma-separated list of ciphers to enable [default=NO_ECB]
-+# Starting in 1.2.0, if you use a cipher list, each cipher may be
-+# followed by a colon (:) and the minimum request length to use
-+# AF_ALG drivers for that cipher; smaller requests are processed by
-+# softare; a negative value will use the default for that cipher
-+#CIPHERS=AES-128-CBC:1024, AES-256-CBC:768, DES-EDE3-CBC:0
-+
-+# DIGESTS: either ALL, NONE, or a comma-separated list of digests to
-+# enable [default=NONE]
-+# It is strongly recommended not to enable digests; their performance
-+# is poor, and there are many cases in which they will not work,
-+# especially when calling fork with open crypto contexts. Openssh,
-+# for example, does this, and you may not be able to login.
-+#DIGESTS = NONE
-+
-+[devcrypto]
-+# Leave this alone and configure algorithms with CIPERS/DIGESTS below
-+default_algorithms = ALL
-+
-+# Configuration commands:
-+# Run 'openssl engine -t -c -vv -pre DUMP_INFO devcrypto' to see a
-+# list of supported algorithms, along with their driver, whether they
-+# are hw accelerated or not, and the engine's configuration commands.
-+
-+# USE_SOFTDRIVERS: specifies whether to use software (not accelerated)
-+# drivers (0=use only accelerated drivers, 1=allow all drivers, 2=use
-+# if acceleration can't be determined) [default=2]
-+#USE_SOFTDRIVERS = 2
-+
-+# CIPHERS: either ALL, NONE, or a comma-separated list of ciphers to
-+# enable [default=ALL]
-+# It is recommended to disable the ECB ciphers; in most cases, it will
-+# only be used for PRNG, in small blocks, where performance is poor,
-+# and there may be problems with apps forking with open crypto
-+# contexts, leading to failures. The CBC ciphers work well:
-+#CIPHERS=DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC
-+
-+# DIGESTS: either ALL, NONE, or a comma-separated list of digests to
-+# enable [default=NONE]
-+# It is strongly recommended not to enable digests; their performance
-+# is poor, and there are many cases in which they will not work,
-+# especially when calling fork with open crypto contexts. Openssh,
-+# for example, does this, and you may not be able to login.
-+#DIGESTS = NONE
-+
-+[padlock]
-+default_algorithms = ALL
-+
-+[gost]
-+default_algorithms = ALL
-+# CRYPT_PARAMS: OID of default GOST 28147-89 parameters It allows the
-+# user to choose between different parameter sets of symmetric cipher
-+# algorithm. RFC 4357 specifies several parameters for the
-+# GOST 28147-89 algorithm, but OpenSSL doesn't provide user interface
-+# to choose one when encrypting. So use engine configuration parameter
-+# instead.
-+# Value of this parameter can be either short name, defined in OpenSSL
-+# obj_dat.h header file or numeric representation of OID, defined in
-+# RFC 4357. Defaults to id-tc26-gost-28147-param-Z
-+#CRYPT_PARAMS = id-tc26-gost-28147-param-Z
-+
-+# PBE_PARAMS: Shortname of default digest alg for PBE
-+#PBE_PARAMS =
+ [openssl_init]
+ providers = provider_sect
++engines = engines_sect
+
+ # List of providers to load
+ [provider_sect]
+ default = default_sect
++.include /var/etc/ssl/providers.cnf
++
+ # The fips section name should match the section name inside the
+ # included fipsmodule.cnf.
+ # fips = fips_sect
+@@ -69,7 +72,13 @@ default = default_sect
+ # OpenSSL may not work correctly which could lead to significant system
+ # problems including inability to remotely access the system.
+ [default_sect]
+-# activate = 1
++activate = 1
++
++[engines_sect]
++.include /var/etc/ssl/engines.cnf
++
++.include /etc/ssl/modules.cnf.d
+
- [ new_oids ]
- # We can add new OIDs in here for use by 'ca', 'req' and 'ts'.
+
+ ####################################################################
diff --git a/package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch b/package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch
deleted file mode 100644
index 84c68b16a29..00000000000
--- a/package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From f14345422747a495a52f9237a43b8be189f21912 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Mon, 5 Nov 2018 15:54:17 -0200
-Subject: eng_devcrypto: save ioctl if EVP_MD_..FLAG_ONESHOT
-
-Since each ioctl causes a context switch, slowing things down, if
-EVP_MD_CTX_FLAG_ONESHOT is set, then:
- - call the ioctl in digest_update, saving the result; and
- - just copy the result in digest_final, instead of using another ioctl.
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
-Reviewed-by: Richard Levitte <levitte@openssl.org>
-(Merged from https://github.com/openssl/openssl/pull/7585)
-
-diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
-index a727c6f646..a2c9a966f7 100644
---- a/crypto/engine/eng_devcrypto.c
-+++ b/crypto/engine/eng_devcrypto.c
-@@ -461,6 +461,7 @@ struct digest_ctx {
- struct session_op sess;
- /* This signals that the init function was called, not that it succeeded. */
- int init_called;
-+ unsigned char digest_res[HASH_MAX_LEN];
- };
-
- static const struct digest_data_st {
-@@ -564,12 +565,15 @@ static int digest_update(EVP_MD_CTX *ctx, const void *data, size_t count)
- if (digest_ctx == NULL)
- return 0;
-
-- if (digest_op(digest_ctx, data, count, NULL, COP_FLAG_UPDATE) < 0) {
-- SYSerr(SYS_F_IOCTL, errno);
-- return 0;
-+ if (EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_ONESHOT)) {
-+ if (digest_op(digest_ctx, data, count, digest_ctx->digest_res, 0) >= 0)
-+ return 1;
-+ } else if (digest_op(digest_ctx, data, count, NULL, COP_FLAG_UPDATE) >= 0) {
-+ return 1;
- }
-
-- return 1;
-+ SYSerr(SYS_F_IOCTL, errno);
-+ return 0;
- }
-
- static int digest_final(EVP_MD_CTX *ctx, unsigned char *md)
-@@ -579,7 +583,10 @@ static int digest_final(EVP_MD_CTX *ctx, unsigned char *md)
-
- if (md == NULL || digest_ctx == NULL)
- return 0;
-- if (digest_op(digest_ctx, NULL, 0, md, COP_FLAG_FINAL) < 0) {
-+
-+ if (EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_ONESHOT)) {
-+ memcpy(md, digest_ctx->digest_res, EVP_MD_CTX_size(ctx));
-+ } else if (digest_op(digest_ctx, NULL, 0, md, COP_FLAG_FINAL) < 0) {
- SYSerr(SYS_F_IOCTL, errno);
- return 0;
- }
diff --git a/package/libs/openssl/patches/410-eng_devcrypto-add-configuration-options.patch b/package/libs/openssl/patches/410-eng_devcrypto-add-configuration-options.patch
deleted file mode 100644
index 8745364cf28..00000000000
--- a/package/libs/openssl/patches/410-eng_devcrypto-add-configuration-options.patch
+++ /dev/null
@@ -1,569 +0,0 @@
-From 1c2fabcdb34e436286b4a8760cfbfbff11ea551a Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Sat, 3 Nov 2018 15:41:10 -0300
-Subject: eng_devcrypto: add configuration options
-
-USE_SOFTDRIVERS: whether to use software (not accelerated) drivers
-CIPHERS: list of ciphers to enable
-DIGESTS: list of digests to enable
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
-Reviewed-by: Richard Levitte <levitte@openssl.org>
-(Merged from https://github.com/openssl/openssl/pull/7585)
-
-diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
-index a2c9a966f7..5ec38ca8f3 100644
---- a/crypto/engine/eng_devcrypto.c
-+++ b/crypto/engine/eng_devcrypto.c
-@@ -16,6 +16,7 @@
- #include <unistd.h>
- #include <assert.h>
-
-+#include <openssl/conf.h>
- #include <openssl/evp.h>
- #include <openssl/err.h>
- #include <openssl/engine.h>
-@@ -36,6 +37,30 @@
- * saner... why re-open /dev/crypto for every session?
- */
- static int cfd;
-+#define DEVCRYPTO_REQUIRE_ACCELERATED 0 /* require confirmation of acceleration */
-+#define DEVCRYPTO_USE_SOFTWARE 1 /* allow software drivers */
-+#define DEVCRYPTO_REJECT_SOFTWARE 2 /* only disallow confirmed software drivers */
-+
-+#define DEVCRYPTO_DEFAULT_USE_SOFDTRIVERS DEVCRYPTO_REJECT_SOFTWARE
-+static int use_softdrivers = DEVCRYPTO_DEFAULT_USE_SOFDTRIVERS;
-+
-+/*
-+ * cipher/digest status & acceleration definitions
-+ * Make sure the defaults are set to 0
-+ */
-+struct driver_info_st {
-+ enum devcrypto_status_t {
-+ DEVCRYPTO_STATUS_UNUSABLE = -1, /* session open failed */
-+ DEVCRYPTO_STATUS_UNKNOWN = 0, /* not tested yet */
-+ DEVCRYPTO_STATUS_USABLE = 1 /* algo can be used */
-+ } status;
-+
-+ enum devcrypto_accelerated_t {
-+ DEVCRYPTO_NOT_ACCELERATED = -1, /* software implemented */
-+ DEVCRYPTO_ACCELERATION_UNKNOWN = 0, /* acceleration support unkown */
-+ DEVCRYPTO_ACCELERATED = 1 /* hardware accelerated */
-+ } accelerated;
-+};
-
- static int clean_devcrypto_session(struct session_op *sess) {
- if (ioctl(cfd, CIOCFSESSION, &sess->ses) < 0) {
-@@ -119,13 +144,22 @@ static const struct cipher_data_st {
- #endif
- };
-
--static size_t get_cipher_data_index(int nid)
-+static size_t find_cipher_data_index(int nid)
- {
- size_t i;
-
- for (i = 0; i < OSSL_NELEM(cipher_data); i++)
- if (nid == cipher_data[i].nid)
- return i;
-+ return (size_t)-1;
-+}
-+
-+static size_t get_cipher_data_index(int nid)
-+{
-+ size_t i = find_cipher_data_index(nid);
-+
-+ if (i != (size_t)-1)
-+ return i;
-
- /*
- * Code further down must make sure that only NIDs in the table above
-@@ -333,19 +367,40 @@ static int cipher_cleanup(EVP_CIPHER_CTX *ctx)
- }
-
- /*
-- * Keep a table of known nids and associated methods.
-+ * Keep tables of known nids, associated methods, selected ciphers, and driver
-+ * info.
- * Note that known_cipher_nids[] isn't necessarily indexed the same way as
-- * cipher_data[] above, which known_cipher_methods[] is.
-+ * cipher_data[] above, which the other tables are.
- */
- static int known_cipher_nids[OSSL_NELEM(cipher_data)];
- static int known_cipher_nids_amount = -1; /* -1 indicates not yet initialised */
- static EVP_CIPHER *known_cipher_methods[OSSL_NELEM(cipher_data)] = { NULL, };
-+static int selected_ciphers[OSSL_NELEM(cipher_data)];
-+static struct driver_info_st cipher_driver_info[OSSL_NELEM(cipher_data)];
-+
-+
-+static int devcrypto_test_cipher(size_t cipher_data_index)
-+{
-+ return (cipher_driver_info[cipher_data_index].status == DEVCRYPTO_STATUS_USABLE
-+ && selected_ciphers[cipher_data_index] == 1
-+ && (cipher_driver_info[cipher_data_index].accelerated
-+ == DEVCRYPTO_ACCELERATED
-+ || use_softdrivers == DEVCRYPTO_USE_SOFTWARE
-+ || (cipher_driver_info[cipher_data_index].accelerated
-+ != DEVCRYPTO_NOT_ACCELERATED
-+ && use_softdrivers == DEVCRYPTO_REJECT_SOFTWARE)));
-+}
-
- static void prepare_cipher_methods(void)
- {
- size_t i;
- struct session_op sess;
- unsigned long cipher_mode;
-+#ifdef CIOCGSESSINFO
-+ struct session_info_op siop;
-+#endif
-+
-+ memset(&cipher_driver_info, 0, sizeof(cipher_driver_info));
-
- memset(&sess, 0, sizeof(sess));
- sess.key = (void *)"01234567890123456789012345678901234567890123456789";
-@@ -353,15 +408,16 @@ static void prepare_cipher_methods(void)
- for (i = 0, known_cipher_nids_amount = 0;
- i < OSSL_NELEM(cipher_data); i++) {
-
-+ selected_ciphers[i] = 1;
- /*
-- * Check that the algo is really availably by trying to open and close
-- * a session.
-+ * Check that the cipher is usable
- */
- sess.cipher = cipher_data[i].devcryptoid;
- sess.keylen = cipher_data[i].keylen;
-- if (ioctl(cfd, CIOCGSESSION, &sess) < 0
-- || ioctl(cfd, CIOCFSESSION, &sess.ses) < 0)
-+ if (ioctl(cfd, CIOCGSESSION, &sess) < 0) {
-+ cipher_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
- continue;
-+ }
-
- cipher_mode = cipher_data[i].flags & EVP_CIPH_MODE;
-
-@@ -387,15 +443,41 @@ static void prepare_cipher_methods(void)
- cipher_cleanup)
- || !EVP_CIPHER_meth_set_impl_ctx_size(known_cipher_methods[i],
- sizeof(struct cipher_ctx))) {
-+ cipher_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
- EVP_CIPHER_meth_free(known_cipher_methods[i]);
- known_cipher_methods[i] = NULL;
- } else {
-+ cipher_driver_info[i].status = DEVCRYPTO_STATUS_USABLE;
-+#ifdef CIOCGSESSINFO
-+ siop.ses = sess.ses;
-+ if (ioctl(cfd, CIOCGSESSINFO, &siop) < 0)
-+ cipher_driver_info[i].accelerated = DEVCRYPTO_ACCELERATION_UNKNOWN;
-+ else if (!(siop.flags & SIOP_FLAG_KERNEL_DRIVER_ONLY))
-+ cipher_driver_info[i].accelerated = DEVCRYPTO_NOT_ACCELERATED;
-+ else
-+ cipher_driver_info[i].accelerated = DEVCRYPTO_ACCELERATED;
-+#endif /* CIOCGSESSINFO */
-+ }
-+ ioctl(cfd, CIOCFSESSION, &sess.ses);
-+ if (devcrypto_test_cipher(i)) {
- known_cipher_nids[known_cipher_nids_amount++] =
- cipher_data[i].nid;
- }
- }
- }
-
-+static void rebuild_known_cipher_nids(ENGINE *e)
-+{
-+ size_t i;
-+
-+ for (i = 0, known_cipher_nids_amount = 0; i < OSSL_NELEM(cipher_data); i++) {
-+ if (devcrypto_test_cipher(i))
-+ known_cipher_nids[known_cipher_nids_amount++] = cipher_data[i].nid;
-+ }
-+ ENGINE_unregister_ciphers(e);
-+ ENGINE_register_ciphers(e);
-+}
-+
- static const EVP_CIPHER *get_cipher_method(int nid)
- {
- size_t i = get_cipher_data_index(nid);
-@@ -438,6 +520,36 @@ static int devcrypto_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
- return *cipher != NULL;
- }
-
-+static void devcrypto_select_all_ciphers(int *cipher_list)
-+{
-+ size_t i;
-+
-+ for (i = 0; i < OSSL_NELEM(cipher_data); i++)
-+ cipher_list[i] = 1;
-+}
-+
-+static int cryptodev_select_cipher_cb(const char *str, int len, void *usr)
-+{
-+ int *cipher_list = (int *)usr;
-+ char *name;
-+ const EVP_CIPHER *EVP;
-+ size_t i;
-+
-+ if (len == 0)
-+ return 1;
-+ if (usr == NULL || (name = OPENSSL_strndup(str, len)) == NULL)
-+ return 0;
-+ EVP = EVP_get_cipherbyname(name);
-+ if (EVP == NULL)
-+ fprintf(stderr, "devcrypto: unknown cipher %s\n", name);
-+ else if ((i = find_cipher_data_index(EVP_CIPHER_nid(EVP))) != (size_t)-1)
-+ cipher_list[i] = 1;
-+ else
-+ fprintf(stderr, "devcrypto: cipher %s not available\n", name);
-+ OPENSSL_free(name);
-+ return 1;
-+}
-+
- /*
- * We only support digests if the cryptodev implementation supports multiple
- * data updates and session copying. Otherwise, we would be forced to maintain
-@@ -493,13 +605,22 @@ static const struct digest_data_st {
- #endif
- };
-
--static size_t get_digest_data_index(int nid)
-+static size_t find_digest_data_index(int nid)
- {
- size_t i;
-
- for (i = 0; i < OSSL_NELEM(digest_data); i++)
- if (nid == digest_data[i].nid)
- return i;
-+ return (size_t)-1;
-+}
-+
-+static size_t get_digest_data_index(int nid)
-+{
-+ size_t i = find_digest_data_index(nid);
-+
-+ if (i != (size_t)-1)
-+ return i;
-
- /*
- * Code further down must make sure that only NIDs in the table above
-@@ -516,8 +637,8 @@ static const struct digest_data_st *get_digest_data(int nid)
- }
-
- /*
-- * Following are the four necessary functions to map OpenSSL functionality
-- * with cryptodev.
-+ * Following are the five necessary functions to map OpenSSL functionality
-+ * with cryptodev: init, update, final, cleanup, and copy.
- */
-
- static int digest_init(EVP_MD_CTX *ctx)
-@@ -630,52 +751,94 @@ static int digest_cleanup(EVP_MD_CTX *ctx)
- return clean_devcrypto_session(&digest_ctx->sess);
- }
-
--static int devcrypto_test_digest(size_t digest_data_index)
--{
-- struct session_op sess1, sess2;
-- struct cphash_op cphash;
-- int ret=0;
--
-- memset(&sess1, 0, sizeof(sess1));
-- memset(&sess2, 0, sizeof(sess2));
-- sess1.mac = digest_data[digest_data_index].devcryptoid;
-- if (ioctl(cfd, CIOCGSESSION, &sess1) < 0)
-- return 0;
-- /* Make sure the driver is capable of hash state copy */
-- sess2.mac = sess1.mac;
-- if (ioctl(cfd, CIOCGSESSION, &sess2) >= 0) {
-- cphash.src_ses = sess1.ses;
-- cphash.dst_ses = sess2.ses;
-- if (ioctl(cfd, CIOCCPHASH, &cphash) >= 0)
-- ret = 1;
-- ioctl(cfd, CIOCFSESSION, &sess2.ses);
-- }
-- ioctl(cfd, CIOCFSESSION, &sess1.ses);
-- return ret;
--}
--
- /*
-- * Keep a table of known nids and associated methods.
-+ * Keep tables of known nids, associated methods, selected digests, and
-+ * driver info.
- * Note that known_digest_nids[] isn't necessarily indexed the same way as
-- * digest_data[] above, which known_digest_methods[] is.
-+ * digest_data[] above, which the other tables are.
- */
- static int known_digest_nids[OSSL_NELEM(digest_data)];
- static int known_digest_nids_amount = -1; /* -1 indicates not yet initialised */
- static EVP_MD *known_digest_methods[OSSL_NELEM(digest_data)] = { NULL, };
-+static int selected_digests[OSSL_NELEM(digest_data)];
-+static struct driver_info_st digest_driver_info[OSSL_NELEM(digest_data)];
-+
-+static int devcrypto_test_digest(size_t digest_data_index)
-+{
-+ return (digest_driver_info[digest_data_index].status == DEVCRYPTO_STATUS_USABLE
-+ && selected_digests[digest_data_index] == 1
-+ && (digest_driver_info[digest_data_index].accelerated
-+ == DEVCRYPTO_ACCELERATED
-+ || use_softdrivers == DEVCRYPTO_USE_SOFTWARE
-+ || (digest_driver_info[digest_data_index].accelerated
-+ != DEVCRYPTO_NOT_ACCELERATED
-+ && use_softdrivers == DEVCRYPTO_REJECT_SOFTWARE)));
-+}
-+
-+static void rebuild_known_digest_nids(ENGINE *e)
-+{
-+ size_t i;
-+
-+ for (i = 0, known_digest_nids_amount = 0; i < OSSL_NELEM(digest_data); i++) {
-+ if (devcrypto_test_digest(i))
-+ known_digest_nids[known_digest_nids_amount++] = digest_data[i].nid;
-+ }
-+ ENGINE_unregister_digests(e);
-+ ENGINE_register_digests(e);
-+}
-
- static void prepare_digest_methods(void)
- {
- size_t i;
-+ struct session_op sess1, sess2;
-+#ifdef CIOCGSESSINFO
-+ struct session_info_op siop;
-+#endif
-+ struct cphash_op cphash;
-+
-+ memset(&digest_driver_info, 0, sizeof(digest_driver_info));
-+
-+ memset(&sess1, 0, sizeof(sess1));
-+ memset(&sess2, 0, sizeof(sess2));
-
- for (i = 0, known_digest_nids_amount = 0; i < OSSL_NELEM(digest_data);
- i++) {
-
-+ selected_digests[i] = 1;
-+
- /*
-- * Check that the algo is usable
-+ * Check that the digest is usable
- */
-- if (!devcrypto_test_digest(i))
-- continue;
-+ sess1.mac = digest_data[i].devcryptoid;
-+ sess2.ses = 0;
-+ if (ioctl(cfd, CIOCGSESSION, &sess1) < 0) {
-+ digest_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
-+ goto finish;
-+ }
-
-+#ifdef CIOCGSESSINFO
-+ /* gather hardware acceleration info from the driver */
-+ siop.ses = sess1.ses;
-+ if (ioctl(cfd, CIOCGSESSINFO, &siop) < 0)
-+ digest_driver_info[i].accelerated = DEVCRYPTO_ACCELERATION_UNKNOWN;
-+ else if (siop.flags & SIOP_FLAG_KERNEL_DRIVER_ONLY)
-+ digest_driver_info[i].accelerated = DEVCRYPTO_ACCELERATED;
-+ else
-+ digest_driver_info[i].accelerated = DEVCRYPTO_NOT_ACCELERATED;
-+#endif
-+
-+ /* digest must be capable of hash state copy */
-+ sess2.mac = sess1.mac;
-+ if (ioctl(cfd, CIOCGSESSION, &sess2) < 0) {
-+ digest_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
-+ goto finish;
-+ }
-+ cphash.src_ses = sess1.ses;
-+ cphash.dst_ses = sess2.ses;
-+ if (ioctl(cfd, CIOCCPHASH, &cphash) < 0) {
-+ digest_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
-+ goto finish;
-+ }
- if ((known_digest_methods[i] = EVP_MD_meth_new(digest_data[i].nid,
- NID_undef)) == NULL
- || !EVP_MD_meth_set_input_blocksize(known_digest_methods[i],
-@@ -689,11 +852,18 @@ static void prepare_digest_methods(void)
- || !EVP_MD_meth_set_cleanup(known_digest_methods[i], digest_cleanup)
- || !EVP_MD_meth_set_app_datasize(known_digest_methods[i],
- sizeof(struct digest_ctx))) {
-+ digest_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
- EVP_MD_meth_free(known_digest_methods[i]);
- known_digest_methods[i] = NULL;
-- } else {
-- known_digest_nids[known_digest_nids_amount++] = digest_data[i].nid;
-+ goto finish;
- }
-+ digest_driver_info[i].status = DEVCRYPTO_STATUS_USABLE;
-+finish:
-+ ioctl(cfd, CIOCFSESSION, &sess1.ses);
-+ if (sess2.ses != 0)
-+ ioctl(cfd, CIOCFSESSION, &sess2.ses);
-+ if (devcrypto_test_digest(i))
-+ known_digest_nids[known_digest_nids_amount++] = digest_data[i].nid;
- }
- }
-
-@@ -739,8 +909,154 @@ static int devcrypto_digests(ENGINE *e, const EVP_MD **digest,
- return *digest != NULL;
- }
-
-+static void devcrypto_select_all_digests(int *digest_list)
-+{
-+ size_t i;
-+
-+ for (i = 0; i < OSSL_NELEM(digest_data); i++)
-+ digest_list[i] = 1;
-+}
-+
-+static int cryptodev_select_digest_cb(const char *str, int len, void *usr)
-+{
-+ int *digest_list = (int *)usr;
-+ char *name;
-+ const EVP_MD *EVP;
-+ size_t i;
-+
-+ if (len == 0)
-+ return 1;
-+ if (usr == NULL || (name = OPENSSL_strndup(str, len)) == NULL)
-+ return 0;
-+ EVP = EVP_get_digestbyname(name);
-+ if (EVP == NULL)
-+ fprintf(stderr, "devcrypto: unknown digest %s\n", name);
-+ else if ((i = find_digest_data_index(EVP_MD_type(EVP))) != (size_t)-1)
-+ digest_list[i] = 1;
-+ else
-+ fprintf(stderr, "devcrypto: digest %s not available\n", name);
-+ OPENSSL_free(name);
-+ return 1;
-+}
-+
-+#endif
-+
-+/******************************************************************************
-+ *
-+ * CONTROL COMMANDS
-+ *
-+ *****/
-+
-+#define DEVCRYPTO_CMD_USE_SOFTDRIVERS ENGINE_CMD_BASE
-+#define DEVCRYPTO_CMD_CIPHERS (ENGINE_CMD_BASE + 1)
-+#define DEVCRYPTO_CMD_DIGESTS (ENGINE_CMD_BASE + 2)
-+#define DEVCRYPTO_CMD_DUMP_INFO (ENGINE_CMD_BASE + 3)
-+
-+/* Helper macros for CPP string composition */
-+#ifndef OPENSSL_MSTR
-+# define OPENSSL_MSTR_HELPER(x) #x
-+# define OPENSSL_MSTR(x) OPENSSL_MSTR_HELPER(x)
-+#endif
-+
-+static const ENGINE_CMD_DEFN devcrypto_cmds[] = {
-+#ifdef CIOCGSESSINFO
-+ {DEVCRYPTO_CMD_USE_SOFTDRIVERS,
-+ "USE_SOFTDRIVERS",
-+ "specifies whether to use software (not accelerated) drivers ("
-+ OPENSSL_MSTR(DEVCRYPTO_REQUIRE_ACCELERATED) "=use only accelerated drivers, "
-+ OPENSSL_MSTR(DEVCRYPTO_USE_SOFTWARE) "=allow all drivers, "
-+ OPENSSL_MSTR(DEVCRYPTO_REJECT_SOFTWARE)
-+ "=use if acceleration can't be determined) [default="
-+ OPENSSL_MSTR(DEVCRYPTO_DEFAULT_USE_SOFDTRIVERS) "]",
-+ ENGINE_CMD_FLAG_NUMERIC},
-+#endif
-+
-+ {DEVCRYPTO_CMD_CIPHERS,
-+ "CIPHERS",
-+ "either ALL, NONE, or a comma-separated list of ciphers to enable [default=ALL]",
-+ ENGINE_CMD_FLAG_STRING},
-+
-+#ifdef IMPLEMENT_DIGEST
-+ {DEVCRYPTO_CMD_DIGESTS,
-+ "DIGESTS",
-+ "either ALL, NONE, or a comma-separated list of digests to enable [default=ALL]",
-+ ENGINE_CMD_FLAG_STRING},
- #endif
-
-+ {0, NULL, NULL, 0}
-+};
-+
-+static int devcrypto_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
-+{
-+ int *new_list;
-+ switch (cmd) {
-+#ifdef CIOCGSESSINFO
-+ case DEVCRYPTO_CMD_USE_SOFTDRIVERS:
-+ switch (i) {
-+ case DEVCRYPTO_REQUIRE_ACCELERATED:
-+ case DEVCRYPTO_USE_SOFTWARE:
-+ case DEVCRYPTO_REJECT_SOFTWARE:
-+ break;
-+ default:
-+ fprintf(stderr, "devcrypto: invalid value (%ld) for USE_SOFTDRIVERS\n", i);
-+ return 0;
-+ }
-+ if (use_softdrivers == i)
-+ return 1;
-+ use_softdrivers = i;
-+#ifdef IMPLEMENT_DIGEST
-+ rebuild_known_digest_nids(e);
-+#endif
-+ rebuild_known_cipher_nids(e);
-+ return 1;
-+#endif /* CIOCGSESSINFO */
-+
-+ case DEVCRYPTO_CMD_CIPHERS:
-+ if (p == NULL)
-+ return 1;
-+ if (strcasecmp((const char *)p, "ALL") == 0) {
-+ devcrypto_select_all_ciphers(selected_ciphers);
-+ } else if (strcasecmp((const char*)p, "NONE") == 0) {
-+ memset(selected_ciphers, 0, sizeof(selected_ciphers));
-+ } else {
-+ new_list=OPENSSL_zalloc(sizeof(selected_ciphers));
-+ if (!CONF_parse_list(p, ',', 1, cryptodev_select_cipher_cb, new_list)) {
-+ OPENSSL_free(new_list);
-+ return 0;
-+ }
-+ memcpy(selected_ciphers, new_list, sizeof(selected_ciphers));
-+ OPENSSL_free(new_list);
-+ }
-+ rebuild_known_cipher_nids(e);
-+ return 1;
-+
-+#ifdef IMPLEMENT_DIGEST
-+ case DEVCRYPTO_CMD_DIGESTS:
-+ if (p == NULL)
-+ return 1;
-+ if (strcasecmp((const char *)p, "ALL") == 0) {
-+ devcrypto_select_all_digests(selected_digests);
-+ } else if (strcasecmp((const char*)p, "NONE") == 0) {
-+ memset(selected_digests, 0, sizeof(selected_digests));
-+ } else {
-+ new_list=OPENSSL_zalloc(sizeof(selected_digests));
-+ if (!CONF_parse_list(p, ',', 1, cryptodev_select_digest_cb, new_list)) {
-+ OPENSSL_free(new_list);
-+ return 0;
-+ }
-+ memcpy(selected_digests, new_list, sizeof(selected_digests));
-+ OPENSSL_free(new_list);
-+ }
-+ rebuild_known_digest_nids(e);
-+ return 1;
-+#endif /* IMPLEMENT_DIGEST */
-+
-+ default:
-+ break;
-+ }
-+ return 0;
-+}
-+
- /******************************************************************************
- *
- * LOAD / UNLOAD
-@@ -793,6 +1109,8 @@ void engine_load_devcrypto_int()
-
- if (!ENGINE_set_id(e, "devcrypto")
- || !ENGINE_set_name(e, "/dev/crypto engine")
-+ || !ENGINE_set_cmd_defns(e, devcrypto_cmds)
-+ || !ENGINE_set_ctrl_function(e, devcrypto_ctrl)
-
- /*
- * Asymmetric ciphers aren't well supported with /dev/crypto. Among the BSD
diff --git a/package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch b/package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch
deleted file mode 100644
index ad83a51a106..00000000000
--- a/package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch
+++ /dev/null
@@ -1,275 +0,0 @@
-From 78e7b1cc7119622645bc5a8542c55b6c95dc7868 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Tue, 6 Nov 2018 22:54:07 -0200
-Subject: eng_devcrypto: add command to dump driver info
-
-This is useful to determine the kernel driver running each algorithm.
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
-Reviewed-by: Richard Levitte <levitte@openssl.org>
-(Merged from https://github.com/openssl/openssl/pull/7585)
-
-diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
-index 5ec38ca8f3..64dc6b891d 100644
---- a/crypto/engine/eng_devcrypto.c
-+++ b/crypto/engine/eng_devcrypto.c
-@@ -50,16 +50,20 @@ static int use_softdrivers = DEVCRYPTO_DEFAULT_USE_SOFDTRIVERS;
- */
- struct driver_info_st {
- enum devcrypto_status_t {
-- DEVCRYPTO_STATUS_UNUSABLE = -1, /* session open failed */
-- DEVCRYPTO_STATUS_UNKNOWN = 0, /* not tested yet */
-- DEVCRYPTO_STATUS_USABLE = 1 /* algo can be used */
-+ DEVCRYPTO_STATUS_FAILURE = -3, /* unusable for other reason */
-+ DEVCRYPTO_STATUS_NO_CIOCCPHASH = -2, /* hash state copy not supported */
-+ DEVCRYPTO_STATUS_NO_CIOCGSESSION = -1, /* session open failed */
-+ DEVCRYPTO_STATUS_UNKNOWN = 0, /* not tested yet */
-+ DEVCRYPTO_STATUS_USABLE = 1 /* algo can be used */
- } status;
-
- enum devcrypto_accelerated_t {
-- DEVCRYPTO_NOT_ACCELERATED = -1, /* software implemented */
-- DEVCRYPTO_ACCELERATION_UNKNOWN = 0, /* acceleration support unkown */
-- DEVCRYPTO_ACCELERATED = 1 /* hardware accelerated */
-+ DEVCRYPTO_NOT_ACCELERATED = -1, /* software implemented */
-+ DEVCRYPTO_ACCELERATION_UNKNOWN = 0, /* acceleration support unkown */
-+ DEVCRYPTO_ACCELERATED = 1 /* hardware accelerated */
- } accelerated;
-+
-+ char *driver_name;
- };
-
- static int clean_devcrypto_session(struct session_op *sess) {
-@@ -415,7 +419,7 @@ static void prepare_cipher_methods(void)
- sess.cipher = cipher_data[i].devcryptoid;
- sess.keylen = cipher_data[i].keylen;
- if (ioctl(cfd, CIOCGSESSION, &sess) < 0) {
-- cipher_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
-+ cipher_driver_info[i].status = DEVCRYPTO_STATUS_NO_CIOCGSESSION;
- continue;
- }
-
-@@ -443,19 +447,24 @@ static void prepare_cipher_methods(void)
- cipher_cleanup)
- || !EVP_CIPHER_meth_set_impl_ctx_size(known_cipher_methods[i],
- sizeof(struct cipher_ctx))) {
-- cipher_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
-+ cipher_driver_info[i].status = DEVCRYPTO_STATUS_FAILURE;
- EVP_CIPHER_meth_free(known_cipher_methods[i]);
- known_cipher_methods[i] = NULL;
- } else {
- cipher_driver_info[i].status = DEVCRYPTO_STATUS_USABLE;
- #ifdef CIOCGSESSINFO
- siop.ses = sess.ses;
-- if (ioctl(cfd, CIOCGSESSINFO, &siop) < 0)
-+ if (ioctl(cfd, CIOCGSESSINFO, &siop) < 0) {
- cipher_driver_info[i].accelerated = DEVCRYPTO_ACCELERATION_UNKNOWN;
-- else if (!(siop.flags & SIOP_FLAG_KERNEL_DRIVER_ONLY))
-- cipher_driver_info[i].accelerated = DEVCRYPTO_NOT_ACCELERATED;
-- else
-- cipher_driver_info[i].accelerated = DEVCRYPTO_ACCELERATED;
-+ } else {
-+ cipher_driver_info[i].driver_name =
-+ OPENSSL_strndup(siop.cipher_info.cra_driver_name,
-+ CRYPTODEV_MAX_ALG_NAME);
-+ if (!(siop.flags & SIOP_FLAG_KERNEL_DRIVER_ONLY))
-+ cipher_driver_info[i].accelerated = DEVCRYPTO_NOT_ACCELERATED;
-+ else
-+ cipher_driver_info[i].accelerated = DEVCRYPTO_ACCELERATED;
-+ }
- #endif /* CIOCGSESSINFO */
- }
- ioctl(cfd, CIOCFSESSION, &sess.ses);
-@@ -505,8 +514,11 @@ static void destroy_all_cipher_methods(void)
- {
- size_t i;
-
-- for (i = 0; i < OSSL_NELEM(cipher_data); i++)
-+ for (i = 0; i < OSSL_NELEM(cipher_data); i++) {
- destroy_cipher_method(cipher_data[i].nid);
-+ OPENSSL_free(cipher_driver_info[i].driver_name);
-+ cipher_driver_info[i].driver_name = NULL;
-+ }
- }
-
- static int devcrypto_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
-@@ -550,6 +562,40 @@ static int cryptodev_select_cipher_cb(const char *str, int len, void *usr)
- return 1;
- }
-
-+static void dump_cipher_info(void)
-+{
-+ size_t i;
-+ const char *name;
-+
-+ fprintf (stderr, "Information about ciphers supported by the /dev/crypto"
-+ " engine:\n");
-+#ifndef CIOCGSESSINFO
-+ fprintf(stderr, "CIOCGSESSINFO (session info call) unavailable\n");
-+#endif
-+ for (i = 0; i < OSSL_NELEM(cipher_data); i++) {
-+ name = OBJ_nid2sn(cipher_data[i].nid);
-+ fprintf (stderr, "Cipher %s, NID=%d, /dev/crypto info: id=%d, ",
-+ name ? name : "unknown", cipher_data[i].nid,
-+ cipher_data[i].devcryptoid);
-+ if (cipher_driver_info[i].status == DEVCRYPTO_STATUS_NO_CIOCGSESSION ) {
-+ fprintf (stderr, "CIOCGSESSION (session open call) failed\n");
-+ continue;
-+ }
-+ fprintf (stderr, "driver=%s ", cipher_driver_info[i].driver_name ?
-+ cipher_driver_info[i].driver_name : "unknown");
-+ if (cipher_driver_info[i].accelerated == DEVCRYPTO_ACCELERATED)
-+ fprintf(stderr, "(hw accelerated)");
-+ else if (cipher_driver_info[i].accelerated == DEVCRYPTO_NOT_ACCELERATED)
-+ fprintf(stderr, "(software)");
-+ else
-+ fprintf(stderr, "(acceleration status unknown)");
-+ if (cipher_driver_info[i].status == DEVCRYPTO_STATUS_FAILURE)
-+ fprintf (stderr, ". Cipher setup failed");
-+ fprintf(stderr, "\n");
-+ }
-+ fprintf(stderr, "\n");
-+}
-+
- /*
- * We only support digests if the cryptodev implementation supports multiple
- * data updates and session copying. Otherwise, we would be forced to maintain
-@@ -812,31 +858,36 @@ static void prepare_digest_methods(void)
- sess1.mac = digest_data[i].devcryptoid;
- sess2.ses = 0;
- if (ioctl(cfd, CIOCGSESSION, &sess1) < 0) {
-- digest_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
-+ digest_driver_info[i].status = DEVCRYPTO_STATUS_NO_CIOCGSESSION;
- goto finish;
- }
-
- #ifdef CIOCGSESSINFO
- /* gather hardware acceleration info from the driver */
- siop.ses = sess1.ses;
-- if (ioctl(cfd, CIOCGSESSINFO, &siop) < 0)
-+ if (ioctl(cfd, CIOCGSESSINFO, &siop) < 0) {
- digest_driver_info[i].accelerated = DEVCRYPTO_ACCELERATION_UNKNOWN;
-- else if (siop.flags & SIOP_FLAG_KERNEL_DRIVER_ONLY)
-- digest_driver_info[i].accelerated = DEVCRYPTO_ACCELERATED;
-- else
-- digest_driver_info[i].accelerated = DEVCRYPTO_NOT_ACCELERATED;
-+ } else {
-+ digest_driver_info[i].driver_name =
-+ OPENSSL_strndup(siop.hash_info.cra_driver_name,
-+ CRYPTODEV_MAX_ALG_NAME);
-+ if (siop.flags & SIOP_FLAG_KERNEL_DRIVER_ONLY)
-+ digest_driver_info[i].accelerated = DEVCRYPTO_ACCELERATED;
-+ else
-+ digest_driver_info[i].accelerated = DEVCRYPTO_NOT_ACCELERATED;
-+ }
- #endif
-
- /* digest must be capable of hash state copy */
- sess2.mac = sess1.mac;
- if (ioctl(cfd, CIOCGSESSION, &sess2) < 0) {
-- digest_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
-+ digest_driver_info[i].status = DEVCRYPTO_STATUS_FAILURE;
- goto finish;
- }
- cphash.src_ses = sess1.ses;
- cphash.dst_ses = sess2.ses;
- if (ioctl(cfd, CIOCCPHASH, &cphash) < 0) {
-- digest_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
-+ digest_driver_info[i].status = DEVCRYPTO_STATUS_NO_CIOCCPHASH;
- goto finish;
- }
- if ((known_digest_methods[i] = EVP_MD_meth_new(digest_data[i].nid,
-@@ -852,7 +903,7 @@ static void prepare_digest_methods(void)
- || !EVP_MD_meth_set_cleanup(known_digest_methods[i], digest_cleanup)
- || !EVP_MD_meth_set_app_datasize(known_digest_methods[i],
- sizeof(struct digest_ctx))) {
-- digest_driver_info[i].status = DEVCRYPTO_STATUS_UNUSABLE;
-+ digest_driver_info[i].status = DEVCRYPTO_STATUS_FAILURE;
- EVP_MD_meth_free(known_digest_methods[i]);
- known_digest_methods[i] = NULL;
- goto finish;
-@@ -894,8 +945,11 @@ static void destroy_all_digest_methods(void)
- {
- size_t i;
-
-- for (i = 0; i < OSSL_NELEM(digest_data); i++)
-+ for (i = 0; i < OSSL_NELEM(digest_data); i++) {
- destroy_digest_method(digest_data[i].nid);
-+ OPENSSL_free(digest_driver_info[i].driver_name);
-+ digest_driver_info[i].driver_name = NULL;
-+ }
- }
-
- static int devcrypto_digests(ENGINE *e, const EVP_MD **digest,
-@@ -939,6 +993,43 @@ static int cryptodev_select_digest_cb(const char *str, int len, void *usr)
- return 1;
- }
-
-+static void dump_digest_info(void)
-+{
-+ size_t i;
-+ const char *name;
-+
-+ fprintf (stderr, "Information about digests supported by the /dev/crypto"
-+ " engine:\n");
-+#ifndef CIOCGSESSINFO
-+ fprintf(stderr, "CIOCGSESSINFO (session info call) unavailable\n");
-+#endif
-+
-+ for (i = 0; i < OSSL_NELEM(digest_data); i++) {
-+ name = OBJ_nid2sn(digest_data[i].nid);
-+ fprintf (stderr, "Digest %s, NID=%d, /dev/crypto info: id=%d, driver=%s",
-+ name ? name : "unknown", digest_data[i].nid,
-+ digest_data[i].devcryptoid,
-+ digest_driver_info[i].driver_name ? digest_driver_info[i].driver_name : "unknown");
-+ if (digest_driver_info[i].status == DEVCRYPTO_STATUS_NO_CIOCGSESSION) {
-+ fprintf (stderr, ". CIOCGSESSION (session open) failed\n");
-+ continue;
-+ }
-+ if (digest_driver_info[i].accelerated == DEVCRYPTO_ACCELERATED)
-+ fprintf(stderr, " (hw accelerated)");
-+ else if (digest_driver_info[i].accelerated == DEVCRYPTO_NOT_ACCELERATED)
-+ fprintf(stderr, " (software)");
-+ else
-+ fprintf(stderr, " (acceleration status unknown)");
-+ if (cipher_driver_info[i].status == DEVCRYPTO_STATUS_FAILURE)
-+ fprintf (stderr, ". Cipher setup failed\n");
-+ else if (digest_driver_info[i].status == DEVCRYPTO_STATUS_NO_CIOCCPHASH)
-+ fprintf(stderr, ", CIOCCPHASH failed\n");
-+ else
-+ fprintf(stderr, ", CIOCCPHASH capable\n");
-+ }
-+ fprintf(stderr, "\n");
-+}
-+
- #endif
-
- /******************************************************************************
-@@ -983,6 +1074,11 @@ static const ENGINE_CMD_DEFN devcrypto_cmds[] = {
- ENGINE_CMD_FLAG_STRING},
- #endif
-
-+ {DEVCRYPTO_CMD_DUMP_INFO,
-+ "DUMP_INFO",
-+ "dump info about each algorithm to stderr; use 'openssl engine -pre DUMP_INFO devcrypto'",
-+ ENGINE_CMD_FLAG_NO_INPUT},
-+
- {0, NULL, NULL, 0}
- };
-
-@@ -1051,6 +1147,13 @@ static int devcrypto_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
- return 1;
- #endif /* IMPLEMENT_DIGEST */
-
-+ case DEVCRYPTO_CMD_DUMP_INFO:
-+ dump_cipher_info();
-+#ifdef IMPLEMENT_DIGEST
-+ dump_digest_info();
-+#endif
-+ return 1;
-+
- default:
- break;
- }
diff --git a/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch b/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch
deleted file mode 100644
index ea3f8fb8a7f..00000000000
--- a/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch
+++ /dev/null
@@ -1,348 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Tue, 6 Nov 2018 10:57:03 -0200
-Subject: e_devcrypto: make the /dev/crypto engine dynamic
-
-Engine has been moved from crypto/engine/eng_devcrypto.c to
-engines/e_devcrypto.c.
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-diff --git a/crypto/engine/build.info b/crypto/engine/build.info
-index e00802a3fd..47fe948966 100644
---- a/crypto/engine/build.info
-+++ b/crypto/engine/build.info
-@@ -6,6 +6,3 @@ SOURCE[../../libcrypto]=\
- tb_cipher.c tb_digest.c tb_pkmeth.c tb_asnmth.c tb_eckey.c \
- eng_openssl.c eng_cnf.c eng_dyn.c \
- eng_rdrand.c
--IF[{- !$disabled{devcryptoeng} -}]
-- SOURCE[../../libcrypto]=eng_devcrypto.c
--ENDIF
-diff --git a/crypto/init.c b/crypto/init.c
-index 1b0d523bea..ee3e2eb075 100644
---- a/crypto/init.c
-+++ b/crypto/init.c
-@@ -329,18 +329,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_openssl)
- engine_load_openssl_int();
- return 1;
- }
--# ifndef OPENSSL_NO_DEVCRYPTOENG
--static CRYPTO_ONCE engine_devcrypto = CRYPTO_ONCE_STATIC_INIT;
--DEFINE_RUN_ONCE_STATIC(ossl_init_engine_devcrypto)
--{
--# ifdef OPENSSL_INIT_DEBUG
-- fprintf(stderr, "OPENSSL_INIT: ossl_init_engine_devcrypto: "
-- "engine_load_devcrypto_int()\n");
--# endif
-- engine_load_devcrypto_int();
-- return 1;
--}
--# endif
-
- # ifndef OPENSSL_NO_RDRAND
- static CRYPTO_ONCE engine_rdrand = CRYPTO_ONCE_STATIC_INIT;
-@@ -365,6 +353,18 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_dynamic)
- return 1;
- }
- # ifndef OPENSSL_NO_STATIC_ENGINE
-+# ifndef OPENSSL_NO_DEVCRYPTOENG
-+static CRYPTO_ONCE engine_devcrypto = CRYPTO_ONCE_STATIC_INIT;
-+DEFINE_RUN_ONCE_STATIC(ossl_init_engine_devcrypto)
-+{
-+# ifdef OPENSSL_INIT_DEBUG
-+ fprintf(stderr, "OPENSSL_INIT: ossl_init_engine_devcrypto: "
-+ "engine_load_devcrypto_int()\n");
-+# endif
-+ engine_load_devcrypto_int();
-+ return 1;
-+}
-+# endif
- # if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_PADLOCK)
- static CRYPTO_ONCE engine_padlock = CRYPTO_ONCE_STATIC_INIT;
- DEFINE_RUN_ONCE_STATIC(ossl_init_engine_padlock)
-@@ -713,11 +713,6 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
- if ((opts & OPENSSL_INIT_ENGINE_OPENSSL)
- && !RUN_ONCE(&engine_openssl, ossl_init_engine_openssl))
- return 0;
--# if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_DEVCRYPTOENG)
-- if ((opts & OPENSSL_INIT_ENGINE_CRYPTODEV)
-- && !RUN_ONCE(&engine_devcrypto, ossl_init_engine_devcrypto))
-- return 0;
--# endif
- # ifndef OPENSSL_NO_RDRAND
- if ((opts & OPENSSL_INIT_ENGINE_RDRAND)
- && !RUN_ONCE(&engine_rdrand, ossl_init_engine_rdrand))
-@@ -727,6 +722,11 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
- && !RUN_ONCE(&engine_dynamic, ossl_init_engine_dynamic))
- return 0;
- # ifndef OPENSSL_NO_STATIC_ENGINE
-+# ifndef OPENSSL_NO_DEVCRYPTOENG
-+ if ((opts & OPENSSL_INIT_ENGINE_CRYPTODEV)
-+ && !RUN_ONCE(&engine_devcrypto, ossl_init_engine_devcrypto))
-+ return 0;
-+# endif
- # if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_PADLOCK)
- if ((opts & OPENSSL_INIT_ENGINE_PADLOCK)
- && !RUN_ONCE(&engine_padlock, ossl_init_engine_padlock))
-diff --git a/engines/build.info b/engines/build.info
-index 1db771971c..33a25d7004 100644
---- a/engines/build.info
-+++ b/engines/build.info
-@@ -11,6 +11,9 @@ IF[{- !$disabled{"engine"} -}]
- IF[{- !$disabled{afalgeng} -}]
- SOURCE[../libcrypto]=e_afalg.c
- ENDIF
-+ IF[{- !$disabled{"devcryptoeng"} -}]
-+ SOURCE[../libcrypto]=e_devcrypto.c
-+ ENDIF
- ELSE
- IF[{- !$disabled{hw} && !$disabled{'hw-padlock'} -}]
- ENGINES=padlock
-@@ -30,6 +33,12 @@ IF[{- !$disabled{"engine"} -}]
- DEPEND[afalg]=../libcrypto
- INCLUDE[afalg]= ../include
- ENDIF
-+ IF[{- !$disabled{"devcryptoeng"} -}]
-+ ENGINES=devcrypto
-+ SOURCE[devcrypto]=e_devcrypto.c
-+ DEPEND[devcrypto]=../libcrypto
-+ INCLUDE[devcrypto]=../include
-+ ENDIF
-
- ENGINES_NO_INST=ossltest dasync
- SOURCE[dasync]=e_dasync.c
-diff --git a/crypto/engine/eng_devcrypto.c b/engines/e_devcrypto.c
-similarity index 95%
-rename from crypto/engine/eng_devcrypto.c
-rename to engines/e_devcrypto.c
-index 2c1b52d572..eff1ed3a7d 100644
---- a/crypto/engine/eng_devcrypto.c
-+++ b/engines/e_devcrypto.c
-@@ -7,7 +7,7 @@
- * https://www.openssl.org/source/license.html
- */
-
--#include "e_os.h"
-+#include "../e_os.h"
- #include <string.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -31,18 +31,20 @@
- # define CHECK_BSD_STYLE_MACROS
- #endif
-
-+#define engine_devcrypto_id "devcrypto"
-+
- /*
- * ONE global file descriptor for all sessions. This allows operations
- * such as digest session data copying (see digest_copy()), but is also
- * saner... why re-open /dev/crypto for every session?
- */
--static int cfd;
-+static int cfd = -1;
- #define DEVCRYPTO_REQUIRE_ACCELERATED 0 /* require confirmation of acceleration */
- #define DEVCRYPTO_USE_SOFTWARE 1 /* allow software drivers */
- #define DEVCRYPTO_REJECT_SOFTWARE 2 /* only disallow confirmed software drivers */
-
--#define DEVCRYPTO_DEFAULT_USE_SOFDTRIVERS DEVCRYPTO_REJECT_SOFTWARE
--static int use_softdrivers = DEVCRYPTO_DEFAULT_USE_SOFDTRIVERS;
-+#define DEVCRYPTO_DEFAULT_USE_SOFTDRIVERS DEVCRYPTO_REJECT_SOFTWARE
-+static int use_softdrivers = DEVCRYPTO_DEFAULT_USE_SOFTDRIVERS;
-
- /*
- * cipher/digest status & acceleration definitions
-@@ -1058,7 +1060,7 @@ static const ENGINE_CMD_DEFN devcrypto_cmds[] = {
- OPENSSL_MSTR(DEVCRYPTO_USE_SOFTWARE) "=allow all drivers, "
- OPENSSL_MSTR(DEVCRYPTO_REJECT_SOFTWARE)
- "=use if acceleration can't be determined) [default="
-- OPENSSL_MSTR(DEVCRYPTO_DEFAULT_USE_SOFDTRIVERS) "]",
-+ OPENSSL_MSTR(DEVCRYPTO_DEFAULT_USE_SOFTDRIVERS) "]",
- ENGINE_CMD_FLAG_NUMERIC},
- #endif
-
-@@ -1166,32 +1168,22 @@ static int devcrypto_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
- *
- *****/
-
--static int devcrypto_unload(ENGINE *e)
--{
-- destroy_all_cipher_methods();
--#ifdef IMPLEMENT_DIGEST
-- destroy_all_digest_methods();
--#endif
--
-- close(cfd);
--
-- return 1;
--}
- /*
-- * This engine is always built into libcrypto, so it doesn't offer any
-- * ability to be dynamically loadable.
-+ * Opens /dev/crypto
- */
--void engine_load_devcrypto_int()
-+static int open_devcrypto(void)
- {
-- ENGINE *e = NULL;
- int fd;
-
-+ if (cfd >= 0)
-+ return 1;
-+
- if ((fd = open("/dev/crypto", O_RDWR, 0)) < 0) {
- #ifndef ENGINE_DEVCRYPTO_DEBUG
- if (errno != ENOENT)
- #endif
- fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno));
-- return;
-+ return 0;
- }
-
- #ifdef CRIOGET
-@@ -1199,35 +1191,61 @@ void engine_load_devcrypto_int()
- fprintf(stderr, "Could not create crypto fd: %s\n", strerror(errno));
- close(fd);
- cfd = -1;
-- return;
-+ return 0;
- }
- close(fd);
- #else
- cfd = fd;
- #endif
-
-- if ((e = ENGINE_new()) == NULL
-- || !ENGINE_set_destroy_function(e, devcrypto_unload)) {
-- ENGINE_free(e);
-- /*
-- * We know that devcrypto_unload() won't be called when one of the
-- * above two calls have failed, so we close cfd explicitly here to
-- * avoid leaking resources.
-- */
-- close(cfd);
-- return;
-+ return 1;
-+}
-+
-+static int close_devcrypto(void)
-+{
-+ int ret;
-+
-+ if (cfd < 0)
-+ return 1;
-+ ret = close(cfd);
-+ cfd = -1;
-+ if (ret != 0) {
-+ fprintf(stderr, "Error closing /dev/crypto: %s\n", strerror(errno));
-+ return 0;
- }
-+ return 1;
-+}
-
-- prepare_cipher_methods();
-+static int devcrypto_unload(ENGINE *e)
-+{
-+ destroy_all_cipher_methods();
- #ifdef IMPLEMENT_DIGEST
-- prepare_digest_methods();
-+ destroy_all_digest_methods();
- #endif
-
-- if (!ENGINE_set_id(e, "devcrypto")
-+ close_devcrypto();
-+
-+ return 1;
-+}
-+
-+static int bind_devcrypto(ENGINE *e) {
-+
-+ if (!ENGINE_set_id(e, engine_devcrypto_id)
- || !ENGINE_set_name(e, "/dev/crypto engine")
-+ || !ENGINE_set_destroy_function(e, devcrypto_unload)
- || !ENGINE_set_cmd_defns(e, devcrypto_cmds)
-- || !ENGINE_set_ctrl_function(e, devcrypto_ctrl)
-+ || !ENGINE_set_ctrl_function(e, devcrypto_ctrl))
-+ return 0;
-
-+ prepare_cipher_methods();
-+#ifdef IMPLEMENT_DIGEST
-+ prepare_digest_methods();
-+#endif
-+
-+ return (ENGINE_set_ciphers(e, devcrypto_ciphers)
-+#ifdef IMPLEMENT_DIGEST
-+ && ENGINE_set_digests(e, devcrypto_digests)
-+#endif
- /*
- * Asymmetric ciphers aren't well supported with /dev/crypto. Among the BSD
- * implementations, it seems to only exist in FreeBSD, and regarding the
-@@ -1250,23 +1268,36 @@ void engine_load_devcrypto_int()
- */
- #if 0
- # ifndef OPENSSL_NO_RSA
-- || !ENGINE_set_RSA(e, devcrypto_rsa)
-+ && ENGINE_set_RSA(e, devcrypto_rsa)
- # endif
- # ifndef OPENSSL_NO_DSA
-- || !ENGINE_set_DSA(e, devcrypto_dsa)
-+ && ENGINE_set_DSA(e, devcrypto_dsa)
- # endif
- # ifndef OPENSSL_NO_DH
-- || !ENGINE_set_DH(e, devcrypto_dh)
-+ && ENGINE_set_DH(e, devcrypto_dh)
- # endif
- # ifndef OPENSSL_NO_EC
-- || !ENGINE_set_EC(e, devcrypto_ec)
-+ && ENGINE_set_EC(e, devcrypto_ec)
- # endif
- #endif
-- || !ENGINE_set_ciphers(e, devcrypto_ciphers)
--#ifdef IMPLEMENT_DIGEST
-- || !ENGINE_set_digests(e, devcrypto_digests)
--#endif
-- ) {
-+ );
-+}
-+
-+#ifdef OPENSSL_NO_DYNAMIC_ENGINE
-+/*
-+ * In case this engine is built into libcrypto, then it doesn't offer any
-+ * ability to be dynamically loadable.
-+ */
-+void engine_load_devcrypto_int(void)
-+{
-+ ENGINE *e = NULL;
-+
-+ if (!open_devcrypto())
-+ return;
-+
-+ if ((e = ENGINE_new()) == NULL
-+ || !bind_devcrypto(e)) {
-+ close_devcrypto();
- ENGINE_free(e);
- return;
- }
-@@ -1275,3 +1306,22 @@ void engine_load_devcrypto_int()
- ENGINE_free(e); /* Loose our local reference */
- ERR_clear_error();
- }
-+
-+#else
-+
-+static int bind_helper(ENGINE *e, const char *id)
-+{
-+ if ((id && (strcmp(id, engine_devcrypto_id) != 0))
-+ || !open_devcrypto())
-+ return 0;
-+ if (!bind_devcrypto(e)) {
-+ close_devcrypto();
-+ return 0;
-+ }
-+ return 1;
-+}
-+
-+IMPLEMENT_DYNAMIC_CHECK_FN()
-+IMPLEMENT_DYNAMIC_BIND_FN(bind_helper)
-+
-+#endif
diff --git a/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch b/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch
index 1f1cd7a5829..f1832638586 100644
--- a/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch
+++ b/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch
@@ -19,11 +19,9 @@ turn them on if it is safe and fast enough.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c
-index 3fcd81de7a..d25230d366 100644
--- a/engines/e_devcrypto.c
+++ b/engines/e_devcrypto.c
-@@ -852,7 +852,7 @@ static void prepare_digest_methods(void)
+@@ -905,7 +905,7 @@ static void prepare_digest_methods(void)
for (i = 0, known_digest_nids_amount = 0; i < OSSL_NELEM(digest_data);
i++) {
@@ -32,7 +30,7 @@ index 3fcd81de7a..d25230d366 100644
/*
* Check that the digest is usable
-@@ -1072,7 +1072,7 @@ static const ENGINE_CMD_DEFN devcrypto_cmds[] = {
+@@ -1119,7 +1119,7 @@ static const ENGINE_CMD_DEFN devcrypto_c
#ifdef IMPLEMENT_DIGEST
{DEVCRYPTO_CMD_DIGESTS,
"DIGESTS",
diff --git a/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch b/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch
index bc514b88c9d..40b1dc78d31 100644
--- a/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch
+++ b/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch
@@ -8,12 +8,10 @@ session. It may have been closed by another process after a fork.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c
-index d25230d366..f4570f1666 100644
--- a/engines/e_devcrypto.c
+++ b/engines/e_devcrypto.c
-@@ -195,9 +195,8 @@ static int cipher_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
- get_cipher_data(EVP_CIPHER_CTX_nid(ctx));
+@@ -211,9 +211,8 @@ static int cipher_init(EVP_CIPHER_CTX *c
+ int ret;
/* cleanup a previous session */
- if (cipher_ctx->sess.ses != 0 &&
diff --git a/package/libs/pcre/Config.in b/package/libs/pcre/Config.in
deleted file mode 100644
index 15e75fc753e..00000000000
--- a/package/libs/pcre/Config.in
+++ /dev/null
@@ -1,11 +0,0 @@
-config PCRE_JIT_ENABLED
- bool
- depends on PACKAGE_libpcre && (arm || i386 || i686 || x86_64 || mips || mipsel || powerpc || sparc)
- default y if (arm || i686 || x86_64)
- prompt "Enable JIT compiler support"
- help
- Enable JIT (Just-In-Time) compiler support.
-
- Enabling this option can give an about 10x performance increase on JIT operations. It can be desireable for e.g. high performance Apache mod_rewrite or HA-Proxy reqrep operations.
-
- However, JIT should _only_ be enabled on architectures that are supported. Enabling JIT on unsupported platforms will result in a compilation failure. A list of supported architectures can be found here: https://pcre.org/original/doc/html/pcrejit.html#SEC3 .
diff --git a/package/libs/pcre/Makefile b/package/libs/pcre/Makefile
deleted file mode 100644
index 8644746b4bd..00000000000
--- a/package/libs/pcre/Makefile
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# Copyright (C) 2006-2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=pcre
-PKG_VERSION:=8.44
-PKG_RELEASE:=4
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=19108658b23b3ec5058edc9f66ac545ea19f9537234be1ec62b714c84399366d
-
-PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENCE
-PKG_CPE_ID:=cpe:/a:pcre:pcre
-
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
-PKG_CONFIG_DEPENDS:=\
- CONFIG_PCRE_JIT_ENABLED
-
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/host-build.mk
-
-define Package/libpcre/default
- SECTION:=libs
- CATEGORY:=Libraries
- URL:=https://www.pcre.org/
-endef
-
-define Package/libpcre/config
- source "$(SOURCE)/Config.in"
-endef
-
-define Package/libpcre
- $(call Package/libpcre/default)
- TITLE:=A Perl Compatible Regular Expression library
-endef
-
-define Package/libpcre16
- $(call Package/libpcre/default)
- TITLE:=A Perl Compatible Regular Expression library (16bit support)
-endef
-
-define Package/libpcre32
- $(call Package/libpcre/default)
- TITLE:=A Perl Compatible Regular Expression library (32bit support)
-endef
-
-HOST_CONFIGURE_ARGS += \
- --enable-utf8 \
- --enable-unicode-properties \
- --enable-pcre16 \
- --with-match-limit-recursion=16000 \
- --disable-cpp
-
-TARGET_CFLAGS += $(FPIC)
-
-CONFIGURE_ARGS += \
- --enable-utf8 \
- --enable-unicode-properties \
- --enable-pcre16 \
- --enable-pcre32 \
- $(if $(CONFIG_PCRE_JIT_ENABLED),--enable-jit,--disable-jit) \
- --with-match-limit-recursion=16000 \
- -disable-cpp
-
-MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS)"
-
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(1)/usr/bin/
- $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/pcre-config
-
- $(INSTALL_DIR) $(2)/bin
- $(LN) $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin
-
- $(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/
-
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib/
-
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
-endef
-
-define Package/libpcre/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre.so $(1)/usr/lib/
-endef
-
-define Package/libpcre16/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre16.so* $(1)/usr/lib/
-endef
-
-define Package/libpcre32/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre32.so* $(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,libpcre))
-$(eval $(call BuildPackage,libpcre16))
-$(eval $(call BuildPackage,libpcre32))
-$(eval $(call HostBuild))
diff --git a/package/libs/pcre2/Config.in b/package/libs/pcre2/Config.in
new file mode 100644
index 00000000000..8777a4e84cb
--- /dev/null
+++ b/package/libs/pcre2/Config.in
@@ -0,0 +1,30 @@
+config PCRE2_JIT_ENABLED
+ bool
+ depends on PACKAGE_libpcre2 && (aarch64 || aarch64_be || arm || i386 || i686 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc || powerpc64 || powerpcle || sparc)
+ default y if (arm || i686 || x86_64)
+ prompt "Enable JIT compiler support"
+ help
+ Enable JIT (Just-In-Time) compiler support.
+
+ Just-in-time compiling is a heavyweight optimization that can greatly
+ speed up pattern matching. However, it comes at the cost of extra
+ processing before the match is performed, so it is of most benefit when
+ the same pattern is going to be matched many times. This does not
+ necessarily mean many calls of a matching function; if the pattern is
+ not anchored, matching attempts may take place many times at various
+ positions in the subject, even for a single call. Therefore, if the
+ subject string is very long, it may still pay to use JIT even for
+ one-off matches. JIT support is available for all of the 8-bit, 16-bit
+ and 32-bit PCRE2 libraries and adds about 100KB to the resulting
+ libpcre2.so. JIT support applies only to the traditional Perl-compatible
+ matching function. It does not apply when the DFA matching function is
+ being used.
+
+ Enabling this option can give an about 10x performance increase on JIT
+ operations. It can be desireable for e.g. high performance Apache
+ mod_rewrite or HA-Proxy reqrep operations.
+
+ However, JIT should _only_ be enabled on architectures that are supported.
+ Enabling JIT on unsupported platforms will result in a compilation
+ failure. A list of supported architectures can be found here:
+ https://pcre.org/current/doc/html/pcre2jit.html#SEC2
diff --git a/package/libs/pcre2/Makefile b/package/libs/pcre2/Makefile
new file mode 100644
index 00000000000..fa4282cee8c
--- /dev/null
+++ b/package/libs/pcre2/Makefile
@@ -0,0 +1,109 @@
+#
+# Copyright (C) 2017 Shane Peelar
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pcre2
+PKG_VERSION:=10.42
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/PCRE2Project/pcre2/releases/download/$(PKG_NAME)-$(PKG_VERSION)
+PKG_HASH:=8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840
+
+PKG_MAINTAINER:=Shane Peelar <lookatyouhacker@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENCE
+PKG_CPE_ID:=cpe:/a:pcre:pcre
+
+PKG_CONFIG_DEPENDS:=\
+ CONFIG_PACKAGE_libpcre2-16 \
+ CONFIG_PACKAGE_libpcre2-32 \
+ CONFIG_PCRE2_JIT_ENABLED
+
+PKG_BUILD_DEPENDS:=zlib
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libpcre2/default
+ SECTION:=libs
+ CATEGORY:=Libraries
+ URL:=https://www.pcre.org/
+endef
+
+define Package/libpcre2/config
+ source "$(SOURCE)/Config.in"
+endef
+
+define Package/libpcre2
+ $(call Package/libpcre2/default)
+ TITLE:=A Perl Compatible Regular Expression library
+endef
+
+define Package/libpcre2-16
+ $(call Package/libpcre2/default)
+ TITLE:=A Perl Compatible Regular Expression library (16bit support)
+endef
+
+define Package/libpcre2-32
+ $(call Package/libpcre2/default)
+ TITLE:=A Perl Compatible Regular Expression library (32bit support)
+endef
+
+CMAKE_HOST_OPTIONS += \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DPCRE2_BUILD_PCRE2_8=ON \
+ -DPCRE2_BUILD_PCRE2_16=ON \
+ -DPCRE2_BUILD_PCRE2_32=ON \
+ -DPCRE2_DEBUG=OFF \
+ -DPCRE2_DISABLE_PERCENT_ZT=ON \
+ -DPCRE2_SUPPORT_JIT=OFF \
+ -DPCRE2_SHOW_REPORT=OFF \
+ -DPCRE2_BUILD_PCRE2GREP=OFF \
+ -DPCRE2_BUILD_TESTS=OFF \
+ -DPCRE2_STATIC_PIC=ON
+
+CMAKE_OPTIONS += \
+ -DBUILD_SHARED_LIBS=ON \
+ -DPCRE2_BUILD_PCRE2_8=ON \
+ -DPCRE2_BUILD_PCRE2_16=O$(if $(CONFIG_PACKAGE_libpcre2-16),N,FF) \
+ -DPCRE2_BUILD_PCRE2_32=O$(if $(CONFIG_PACKAGE_libpcre2-32),N,FF) \
+ -DPCRE2_DEBUG=OFF \
+ -DPCRE2_DISABLE_PERCENT_ZT=ON \
+ -DPCRE2_SUPPORT_JIT=O$(if $(CONFIG_PCRE2_JIT_ENABLED),N,FF) \
+ -DPCRE2_SHOW_REPORT=OFF \
+ -DPCRE2_BUILD_PCRE2GREP=OFF \
+ -DPCRE2_BUILD_TESTS=OFF
+
+define Build/InstallDev
+ $(call Build/InstallDev/cmake,$(1))
+ $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/pcre2-config
+ $(INSTALL_DIR) $(2)/bin
+ $(LN) ../../usr/bin/pcre2-config $(2)/bin/pcre2-config
+endef
+
+define Package/libpcre2/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-{8,posix}.so* $(1)/usr/lib/
+endef
+
+define Package/libpcre2-16/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-16.so* $(1)/usr/lib/
+endef
+
+define Package/libpcre2-32/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-32.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libpcre2))
+$(eval $(call BuildPackage,libpcre2-16))
+$(eval $(call BuildPackage,libpcre2-32))
+$(eval $(call HostBuild))
diff --git a/package/libs/popt/Makefile b/package/libs/popt/Makefile
index 34ae4d7c617..ba9c82349bb 100644
--- a/package/libs/popt/Makefile
+++ b/package/libs/popt/Makefile
@@ -8,16 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=popt
-PKG_VERSION:=1.16
-PKG_RELEASE:=2
+PKG_VERSION:=1.19
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:= \
- http://distfiles.gentoo.org/distfiles/ \
- http://distcache.freebsd.org/ports-distfiles/ \
- http://rpm5.org/files/popt/
-PKG_HASH:=e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8
+PKG_SOURCE_URL:=http://ftp.rpm.org/popt/releases/popt-1.x/
+PKG_HASH:=c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9
PKG_LICENSE:=MIT
+PKG_CPE_ID:=cpe:/a:popt_project:popt
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
@@ -33,7 +31,7 @@ define Package/libpopt
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A command line option parsing library
- URL:=http://rpm5.org/files/popt/
+ URL:=https://github.com/rpm-software-management/popt
ABI_VERSION:=0
endef
diff --git a/package/libs/popt/patches/100-configure.ac-remove-require-gettext-version.patch b/package/libs/popt/patches/100-configure.ac-remove-require-gettext-version.patch
new file mode 100644
index 00000000000..24ad076433e
--- /dev/null
+++ b/package/libs/popt/patches/100-configure.ac-remove-require-gettext-version.patch
@@ -0,0 +1,26 @@
+From 19d21b2d9e5aea5f73b1709b3c7803f920471146 Mon Sep 17 00:00:00 2001
+From: Nick Hainke <vincent@systemli.org>
+Date: Sun, 25 Sep 2022 11:52:29 +0200
+Subject: [PATCH] configure.ac: remove require gettext version
+
+This breaks compilation with OpenWrt:
+./configure: line 13059: syntax error near unexpected token `0.19.8'
+./configure: line 13059: `AM_GNU_GETTEXT_REQUIRE_VERSION(0.19.8)'
+
+Fixes: bf8dd64e8aa0 ("Update gettext autoconf usage")
+
+Signed-off-by: Nick Hainke <vincent@systemli.org>
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,7 +53,6 @@ AC_SEARCH_LIBS([setreuid], [ucb])
+ AC_CHECK_FUNCS([getuid geteuid iconv mtrace secure_getenv __secure_getenv setreuid setuid stpcpy strerror vasprintf srandom glob_pattern_p mbsrtowcs])
+
+ AM_GNU_GETTEXT_VERSION([0.19.8])
+-AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8])
+ AM_GNU_GETTEXT([external])
+ AM_ICONV_LINK
+
diff --git a/package/libs/readline/Makefile b/package/libs/readline/Makefile
index d41a6d74f4d..015a1ae2da9 100644
--- a/package/libs/readline/Makefile
+++ b/package/libs/readline/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=readline
-PKG_VERSION:=8.1
+PKG_VERSION:=8.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/readline
-PKG_HASH:=f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02
+PKG_HASH:=3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
@@ -45,6 +45,7 @@ define Package/libreadline/description
history expansion on previous commands.
endef
+HOST_CONFIGURE_ARGS += --disable-shared --with-pic
CONFIGURE_ARGS += --with-curses --disable-install-examples
CONFIGURE_VARS += \
@@ -52,6 +53,7 @@ CONFIGURE_VARS += \
bash_cv_func_sigsetjmp=yes \
TARGET_CFLAGS += $(FPIC)
+HOST_CFLAGS += $(FPIC)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
diff --git a/package/libs/sysfsutils/Makefile b/package/libs/sysfsutils/Makefile
index 8ce9a40f914..b7c9d8cdc14 100644
--- a/package/libs/sysfsutils/Makefile
+++ b/package/libs/sysfsutils/Makefile
@@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=sysfsutils
PKG_VERSION:=2.1.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/linux-diag
PKG_HASH:=e865de2c1f559fff0d3fc936e660c0efaf7afe662064f2fb97ccad1ec28d208a
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
+PKG_CPE_ID:=cpe:/a:sysfsutils_project:sysfsutils
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING cmd/GPL lib/LGPL
diff --git a/package/libs/sysfsutils/files/sysfsutils b/package/libs/sysfsutils/files/sysfsutils
index 0305ca82a9d..3c5b35e78d3 100644
--- a/package/libs/sysfsutils/files/sysfsutils
+++ b/package/libs/sysfsutils/files/sysfsutils
@@ -4,6 +4,8 @@
# Based on Debian's script /etc/init.d/sysfsutils by
# Martin Pitt <mpitt@debian.org>
+START=11
+
load_conffile() {
FILE="$1"
sed 's/#.*$//; /^[[:space:]]*$/d;
@@ -39,7 +41,6 @@ load_conffile() {
}
}
-START=11
start() {
for file in /etc/sysfs.conf /etc/sysfs.d/*.conf; do
[ -r "$file" ] || continue
diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile
index 52a4cda19f6..ea36af5da44 100644
--- a/package/libs/toolchain/Makefile
+++ b/package/libs/toolchain/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=toolchain
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-3.0-with-GCC-exception
@@ -115,7 +115,7 @@ define Package/libasan
$(call Package/gcc/Default)
NAME:=libasan
TITLE:=Runtime library for AddressSanitizer in GCC
- DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc
+ DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips64 @!mips64el @!arc
ABI_VERSION:=5
endef
@@ -202,7 +202,7 @@ define Package/libubsan
$(call Package/gcc/Default)
NAME:=libubsan
TITLE:=Runtime library for UndefinedBehaviorSanitizer in GCC
- DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc
+ DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips64 @!mips64el @!arc
ABI_VERSION:=1
endef
@@ -454,6 +454,9 @@ define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
+define Build/Quilt
+endef
+
LIBGCC_A=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc_pic.a))
LIBGCC_MAP=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.map))
LIBGCC_SO=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so.*))
@@ -490,6 +493,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
define Package/libstdcpp/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(TOOLCHAIN_DIR)/lib/libstdc++.so.* $(1)/usr/lib/
+ rm -rf $(1)/usr/lib/*-gdb.py
endef
define Package/libasan/install
@@ -519,10 +523,9 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
$(INSTALL_DIR) $(1)/lib
$(CP) \
$(TOOLCHAIN_DIR)/lib/ld*.so.* \
- $(TOOLCHAIN_DIR)/lib/ld-$(LIBC_SO_VERSION).so \
$(1)/lib/
for file in libanl libc libcidn libcrypt libdl libm libnsl libnss_dns libnss_files libresolv libutil; do \
- for file in $(TOOLCHAIN_DIR)/lib/$$$$file.so.* $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so; do \
+ for file in $(TOOLCHAIN_DIR)/lib/$$$$file.so.*; do \
if [ -e "$$$$file" ]; then \
$(CP) $$$$file $(1)/lib/; \
fi; \
@@ -561,7 +564,6 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
ifneq ($(CONFIG_USE_MUSL),y)
$(CP) \
$(TOOLCHAIN_DIR)/lib/libpthread.so.* \
- $(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_SO_VERSION).so \
$(1)/lib/
endif
endef
@@ -581,7 +583,6 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
ifneq ($(CONFIG_USE_MUSL),y)
$(CP) \
$(TOOLCHAIN_DIR)/lib/librt.so.* \
- $(TOOLCHAIN_DIR)/lib/librt-$(LIBC_SO_VERSION).so \
$(1)/lib/
endif
endef
@@ -654,12 +655,23 @@ else
exit 0
endef
+ define Package/glibc/install
+ endef
+
+ LD_MUSL_NAME = $(notdir $(firstword $(wildcard $(TOOLCHAIN_ROOT_DIR)/lib/libc.so*)))
+
+ define Package/musl/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(LN) ../../lib/$(LD_MUSL_NAME) $(1)/usr/bin/ldd
+ endef
+
define Package/libc/install
for file in $(call qstrip,$(CONFIG_LIBC_FILE_SPEC)); do \
$(INSTALL_DIR) $(1)/lib ; \
$(CP) $(call qstrip,$(CONFIG_LIBC_ROOT_DIR))/$$$$file $(1)/lib/ ; \
done ; \
exit 0
+ $(call Package/$(LIBC)/install,$1)
endef
define Package/libpthread/install
diff --git a/package/libs/uclibc++/Makefile b/package/libs/uclibc++/Makefile
deleted file mode 100644
index 0e3210a5b9a..00000000000
--- a/package/libs/uclibc++/Makefile
+++ /dev/null
@@ -1,105 +0,0 @@
-#
-# Copyright (C) 2006-2012 OpenWrt.org
-# Copyright (c) 2016 LEDE project
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=uclibc++
-PKG_VERSION:=0.2.5
-PKG_RELEASE:=3
-
-PKG_SOURCE:=uClibc++-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://cxx.uclibc.org/src/
-PKG_HASH:=596fb9ed7295564ce4c70ae6076a18f92e72f70310d70c98520bbca85c77895a
-PKG_BUILD_DIR:=$(BUILD_DIR)/uClibc++-$(PKG_VERSION)
-
-PKG_LICENSE:=LGPL-2.1-or-later
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-PKG_USE_MIPS16:=0
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/uclibcxx
- NAME:=uclibc++
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=C++ library for embedded systems
- URL:=https://cxx.uclibc.org/
-endef
-
-UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
- -e 's/i.86/i386/' \
- -e 's/sparc.*/sparc/' \
- -e 's/m68k.*/m68k/' \
- -e 's/ppc/powerpc/g' \
- -e 's/v850.*/v850/g' \
- -e 's/sh64/sh/' \
- -e 's/sh[234].*/sh/' \
- -e 's/mips.*/mips/' \
- -e 's/mipsel.*/mips/' \
-)
-
-TARGET_CFLAGS += $(FPIC) -nostdinc++ -std=c++11
-TARGET_LDFLAGS += -Wl,--gc-sections
-
-ifneq ($(CONFIG_CCACHE),)
-TARGET_CXX=$(TARGET_CXX_NOCACHE)
-endif
-
-ifeq ($(CONFIG_USE_MUSL),y)
-SSP_LIB=-lssp_nonshared
-endif
-
-ifeq (${V}, s)
-MAKE_VARS+= \
- V=1
-else ifeq (${V}, sc)
-MAKE_VARS+= \
- V=2
-endif
-
-MAKE_FLAGS:= \
- $(TARGET_CONFIGURE_OPTS) \
- CPU_CFLAGS="$(TARGET_CFLAGS)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
- GEN_LIBS="-lc $(LIBGCC_S) $(SSP_LIB)" \
- check_as_needed=
-
-# check_as_needed overrides dependency on libgcc_s
-
-define Build/Configure
- if [ -f ./files/config.$(UCLIBC_TARGET_ARCH) ]; then \
- cp ./files/config.$(UCLIBC_TARGET_ARCH) $(PKG_BUILD_DIR)/.config; \
- else \
- cp ./files/config.default $(PKG_BUILD_DIR)/.config; \
- fi
-endef
-
-define Build/InstallDev
- $(INSTALL_DIR) $(2)/bin $(1)/usr/include/uClibc++ $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/g++-uc $(TOOLCHAIN_DIR)/bin/
- $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include/uClibc++/
- $(CP) $(PKG_INSTALL_DIR)/lib/libuClibc++*.{a,so}* $(1)/usr/lib/
- $(SED) 's!\(^\|[[:space:]]\)-[IL]$(TOOLCHAIN_DIR)/[^[:space:]]*!!g' $(TOOLCHAIN_DIR)/bin/g++-uc
- $(SED) 's|-I/include/|-I$$$${STAGING_DIR:-$(STAGING_DIR)}/usr/include/uClibc++/|g' $(TOOLCHAIN_DIR)/bin/g++-uc
- $(SED) 's|-L/lib/|-L$$$${STAGING_DIR:-$(STAGING_DIR)}/lib/|g' $(TOOLCHAIN_DIR)/bin/g++-uc
-# add another wrapper which links against both uClibc++ and libstdc++
- $(INSTALL_BIN) $(TOOLCHAIN_DIR)/bin/g++-uc $(TOOLCHAIN_DIR)/bin/g++-uc+std
- $(SED) 's|^WRAPPER_INCLUDEDIR=.*||g' $(TOOLCHAIN_DIR)/bin/g++-uc+std
- $(SED) 's|-luClibc++|-Wl,-Bdynamic,-luClibc++,-Bstatic,-lstdc++,-Bdynamic|g' $(TOOLCHAIN_DIR)/bin/g++-uc+std
- $(SED) 's|-nostdinc++||g' $(TOOLCHAIN_DIR)/bin/g++-uc+std
-endef
-
-define Package/uclibcxx/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/lib/libuClibc++.so.* $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/lib/libuClibc++-*.so $(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,uclibcxx))
diff --git a/package/libs/uclibc++/files/config.default b/package/libs/uclibc++/files/config.default
deleted file mode 100644
index d76670e9695..00000000000
--- a/package/libs/uclibc++/files/config.default
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-
-#
-# Target Features and Options
-#
-UCLIBCXX_HAS_FLOATS=y
-# UCLIBCXX_HAS_LONG_DOUBLE is not set
-# UCLIBCXX_HAS_TLS is not set
-UCLIBCXX_WARNINGS=""
-BUILD_EXTRA_LIBRARIES=""
-HAVE_DOT_CONFIG=y
-
-#
-# String and I/O Stream Support
-#
-UCLIBCXX_HAS_WCHAR=y
-UCLIBCXX_IOSTREAM_BUFSIZE=32
-UCLIBCXX_HAS_LFS=y
-UCLIBCXX_SUPPORT_CDIR=y
-UCLIBCXX_SUPPORT_CIN=y
-UCLIBCXX_SUPPORT_COUT=y
-UCLIBCXX_SUPPORT_CERR=y
-UCLIBCXX_SUPPORT_CLOG=y
-# UCLIBCXX_SUPPORT_WCIN is not set
-# UCLIBCXX_SUPPORT_WCOUT is not set
-# UCLIBCXX_SUPPORT_WCERR is not set
-# UCLIBCXX_SUPPORT_WCLOG is not set
-
-#
-# STL and Code Expansion
-#
-UCLIBCXX_STL_BUFFER_SIZE=32
-UCLIBCXX_CODE_EXPANSION=y
-UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS=y
-UCLIBCXX_EXPAND_STRING_CHAR=y
-UCLIBCXX_EXPAND_VECTOR_BASIC=y
-UCLIBCXX_EXPAND_IOS_CHAR=y
-UCLIBCXX_EXPAND_STREAMBUF_CHAR=y
-UCLIBCXX_EXPAND_ISTREAM_CHAR=y
-UCLIBCXX_EXPAND_OSTREAM_CHAR=y
-UCLIBCXX_EXPAND_FSTREAM_CHAR=y
-UCLIBCXX_EXPAND_SSTREAM_CHAR=y
-
-#
-# Library Installation Options
-#
-UCLIBCXX_RUNTIME_PREFIX=""
-UCLIBCXX_RUNTIME_INCLUDE_SUBDIR="/include"
-UCLIBCXX_RUNTIME_LIB_SUBDIR="/lib"
-UCLIBCXX_RUNTIME_BIN_SUBDIR="/bin"
-UCLIBCXX_EXCEPTION_SUPPORT=y
-IMPORT_LIBSUP=y
-# IMPORT_LIBGCC_EH is not set
-BUILD_STATIC_LIB=y
-# BUILD_ONLY_STATIC_LIB is not set
-# DODEBUG is not set
diff --git a/package/libs/uclibc++/patches/001-no-ansi.patch b/package/libs/uclibc++/patches/001-no-ansi.patch
deleted file mode 100644
index 7ddbf52f006..00000000000
--- a/package/libs/uclibc++/patches/001-no-ansi.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/Rules.mak
-+++ b/Rules.mak
-@@ -232,7 +232,6 @@ endif
- GEN_CXXFLAGS:=-nostdinc++
- GEN_CXXFLAGS+=$(if $(CXXFLAG_-fvisibility-inlines-hidden),-DGCC_HASCLASSVISIBILITY)
- CXXFLAGS:=$(CFLAGS)
--CFLAGS += -ansi
-
- LIBGCC:=$(shell $(CC) -print-libgcc-file-name)
- LIBGCC_DIR:=$(dir $(LIBGCC))
diff --git a/package/libs/uclibc++/patches/002-undef-functions.patch b/package/libs/uclibc++/patches/002-undef-functions.patch
deleted file mode 100644
index 47fa1580f2e..00000000000
--- a/package/libs/uclibc++/patches/002-undef-functions.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 8245f62c1e7aba150f666b3c3a1dda646dee6d4b Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Fri, 27 Sep 2019 13:12:44 -0700
-Subject: [PATCH] cstdio: Add undef for four functions
-
-When compiling with uClibc-ng, these functions get defined as macros and
-become unavailable for std.
-
-Fixes programs that use the std versions of these functions.
-
-This matches libstdcpp behavior.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- include/cstdio | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/include/cstdio
-+++ b/include/cstdio
-@@ -21,6 +21,15 @@
- #ifndef __HEADER_CSTDIO
- #define __HEADER_CSTDIO 1
-
-+#undef clearerr
-+#undef feof
-+#undef ferror
-+#undef fgetc
-+#undef fputc
-+#undef getc
-+#undef getchar
-+#undef putc
-+#undef putchar
-
- namespace std{
- using ::FILE;
diff --git a/package/libs/uclibc++/patches/003-no-fPIC.patch b/package/libs/uclibc++/patches/003-no-fPIC.patch
deleted file mode 100644
index dfd8833ae41..00000000000
--- a/package/libs/uclibc++/patches/003-no-fPIC.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/Rules.mak
-+++ b/Rules.mak
-@@ -185,7 +185,6 @@ export UCLIBCXX_RUNTIME_PREFIX UCLIBCXX_
-
- WRAPPER = $(top_builddir)bin/g++-uc
- OPTIMIZATION:=
--PICFLAG:=-fPIC
-
- # use '-Os' optimization if available, else use -O2, allow Config to override
- $(eval $(call check-gcc-var,-Os))
diff --git a/package/libs/uclibc++/patches/004-uClibc-Make-long-long-available-to-C-11.patch b/package/libs/uclibc++/patches/004-uClibc-Make-long-long-available-to-C-11.patch
deleted file mode 100644
index 6e13f22c8a5..00000000000
--- a/package/libs/uclibc++/patches/004-uClibc-Make-long-long-available-to-C-11.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 8151579eb36d9366632242415ff3f5177fa5e1e2 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Thu, 3 Oct 2019 18:58:43 -0700
-Subject: [PATCH] uClibc++: Make long long available to C++11
-
-C++11 makes long long available. It is no longer a GNU extension.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- include/istream | 4 ++--
- include/istream_helpers | 2 +-
- include/ostream | 8 ++++----
- include/ostream_helpers | 8 ++++----
- tests/sstreamtest.cpp | 4 ++--
- 5 files changed, 13 insertions(+), 13 deletions(-)
-
---- a/include/istream
-+++ b/include/istream
-@@ -72,7 +72,7 @@ namespace std{
- basic_istream<charT,traits>& operator>>(void*& p);
- basic_istream<charT,traits>& operator>>(basic_streambuf<char_type,traits>* sb);
-
--#ifndef __STRICT_ANSI__
-+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
- basic_istream<charT,traits>& operator>>(long long& n);
- basic_istream<charT,traits>& operator>>(unsigned long long& n);
- #endif
-@@ -455,7 +455,7 @@ namespace std{
- return *this;
- }
-
--#ifndef __STRICT_ANSI__
-+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
- template <class charT, class traits> _UCXXEXPORT basic_istream<charT,traits>&
- basic_istream<charT,traits>::operator>>(long long& n)
- {
---- a/include/istream_helpers
-+++ b/include/istream_helpers
-@@ -301,7 +301,7 @@ namespace std{
- };
-
-
--#ifndef __STRICT_ANSI__
-+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
- template <class traits> class _UCXXEXPORT __istream_readin<traits, char, long long>{
- public:
- inline static void readin(basic_istream<char, traits >& stream, long long & var)
---- a/include/ostream
-+++ b/include/ostream
-@@ -85,7 +85,7 @@ namespace std {
- basic_ostream<charT,traits>& operator<<(long double f);
- basic_ostream<charT,traits>& operator<<(void* p);
- basic_ostream<charT,traits>& operator<<(basic_streambuf<char_type,traits>* sb);
--#ifndef __STRICT_ANSI__
-+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
- basic_ostream<charT,traits>& operator<<(long long n);
- basic_ostream<charT,traits>& operator<<(unsigned long long n);
- #endif
-@@ -221,7 +221,7 @@ namespace std {
- return *this;
- }
-
--#ifndef __STRICT_ANSI__
-+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
- template <class charT, class traits> _UCXXEXPORT basic_ostream<charT,traits>& basic_ostream<charT, traits>::operator<<(long long n)
- {
- sentry s(*this);
-@@ -487,7 +487,7 @@ namespace std {
- #endif
-
-
--#ifndef __STRICT_ANSI__
-+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
-
- //Support for output of long long data types
-
-@@ -509,7 +509,7 @@ template<class Ch, class Tr> _UCXXEXPORT
- }
-
-
--#endif //__STRICT_ANSI__
-+#endif // !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
-
-
-
---- a/include/ostream_helpers
-+++ b/include/ostream_helpers
-@@ -142,7 +142,7 @@ namespace std{
- }
- };
-
--#ifndef __STRICT_ANSI__
-+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
-
- template <class traits> class _UCXXEXPORT __ostream_printout<traits, char, signed long long int>{
- public:
-@@ -237,7 +237,7 @@ namespace std{
- };
-
-
--#endif //__STRICT_ANSI__
-+#endif // !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
-
- template <class traits> class _UCXXEXPORT __ostream_printout<traits, char, double>{
- public:
-@@ -357,7 +357,7 @@ namespace std{
- }
- };
-
--#ifndef __STRICT_ANSI__
-+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
-
- template <class traits> class _UCXXEXPORT __ostream_printout<traits, wchar_t, signed long long int>{
- public:
-@@ -428,7 +428,7 @@ namespace std{
- };
-
-
--#endif //__STRICT_ANSI__
-+#endif // !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
-
- template <class traits> class _UCXXEXPORT __ostream_printout<traits, wchar_t, double>{
- public:
---- a/tests/sstreamtest.cpp
-+++ b/tests/sstreamtest.cpp
-@@ -9,7 +9,7 @@ int main(){
- int i;
- std::string s;
- char c;
--#ifndef __STRICT_ANSI__
-+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
- long long ll;
- unsigned long long ull;
- #endif
-@@ -32,7 +32,7 @@ int main(){
-
-
-
--#ifndef __STRICT_ANSI__
-+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L)
- a.str("678 76 54");
- a >> ll >> ull >> s;
- std::cout << "ll (should be 678): " << ll << std::endl;
diff --git a/package/libs/uclibc++/patches/005-istream_helpers-Fix-sscanf-typo.patch b/package/libs/uclibc++/patches/005-istream_helpers-Fix-sscanf-typo.patch
deleted file mode 100644
index 66b62c197ca..00000000000
--- a/package/libs/uclibc++/patches/005-istream_helpers-Fix-sscanf-typo.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 7f6dd860818512c0eb313320308b22ba7e2c7205 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Fri, 4 Oct 2019 20:06:53 -0700
-Subject: [PATCH] istream_helpers: Fix sscanf typo
-
-This caused readin not to work properly with long long types.
-
-Found accidentally through a glibc warning
-(declared with warn_unused_result).
-
-Tested with gptfdisk on OpenWrt.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- include/istream_helpers | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/include/istream_helpers
-+++ b/include/istream_helpers
-@@ -317,7 +317,7 @@ namespace std{
- sscanf(temp.c_str(), "%llo", (unsigned long long *)&var );
- }else if(stream.flags() & ios_base::hex){
- if(stream.flags() & ios_base::uppercase){
-- scanf(temp.c_str(), "%llX", (unsigned long long *)&var );
-+ sscanf(temp.c_str(), "%llX", (unsigned long long *)&var );
- }else{
- sscanf(temp.c_str(), "%llx", (unsigned long long *)&var);
- }
-@@ -344,7 +344,7 @@ namespace std{
- sscanf(temp.c_str(), "%llo", &var );
- }else if(stream.flags() & ios_base::hex){
- if(stream.flags() & ios_base::uppercase){
-- scanf(temp.c_str(), "%llX", &var );
-+ sscanf(temp.c_str(), "%llX", &var );
- }else{
- sscanf(temp.c_str(), "%llx", &var);
- }
diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile
index 398a27bb98b..d7d1f1bb1f5 100644
--- a/package/libs/uclient/Makefile
+++ b/package/libs/uclient/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git
-PKG_MIRROR_HASH:=7c443cac02a734dd312c65618f4de17248d188317f30a9fac192c1503b3d5c05
-PKG_SOURCE_DATE:=2021-05-14
-PKG_SOURCE_VERSION:=6a6011df3429ffa5958d12b1327eeda4fd9daa47
+PKG_MIRROR_HASH:=16c6c97f45d9737fb40628ea22ae347541a1e37d8d1576e04ffbaa5fc92f3b6d
+PKG_SOURCE_DATE:=2023-04-13
+PKG_SOURCE_VERSION:=007d945467499f43656b141171d31f5643b83a6c
CMAKE_INSTALL:=1
PKG_BUILD_DEPENDS:=ustream-ssl
diff --git a/package/libs/udebug/Makefile b/package/libs/udebug/Makefile
new file mode 100644
index 00000000000..0a54515e746
--- /dev/null
+++ b/package/libs/udebug/Makefile
@@ -0,0 +1,82 @@
+#
+# Copyright (C) 2023 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=udebug
+CMAKE_INSTALL:=1
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=$(PROJECT_GIT)/project/udebug.git
+PKG_MIRROR_HASH:=553a58a14b59dc7b22755557acbc74f0655a431442a4faca56d28cdb1ef14fb4
+PKG_SOURCE_DATE:=2023-12-06
+PKG_SOURCE_VERSION:=6d3f51f9fda706f0cf4732c762e4dbe8c21e12cf
+PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
+
+PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libudebug
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=udebug client library
+ DEPENDS:=+libubox +libubus
+endef
+
+define Package/udebugd
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=OpenWrt debug service
+ DEPENDS:=+libudebug
+endef
+
+define Package/udebugd/conffiles
+/etc/config/udebug
+endef
+
+define Package/ucode-mod-udebug
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=ucode udebug module
+ DEPENDS:=+libucode +libudebug
+endef
+
+define Package/udebug-cli
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=OpenWrt debug service CLI
+ DEPENDS:=+udebugd +ucode-mod-udebug
+endef
+
+define Package/libudebug/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
+endef
+
+define Package/ucode-mod-udebug/install
+ $(INSTALL_DIR) $(1)/usr/lib/ucode
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ucode/*.so $(1)/usr/lib/ucode
+endef
+
+define Package/udebugd/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
+ $(INSTALL_BIN) ./files/udebug.config $(1)/etc/config/udebug
+ $(INSTALL_BIN) ./files/udebug.init $(1)/etc/init.d/udebug
+ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/udebugd $(1)/usr/sbin
+endef
+
+define Package/udebug-cli/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/udebug-cli $(1)/usr/sbin/udebug
+endef
+
+$(eval $(call BuildPackage,libudebug))
+$(eval $(call BuildPackage,udebugd))
+$(eval $(call BuildPackage,ucode-mod-udebug))
+$(eval $(call BuildPackage,udebug-cli))
diff --git a/package/libs/udebug/files/udebug.config b/package/libs/udebug/files/udebug.config
new file mode 100644
index 00000000000..68ddefe6cdf
--- /dev/null
+++ b/package/libs/udebug/files/udebug.config
@@ -0,0 +1,30 @@
+config service procd
+ option enabled 0
+
+config service log
+ option enabled 0
+ option debug 0
+ option kernel 1
+ option syslog 1
+
+config service hostapd
+ option enabled 0
+ option wpa_log 1
+ option wpa_nl_rx 0
+ option wpa_nl_tx 0
+ option wpa_nl_ctrl 0
+
+config service wpa_supplicant
+ option enabled 0
+ option wpa_log 1
+ option wpa_nl_rx 0
+ option wpa_nl_tx 0
+ option wpa_nl_ctrl 0
+
+config service netifd
+ option enabled 0
+ option netifd_log 1
+ option netifd_nl 0
+
+config service umdns
+ option enabled 0
diff --git a/package/libs/udebug/files/udebug.init b/package/libs/udebug/files/udebug.init
new file mode 100755
index 00000000000..b57e962f6fa
--- /dev/null
+++ b/package/libs/udebug/files/udebug.init
@@ -0,0 +1,55 @@
+#!/bin/sh /etc/rc.common
+# Copyright (c) 2021 OpenWrt.org
+
+START=11
+
+USE_PROCD=1
+PROG=/usr/sbin/udebugd
+
+start_service() {
+ procd_open_instance
+ procd_set_param command "$PROG"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+get_vars() {
+ local cfg="$1"
+ uci show "udebug.$cfg" | while read LINE; do
+ cur="${LINE##udebug.$1.}"
+ [[ "$cur" = "$LINE" ]] && continue
+ var="${cur%%=*}"
+ [[ "$cur" = "$var" ]] && continue
+ echo "$var"
+ done
+}
+
+add_debug_service() {
+ local cfg="$1"
+
+ json_add_object "$cfg"
+ for var in $(get_vars "$cfg"); do
+ config_get val "$cfg" "$var"
+ json_add_string "$var" "$val"
+ done
+ json_close_object "$cfg"
+}
+
+reload_service() {
+ config_load udebug
+
+ json_init
+ json_add_object service
+ config_foreach add_debug_service service
+ json_close_object
+ ubus call udebug set_config "$(json_dump)"
+}
+
+service_triggers() {
+ procd_add_reload_trigger udebug
+}
+
+service_started() {
+ ubus -t 10 wait_for udebug
+ [ $? = 0 ] && reload_service
+}
diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile
index f762c89d29b..076053abf65 100644
--- a/package/libs/ustream-ssl/Makefile
+++ b/package/libs/ustream-ssl/Makefile
@@ -1,13 +1,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ustream-ssl
-PKG_RELEASE:=2
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git
-PKG_SOURCE_DATE:=2020-12-10
-PKG_SOURCE_VERSION:=68d09243b6fd4473004b27ff6483352e76e6af1a
-PKG_MIRROR_HASH:=a620090dee08c0624d167c10e9e45d54aa2b953a1f356eff7325a8fe53c622e6
+PKG_SOURCE_DATE:=2023-11-26
+PKG_SOURCE_VERSION:=263b9a97cf7e1e2467319c23832b705fc01190b5
+PKG_MIRROR_HASH:=1c01d633f21c6cb578a785826d1983284b28f49b20d608d82179842dcdbeed6e
CMAKE_INSTALL:=1
PKG_LICENSE:=ISC
@@ -44,7 +44,7 @@ endef
define Package/libustream-mbedtls
$(Package/libustream/default)
TITLE += (mbedtls)
- DEPENDS += +libmbedtls
+ DEPENDS += +PACKAGE_libustream-mbedtls:libmbedtls
CONFLICTS := libustream-openssl libustream-wolfssl
VARIANT:=mbedtls
DEFAULT_VARIANT:=1
diff --git a/package/libs/wolfssl/Config.in b/package/libs/wolfssl/Config.in
index 81496c15d69..7c154ccb315 100644
--- a/package/libs/wolfssl/Config.in
+++ b/package/libs/wolfssl/Config.in
@@ -1,4 +1,4 @@
-if PACKAGE_libwolfssl
+menu "wolfSSL Library Configuration"
config WOLFSSL_HAS_AES_CCM
bool "Include AES-CCM support"
@@ -43,42 +43,54 @@ config WOLFSSL_HAS_OCSP
config WOLFSSL_HAS_WPAS
bool "Include wpa_supplicant support"
select WOLFSSL_HAS_ARC4
+ select WOLFSSL_HAS_DH
select WOLFSSL_HAS_OCSP
select WOLFSSL_HAS_SESSION_TICKET
default y
config WOLFSSL_HAS_ECC25519
bool "Include ECC Curve 25519 support"
- default n
+ default y
+
+config WOLFSSL_HAS_ECC448
+ bool "Include ECC Curve 448 support"
config WOLFSSL_HAS_OPENVPN
bool "Include OpenVPN support"
- default n
+ default y
+
+config WOLFSSL_ALT_NAMES
+ bool "Include SAN (Subject Alternative Name) support"
+ default y
config WOLFSSL_HAS_DEVCRYPTO
bool
-choice
- prompt "Hardware Acceleration"
- default WOLFSSL_HAS_NO_HW
-
- config WOLFSSL_HAS_NO_HW
- bool "None"
-
- config WOLFSSL_HAS_AFALG
- bool "AF_ALG"
-
- config WOLFSSL_HAS_DEVCRYPTO_CBC
- bool "/dev/crytpo - AES-CBC-only"
- select WOLFSSL_HAS_DEVCRYPTO
-
- config WOLFSSL_HAS_DEVCRYPTO_AES
- bool "/dev/crypto - AES-only (all supported modes)"
- select WOLFSSL_HAS_DEVCRYPTO
-
- config WOLFSSL_HAS_DEVCRYPTO_FULL
- bool "/dev/crypto - full"
- select WOLFSSL_HAS_DEVCRYPTO
-endchoice
-
+if PACKAGE_libwolfssl
+ if PACKAGE_libwolfsslcpu-crypto
+ comment "Hardware Acceleration does not apply to libwolfsslcpu-crypto"
+ endif
+ choice
+ prompt "Hardware Acceleration"
+ default WOLFSSL_HAS_NO_HW
+
+ config WOLFSSL_HAS_NO_HW
+ bool "None"
+
+ config WOLFSSL_HAS_AFALG
+ bool "AF_ALG"
+
+ config WOLFSSL_HAS_DEVCRYPTO_CBC
+ bool "/dev/crypto - AES-CBC-only"
+ select WOLFSSL_HAS_DEVCRYPTO
+
+ config WOLFSSL_HAS_DEVCRYPTO_AES
+ bool "/dev/crypto - AES-only (all supported modes)"
+ select WOLFSSL_HAS_DEVCRYPTO
+
+ config WOLFSSL_HAS_DEVCRYPTO_FULL
+ bool "/dev/crypto - full"
+ select WOLFSSL_HAS_DEVCRYPTO
+ endchoice
endif
+endmenu
diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile
index 0c95288a2ac..8477fb85c51 100644
--- a/package/libs/wolfssl/Makefile
+++ b/package/libs/wolfssl/Makefile
@@ -8,16 +8,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wolfssl
-PKG_VERSION:=4.7.0-stable
-PKG_RELEASE:=2
+PKG_VERSION:=5.6.6-stable
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
-PKG_HASH:=b0e740b31d4d877d540ad50cc539a8873fc41af02bd3091c4357b403f7106e31
+PKG_HASH:=3d2ca672d41c2c2fa667885a80d6fa03c3e91f0f4f72f87aef2bc947e8c87237
PKG_FIXUP:=libtool libtool-abiver
PKG_INSTALL:=1
-PKG_USE_MIPS16:=0
+PKG_BUILD_FLAGS:=no-mips16 lto
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=LICENSING COPYING
@@ -25,29 +25,49 @@ PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
PKG_CPE_ID:=cpe:/a:wolfssl:wolfssl
PKG_CONFIG_DEPENDS:=\
- CONFIG_WOLFSSL_HAS_AES_CCM CONFIG_WOLFSSL_HAS_AFALG \
- CONFIG_WOLFSSL_HAS_ARC4 CONFIG_WOLFSSL_HAS_CHACHA_POLY \
- CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL \
- CONFIG_WOLFSSL_HAS_DH CONFIG_WOLFSSL_HAS_DTLS \
- CONFIG_WOLFSSL_HAS_ECC25519 CONFIG_WOLFSSL_HAS_OCSP \
- CONFIG_WOLFSSL_HAS_SESSION_TICKET CONFIG_WOLFSSL_HAS_TLSV10 \
- CONFIG_WOLFSSL_HAS_TLSV13 CONFIG_WOLFSSL_HAS_WPAS CONFIG_WOLFSSL_HAS_CERTGEN \
- CONFIG_WOLFSSL_HAS_OPENVPN
-
-PKG_ABI_VERSION=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS)))
+ CONFIG_WOLFSSL_HAS_AES_CCM \
+ CONFIG_WOLFSSL_HAS_ARC4 \
+ CONFIG_WOLFSSL_HAS_CERTGEN \
+ CONFIG_WOLFSSL_HAS_CHACHA_POLY \
+ CONFIG_WOLFSSL_HAS_DH \
+ CONFIG_WOLFSSL_HAS_DTLS \
+ CONFIG_WOLFSSL_HAS_ECC25519 \
+ CONFIG_WOLFSSL_HAS_ECC448 \
+ CONFIG_WOLFSSL_HAS_OCSP \
+ CONFIG_WOLFSSL_HAS_OPENVPN CONFIG_WOLFSSL_ALT_NAMES \
+ CONFIG_WOLFSSL_HAS_SESSION_TICKET \
+ CONFIG_WOLFSSL_HAS_TLSV10 \
+ CONFIG_WOLFSSL_HAS_TLSV13 \
+ CONFIG_WOLFSSL_HAS_WPAS
+
+PKG_ABI_VERSION:=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS)))
+
+PKG_CONFIG_DEPENDS+=\
+ CONFIG_PACKAGE_libwolfssl-benchmark \
+ CONFIG_WOLFSSL_HAS_AFALG \
+ CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES \
+ CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC \
+ CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL
include $(INCLUDE_DIR)/package.mk
-define Package/libwolfssl
+define Package/libwolfssl/Default
SECTION:=libs
SUBMENU:=SSL
CATEGORY:=Libraries
- TITLE:=wolfSSL library
URL:=http://www.wolfssl.com/
+endef
+
+define Package/libwolfssl
+$(call Package/libwolfssl/Default)
+ TITLE:=wolfSSL library
MENU:=1
PROVIDES:=libcyassl
DEPENDS:=+WOLFSSL_HAS_DEVCRYPTO:kmod-cryptodev +WOLFSSL_HAS_AFALG:kmod-crypto-user
ABI_VERSION:=$(PKG_ABI_VERSION)
+ VARIANT:=regular
+ DEFAULT_VARIANT:=1
+ CONFLICTS:=libwolfsslcpu-crypto
endef
define Package/libwolfssl/description
@@ -59,17 +79,58 @@ define Package/libwolfssl/config
source "$(SOURCE)/Config.in"
endef
-TARGET_CFLAGS += $(FPIC) -DFP_MAX_BITS=8192 -fomit-frame-pointer -flto
-TARGET_LDFLAGS += -flto
+define Package/libwolfsslcpu-crypto
+$(call Package/libwolfssl/Default)
+ TITLE:=wolfSSL library with AES CPU instructions
+ PROVIDES:=libwolfssl libcyassl
+ DEPENDS:=@((aarch64||x86_64)&&(m||!TARGET_bcm27xx))
+ ABI_VERSION:=$(PKG_ABI_VERSION)
+ VARIANT:=cpu-crypto
+endef
+
+define Package/libwolfssl-benchmark
+$(call Package/libwolfssl/Default)
+ TITLE:=wolfSSL Benchmark Utility
+ DEPENDS:=libwolfssl
+endef
+
+define Package/libwolfsslcpu-crypto/description
+$(call Package/libwolfssl/description)
+This variant uses AES CPU instructions (Intel AESNI or ARMv8 Crypto Extension)
+endef
+
+define Package/libwolfsslcpu-crypto/config
+ if TARGET_armsr && PACKAGE_libwolfsslcpu-crypto = y
+ comment "You are about to build libwolfsslcpu-crypto into an armsr_64 image."
+ comment "Ensure all of your installation targets support the Crypto Extension. "
+ comment "Look for the 'aes' feature in /proc/cpuinfo. This library does not do "
+ comment "run-time detection and will crash if the CPU does not support it. "
+ endif
+ if TARGET_bcm27xx && PACKAGE_libwolfsslcpu-crypto
+ comment "Beware that libwolfsslcpu-crypto will not run in a bcm27xx target. "
+ endif
+endef
+
+define Package/libwolfssl-benchmark/description
+This is the wolfssl benchmark utility.
+endef
+
+TARGET_CFLAGS += \
+ $(FPIC) \
+ -fomit-frame-pointer \
+ -DFP_MAX_BITS=8192 \
+ $(if $(CONFIG_WOLFSSL_ALT_NAMES),-DWOLFSSL_ALT_NAMES)
# --enable-stunnel needed for OpenSSL API compatibility bits
CONFIGURE_ARGS += \
+ --enable-reproducible-build \
--enable-lighty \
--enable-opensslall \
--enable-opensslextra \
--enable-sni \
--enable-stunnel \
- --disable-crypttests \
+ --enable-altcertchains \
+ --$(if $(CONFIG_PACKAGE_libwolfssl-benchmark),enable,disable)-crypttests \
--disable-examples \
--disable-jobserver \
--$(if $(CONFIG_IPV6),enable,disable)-ipv6 \
@@ -84,11 +145,49 @@ CONFIGURE_ARGS += \
--$(if $(CONFIG_WOLFSSL_HAS_SESSION_TICKET),enable,disable)-session-ticket \
--$(if $(CONFIG_WOLFSSL_HAS_DTLS),enable,disable)-dtls \
--$(if $(CONFIG_WOLFSSL_HAS_ECC25519),enable,disable)-curve25519 \
+ --$(if $(CONFIG_WOLFSSL_HAS_ECC448),enable,disable)-curve448 \
+ --$(if $(CONFIG_WOLFSSL_HAS_OPENVPN),enable,disable)-openvpn
+
+define Package/libwolfsslcpu-crypto/preinst-aarch64
+#!/bin/sh
+exec >&2
+printf "[libwolfsslcpu-crypto] Checking for Arm v8-A Cryptographic Extension support: "
+if [ -n "$${IPKG_INSTROOT}" ]; then
+ printf "...[offline]... "
+ eval "$$(grep '^DISTRIB_TARGET=' "$${IPKG_INSTROOT}/etc/openwrt_release")"
+ echo "$${DISTRIB_TARGET}" | grep '^bcm27xx/.*' > /dev/null && {
+ echo "not supported"
+ echo "Error: Target $${DISTRIB_TARGET} does not support Arm Cryptographic Extension."
+ echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
+ exit 1
+ }
+else
+ grep -q '^Features.*\baes\b' /proc/cpuinfo || {
+ echo "not supported"
+ echo "Error: Arm v8-A Cryptographic Extension not supported."
+ echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
+ echo "Contents of /proc/cpuinfo:"
+ cat /proc/cpuinfo
+ exit 1
+ }
+fi
+echo OK
+exit 0
+endef
+
+ifeq ($(BUILD_VARIANT),regular)
+CONFIGURE_ARGS += \
--$(if $(CONFIG_WOLFSSL_HAS_AFALG),enable,disable)-afalg \
- --$(if $(CONFIG_WOLFSSL_HAS_OPENVPN),enable,disable)-openvpn \
--enable-devcrypto=$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC),cbc\
,$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES),aes\
,$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL),yes,no)))
+else ifdef CONFIG_aarch64
+ CONFIGURE_ARGS += --enable-armasm
+ TARGET_CFLAGS:=$(TARGET_CFLAGS:-mcpu%=-mcpu%+crypto)
+ Package/libwolfsslcpu-crypto/preinst=$(Package/libwolfsslcpu-crypto/preinst-aarch64)
+else ifdef CONFIG_TARGET_x86_64
+ CONFIGURE_ARGS += --enable-intelasm
+endif
ifeq ($(CONFIG_WOLFSSL_HAS_OCSP),y)
CONFIGURE_ARGS += \
@@ -97,7 +196,7 @@ endif
ifeq ($(CONFIG_WOLFSSL_HAS_WPAS),y)
CONFIGURE_ARGS += \
- --enable-wpas --enable-sha512 --enable-fortress --enable-fastmath
+ --enable-wpas --enable-fortress --enable-fastmath
endif
define Build/InstallDev
@@ -117,4 +216,13 @@ define Package/libwolfssl/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so.* $(1)/usr/lib/
endef
+Package/libwolfsslcpu-crypto/install=$(Package/libwolfssl/install)
+
+define Package/libwolfssl-benchmark/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_BUILD_DIR)/wolfcrypt/benchmark/.libs/benchmark $(1)/usr/bin/wolfssl-benchmark
+endef
+
$(eval $(call BuildPackage,libwolfssl))
+$(eval $(call BuildPackage,libwolfsslcpu-crypto))
+$(eval $(call BuildPackage,libwolfssl-benchmark))
diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch
index c89ff1be9df..019645d7967 100644
--- a/package/libs/wolfssl/patches/100-disable-hardening-check.patch
+++ b/package/libs/wolfssl/patches/100-disable-hardening-check.patch
@@ -1,10 +1,10 @@
--- a/wolfssl/wolfcrypt/settings.h
+++ b/wolfssl/wolfcrypt/settings.h
-@@ -2255,7 +2255,7 @@ extern void uITRON4_free(void *p) ;
- #endif
+@@ -2774,7 +2774,7 @@ extern void uITRON4_free(void *p) ;
/* warning for not using harden build options (default with ./configure) */
--#ifndef WC_NO_HARDEN
+ /* do not warn if big integer support is disabled */
+-#if !defined(WC_NO_HARDEN) && !defined(NO_BIG_INT)
+#if 0
#if (defined(USE_FAST_MATH) && !defined(TFM_TIMING_RESISTANT)) || \
(defined(HAVE_ECC) && !defined(ECC_TIMING_RESISTANT)) || \
diff --git a/package/libs/wolfssl/patches/200-ecc-rng.patch b/package/libs/wolfssl/patches/200-ecc-rng.patch
deleted file mode 100644
index 2d33c062092..00000000000
--- a/package/libs/wolfssl/patches/200-ecc-rng.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Since commit 6467de5a8840 ("Randomize z ordinates in scalar
-mult when timing resistant") wolfssl requires a RNG for an EC
-key when the hardened built option is selected.
-
-wc_ecc_set_rng is only available when built hardened, so there
-is no safe way to install the RNG to the key regardless whether
-or not wolfssl is compiled hardened.
-
-Always export wc_ecc_set_rng so tools such as hostapd can install
-RNG regardless of the built settings for wolfssl.
-
---- a/wolfcrypt/src/ecc.c
-+++ b/wolfcrypt/src/ecc.c
-@@ -10293,21 +10293,21 @@ void wc_ecc_fp_free(void)
-
- #endif /* FP_ECC */
-
--#ifdef ECC_TIMING_RESISTANT
- int wc_ecc_set_rng(ecc_key* key, WC_RNG* rng)
- {
- int err = 0;
-
-+#ifdef ECC_TIMING_RESISTANT
- if (key == NULL) {
- err = BAD_FUNC_ARG;
- }
- else {
- key->rng = rng;
- }
-+#endif
-
- return err;
- }
--#endif
-
- #ifdef HAVE_ECC_ENCRYPT
-
---- a/wolfssl/wolfcrypt/ecc.h
-+++ b/wolfssl/wolfcrypt/ecc.h
-@@ -584,10 +584,8 @@ WOLFSSL_API
- void wc_ecc_fp_free(void);
- WOLFSSL_LOCAL
- void wc_ecc_fp_init(void);
--#ifdef ECC_TIMING_RESISTANT
- WOLFSSL_API
- int wc_ecc_set_rng(ecc_key* key, WC_RNG* rng);
--#endif
-
- WOLFSSL_API
- int wc_ecc_set_curve(ecc_key* key, int keysize, int curve_id);
diff --git a/package/libs/zlib/Makefile b/package/libs/zlib/Makefile
index c7a8415c79f..2559fbba0d4 100644
--- a/package/libs/zlib/Makefile
+++ b/package/libs/zlib/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=zlib
-PKG_VERSION:=1.2.11
-PKG_RELEASE:=3
+PKG_VERSION:=1.3.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@SF/libpng http://www.zlib.net
-PKG_HASH:=4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066
+PKG_SOURCE_URL:=https://github.com/madler/zlib/releases/download/v$(PKG_VERSION)
+PKG_HASH:=38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32
PKG_LICENSE:=Zlib
PKG_LICENSE_FILES:=README
diff --git a/package/libs/zlib/patches/001-neon-implementation-of-adler32.patch b/package/libs/zlib/patches/001-neon-implementation-of-adler32.patch
deleted file mode 100644
index 843ef45c7d7..00000000000
--- a/package/libs/zlib/patches/001-neon-implementation-of-adler32.patch
+++ /dev/null
@@ -1,253 +0,0 @@
-From d2f06cd65d7ac39c6dd6761eef162abc946b155b Mon Sep 17 00:00:00 2001
-From: Adenilson Cavalcanti <adenilson.cavalcanti@arm.com>
-Date: Tue, 11 Apr 2017 17:13:02 -0700
-Subject: [PATCH] NEON implementation for Adler32
-
-The checksum is calculated in the uncompressed PNG data
-and can be made much faster by using SIMD.
-
-Tests in ARMv8 yielded an improvement of about 3x
-(e.g. walltime was 350ms x 125ms for a 4096x4096 bytes
-executed 30 times). That results in at least 18% improvement
-in image decoding in Chromium.
-
-Further details at:
-https://bugs.chromium.org/p/chromium/issues/detail?id=688601
----
- CMakeLists.txt | 29 +++++++---
- adler32.c | 5 ++
- contrib/README.contrib | 3 +
- contrib/arm/neon_adler32.c | 137 +++++++++++++++++++++++++++++++++++++++++++++
- 4 files changed, 166 insertions(+), 8 deletions(-)
- create mode 100644 contrib/arm/neon_adler32.c
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0fe939df..8e75f664 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -7,6 +7,7 @@ set(VERSION "1.2.11")
-
- option(ASM686 "Enable building i686 assembly implementation")
- option(AMD64 "Enable building amd64 assembly implementation")
-+option(ARMv8 "Enable building ARM NEON intrinsics implementation")
-
- set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
- set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
-@@ -132,14 +133,26 @@ endif()
- if(CMAKE_COMPILER_IS_GNUCC)
- if(ASM686)
- set(ZLIB_ASMS contrib/asm686/match.S)
-- elseif (AMD64)
-+ elseif(AMD64)
- set(ZLIB_ASMS contrib/amd64/amd64-match.S)
-- endif ()
-+ elseif(ARMv8)
-+ set(ZLIB_ARMv8 contrib/arm/neon_adler32.c)
-+ endif()
-
-- if(ZLIB_ASMS)
-- add_definitions(-DASMV)
-- set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
-- endif()
-+ if(ZLIB_ASMS)
-+ add_definitions(-DASMV)
-+ set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
-+ elseif(ZLIB_ARMv8)
-+ add_definitions(-DARMv8)
-+ set(COMPILER ${CMAKE_C_COMPILER})
-+ # NEON is mandatory in ARMv8.
-+ if(${COMPILER} MATCHES "aarch64")
-+ set_source_files_properties(${ZLIB_ARMv8} PROPERTIES LANGUAGE C COMPILE_FLAGS -march=armv8-a)
-+ # But it was optional for ARMv7.
-+ elseif(${COMPILER} MATCHES "arm")
-+ set_source_files_properties(${ZLIB_ARMv8} PROPERTIES LANGUAGE C COMPILE_FLAGS -mfpu=neon)
-+ endif()
-+ endif()
- endif()
-
- if(MSVC)
-@@ -183,8 +196,8 @@ if(MINGW)
- set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
- endif(MINGW)
-
--add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
--add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
-+add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_ARMv8} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
-+add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_ARMv8} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
- set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
- set_target_properties(zlib PROPERTIES SOVERSION 1)
-
-diff --git a/adler32.c b/adler32.c
-index d0be4380..45ebaa4b 100644
---- a/adler32.c
-+++ b/adler32.c
-@@ -136,7 +136,12 @@ uLong ZEXPORT adler32(adler, buf, len)
- const Bytef *buf;
- uInt len;
- {
-+#ifdef ARMv8
-+# pragma message("Using NEON-ized Adler32.")
-+ return NEON_adler32(adler, buf, len);
-+#else
- return adler32_z(adler, buf, len);
-+#endif
- }
-
- /* ========================================================================= */
-diff --git a/contrib/README.contrib b/contrib/README.contrib
-index a411d5c3..3fd1d202 100644
---- a/contrib/README.contrib
-+++ b/contrib/README.contrib
-@@ -12,6 +12,9 @@ amd64/ by Mikhail Teterin <mi@ALDAN.algebra.com>
- asm code for AMD64
- See patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/96393
-
-+arm/ by Adenilson Cavalcanti <cavalcantii@chromium.org>
-+ ARM optimizations (NEON and ARMv8 code).
-+
- asm686/ by Brian Raiter <breadbox@muppetlabs.com>
- asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax
- See http://www.muppetlabs.com/~breadbox/software/assembly.html
-diff --git a/contrib/arm/neon_adler32.c b/contrib/arm/neon_adler32.c
-new file mode 100644
-index 00000000..f173a74f
---- /dev/null
-+++ b/contrib/arm/neon_adler32.c
-@@ -0,0 +1,137 @@
-+/* Copyright (C) 1995-2011, 2016 Mark Adler
-+ * Copyright (C) 2017 ARM Holdings Inc.
-+ * Authors: Adenilson Cavalcanti <adenilson.cavalcanti@arm.com>
-+ * Simon Hosie <simon.hosie@arm.com>
-+ * This software is provided 'as-is', without any express or implied
-+ * warranty. In no event will the authors be held liable for any damages
-+ * arising from the use of this software.
-+ * Permission is granted to anyone to use this software for any purpose,
-+ * including commercial applications, and to alter it and redistribute it
-+ * freely, subject to the following restrictions:
-+ * 1. The origin of this software must not be misrepresented; you must not
-+ * claim that you wrote the original software. If you use this software
-+ * in a product, an acknowledgment in the product documentation would be
-+ * appreciated but is not required.
-+ * 2. Altered source versions must be plainly marked as such, and must not be
-+ * misrepresented as being the original software.
-+ * 3. This notice may not be removed or altered from any source distribution.
-+ */
-+
-+#if (defined(__ARM_NEON__) || defined(__ARM_NEON))
-+#include <arm_neon.h>
-+
-+static void NEON_accum32(uint32_t *s, const unsigned char *buf,
-+ unsigned int len)
-+{
-+ static const uint8_t taps[32] = {
-+ 32, 31, 30, 29, 28, 27, 26, 25,
-+ 24, 23, 22, 21, 20, 19, 18, 17,
-+ 16, 15, 14, 13, 12, 11, 10, 9,
-+ 8, 7, 6, 5, 4, 3, 2, 1 };
-+
-+ uint32x2_t adacc2, s2acc2, as;
-+ uint8x16_t t0 = vld1q_u8(taps), t1 = vld1q_u8(taps + 16);
-+
-+ uint32x4_t adacc = vdupq_n_u32(0), s2acc = vdupq_n_u32(0);
-+ adacc = vsetq_lane_u32(s[0], adacc, 0);
-+ s2acc = vsetq_lane_u32(s[1], s2acc, 0);
-+
-+ while (len >= 2) {
-+ uint8x16_t d0 = vld1q_u8(buf), d1 = vld1q_u8(buf + 16);
-+ uint16x8_t adler, sum2;
-+ s2acc = vaddq_u32(s2acc, vshlq_n_u32(adacc, 5));
-+ adler = vpaddlq_u8( d0);
-+ adler = vpadalq_u8(adler, d1);
-+ sum2 = vmull_u8( vget_low_u8(t0), vget_low_u8(d0));
-+ sum2 = vmlal_u8(sum2, vget_high_u8(t0), vget_high_u8(d0));
-+ sum2 = vmlal_u8(sum2, vget_low_u8(t1), vget_low_u8(d1));
-+ sum2 = vmlal_u8(sum2, vget_high_u8(t1), vget_high_u8(d1));
-+ adacc = vpadalq_u16(adacc, adler);
-+ s2acc = vpadalq_u16(s2acc, sum2);
-+ len -= 2;
-+ buf += 32;
-+ }
-+
-+ while (len > 0) {
-+ uint8x16_t d0 = vld1q_u8(buf);
-+ uint16x8_t adler, sum2;
-+ s2acc = vaddq_u32(s2acc, vshlq_n_u32(adacc, 4));
-+ adler = vpaddlq_u8(d0);
-+ sum2 = vmull_u8( vget_low_u8(t1), vget_low_u8(d0));
-+ sum2 = vmlal_u8(sum2, vget_high_u8(t1), vget_high_u8(d0));
-+ adacc = vpadalq_u16(adacc, adler);
-+ s2acc = vpadalq_u16(s2acc, sum2);
-+ buf += 16;
-+ len--;
-+ }
-+
-+ adacc2 = vpadd_u32(vget_low_u32(adacc), vget_high_u32(adacc));
-+ s2acc2 = vpadd_u32(vget_low_u32(s2acc), vget_high_u32(s2acc));
-+ as = vpadd_u32(adacc2, s2acc2);
-+ s[0] = vget_lane_u32(as, 0);
-+ s[1] = vget_lane_u32(as, 1);
-+}
-+
-+static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf,
-+ unsigned int len)
-+{
-+ /* Oldie K&R code integration. */
-+ unsigned int i;
-+ for (i = 0; i < len; ++i) {
-+ pair[0] += buf[i];
-+ pair[1] += pair[0];
-+ }
-+}
-+
-+extern unsigned long NEON_adler32(unsigned long adler, const unsigned char *buf,
-+ const unsigned int len)
-+{
-+ /* initial Adler-32 value (deferred check for len == 1 speed) */
-+ if (!buf)
-+ return 1L;
-+
-+ /* The largest prime smaller than 65536. */
-+ const uint32_t M_BASE = 65521;
-+ /* This is the threshold where doing accumulation may overflow. */
-+ const int M_NMAX = 5552;
-+
-+ unsigned long sum2;
-+ uint32_t pair[2];
-+ int n = M_NMAX;
-+ unsigned int done = 0;
-+ /* Oldie K&R code integration. */
-+ unsigned int i;
-+
-+ /* Split Adler-32 into component sums, it can be supplied by
-+ * the caller sites (e.g. in a PNG file).
-+ */
-+ sum2 = (adler >> 16) & 0xffff;
-+ adler &= 0xffff;
-+ pair[0] = adler;
-+ pair[1] = sum2;
-+
-+ for (i = 0; i < len; i += n) {
-+ if ((i + n) > len)
-+ n = len - i;
-+
-+ if (n < 16)
-+ break;
-+
-+ NEON_accum32(pair, buf + i, n / 16);
-+ pair[0] %= M_BASE;
-+ pair[1] %= M_BASE;
-+
-+ done += (n / 16) * 16;
-+ }
-+
-+ /* Handle the tail elements. */
-+ if (done < len) {
-+ NEON_handle_tail(pair, (buf + done), len - done);
-+ pair[0] %= M_BASE;
-+ pair[1] %= M_BASE;
-+ }
-+
-+ /* D = B * 65536 + A, see: https://en.wikipedia.org/wiki/Adler-32. */
-+ return (pair[1] << 16) | pair[0];
-+}
-+#endif
diff --git a/package/libs/zlib/patches/002-arm-specific-optimisations-for-inflate.patch b/package/libs/zlib/patches/002-arm-specific-optimisations-for-inflate.patch
index d181b034e51..04e66621e14 100644
--- a/package/libs/zlib/patches/002-arm-specific-optimisations-for-inflate.patch
+++ b/package/libs/zlib/patches/002-arm-specific-optimisations-for-inflate.patch
@@ -11,9 +11,6 @@ Change-Id: Id4cda552b39bfb39ab35ec499dbe122b43b6d1a1
create mode 100644 contrib/arm/inffast.c
create mode 100644 contrib/arm/inflate.c
-diff --git a/contrib/arm/inffast.c b/contrib/arm/inffast.c
-new file mode 100644
-index 00000000..0dbd1dbc
--- /dev/null
+++ b/contrib/arm/inffast.c
@@ -0,0 +1,323 @@
@@ -340,9 +337,6 @@ index 00000000..0dbd1dbc
+ */
+
+#endif /* !ASMINF */
-diff --git a/contrib/arm/inflate.c b/contrib/arm/inflate.c
-new file mode 100644
-index 00000000..ac333e8c
--- /dev/null
+++ b/contrib/arm/inflate.c
@@ -0,0 +1,1561 @@
diff --git a/package/libs/zlib/patches/003-arm-specific-optimisations-for-inflate.patch b/package/libs/zlib/patches/003-arm-specific-optimisations-for-inflate.patch
index 9370264c403..1f83b500ba1 100644
--- a/package/libs/zlib/patches/003-arm-specific-optimisations-for-inflate.patch
+++ b/package/libs/zlib/patches/003-arm-specific-optimisations-for-inflate.patch
@@ -16,9 +16,6 @@ Change-Id: I59854eb25d2b1e43561c8a2afaf9175bf10cf674
3 files changed, 335 insertions(+), 62 deletions(-)
create mode 100644 contrib/arm/chunkcopy.h
-diff --git a/contrib/arm/chunkcopy.h b/contrib/arm/chunkcopy.h
-new file mode 100644
-index 00000000..2d6fd6f9
--- /dev/null
+++ b/contrib/arm/chunkcopy.h
@@ -0,0 +1,279 @@
@@ -301,8 +298,6 @@ index 00000000..2d6fd6f9
+#undef Z_RESTRICT
+
+#endif /* CHUNKCOPY_H */
-diff --git a/contrib/arm/inffast.c b/contrib/arm/inffast.c
-index 0dbd1dbc..f7f50071 100644
--- a/contrib/arm/inffast.c
+++ b/contrib/arm/inffast.c
@@ -7,6 +7,7 @@
@@ -313,7 +308,7 @@ index 0dbd1dbc..f7f50071 100644
#ifdef ASMINF
# pragma message("Assembler code may have bugs -- use at your own risk")
-@@ -57,6 +58,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+@@ -57,6 +58,7 @@ unsigned start; /* inflate()'s s
unsigned char FAR *out; /* local strm->next_out */
unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
unsigned char FAR *end; /* while out < end, enough space available */
@@ -321,7 +316,7 @@ index 0dbd1dbc..f7f50071 100644
#ifdef INFLATE_STRICT
unsigned dmax; /* maximum distance from zlib header */
#endif
-@@ -84,12 +86,13 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+@@ -84,12 +86,13 @@ unsigned start; /* inflate()'s s
out = strm->next_out;
beg = out - (start - strm->avail_out);
end = out + (strm->avail_out - 257);
@@ -336,7 +331,7 @@ index 0dbd1dbc..f7f50071 100644
window = state->window;
hold = state->hold;
bits = state->bits;
-@@ -197,70 +200,51 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
+@@ -197,70 +200,51 @@ unsigned start; /* inflate()'s s
#endif
}
from = window;
@@ -371,14 +366,8 @@ index 0dbd1dbc..f7f50071 100644
- } while (--op);
- from = out - dist; /* rest from output */
- }
-+ out = chunkcopy_safe(out, from, op, limit);
-+ from = window; /* more from start of window */
-+ op = wnext;
-+ /* This (rare) case can create a situation where
-+ the first chunkcopy below must be checked.
-+ */
- }
- }
+- }
+- }
- else { /* contiguous in window */
- from += wnext - op;
- if (op < len) { /* some from window */
@@ -399,6 +388,14 @@ index 0dbd1dbc..f7f50071 100644
- *out++ = *from++;
- if (len > 1)
- *out++ = *from++;
++ out = chunkcopy_safe(out, from, op, limit);
++ from = window; /* more from start of window */
++ op = wnext;
++ /* This (rare) case can create a situation where
++ the first chunkcopy below must be checked.
++ */
++ }
++ }
+ if (op < len) { /* still need some from output */
+ out = chunkcopy_safe(out, from, op, limit);
+ len -= op;
@@ -443,8 +440,6 @@ index 0dbd1dbc..f7f50071 100644
}
}
else if ((op & 64) == 0) { /* 2nd level distance code */
-diff --git a/contrib/arm/inflate.c b/contrib/arm/inflate.c
-index ac333e8c..e40322c3 100644
--- a/contrib/arm/inflate.c
+++ b/contrib/arm/inflate.c
@@ -84,6 +84,7 @@
diff --git a/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch b/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch
index 68f317b24bc..5181dcf4195 100644
--- a/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch
+++ b/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch
@@ -1,8 +1,6 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8e75f66..24d7329 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -95,34 +95,67 @@ set(ZLIB_PUBLIC_HDRS
+@@ -93,34 +93,67 @@ set(ZLIB_PUBLIC_HDRS
${CMAKE_CURRENT_BINARY_DIR}/zconf.h
zlib.h
)