openwrt/package/utils/ucode/Makefile
Jo-Philipp Wich 553a7a3265 ucode: update to Git 1a8a0bcf725520820802ad433db22d8f64fbed6c (2024-07-11)
96f74b5be829 ubus: make ubus_context first in uc_ubus_connection_t
7e5830edfb38 nl80211: fix datatype of NL80211_BAND_IFTYPE_ATTR_HE_CAP_{MAC,PHY} attrs
5c8fd34bac42 nl80211: fix parsing of NL80211_BAND_ATTR_VHT_MCS_SET attribute
e8d4e4fe967d nl80211: fix decoding of NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET attribute
30a3f7ad0433 rtnl: store callback in listener registry only on success
9cbe8294909f rtnl: optimize reception of rtnl events
534417132e18 rtnl: increase event socket rx buffer size limit to 1 MiB
3f9811d2f7b7 compiler: close upvalues on loop control statements
ee4af9b55cb4 vm: rework object iteration
a275399dd8e2 uci: refactor uci.changes() to match documentation
1220992631d5 ubus: automatically clear error information
d6fd94014eea uci: automatically clear error information
99837f280b61 uloop: automatically clear error information
ba3855ae3775 lib: fix documentation typo for `pop()` function
be767ae197ba vm: rework `in` operator semantics
4ade84e8fb81 ubus: add explicit support for deferring incoming requests
cfe137be068a uci: remove incorrectly documentated reorder() parameter
e8d78a26da0c lib: introduce socket library
a0ad1d127ae6 build: fix symbol and library detection
674f65ee551d jsdoc: disable default module titles
a33d16a86493 socket: rework error handling
e2b81d869222 uloop: add documentation
953f36c96e8a socket: make socket.send() accept non-string data
f211d5ac666f ubus: fix uc_ubus_have_uloop for eloop+uloop combination
0662de64bd1f socket: add AF_PACKET socket type support
b594ff8a2841 socket: remove leftover debug code
0d823e702bfe socket: fix addrinfo() with omitted service argument
8cf816d615fd socket: fix potential memory leak in connect()
8f5f231d66cd socket: optimize poll() argument handling
36f106056069 socket: remove wrong documentation fragment
525fca224012 socket: uv_to_sockaddr(): fix length calculation for AF_UNIX addresses
3938645ad9e3 socket: support IPv6 addresses in struct conversion routines
3a586dc7ddbe socket: improve uc_socket_connect() behavior
7b269f1cd3d2 socket: improve uc_socket_listen() behavior
fc6f2b89febf socket: handle further socket option value types
d6f25797dad1 socket: add IPv6 socket options
7611487b9a05 socket: implement recvmsg(), sendmsg() and cmsg support
d2e44bfa8b54 core-lib: improved documentation
e0bab40c8578 fs: add truncate() file method
5d305cfb2ab7 fs: add lock() file method
8b0318f7fabe lib: introduce zlib library
73644a036f5a nl80211: move access to tb array out of uc_nl_convert_attr and below
6e3cf83a77a7 nl80211: add support for multi-attribute arrays
6ff24d5488a9 nl80211: update nl80211.h to latest wireless-next
abc2aef28641 nl80211: add wiphy multi-radio support

Fixes: https://github.com/jow-/ucode/issues/186
Fixes: https://github.com/jow-/ucode/issues/187
Fixes: https://github.com/jow-/ucode/issues/188
Fixes: https://github.com/jow-/ucode/issues/193
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2024-07-14 01:27:28 +02:00

181 lines
4.7 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:=2024-07-11
PKG_SOURCE_VERSION:=1a8a0bcf725520820802ad433db22d8f64fbed6c
PKG_MIRROR_HASH:=ccacb0efe909248230fb0953433a74a2251ac0069d25a731b128e0ee8d6afeb3
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=ISC
PKG_ABI_VERSION:=20230711
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)
ifeq ($(HOST_OS),Darwin)
CMAKE_HOST_OPTIONS += \
-DCMAKE_SKIP_RPATH=FALSE \
-DCMAKE_MACOSX_RPATH=1 \
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
else
CMAKE_HOST_OPTIONS += \
-DSOVERSION=$(PKG_ABI_VERSION)
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
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, \
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 BuildPackage,libucode))
$(eval $(call BuildPackage,ucode))
$(foreach mod,$(UCODE_MODULES), \
$(eval $(call BuildPackage,$(mod))))
$(eval $(call HostBuild))