diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gost_engine/Makefile | 25 | ||||
-rw-r--r-- | libs/ibrcommon/Makefile | 2 | ||||
-rw-r--r-- | libs/ibrcommon/patches/001-fix-build-with-musl.patch | 30 | ||||
-rw-r--r-- | libs/libmraa/patches/001-mraa-Use-posix-basename.patch | 40 | ||||
-rw-r--r-- | libs/libssh/Makefile | 6 | ||||
-rw-r--r-- | libs/libssh/patches/100-mbedtls_fix.patch | 53 |
6 files changed, 131 insertions, 25 deletions
diff --git a/libs/gost_engine/Makefile b/libs/gost_engine/Makefile index aac842a28..308b7e45b 100644 --- a/libs/gost_engine/Makefile +++ b/libs/gost_engine/Makefile @@ -3,21 +3,20 @@ include $(INCLUDE_DIR)/openssl-module.mk PKG_NAME:=gost_engine PKG_VERSION:=3.0.3 -PKG_HASH:=8cf888333d08b8bbcc12e4e8c0d8b258c74dbd67941286ffbcc648c6d3d66735 -PKG_LICENSE:=Apache-2.0 -PKG_RELEASE:=9 +PKG_RELEASE:=10 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/gost-engine/engine/archive/v$(PKG_VERSION) +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=v$(PKG_VERSION) +PKG_SOURCE_URL:=https://github.com/gost-engine/engine +PKG_MIRROR_HASH:=ad88b0bc4ede265bc91757f0bb9777a381f8e271faa43992a054ddd5f435ad88 PKG_MAINTAINER:=Artur Petrov <github@phpchain.ru> +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -PKG_UNPACK:=$(HOST_TAR) -C "$(PKG_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)" -PKG_INSTALL:= - define Package/gost_engine/Default $(call Package/openssl/engine/Default) TITLE:=GOST engine for OpenSSL @@ -49,7 +48,7 @@ define Package/gost_engine-util $(call Package/gost_engine/Default) SECTION:=utils CATEGORY:=Utilities - DEPENDS:=libopenssl-gost_engine + DEPENDS:=+libopenssl-gost_engine TITLE+= (utilities) endef @@ -61,15 +60,17 @@ endef CMAKE_OPTIONS += -DOPENSSL_ENGINES_DIR=/usr/lib/$(ENGINES_DIR) define Package/libopenssl-gost_engine/install - $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR) $(1)/etc/ssl/engines.cnf.d - $(INSTALL_DATA) $(PKG_BUILD_DIR)/bin/gost.so \ + $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/lib/$(ENGINES_DIR) $(1)/etc/ssl/engines.cnf.d + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libgost.so \ + $(1)/usr/lib/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/gost.so \ $(1)/usr/lib/$(ENGINES_DIR)/ $(INSTALL_DATA) ./files/gost.cnf $(1)/etc/ssl/engines.cnf.d/ endef define Package/gost_engine-util/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{gost12sum,gostsum} \ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gost12sum,gostsum} \ $(1)/usr/bin/ endef diff --git a/libs/ibrcommon/Makefile b/libs/ibrcommon/Makefile index b1adfd39f..2b6f4c2eb 100644 --- a/libs/ibrcommon/Makefile +++ b/libs/ibrcommon/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ibrcommon PKG_VERSION:=1.0.1 -PKG_RELEASE:=9 +PKG_RELEASE:=10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases diff --git a/libs/ibrcommon/patches/001-fix-build-with-musl.patch b/libs/ibrcommon/patches/001-fix-build-with-musl.patch index c7b9a8c35..bee392d0d 100644 --- a/libs/ibrcommon/patches/001-fix-build-with-musl.patch +++ b/libs/ibrcommon/patches/001-fix-build-with-musl.patch @@ -1,21 +1,33 @@ --- a/ibrcommon/data/File.cpp +++ b/ibrcommon/data/File.cpp -@@ -35,9 +35,7 @@ +@@ -35,10 +35,6 @@ #include <cerrno> #include <fstream> -#if !defined(HAVE_FEATURES_H) || defined(ANDROID) - #include <libgen.h> +-#include <libgen.h> -#endif - +- #ifdef __WIN32__ #include <io.h> -@@ -226,7 +224,7 @@ namespace ibrcommon + #define FILE_DELIMITER_CHAR '\\' +@@ -225,14 +221,11 @@ namespace ibrcommon + std::string File::getBasename() const { - #if !defined(ANDROID) && defined(HAVE_FEATURES_H) +-#if !defined(ANDROID) && defined(HAVE_FEATURES_H) - return std::string(basename(_path.c_str())); -+ return std::string(basename((char *)_path.c_str())); - #else - char path[_path.length()+1]; - ::memcpy(&path, _path.c_str(), _path.length()+1); +-#else +- char path[_path.length()+1]; +- ::memcpy(&path, _path.c_str(), _path.length()+1); +- +- return std::string(basename(path)); +-#endif ++ size_t found = _path.find_last_of('/'); ++ if (found != std::string::npos) ++ return _path.substr(found + 1); ++ else ++ return _path; + } + + File File::get(const std::string &filename) const diff --git a/libs/libmraa/patches/001-mraa-Use-posix-basename.patch b/libs/libmraa/patches/001-mraa-Use-posix-basename.patch new file mode 100644 index 000000000..97af1565e --- /dev/null +++ b/libs/libmraa/patches/001-mraa-Use-posix-basename.patch @@ -0,0 +1,40 @@ +From 47c3850cddd63cebd9dc48e411963314449118f1 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 31 Dec 2023 19:16:35 -0800 +Subject: [PATCH] mraa: Use posix basename + +Musl has removed the declaration from string.h [1] which exposes the +problem especially with clang-17+ compiler where implicit function +declaration is flagged as error. Use posix basename and make a copy of +string to operate on to emulate GNU basename behaviour. + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/mraa.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/src/mraa.c ++++ b/src/mraa.c +@@ -12,6 +12,7 @@ + #endif + + #include <dlfcn.h> ++#include <libgen.h> + #include <pwd.h> + #include <sched.h> + #include <stddef.h> +@@ -338,9 +339,11 @@ static int + mraa_count_iio_devices(const char* path, const struct stat* sb, int flag, struct FTW* ftwb) + { + // we are only interested in files with specific names +- if (fnmatch(IIO_DEVICE_WILDCARD, basename(path), 0) == 0) { ++ char* tmp = strdup(path); ++ if (fnmatch(IIO_DEVICE_WILDCARD, basename(tmp), 0) == 0) { + num_iio_devices++; + } ++ free(tmp); + return 0; + } + diff --git a/libs/libssh/Makefile b/libs/libssh/Makefile index 7cd1bd6b6..21d03c7fe 100644 --- a/libs/libssh/Makefile +++ b/libs/libssh/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libssh -PKG_VERSION:=0.10.4 -PKG_RELEASE:=2 +PKG_VERSION:=0.10.6 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.libssh.org/files/0.10/ -PKG_HASH:=07392c54ab61476288d1c1f0a7c557b50211797ad00c34c3af2bbc4dbc4bd97d +PKG_HASH:=1861d498f5b6f1741b6abc73e608478491edcf9c9d4b6630eef6e74596de9dc1 PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr> PKG_LICENSE:=LGPL-2.1-or-later BSD-2-Clause diff --git a/libs/libssh/patches/100-mbedtls_fix.patch b/libs/libssh/patches/100-mbedtls_fix.patch new file mode 100644 index 000000000..4a6309c39 --- /dev/null +++ b/libs/libssh/patches/100-mbedtls_fix.patch @@ -0,0 +1,53 @@ +--- a/cmake/Modules/FindMbedTLS.cmake ++++ b/cmake/Modules/FindMbedTLS.cmake +@@ -34,7 +34,7 @@ set(_MBEDTLS_ROOT_HINTS_AND_PATHS + + find_path(MBEDTLS_INCLUDE_DIR + NAMES +- mbedtls/config.h ++ mbedtls/version.h + HINTS + ${_MBEDTLS_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES +@@ -72,7 +72,13 @@ find_library(MBEDTLS_X509_LIBRARY + set(MBEDTLS_LIBRARIES ${MBEDTLS_SSL_LIBRARY} ${MBEDTLS_CRYPTO_LIBRARY} + ${MBEDTLS_X509_LIBRARY}) + +-if (MBEDTLS_INCLUDE_DIR AND EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h") ++if (MBEDTLS_INCLUDE_DIR AND EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h") ++ file(STRINGS "${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h" _mbedtls_version_str REGEX ++ "^#[\t ]*define[\t ]+MBEDTLS_VERSION_STRING[\t ]+\"[0-9]+.[0-9]+.[0-9]+\"") ++ ++ string(REGEX REPLACE "^.*MBEDTLS_VERSION_STRING.*([0-9]+.[0-9]+.[0-9]+).*" ++ "\\1" MBEDTLS_VERSION "${_mbedtls_version_str}") ++elseif (MBEDTLS_INCLUDE_DIR AND EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h") + file(STRINGS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h" _mbedtls_version_str REGEX + "^#[\t ]*define[\t ]+MBEDTLS_VERSION_STRING[\t ]+\"[0-9]+.[0-9]+.[0-9]+\"") + +@@ -93,7 +99,7 @@ if (MBEDTLS_VERSION) + in the system variable MBEDTLS_ROOT_DIR" + ) + else (MBEDTLS_VERSION) +- find_package_handle_standard_args(MBedTLS ++ find_package_handle_standard_args(MbedTLS + "Could NOT find mbedTLS, try to set the path to mbedLS root folder in + the system variable MBEDTLS_ROOT_DIR" + MBEDTLS_INCLUDE_DIR +--- a/src/libmbedcrypto.c ++++ b/src/libmbedcrypto.c +@@ -118,8 +118,14 @@ int hmac_update(HMACCTX c, const void *d + + int hmac_final(HMACCTX c, unsigned char *hashmacbuf, size_t *len) + { ++ const mbedtls_md_info_t *md_info; + int rc; +- *len = (unsigned int)mbedtls_md_get_size(c->md_info); ++#if MBEDTLS_VERSION_MAJOR >= 3 ++ md_info = mbedtls_md_info_from_ctx(c); ++#else ++ md_info = c->md_info; ++#endif ++ *len = (unsigned int)mbedtls_md_get_size(md_info); + rc = !mbedtls_md_hmac_finish(c, hashmacbuf); + mbedtls_md_free(c); + SAFE_FREE(c); |