[arch-commits] Commit in (4 files)
Daurnimator
daurnimator at archlinux.org
Wed Jan 20 14:31:35 UTC 2021
Date: Wednesday, January 20, 2021 @ 14:31:35
Author: daurnimator
Revision: 823970
Add lua-compat53
Added:
lua-compat53/
lua-compat53/repos/
lua-compat53/trunk/
lua-compat53/trunk/PKGBUILD
----------+
PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
Added: lua-compat53/trunk/PKGBUILD
===================================================================
--- lua-compat53/trunk/PKGBUILD (rev 0)
+++ lua-compat53/trunk/PKGBUILD 2021-01-20 14:31:35 UTC (rev 823970)
@@ -0,0 +1,50 @@
+# Maintainer: Daurnimator <daurnimator at archlinux.org>
+
+pkgbase='lua-compat53'
+pkgname=('lua51-compat53' 'lua52-compat53')
+pkgver=0.10
+pkgrel=1
+pkgdesc='Compatibility module providing Lua-5.3-style APIs'
+arch=('x86_64')
+url='https://github.com/keplerproject/lua-compat-5.3'
+license=('MIT')
+makedepends=('lua51' 'lua52')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/lua-compat-5.3/archive/v$pkgver.tar.gz")
+sha256sums=('d1ed32f091856f6fffab06232da79c48b437afd4cd89e5c1fc85d7905b011430')
+
+build() {
+ cd "lua-compat-5.3-$pkgver"
+ mkdir 5.1 5.2
+
+ gcc $CPPFLAGS $CFLAGS -fPIC -I/usr/include/lua5.1 -c lutf8lib.c -o 5.1/lutf8lib.o
+ gcc $CPPFLAGS $CFLAGS -fPIC -I/usr/include/lua5.1 -c lstrlib.c -o 5.1/lstrlib.o
+ gcc $CPPFLAGS $CFLAGS -fPIC -I/usr/include/lua5.1 -c ltablib.c -o 5.1/ltablib.o
+ gcc -shared $LDFLAGS -o 5.1/utf8.so 5.1/lutf8lib.o
+ gcc -shared $LDFLAGS -o 5.1/string.so 5.1/lstrlib.o
+ gcc -shared $LDFLAGS -o 5.1/table.so 5.1/ltablib.o
+
+ gcc $CPPFLAGS $CFLAGS -fPIC -I/usr/include/lua5.2 -c lutf8lib.c -o 5.2/lutf8lib.o
+ gcc $CPPFLAGS $CFLAGS -fPIC -I/usr/include/lua5.2 -c lstrlib.c -o 5.2/lstrlib.o
+ gcc $CPPFLAGS $CFLAGS -fPIC -I/usr/include/lua5.2 -c ltablib.c -o 5.2/ltablib.o
+ gcc -shared $LDFLAGS -o 5.2/utf8.so 5.2/lutf8lib.o
+ gcc -shared $LDFLAGS -o 5.2/string.so 5.2/lstrlib.o
+ gcc -shared $LDFLAGS -o 5.2/table.so 5.2/ltablib.o
+}
+
+package_lua51-compat53() {
+ pkgdesc='Compatibility module providing Lua-5.3-style APIs for Lua 5.1'
+
+ cd "lua-compat-5.3-$pkgver"
+ install -Dm644 compat53/{init,module}.lua -t "$pkgdir/usr/share/lua/5.1/compat53"
+ install -D 5.1/{utf8,string,table}.so -t "$pkgdir/usr/lib/lua/5.1/compat53/"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lua52-compat53() {
+ pkgdesc='Compatibility module providing Lua-5.3-style APIs for Lua 5.2'
+
+ cd "lua-compat-5.3-$pkgver"
+ install -Dm644 compat53/{init,module}.lua -t "$pkgdir/usr/share/lua/5.2/compat53"
+ install -D 5.2/{utf8,string,table}.so -t "$pkgdir/usr/lib/lua/5.2/compat53/"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
More information about the arch-commits
mailing list