From 2c4c2889d5015ba77d70e25bc26c22a96667dd68 Mon Sep 17 00:00:00 2001 From: omni Date: Mon, 15 Nov 2021 15:32:22 +0000 Subject: [PATCH 1/7] community/luarocks: upgrade to 3.9.2 & add for lua5.4 --- community/luarocks/APKBUILD | 26 ++-- community/luarocks/config.lua | 2 +- community/luarocks/fix-tree-rocks_dir.patch | 147 -------------------- community/luarocks/luarocks5.4.trigger | 7 + 4 files changed, 18 insertions(+), 164 deletions(-) delete mode 100644 community/luarocks/fix-tree-rocks_dir.patch create mode 100644 community/luarocks/luarocks5.4.trigger diff --git a/community/luarocks/APKBUILD b/community/luarocks/APKBUILD index 3b97713a6c7..0b7de890f73 100644 --- a/community/luarocks/APKBUILD +++ b/community/luarocks/APKBUILD @@ -1,18 +1,17 @@ # Contributor: Carlo Landmeter # Maintainer: Jakub Jirutka pkgname=luarocks -pkgver=2.4.4 -pkgrel=2 +pkgver=3.9.2 +pkgrel=0 pkgdesc="Deployment and management system for Lua modules" url="https://luarocks.org/" arch="noarch" license="MIT" depends="curl" source="https://luarocks.org/releases/$pkgname-$pkgver.tar.gz - fix-tree-rocks_dir.patch config.lua" -_lua_versions="5.1 5.2 5.3" +_lua_versions="5.1 5.2 5.3 5.4" for _v in $_lua_versions; do makedepends="$makedepends lua$_v-dev" subpackages="$subpackages $pkgname${_v}:_subpackage" @@ -35,15 +34,11 @@ build() { ./configure \ --prefix=/usr \ - --sysconfdir=/etc/luarocks \ + --sysconfdir=/etc \ --rocks-tree=/usr/local \ --lua-version="$lver" \ - --lua-suffix="$lver" \ --with-lua-include="$(pkg-config --variable=includedir lua$lver)" \ - --with-lua-lib="$(pkg-config --variable=libdir lua$lver)" \ - --with-downloader=curl \ - --with-md5-checker=md5sum \ - --versioned-rocks-dir + --with-lua-lib="$(pkg-config --variable=libdir lua$lver)" make done } @@ -62,9 +57,9 @@ _subpackage() { make install DESTDIR="$subpkgdir" - # Remove default script names which conflict per Lua version. - rm "$subpkgdir"/usr/bin/luarocks \ - "$subpkgdir"/usr/bin/luarocks-admin + # Move default scripts which conflict per Lua version. + mv "$subpkgdir"/usr/bin/luarocks "$subpkgdir"/usr/bin/luarocks-"$lver" + mv "$subpkgdir"/usr/bin/luarocks-admin "$subpkgdir"/usr/bin/luarocks-admin-"$lver" # Set the correct Lua version. sed -i "s/env lua/env lua$lver/" \ @@ -77,7 +72,6 @@ _subpackage() { } sha512sums=" -cbc6a54aa5077e656dcb4fed915fe8b66cad4ad04f28700e2f67805232a6dc366d4ac03e3a85e27a45b178c362ae8aa905ceab5553252735e049730a28450e19 luarocks-2.4.4.tar.gz -22ca5efa62c592c8395ca8c9ce3c938b5e41cf7d149f45d3666a5370d27e3e8c01d1712217c456d7b54163e375d9841d5f9213b25f4237b0bf3ab498c02864fb fix-tree-rocks_dir.patch -1f75705af3b1ef57386234195a5d496d554c95473e5b0c0a3319e3c0f905519397b92603c5596d363818df7d94f886b898ba12a3880d3e982d1c63b74c50febe config.lua +7e93164bdcf35338e993822931a8e59957ab69c6e23236a7a075649c2f7cd173305c4ca6e9d115fc5e282cb76c21754d7adac92b21885006e5ee3bc06a9d0059 luarocks-3.9.2.tar.gz +5845d5643c3eeb6d4af6d919a588c5253c91e6a0b278116b4cd855437fc48ac64970fd3ef758c135bc0536ddc1aaa16b01c50e33c864f59aeef1ccced0d01d82 config.lua " diff --git a/community/luarocks/config.lua b/community/luarocks/config.lua index 25e6d117177..beb6ce586d3 100644 --- a/community/luarocks/config.lua +++ b/community/luarocks/config.lua @@ -5,7 +5,7 @@ rocks_trees = { -- System-wide Lua and Lua/C modules for specific Lua version installed by apk. { name = 'distro-modules', root = '/usr' }, - -- System-wide Lua modules compatible with Lua 5.1-5.3 installed by apk. + -- System-wide Lua modules compatible with Lua 5.1-5.4 installed by apk. { name = 'distro-modules-common', root = '/usr', lua_dir = '/usr/share/lua/common', diff --git a/community/luarocks/fix-tree-rocks_dir.patch b/community/luarocks/fix-tree-rocks_dir.patch deleted file mode 100644 index 3a4c1f2e919..00000000000 --- a/community/luarocks/fix-tree-rocks_dir.patch +++ /dev/null @@ -1,147 +0,0 @@ -From: Jakub Jirutka -Date: Mon, 01 Jan 2017 17:59:00 +0200 -Subject: [PATCH] Fix support for tree.rocks_dir - -LuaRocks allows to specify "tree" using just "root" which is a prefix -prepended to default locations such as /lib/luarocks/rocks (rocks_dir), -/share/lua/5.x (lua_dir) etc. Later they added option to specify -rocks_dir, lua_dir, bin_dir... directly. The problem is that it's kinda -broken, some methods does not respect these options and always -construct these paths from "root". - -This patch hopefuly fixes this problem. - -We need it for /usr/lib/luarocks/rocks-common where we install -rock_manifests for Lua modules compatible with Lua 5.1-5.3. -See also config.lua. - ---- a/src/luarocks/command_line.lua -+++ b/src/luarocks/command_line.lua -@@ -35,9 +35,14 @@ - end - - local function replace_tree(flags, tree) -- tree = dir.normalize(tree) -+ if type(tree) == "table" then -+ path.use_tree(tree) -+ tree = dir.normalize(tree.root) -+ else -+ tree = dir.normalize(tree) -+ path.use_tree(tree) -+ end - flags["tree"] = tree -- path.use_tree(tree) - end - - local function is_ownership_ok(directory) -@@ -137,7 +142,7 @@ - if not tree.root then - die("Configuration error: tree '"..tree.name.."' has no 'root' field.") - end -- replace_tree(flags, tree.root) -+ replace_tree(flags, tree) - named = true - break - end ---- a/src/luarocks/path.lua -+++ b/src/luarocks/path.lua -@@ -18,7 +18,9 @@ - end - - function path.rocks_dir(tree) -- if type(tree) == "string" then -+ if not tree then -+ return cfg.rocks_dir -+ elseif type(tree) == "string" then - return dir.path(tree, cfg.rocks_subdir) - else - assert(type(tree) == "table") -@@ -83,7 +85,6 @@ - -- the package (and by extension, the path) exists. - function path.versions_dir(name, tree) - assert(type(name) == "string") -- tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name) - end - -@@ -96,7 +97,6 @@ - function path.install_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") -- tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version) - end - -@@ -109,7 +109,6 @@ - function path.rockspec_file(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") -- tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, name.."-"..version..".rockspec") - end - -@@ -122,7 +121,6 @@ - function path.rock_manifest_file(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") -- tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "rock_manifest") - end - -@@ -135,7 +133,6 @@ - function path.lib_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") -- tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "lib") - end - -@@ -148,7 +145,6 @@ - function path.lua_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") -- tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "lua") - end - -@@ -161,7 +157,6 @@ - function path.doc_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") -- tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "doc") - end - -@@ -174,7 +169,6 @@ - function path.conf_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") -- tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "conf") - end - -@@ -188,7 +182,6 @@ - function path.bin_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") -- tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "bin") - end - -@@ -303,11 +296,15 @@ - end - - function path.use_tree(tree) -- cfg.root_dir = tree -+ cfg.root_dir = path.rocks_tree_to_string(tree) - cfg.rocks_dir = path.rocks_dir(tree) - cfg.deploy_bin_dir = path.deploy_bin_dir(tree) - cfg.deploy_lua_dir = path.deploy_lua_dir(tree) - cfg.deploy_lib_dir = path.deploy_lib_dir(tree) -+ -- Workaround for outdated methods that ignore cfg.rocks_dir. -+ if tree.rocks_dir then -+ cfg.rocks_subdir = tree.rocks_dir:match("^" .. util.matchquote(cfg.root_dir) .. "(.*)$") -+ end - end - - --- Apply a given function to the active rocks trees based on chosen dependency mode. diff --git a/community/luarocks/luarocks5.4.trigger b/community/luarocks/luarocks5.4.trigger new file mode 100644 index 00000000000..dc152083343 --- /dev/null +++ b/community/luarocks/luarocks5.4.trigger @@ -0,0 +1,7 @@ +#!/bin/sh + +for tree in distro-modules distro-modules-common; do + luarocks-admin-5.4 make-manifest --local-tree --tree=$tree >/dev/null 2>&1 +done + +exit 0 -- GitLab From a2cc6d336fcd52846c94cb7cf967c7a179c71234 Mon Sep 17 00:00:00 2001 From: omni Date: Mon, 15 Nov 2021 17:40:26 +0000 Subject: [PATCH 2/7] community/moonscript: add lua5.4, use luarocks 3.9.1 --- community/moonscript/APKBUILD | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/community/moonscript/APKBUILD b/community/moonscript/APKBUILD index 01f05fbd473..c9fa0555f63 100644 --- a/community/moonscript/APKBUILD +++ b/community/moonscript/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Jakub Jirutka pkgname=moonscript pkgver=0.5.0 -pkgrel=2 +pkgrel=3 pkgdesc="A language that compiles to Lua" url="https://moonscript.org" arch="noarch" @@ -10,9 +10,9 @@ license="MIT" depends="lua-alt-getopt lua-filesystem lua-lpeg" checkdepends="lua-busted luajit" makedepends="luarocks" -source="$pkgname-$pkgver.tar.gz::https://github.com/leafo/$pkgname/archive/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/leafo/moonscript/archive/v$pkgver.tar.gz" -_luaversions="5.1 5.2 5.3" +_luaversions="5.1 5.2 5.3 5.4" for _v in $_luaversions; do subpackages="$subpackages lua$_v-$pkgname:_subpackage" checkdepends="$checkdepends lua$_v lua$_v-busted lua$_v-loadkit" @@ -60,4 +60,6 @@ _subpackage() { done } -sha512sums="f573f9a96502662987de637f7f62b935fab93aa775122c9ae20d98029394e3136e6b519908ce76e1e77c51fbcee162c3ad0aa58eeb1ee56a2b07951437987941 moonscript-0.5.0.tar.gz" +sha512sums=" +f573f9a96502662987de637f7f62b935fab93aa775122c9ae20d98029394e3136e6b519908ce76e1e77c51fbcee162c3ad0aa58eeb1ee56a2b07951437987941 moonscript-0.5.0.tar.gz +" -- GitLab From 85fcf9f7a2f1ad8ab6c8c12d10c9e3346c13ad25 Mon Sep 17 00:00:00 2001 From: omni Date: Fri, 10 Jun 2022 08:59:19 +0000 Subject: [PATCH 3/7] community/lua-lgi: add lua5.4 --- community/lua-lgi/APKBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/community/lua-lgi/APKBUILD b/community/lua-lgi/APKBUILD index 3abf4ea623e..8ca1b992630 100644 --- a/community/lua-lgi/APKBUILD +++ b/community/lua-lgi/APKBUILD @@ -1,10 +1,10 @@ # Contributor: Natanael Copa # Maintainer: Natanael Copa -_luaversions="5.1 5.2 5.3" +_luaversions="5.1 5.2 5.3 5.4" pkgname=lua-lgi _rockname="${pkgname#lua-*}" pkgver=0.9.2 -pkgrel=4 +pkgrel=5 pkgdesc="Dynamic Lua binding to GObject libraries using GObject-Introspection" url="https://github.com/lgi-devs/lgi" arch="all" -- GitLab From 761baa319740b5704412e331ce2eabad5553e38d Mon Sep 17 00:00:00 2001 From: omni Date: Fri, 10 Jun 2022 09:18:00 +0000 Subject: [PATCH 4/7] community/lua-basexx: add lua5.4 --- community/lua-basexx/APKBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/community/lua-basexx/APKBUILD b/community/lua-basexx/APKBUILD index dd09eb80333..440e3b7901b 100644 --- a/community/lua-basexx/APKBUILD +++ b/community/lua-basexx/APKBUILD @@ -3,7 +3,7 @@ pkgname=lua-basexx _pkgname=basexx pkgver=0.4.1 -pkgrel=0 +pkgrel=1 pkgdesc="A Lua library for base2, base16, base32, base64, base85 decoding and encoding of data strings" url="https://github.com/aiq/basexx/" arch="noarch" @@ -12,7 +12,7 @@ checkdepends="lua-busted luajit" source="$pkgname-$pkgver.tar.gz::https://github.com/aiq/$_pkgname/archive/v$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" -_luaversions="5.1 5.2 5.3" +_luaversions="5.1 5.2 5.3 5.4" for _v in $_luaversions; do subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage" checkdepends="$checkdepends lua$_v lua$_v-busted" -- GitLab From 3ab8b0e96fd72e393b44938752fd25da28cbf23b Mon Sep 17 00:00:00 2001 From: omni Date: Mon, 15 Nov 2021 17:47:12 +0000 Subject: [PATCH 5/7] community/lua-brieflz: add lua5.4, use luarocks 3.9.2 --- community/lua-brieflz/APKBUILD | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/community/lua-brieflz/APKBUILD b/community/lua-brieflz/APKBUILD index 1e1f6a7fc0a..d8950ed046b 100644 --- a/community/lua-brieflz/APKBUILD +++ b/community/lua-brieflz/APKBUILD @@ -3,12 +3,12 @@ pkgname=lua-brieflz _pkgname=brieflz.lua pkgver=0.2.0 -pkgrel=0 +pkgrel=1 pkgdesc="Lua binding for BriefLZ compression library" url="https://github.com/jirutka/brieflz.lua" arch="all" license="MIT" -checkdepends="lua-basexx lua-busted moonscript" +checkdepends="lua-busted moonscript" source="$pkgname-$pkgver.tar.gz::https://github.com/jirutka/$_pkgname/archive/v$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" @@ -17,11 +17,11 @@ case "$CARCH" in *) checkdepends="$checkdepends luajit" _luajit="jit";; esac -_luaversions="5.1 5.2 5.3" +_luaversions="5.1 5.2 5.3 5.4" for _v in $_luaversions; do makedepends="$makedepends lua$_v-dev luarocks$_v" subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage" - checkdepends="$checkdepends lua$_v-busted" + checkdepends="$checkdepends lua$_v-basexx lua$_v-busted" done build() { -- GitLab From 34d32bcd096fba8e774f23ecdee3b961b9903181 Mon Sep 17 00:00:00 2001 From: omni Date: Mon, 15 Nov 2021 18:07:27 +0000 Subject: [PATCH 6/7] community/lua-loadkit: add lua5.4 --- community/lua-loadkit/APKBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/community/lua-loadkit/APKBUILD b/community/lua-loadkit/APKBUILD index fdd2ea8cb03..4c447a8271e 100644 --- a/community/lua-loadkit/APKBUILD +++ b/community/lua-loadkit/APKBUILD @@ -3,7 +3,7 @@ pkgname=lua-loadkit _pkgname=loadkit pkgver=1.1.0 -pkgrel=1 +pkgrel=2 pkgdesc="Allows to load arbitrary files within the Lua package path" url="https://github.com/leafo/loadkit" arch="noarch" @@ -13,7 +13,7 @@ builddir="$srcdir/$_pkgname-$pkgver" # Tests require moonscript, but moonscript requires loadkit to run all tests. options="!check" -_luaversions="5.1 5.2 5.3" +_luaversions="5.1 5.2 5.3 5.4" for _v in $_luaversions; do subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage" checkdepends="$checkdepends lua$_v" -- GitLab From 0efe98d03891474ebce131e32ca392a0f57b5ded Mon Sep 17 00:00:00 2001 From: omni Date: Sun, 31 Jul 2022 12:51:54 +0000 Subject: [PATCH 7/7] community/lua-lgi: upgrade to 0.9.2_git20220730 --- community/lua-lgi/APKBUILD | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/community/lua-lgi/APKBUILD b/community/lua-lgi/APKBUILD index 8ca1b992630..1536ebc3da0 100644 --- a/community/lua-lgi/APKBUILD +++ b/community/lua-lgi/APKBUILD @@ -3,8 +3,9 @@ _luaversions="5.1 5.2 5.3 5.4" pkgname=lua-lgi _rockname="${pkgname#lua-*}" -pkgver=0.9.2 -pkgrel=5 +pkgver=0.9.2_git20220825 +_gitcommit=34fe0e2470429be11fc7268a9391ee715b3377e0 +pkgrel=0 pkgdesc="Dynamic Lua binding to GObject libraries using GObject-Introspection" url="https://github.com/lgi-devs/lgi" arch="all" @@ -16,10 +17,10 @@ for _i in $_luaversions; do subpackages="$subpackages lua$_i-$_rockname:_split" done subpackages="$subpackages $pkgname-doc" +source="lgi-$pkgver.tar.gz::https://github.com/lgi-devs/lgi/archive/$_gitcommit.tar.gz" +builddir="$srcdir/$pkgname-$_gitcommit" -source="lgi-$pkgver.tar.gz::https://github.com/lgi-devs/lgi/archive/$pkgver.tar.gz" - -_sdir="$srcdir"/lgi-$pkgver +_sdir="$srcdir/lgi-$_gitcommit" prepare() { default_prepare @@ -62,4 +63,6 @@ _split() { "$subpkgdir/usr/share/lua/" } -sha512sums="755a96b78530f42da6d4e2664f8e37cb07a356419e7e6448003c3f841c9d98ad18b851715d9eb203ea7eb27b13ec46223fa8a1c90a99fd12960ce85b0a695335 lgi-0.9.2.tar.gz" +sha512sums=" +90abcef1c15820dd6657eb0c3c576bc4bee834d301aec1e0ff225115494b59bbf11e9a1e7234508f9fa77d65a3ddfcfd85fadd72663777f4a4110a5513d0f210 lgi-0.9.2_git20220825.tar.gz +" -- GitLab