commit: 2531b987b94fef3efe08b8ca8e24b7387b3c10f6
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 7 23:47:47 2026 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Feb 7 23:47:47 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2531b987
dev-lua/luarocks: add 3.13.0
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
dev-lua/luarocks/Manifest | 1 +
dev-lua/luarocks/luarocks-3.13.0.ebuild | 90 +++++++++++++++++++++++++++++++++
2 files changed, 91 insertions(+)
diff --git a/dev-lua/luarocks/Manifest b/dev-lua/luarocks/Manifest
index da023fc7d345..e37ee8cb0377 100644
--- a/dev-lua/luarocks/Manifest
+++ b/dev-lua/luarocks/Manifest
@@ -1 +1,2 @@
DIST luarocks-3.12.2.tar.gz 441393 BLAKE2B
38cede07aa8cab8ffb205a3326b28bc353b08c253c0a5f96e75d73c97785a55a5fd43048213701ab79b2a746f715d6b865f743ed68963a782f65af4bacb4ef0a
SHA512
a1182c5f0ba87841014bb8063c170968659e35339d559a56fe8eb007ebfbe0ce356e4c4341bbfe4279986d9ca10f04a38e3fdbc80223251526d2de34b2849cc5
+DIST luarocks-3.13.0.tar.gz 441909 BLAKE2B
204e7898381d5cc46608b4611270730f14004e283aadb749f439b22111ecd6e0b6287b75f296703a3e9029f934b135bbc74d2b209177dd84382d9f9ad735f5c2
SHA512
44381bb7fd3d474f92b0d2d0bf492246907f88ac6d5bdbb30b889222d755681777042195cfbfa136c068e05db78896760d5aea28c2f60a46d2f30c4c28ba704b
diff --git a/dev-lua/luarocks/luarocks-3.13.0.ebuild
b/dev-lua/luarocks/luarocks-3.13.0.ebuild
new file mode 100644
index 000000000000..7c98c5c07f19
--- /dev/null
+++ b/dev-lua/luarocks/luarocks-3.13.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit lua-single
+
+DESCRIPTION="A package manager for the Lua programming language"
+HOMEPAGE="https://luarocks.org"
+SRC_URI="https://luarocks.org/releases/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="test"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="test"
+
+RDEPEND="${LUA_DEPS}
+ $(lua_gen_cond_dep 'dev-lua/compat53[${LUA_USEDEP}]' lua5-1 luajit)
+"
+
+DEPEND="
+ net-misc/curl
+ dev-libs/openssl:0
+ ${RDEPEND}
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? (
+ $(lua_gen_cond_dep 'dev-lua/busted[${LUA_USEDEP}]')
+ $(lua_gen_cond_dep 'dev-lua/busted-htest[${LUA_USEDEP}]')
+ ${RDEPEND}
+ )
+"
+
+src_prepare() {
+ default
+
+ # If 'dev-lang/lua' is a new, fresh installation, no 'LUA_LIBDIR'
exists,
+ # as no compiled modules are installed on a new, fresh installation,
+ # so this check must be disabled, otherwise 'configure' will fail.
+ sed -e '/LUA_LIBDIR is not a valid directory/d' -i configure || die
+
+ # unbundle lua-compat53 #961755
+ rm -r src/compat53/*.lua || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ "--prefix=${EPREFIX}/usr"
+ "--with-lua-include=$(lua_get_include_dir)"
+ "--with-lua-interpreter=${ELUA}"
+ "--with-lua-lib=$(lua_get_cmod_dir)"
+ )
+
+ # Since the configure script is handcrafted,
+ # and yells at unknown options, do not use 'econf'.
+ ./configure "${myeconfargs[@]}" || die
+}
+
+src_test() {
+ busted --lua=${ELUA} || die
+}
+
+src_install() {
+ default
+
+ { find "${D}" -type f -exec sed -i -e "s:${D}::g" {} \;; } || die
+}
+
+pkg_postinst() {
+ local lua_abi_ver
+ if use lua_single_target_luajit; then
+ lua_abi_ver="5.1"
+ else
+ lua_abi_ver=${ELUA#lua}
+ fi
+ elog
+ elog "To manage rocks for a Lua version other than the current
${CATEGORY}/${PN} default (${lua_abi_ver})"
+ elog "you can use the command-line option --lua-version, e.g."
+ elog
+ elog " luarocks --lua-version 5.3 install luasocket"
+ elog
+ elog "(use 5.1 for luajit). Note that the relevant Lua version must
already be present in the system."
+ elog
+}