diff --git a/libs/libucontext/Makefile b/libs/libucontext/Makefile index 3515eabe85..40c3f543d5 100644 --- a/libs/libucontext/Makefile +++ b/libs/libucontext/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libucontext -PKG_VERSION:=1.3.2 +PKG_VERSION:=1.5.1 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/kaniini/libucontext +PKG_SOURCE_URL:=https://github.com/kaniini/libucontext.git PKG_SOURCE_VERSION:=$(PKG_NAME)-$(PKG_VERSION) -PKG_MIRROR_HASH:=eef55c05aca03c6d62672838638f49daa95ab8f9bf87126df32cedfe150e333c +PKG_MIRROR_HASH:=6c5f756f32418d8db52b715e1837e46ea2d94926ba93e74d202e2cf891eda1f0 PKG_MAINTAINER:=Volker Christian PKG_LICENSE:=ISC @@ -23,7 +23,6 @@ define Package/libucontext CATEGORY:=Libraries TITLE:=libucontext is a library which provides the ucontext.h C API URL:=https://github.com/kaniini/libucontext - DEPENDS:=@USE_MUSL endef define Package/libucontext-tests @@ -39,6 +38,18 @@ define Package/libucontext/description libraries/applications which need the SYS-V ucontext API. endef +MESON_ARGS += \ + -Ddocs=false + +ifneq ($(CONFIG_USE_MUSL),) +MESON_ARGS += \ + -Dfreestanding=false +else ifneq ($(CONFIG_USE_GLIBC),) +MESON_ARGS += \ + -Dfreestanding=true \ + -Dexport_unprefixed=false +endif + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/include/libucontext $(1)/usr/include/ @@ -53,7 +64,9 @@ endef define Package/libucontext-tests/install $(INSTALL_DIR) $(1)/usr/bin +ifneq ($(CONFIG_USE_MUSL),) $(INSTALL_BIN) $(MESON_BUILD_DIR)/test_libucontext_posix $(1)/usr/bin/ +endif $(INSTALL_BIN) $(MESON_BUILD_DIR)/test_libucontext $(1)/usr/bin/ endef diff --git a/libs/libucontext/patches/001-fix-ppc-build.patch b/libs/libucontext/patches/001-fix-ppc-build.patch new file mode 100644 index 0000000000..d0517bf79b --- /dev/null +++ b/libs/libucontext/patches/001-fix-ppc-build.patch @@ -0,0 +1,19 @@ +From: Aditya Nugraha +Date: Wed Jul 10 22:49:00 2026 +0700 +Subject: [PATCH] Fixed ppc compilation + + Fixed ppc compilation for KERNEL_UAPI_UCONTEXT_SIZE is not found. + + Signed-off-by: Aditya Nugraha + +--- a/arch/ppc/defs.h ++++ b/arch/ppc/defs.h +@@ -1,7 +1,7 @@ + #ifndef __ARCH_PPC_DEFS_H + #define __ARCH_PPC_DEFS_H + +-#define KERNEL_UAPI_CONTEXT_SIZE (1184) ++#define KERNEL_UAPI_UCONTEXT_SIZE (1184) + + #define REG_R0 (0) + #define REG_R1 (1)