3d999b21f4ba socket: add include for older kernels 552ca3cf55ed compiler: allow export function declarations without trailing semicolon d9e24e4ad13d compiler: add function forward declaration syntax de986520017a fs: add statvfs flags and fs error codes e6bf0a9dca79 nl80211: fix listener.request() dropping multicast events 520d9f4c8781 nl80211: fix waitfor() busy-spinning on non-blocking event socket 05328e33f078 nl80211: fix memory leak in waitfor() on repeated matching events e4a165976dbb nl80211: don't report waitfor() match on event parse failure 57367e880e9d nl80211: add missing survey info attributes a39b74fe329e nl80211: fix dfs_cac_time attribute type beafcff845fc compiler, lib, resolv: fix const string pointers 4170c8dcc568 lib: fix system() inheriting blocked SIGCHLD mask in child process d2c74298e22d fs: document glob 8a8b4d12a867 types: fix regexp `/.../s` flag inversion d7bc7adcb99d lib: slightly expand regexp() JSDoc 826fbfef2df9 nl80211: fix HE MCS set parsing 617967a3ceb9 socket: strip brackets from IPv6 addresses in addrinfo() a078b72a90bb socket: increase IPv6 scope ID buffer to support 15-char interface names ed23cf5aa182 rtnl, nl80211: fix segfault when listener.close() is called explicitly 3e585662394b docs: add function forward declarations to syntax tutorial bda4a0e454de vm: free thread context on vm_free to prevent memory leak 13158a73c96b nl80211: get iftype extended capabilites 30ffbd6c07dc ubus: add module documentation ce0c8fc0ffea docs: spelling fixes and usage notes 35a74e92ad69 docs: rewrite ubus module intro to expand pub/sub and fix OpenWrt capitalization b3380068a7e1 docs: flatten ubus class hierarchy and fix capitalization 3c9d3b5272d7 docs: math: fix spelling mistakes in documentation aae2250ab519 fs: fix popen() documentation eff52f0d262a digest: implement FNV-1a 64 bit hash algorithm 35ed1d1efd64 ubus: fix refcounting bug c7e7dfa7b64a ubus: avoid double close of externally owned channel fds 896ac72caffb tests: make run_tests.uc default to build/ b50372e8e8a0 tests: implement automatic library test skipping 81066c54a07f math: degrees <-> radians convertors 388ef3f35e0a ubus: drop unconditional garbage collection calls aebdb2c0262e main: fix option argument parsing on glibc Signed-off-by: Felix Fietkau <nbd@nbd.name>
203 lines
5.3 KiB
Makefile
203 lines
5.3 KiB
Makefile
#
|
|
# Copyright (C) 2020-2021 Jo-Philipp Wich <jo@mein.io>
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=ucode
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
|
|
PKG_SOURCE_DATE:=2026-04-24
|
|
PKG_SOURCE_VERSION:=0beaa9dc244f16c52c0a7dc3f180cca0539124cd
|
|
PKG_MIRROR_HASH:=9a58c061541cd98d248335c351a10049823a0dd317475fa0be73593c6d90a70a
|
|
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
|
PKG_LICENSE:=ISC
|
|
|
|
PKG_ABI_VERSION:=20230711
|
|
PKG_BUILD_DEPENDS:=libmd
|
|
HOST_BUILD_DEPENDS:=libjson-c/host
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
include $(INCLUDE_DIR)/cmake.mk
|
|
|
|
CMAKE_OPTIONS += \
|
|
-DSOVERSION=$(PKG_ABI_VERSION)
|
|
|
|
CMAKE_HOST_OPTIONS += \
|
|
-DCMAKE_SKIP_RPATH=FALSE \
|
|
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
|
|
|
|
ifeq ($(HOST_OS),Darwin)
|
|
CMAKE_HOST_OPTIONS += \
|
|
-DCMAKE_MACOSX_RPATH=1
|
|
else
|
|
CMAKE_HOST_OPTIONS += \
|
|
-DUSE_RPATH="${STAGING_DIR_HOSTPKG}/lib"
|
|
endif
|
|
|
|
CMAKE_HOST_OPTIONS += \
|
|
-DFS_SUPPORT=ON \
|
|
-DMATH_SUPPORT=ON \
|
|
-DNL80211_SUPPORT=OFF \
|
|
-DRESOLV_SUPPORT=OFF \
|
|
-DRTNL_SUPPORT=OFF \
|
|
-DSTRUCT_SUPPORT=ON \
|
|
-DUBUS_SUPPORT=OFF \
|
|
-DUCI_SUPPORT=OFF \
|
|
-DULOOP_SUPPORT=OFF \
|
|
-DDEBUG_SUPPORT=ON \
|
|
-DLOG_SUPPORT=OFF \
|
|
-DZLIB_SUPPORT=ON \
|
|
-DDIGEST_SUPPORT=OFF
|
|
|
|
|
|
define Package/ucode/default
|
|
SUBMENU:=ucode
|
|
SECTION:=lang
|
|
CATEGORY:=Languages
|
|
TITLE:=Tiny scripting and templating language
|
|
endef
|
|
|
|
define Package/ucode
|
|
$(Package/ucode/default)
|
|
DEPENDS:=+libucode
|
|
endef
|
|
|
|
define Package/ucode/description
|
|
ucode is a tiny script interpreter featuring an ECMAScript oriented
|
|
script language and Jinja-inspired templating.
|
|
endef
|
|
|
|
|
|
define Package/libucode
|
|
$(Package/ucode/default)
|
|
SUBMENU:=
|
|
SECTION:=libs
|
|
CATEGORY:=Libraries
|
|
TITLE+= (library)
|
|
ABI_VERSION:=$(PKG_ABI_VERSION)
|
|
DEPENDS:=+libjson-c
|
|
endef
|
|
|
|
define Package/libucode/description
|
|
The libucode package provides the shared runtime library for the ucode interpreter.
|
|
endef
|
|
|
|
# 1: name
|
|
# 2: cmake symbol
|
|
# 3: depends
|
|
# 4: description
|
|
define UcodeModule
|
|
UCODE_MODULES += ucode-mod-$(strip $(1))
|
|
CMAKE_OPTIONS += -D$(strip $(2))=$(if $(CONFIG_PACKAGE_ucode-mod-$(strip $(1))),ON,OFF)
|
|
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_ucode-mod-$(strip $(1))
|
|
|
|
define Package/ucode-mod-$(strip $(1))
|
|
$(Package/ucode/default)
|
|
TITLE+= ($(strip $(1)) module)
|
|
DEPENDS:=+ucode $(3)
|
|
endef
|
|
|
|
define Package/ucode-mod-$(strip $(1))/description
|
|
$(strip $(4))
|
|
endef
|
|
|
|
define Package/ucode-mod-$(strip $(1))/install
|
|
$(INSTALL_DIR) $$(1)/usr/lib/ucode
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/$(strip $(1)).so $$(1)/usr/lib/ucode/
|
|
endef
|
|
endef
|
|
|
|
|
|
define Build/InstallDev
|
|
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include/ucode
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/ucode/*.h $(1)/usr/include/ucode/
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libucode.so* $(1)/usr/lib/
|
|
endef
|
|
|
|
|
|
define Package/ucode/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/u* $(1)/usr/bin/
|
|
endef
|
|
|
|
define Package/libucode/install
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libucode.so.* $(1)/usr/lib/
|
|
endef
|
|
|
|
|
|
$(eval $(call UcodeModule, \
|
|
debug, DEBUG_SUPPORT, +libubox +libucode, \
|
|
The debug plugin module provides runtime debugging and introspection facilities.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
fs, FS_SUPPORT, , \
|
|
The filesystem plugin module allows interaction with the local file system.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
log, LOG_SUPPORT, +libubox, \
|
|
The log plugin module provides access to the syslog and libubox ulog APIs.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
math, MATH_SUPPORT, , \
|
|
The math plugin provides access to various <math.h> procedures.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
nl80211, NL80211_SUPPORT, +libnl-tiny +libubox, \
|
|
The nl80211 plugin provides access to the Linux wireless 802.11 netlink API.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
resolv, RESOLV_SUPPORT, , \
|
|
The resolv plugin implements simple DNS resolving.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
rtnl, RTNL_SUPPORT, +libnl-tiny +libubox, \
|
|
The rtnl plugin provides access to the Linux routing netlink API.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
socket, SOCKET_SUPPORT, , \
|
|
The socket plugin provides access to IPv4, IPv6, Unix and packet socket APIs.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
struct, STRUCT_SUPPORT, , \
|
|
The struct plugin implements Python 3 compatible struct.pack/unpack functionality.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
ubus, UBUS_SUPPORT, +libubus +libblobmsg-json, \
|
|
The ubus module allows ucode template scripts to enumerate and invoke ubus procedures.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
uci, UCI_SUPPORT, +libuci, \
|
|
The uci module allows templates to read and modify uci configuration.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
uloop, ULOOP_SUPPORT, +libubox, \
|
|
The uloop module allows ucode scripts to interact with OpenWrt uloop event loop implementation.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
digest, DIGEST_SUPPORT, , \
|
|
The digest module allows ucode scripts to use libmd digests.))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
io, IO_SUPPORT, , \
|
|
The io module allows direct file descriptor read/write (including non-blocking).))
|
|
|
|
$(eval $(call UcodeModule, \
|
|
zlib, ZLIB_SUPPORT, +zlib, \
|
|
The zlib module allows ucode scripts to de/compress gzip and zlib formats.))
|
|
|
|
$(eval $(call BuildPackage,libucode))
|
|
$(eval $(call BuildPackage,ucode))
|
|
|
|
$(foreach mod,$(UCODE_MODULES), \
|
|
$(eval $(call BuildPackage,$(mod))))
|
|
|
|
$(eval $(call HostBuild))
|