895f92164b66 uloop: add ULOOP_PRIORITY support for EPOLLPRI events f9b1f3ff17ba uloop: revert my flag changes from the ULOOP_PRIORITY change 2982bfb1c325 blob: fix wrong type for realloc result in blob_buffer_grow() 78c20f6c8579 json_script: convert recursive __json_script_file_free() to iterative e7c13bf8cbca usock: fix off-by-one in nanosecond normalization in poll_restart() 68b3f1588de4 uloop: usock: add error checking for fcntl and remove duplicate include 03821f942c49 uloop: fix undefined behavior in signal bit operations for signals > 32 e6e6fd83e26d blobmsg: fix policy name length overflow and add bounds check in blobmsg_parse() d30b9cc1a02d usock: fix integer overflow in timeout calculations 406e342bb900 udebug: fix double off-by-one in udebug_entry_vprintf() 700eca0bac66 blobmsg_json: fix integer overflow in blobmsg_puts() 6351fe552162 blobmsg_json: floor strbuf size and tighten the post-format guard 58b6543f1b25 blobmsg: fix unsigned integer overflow in blobmsg_alloc_string_buffer() d7a3ae699df0 blobmsg: use correct byte-order macro when setting BLOB_ATTR_EXTENDED 23c6618a5b90 blobmsg_json: fix double format string to avoid truncation and data loss 1edf1d704e76 jshn: fix integer overflow and type confusion in jshn_parse_file 9b488010c4a7 utils: fix integer overflow in __calloc_a() 40a87f734b94 blob: fix integer overflow in buffer growth functions 02fccb465651 blob: use size_t for blob_memdup() length 0fa612ca08f7 json_script: avoid alloca() on attacker-controlled pattern length 8c9862b6921b blobmsg: fix integer overflow in blobmsg_realloc_string_buffer() 5fbef5bb94fb ustream: avoid INT_MAX overflow on malloc in ustream_vprintf() 1501e60e5554 md5: detect read errors in md5sum() instead of returning a bogus hash Link: https://github.com/openwrt/openwrt/pull/23212 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
122 lines
3.0 KiB
Makefile
122 lines
3.0 KiB
Makefile
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=libubox
|
|
PKG_RELEASE=1
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
|
|
PKG_MIRROR_HASH:=a64b712809c1504975edecb5d31b1cfb8a860263654ded8cc952517b552c1032
|
|
PKG_SOURCE_DATE:=2026-05-03
|
|
PKG_SOURCE_VERSION:=1501e60e5554bd206c9b13532b7352e668508420
|
|
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
|
CMAKE_INSTALL:=1
|
|
|
|
PKG_LICENSE:=ISC
|
|
PKG_LICENSE_FILES:=
|
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
|
|
|
PKG_BUILD_DEPENDS:=lua
|
|
HOST_BUILD_DEPENDS:=libjson-c/host
|
|
HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
include $(INCLUDE_DIR)/cmake.mk
|
|
|
|
define Package/libubox
|
|
SECTION:=libs
|
|
CATEGORY:=Libraries
|
|
TITLE:=Basic utility library
|
|
ABI_VERSION:=$(PKG_ABI_VERSION)
|
|
DEPENDS:=
|
|
endef
|
|
|
|
define Package/libblobmsg-json
|
|
SECTION:=libs
|
|
CATEGORY:=Libraries
|
|
TITLE:=blobmsg <-> json conversion library
|
|
ABI_VERSION:=$(PKG_ABI_VERSION)
|
|
DEPENDS:=+libjson-c +libubox
|
|
endef
|
|
|
|
define Package/jshn
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
DEPENDS:=+libjson-c +libubox +libblobmsg-json
|
|
TITLE:=JSON SHell Notation
|
|
endef
|
|
|
|
define Package/jshn/description
|
|
Library for parsing and generating JSON from shell scripts
|
|
endef
|
|
|
|
define Package/libjson-script
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
DEPENDS:=+libubox
|
|
ABI_VERSION:=$(PKG_ABI_VERSION)
|
|
TITLE:=Minimalistic JSON based scripting engine
|
|
endef
|
|
|
|
define Package/libubox-lua
|
|
SECTION:=libs
|
|
CATEGORY:=Libraries
|
|
DEPENDS:=+libubox +liblua
|
|
TITLE:=Lua binding for the OpenWrt Basic utility library
|
|
endef
|
|
|
|
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
|
CMAKE_OPTIONS += \
|
|
-DLUAPATH=/usr/lib/lua \
|
|
-DABIVERSION="$(PKG_ABI_VERSION)"
|
|
|
|
define Package/libubox/install
|
|
$(INSTALL_DIR) $(1)/lib/
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libubox.so.* $(1)/lib/
|
|
endef
|
|
|
|
define Package/libblobmsg-json/install
|
|
$(INSTALL_DIR) $(1)/lib/
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblobmsg_json.so.* $(1)/lib/
|
|
endef
|
|
|
|
define Package/jshn/install
|
|
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/libubox
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jshn $(1)/usr/bin
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libubox/jshn.sh $(1)/usr/share/libubox
|
|
endef
|
|
|
|
define Package/libjson-script/install
|
|
$(INSTALL_DIR) $(1)/lib/
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libjson_script.so.* $(1)/lib/
|
|
endef
|
|
|
|
define Package/libubox-lua/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua
|
|
$(CP) $(PKG_BUILD_DIR)/lua/uloop.so $(1)/usr/lib/lua/
|
|
endef
|
|
|
|
|
|
CMAKE_HOST_OPTIONS += \
|
|
-DBUILD_LUA=OFF \
|
|
-DBUILD_EXAMPLES=OFF \
|
|
-DCMAKE_SKIP_RPATH=FALSE \
|
|
-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))
|
|
$(eval $(call BuildPackage,libjson-script))
|
|
$(eval $(call BuildPackage,libubox-lua))
|
|
$(eval $(call HostBuild))
|