summaryrefslogtreecommitdiffstats
path: root/main/lua/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/lua/APKBUILD')
-rw-r--r--main/lua/APKBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/main/lua/APKBUILD b/main/lua/APKBUILD
new file mode 100644
index 00000000..5e41bc03
--- /dev/null
+++ b/main/lua/APKBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua
+pkgver=5.1.4
+pkgrel=2
+pkgdesc="A powerful light-weight programming language designed for extending applications."
+url="http://www.lua.org/"
+license="MIT"
+depends=
+makedepends="readline-dev libtool"
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://www.$pkgname.org/ftp/$pkgname-$pkgver.tar.gz
+ lua-5.1-make.patch
+ lua-5.1-module_paths.patch
+ "
+
+build ()
+{
+ cd "$srcdir"/$pkgname-$pkgver
+ for i in ../*.patch; do
+ msg "Applying $i"
+ patch -p1 < $i || return 1
+ done
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:4:1/' src/Makefile
+
+ # we want packages to find our things
+ sed -i -e 's:/usr/local:/usr:' etc/lua.pc
+
+ cd src
+ make CFLAGS=" -DLUA_USE_LINUX $CFLAGS" \
+ RPATH="/usr/lib" \
+ LUA_LIBS="-lreadline" \
+ LIB_LIBS="-lm -ldl" \
+ V=$pkgver \
+ gentoo_all || return 1
+
+ cd "$srcdir/$pkgname-$pkgver"
+ make INSTALL_TOP="$pkgdir"/usr INSTALL_LIB="$pkgdir"/usr/lib \
+ V=$pkgver gentoo_install || return 1
+
+ install -D -m 644 etc/lua.pc "$pkgdir"/usr/lib/pkgconfig/lua.pc
+ install -D -m 644 doc/lua.1 "$pkgdir"/usr/share/man/man1/lua.1
+ install -D -m 644 doc/luac.1 "$pkgdir"/usr/share/man/man1/luac.1
+}
+md5sums="d0870f2de55d59c1c8419f36e8fac150 lua-5.1.4.tar.gz
+0145ff6036eb6bfdab427dc8f0c3f3c0 lua-5.1-make.patch
+e60ef15deefb72a5930c498f1184aced lua-5.1-module_paths.patch"