]> git.99rst.org Git - openwrt-packages.git/commitdiff
luasocket: add Lua 5.4 variant
authorAlexandru Ardelean <redacted>
Tue, 26 May 2026 11:15:12 +0000 (14:15 +0300)
committerAlexandru Ardelean <redacted>
Fri, 31 Jul 2026 06:46:08 +0000 (09:46 +0300)
Add luasocket5.4 next to the existing luasocket (Lua 5.1) and
luasocket5.3 variants, installed via the upstream makefile's
'make install LUAV=5.4'.

That makefile defaults to prefix=/usr/local on linux, which is where
the luasocket5.3 variant still installs, so pass prefix=/usr explicitly
to land in /usr/share/lua/5.4 and /usr/lib/lua/5.4 like the other Lua
5.4 module packages.

Needed for the prosody 13.x upgrade.

Signed-off-by: Alexandru Ardelean <redacted>
lang/lua/luasocket/Makefile

index 973192ec78d692d9ebce40cfbc6394a92997b99c..6443f8ce2ba0f59fcace244fba5f8ae6a13995bc 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luasocket
 PKG_VERSION:=3.1.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
@@ -44,6 +44,13 @@ define Package/luasocket5.3
   VARIANT:=lua-53
 endef
 
+define Package/luasocket5.4
+  $(Package/luasocket/default)
+  TITLE:=LuaSocket 5.4
+  DEPENDS:=+liblua5.4
+  VARIANT:=lua-54
+endef
+
 ifeq ($(BUILD_VARIANT),lua-51)
   LUA_VERSION=5.1
 endif
@@ -52,6 +59,10 @@ ifeq ($(BUILD_VARIANT),lua-53)
   LUA_VERSION=5.3
 endif
 
+ifeq ($(BUILD_VARIANT),lua-54)
+  LUA_VERSION=5.4
+endif
+
 
 define Package/luasocket/default/description
   LuaSocket is the most comprehensive networking support
@@ -60,6 +71,7 @@ define Package/luasocket/default/description
 endef
 Package/luasocket/description     = $(Package/luasocket/default/description)
 Package/luasocket5.3/description = $(Package/luasocket/default/description)
+Package/luasocket5.4/description = $(Package/luasocket/default/description)
 
 define Build/Configure
 endef
@@ -95,6 +107,15 @@ define Package/luasocket5.3/install
                install
 endef
 
+define Package/luasocket5.4/install
+       $(MAKE) -C $(PKG_BUILD_DIR)/src \
+               DESTDIR="$(1)" \
+               prefix=/usr \
+               LUAV=$(LUA_VERSION) \
+               install
+endef
+
 
 $(eval $(call BuildPackage,luasocket))
 $(eval $(call BuildPackage,luasocket5.3))
+$(eval $(call BuildPackage,luasocket5.4))
git clone https://git.99rst.org/PROJECT