summaryrefslogtreecommitdiff
path: root/dev-lua/compat53
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-12 02:01:24 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-12 02:01:24 +0000
commit39c32f4d5dca9f6293fccb69e9d50baf494c8de4 (patch)
treeec772fdf23a7279a60e9063b01c2dc909741a197 /dev-lua/compat53
parent494ca58c9f5243dd4b56557aa8c41bce76e95ec3 (diff)
gentoo auto-resync : 12:12:2024 - 02:01:23
Diffstat (limited to 'dev-lua/compat53')
-rw-r--r--dev-lua/compat53/Manifest3
-rw-r--r--dev-lua/compat53/compat53-0.14.3.ebuild69
-rw-r--r--dev-lua/compat53/metadata.xml15
3 files changed, 87 insertions, 0 deletions
diff --git a/dev-lua/compat53/Manifest b/dev-lua/compat53/Manifest
new file mode 100644
index 000000000000..d268f2bc37ec
--- /dev/null
+++ b/dev-lua/compat53/Manifest
@@ -0,0 +1,3 @@
+DIST lua-compat-5.3-0.14.3.tar.gz 61873 BLAKE2B 056a6f3ea4239821d616bff50eef12427745a06d0992e0b2abbcfb311eace583ca47312f8a6d3770b2526da09e47ac1a4fb3352c06c49c53b8d205b418f47d9e SHA512 9e355df0d1a165b7bbdc69c39fe49467ae5a7d93e02b875ade5863e2d44ba80955287210376fccbc5f2370970f5552774d84c812a9681d49a78b8eceeab37442
+EBUILD compat53-0.14.3.ebuild 1424 BLAKE2B 87cd71f1576e3131b3a850692e40e47f88eb4e438ae7fece8660b831a48eebf57d8e7ed044013ea5a376c73c4ebb00b57f2be4b42a5ede3c205e5730addba2c3 SHA512 66a7adac69aa7682b0d9caed9760c520360c1cf75273d330fa5e1aef47cb052d8dd148eb633e8a597e99a080abd9dfe62a96948c2270a71885e4e0cb2564b98f
+MISC metadata.xml 483 BLAKE2B 040bc6c5a48aeca4416f21b84a27b26342f6912060d433d0a23a027d5caaac06ffc7dc17ef589d2a16e37bd32361dc87d18d377cd4707e696f97bc7bc3c58069 SHA512 a9eb0ac1b40c9984b670edf3caa5f42502ae510bdbae7c80505338b3e90948bb71641123a30ab39cd99d004330f580dda9b5b9030b977870883206c854b61fee
diff --git a/dev-lua/compat53/compat53-0.14.3.ebuild b/dev-lua/compat53/compat53-0.14.3.ebuild
new file mode 100644
index 000000000000..f5f200a148a9
--- /dev/null
+++ b/dev-lua/compat53/compat53-0.14.3.ebuild
@@ -0,0 +1,69 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit edo lua toolchain-funcs
+
+MY_PN="lua-${PN/53/-5.3}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Compatibility module providing Lua-5.3-style APIs for Lua 5.2 and 5.1"
+HOMEPAGE="https://github.com/lunarmodules/lua-compat-5.3/"
+SRC_URI="https://github.com/lunarmodules/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+DEPEND="${LUA_DEPS}"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+ # change to name of compat53.'module' calls
+ # this is required, see rockspecs
+ mv lbitlib.c bitlib.c || die
+ mv liolib.c io.c || die
+ mv lstrlib.c string.c || die
+ mv ltablib.c table.c || die
+ mv lutf8lib.c utf8.c || die
+ lua_copy_sources
+}
+
+lua_src_compile() {
+ cd "${BUILD_DIR}" || die
+ local u=""
+ for u in *.c; do
+ edo $(tc-getCC) -shared -fPIC \
+ ${CPPFLAGS} \
+ ${CFLAGS} $(lua_get_CFLAGS) \
+ ${SOFLAGS} \
+ ${LDFLAGS} $(lua_get_LIBS) \
+ -o "${u/.c/.so}" ${u} c-api/compat-5.3.c
+ done
+}
+
+src_compile() {
+ lua_foreach_impl lua_src_compile
+}
+
+lua_src_install() {
+ cd "${BUILD_DIR}" || die
+ insinto $(lua_get_lmod_dir)/${PN}
+ doins compat53/*.lua
+ exeinto $(lua_get_cmod_dir)/${PN}
+ doexe *.so
+}
+
+src_install() {
+ lua_foreach_impl lua_src_install
+ doheader c-api/*
+ einstalldocs
+}
diff --git a/dev-lua/compat53/metadata.xml b/dev-lua/compat53/metadata.xml
new file mode 100644
index 000000000000..5d243d08f4ab
--- /dev/null
+++ b/dev-lua/compat53/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>nicolas.parlant@parhuet.fr</email>
+ <name>Nicolas PARLANT</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">lunarmodules/lua-compat-5.3</remote-id>
+ </upstream>
+</pkgmetadata>