summaryrefslogtreecommitdiff
path: root/repo/system/lua/lua.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
committerdavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
commit739c65c54cb0e957df5e9b76f93fb02554e5cac3 (patch)
tree09ddfa0a342f3ea9de136cb50abdd79821bf1b53 /repo/system/lua/lua.xibuild
parent4c585ad54388285500fd18a6aaa516894e0f2c16 (diff)
moved everything to new file formatting
Diffstat (limited to 'repo/system/lua/lua.xibuild')
-rw-r--r--repo/system/lua/lua.xibuild56
1 files changed, 56 insertions, 0 deletions
diff --git a/repo/system/lua/lua.xibuild b/repo/system/lua/lua.xibuild
new file mode 100644
index 0000000..fdcf8ab
--- /dev/null
+++ b/repo/system/lua/lua.xibuild
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+MAKEDEPS="make "
+DEPS="readline"
+
+PKG_VER=5.4.4
+SOURCE=https://www.lua.org/ftp/lua-$PKG_VER.tar.gz
+ADDITIONAL="
+ https://www.linuxfromscratch.org/patches/blfs/svn/lua-$PKG_VER-shared_library-1.patch
+ lua5.4.pc
+ "
+
+DESC="A powerful lightweight scripting language"
+
+prepare () {
+ sed -e "s|@MAJOR_VER@|${PKG_VER%.*}|g" \
+ -e "s|@MINOR_VER@|${PKG_VER}|g" \
+ -i lua5.4.pc
+
+ patch -Np1 -i lua-$PKG_VER-shared_library-1.patch
+ cat > configure.ac <<-EOF
+ top_buildir=.
+
+ AC_INIT(src/luaconf.h)
+ AC_PROG_LIBTOOL
+ AC_OUTPUT()
+ EOF
+ libtoolize --force --install && aclocal && autoconf
+
+
+}
+
+build () {
+ ./configure \
+ --prefix=/usr
+ cd src
+ CFLAGS="$CFLAGS -DLUA_USE_LINUX -DLUA_COMPAT_5_2" \
+ SYSLDFLAGS="$LDFLAGS" \
+ RPATH="/usr/lib" make
+}
+
+package () {
+ cd ..
+ sed -i "s/INSTALL= install -p/INSTALL= install/g" Makefile
+ make V=${PKG_VER%.*} \
+ INSTALL_TOP="$PKG_DEST"/usr \
+ INSTALL_INC="$PKG_DEST"/usr/include/lua${PKG_VER%.*} \
+ INSTALL_LIB="$PKG_DEST"/usr/lib/lua${PKG_VER%.*} install
+
+
+ mkdir -p $PKG_DEST/usr/share/doc/lua-$PKG_VER
+ for s in html css gif png; do
+ cp doc/*.$s $PKG_DEST/usr/share/doc/lua-$PKG_VER
+ done
+ install -Dm644 lua5.4.pc "$PKG_DEST"/usr/lib/pkgconfig/lua5.4.pc
+}