mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
23170c6f4e
e14b099 syntax: implement support for ES6 template literals 111cf06 vm: stop executing bytecode on return of nested calls 33f1e0b treewide: move json-c compat shims into internal header file e0e9431 vm: move unhandled exception reporting out of `uc_vm_execute_chunk()` 2b59140 vm: fix callframe double free on unhanded exceptions 7d7e950 main: abort when failing to load a preload library 1032a67 lib: let `json()` accept input objects implementing `read()` method 5ee68d5 fs: implement `fs.readfile()` and `fs.writefile()` df6b861 ci: debian: change path before attempting to invoke Git operations dfaf05a ci: debian: automatically update changelog from Git tag 34f3c45 ci: fix YAML syntax of Debian workflow e956bcf fs: fix off-by-one in fs.dirname() function 6fc4b6c .gitignore: fix overmatching patterns, blacklist cram .venv 7c2e082 build: remove legacy json-c check 77942af build: add polyfills for older libjson-c versions 0b4aaa3 CI: build Debian package f404285 debian: Add package definition a37f654 types: fix escape sequence encoding of high byte values in JSON strings aae5312 Update README.md 8134e25 build: fix symlink install target 87c7296 treewide: replace some leftover "utpl" occurrences, update .gitignore 7d27ad5 build: only stage ucc symlink if compile support is enabled 171402f lib: add date and time related functions 8b5dc60 lib: provide API function to obtain stdlib function implementations eb0d2f1 main: turn ucode into multicall executable 28ee7e1 uloop: add support for tasks 753dea9 CI: build on macOS 668c5c0 lib: add argument position support (`%m$`) to `sprintf()` and `printf()` ab46fdf treewide: remove legacy json-c include directives b8f49b1 tests: 21_regex_literals: generalize syntax error test case fd2e5e7 tests: 16_sort: fix logic flaw exposed on OS X 2c71bf2 tests: run_tests.sh: pass dummy value to `-T` flag 55c4a90 lib: disallow zero padding for %s formats 0d05cb5 tests: run_tests.sh: use greadlink if available 271e520 resolv: make OS X compatible d13c320 fs: avoid Linux specific sys/sysmacros.h include on OS X 33397a3 uloop: use execvp() on OS X bafdc8f lib: add naive sigtimedwait() stub for OS X ada1585 build: consolidate CMakeLists.txt and cover OS X deviations befbb69 include: add OS X compatible endian.h header 49838a8 include: rename include guards to avoid clashes with system headers 91f65de nl80211: add missing attributes and correct some attribute flags b4a1fd5 lib: adjust require(), render() and include() raw mode semantics 4618807 main: rework CLI frontend 73dcd78 lib: fix potential integer underflow on empty render output c402551 vm: fix crash on object literals with non-string computed properties efe8a02 syntax: support add new operators 078d686 ubus: add event support 6c66c83 ubus: refactor error and argument handling 1cb04f9 ubus: add object publishing, notify and subscribe support 0e85974 uloop: clear errno before integer conversion attempts 05bd7ed types: treat resource type prototypes as GC roots a2a26ca lib: introduce uloop binding 6b6d01f vm: release this context on exception in managed method call 1af23a9 tests: fix proto() testcase 4ce69a8 fs: implement access(), mkstemp(), file.flush() and proc.flush() Signed-off-by: Jo-Philipp Wich <jo@mein.io> (backported from commitscef3e6a69c
,0400774a10
andc59704334c
)
214 lines
5.2 KiB
Makefile
214 lines
5.2 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:=2022-04-13
|
|
PKG_SOURCE_VERSION:=e14b0993b101839d2d40b5c4f184e6b0c2083b65
|
|
PKG_MIRROR_HASH:=50771ea70be071626cfb682627713f818d740bc91ccadad0ba0aad5bef08a865
|
|
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
|
PKG_LICENSE:=ISC
|
|
|
|
PKG_ABI_VERSION:=20220322
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/cmake.mk
|
|
|
|
CMAKE_OPTIONS += -DSOVERSION=$(PKG_ABI_VERSION)
|
|
|
|
define Package/ucode/default
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
TITLE:=ucode - 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)
|
|
TITLE+= - runtime 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
|
|
|
|
|
|
define Package/ucode-mod-fs
|
|
$(Package/ucode/default)
|
|
TITLE+= (filesystem module)
|
|
DEPENDS:=ucode
|
|
endef
|
|
|
|
define Package/ucode-mod-fs/description
|
|
The filesystem plugin module allows interaction with the local file system.
|
|
endef
|
|
|
|
|
|
define Package/ucode-mod-math
|
|
$(Package/ucode/default)
|
|
TITLE+= (math module)
|
|
DEPENDS:=ucode
|
|
endef
|
|
|
|
define Package/ucode-mod-math/description
|
|
The math plugin provides access to various <math.h> procedures.
|
|
endef
|
|
|
|
|
|
define Package/ucode-mod-nl80211
|
|
$(Package/ucode/default)
|
|
TITLE+= (nl80211 module)
|
|
DEPENDS:=ucode +libnl-tiny
|
|
endef
|
|
|
|
define Package/ucode-mod-nl80211/description
|
|
The nl80211 plugin provides access to the Linux wireless 802.11 netlink API.
|
|
endef
|
|
|
|
|
|
define Package/ucode-mod-resolv
|
|
$(Package/ucode/default)
|
|
TITLE+= (resolv module)
|
|
DEPENDS:=ucode
|
|
endef
|
|
|
|
define Package/ucode-mod-resolv/description
|
|
The resolv plugin implements simple DNS resolving.
|
|
endef
|
|
|
|
|
|
define Package/ucode-mod-rtnl
|
|
$(Package/ucode/default)
|
|
TITLE+= (rtnl module)
|
|
DEPENDS:=ucode +libnl-tiny
|
|
endef
|
|
|
|
define Package/ucode-mod-rtnl/description
|
|
The rtnl plugin provides access to the Linux routing netlink API.
|
|
endef
|
|
|
|
|
|
define Package/ucode-mod-struct
|
|
$(Package/ucode/default)
|
|
TITLE+= (struct module)
|
|
DEPENDS:=ucode
|
|
endef
|
|
|
|
define Package/ucode-mod-struct/description
|
|
The struct plugin implemnts Python 3 compatible struct.pack/unpack functionality.
|
|
endef
|
|
|
|
|
|
define Package/ucode-mod-ubus
|
|
$(Package/ucode/default)
|
|
TITLE+= (ubus module)
|
|
DEPENDS:=ucode +libubus +libblobmsg-json
|
|
endef
|
|
|
|
define Package/ucode-mod-ubus/description
|
|
The ubus module allows ucode template scripts to enumerate and invoke ubus
|
|
procedures.
|
|
endef
|
|
|
|
|
|
define Package/ucode-mod-uci
|
|
$(Package/ucode/default)
|
|
TITLE+= (uci module)
|
|
DEPENDS:=ucode +libuci
|
|
endef
|
|
|
|
define Package/ucode-mod-uci/description
|
|
The uci module allows templates to read and modify uci configuration.
|
|
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
|
|
|
|
define Package/ucode-mod-fs/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/fs.so $(1)/usr/lib/ucode/
|
|
endef
|
|
|
|
define Package/ucode-mod-math/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/math.so $(1)/usr/lib/ucode/
|
|
endef
|
|
|
|
define Package/ucode-mod-nl80211/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/nl80211.so $(1)/usr/lib/ucode/
|
|
endef
|
|
|
|
define Package/ucode-mod-resolv/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/resolv.so $(1)/usr/lib/ucode/
|
|
endef
|
|
|
|
define Package/ucode-mod-rtnl/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/rtnl.so $(1)/usr/lib/ucode/
|
|
endef
|
|
|
|
define Package/ucode-mod-struct/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/struct.so $(1)/usr/lib/ucode/
|
|
endef
|
|
|
|
define Package/ucode-mod-ubus/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/ubus.so $(1)/usr/lib/ucode/
|
|
endef
|
|
|
|
define Package/ucode-mod-uci/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/uci.so $(1)/usr/lib/ucode/
|
|
endef
|
|
|
|
|
|
$(eval $(call BuildPackage,ucode))
|
|
$(eval $(call BuildPackage,libucode))
|
|
$(eval $(call BuildPackage,ucode-mod-fs))
|
|
$(eval $(call BuildPackage,ucode-mod-math))
|
|
$(eval $(call BuildPackage,ucode-mod-nl80211))
|
|
$(eval $(call BuildPackage,ucode-mod-resolv))
|
|
$(eval $(call BuildPackage,ucode-mod-rtnl))
|
|
$(eval $(call BuildPackage,ucode-mod-struct))
|
|
$(eval $(call BuildPackage,ucode-mod-ubus))
|
|
$(eval $(call BuildPackage,ucode-mod-uci))
|