2012-06-23 20:28:07 +10:00
|
|
|
# Description: A programming language designed for extending applications.
|
|
|
|
# URL: http://www.lua.org/
|
2014-11-10 23:25:50 +11:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2012-06-23 20:28:07 +10:00
|
|
|
# Packager: Tilman Sauerbeck, tilman at crux dot nu
|
|
|
|
# Depends on: readline
|
2007-04-09 21:32:46 +02:00
|
|
|
|
|
|
|
name=lua
|
2016-08-10 20:57:19 +10:00
|
|
|
version=5.3.3
|
2015-12-03 20:20:26 +11:00
|
|
|
release=1
|
2012-06-23 20:28:07 +10:00
|
|
|
source=(http://www.lua.org/ftp/$name-$version.tar.gz
|
2014-02-17 13:03:38 +11:00
|
|
|
liblua.so.patch lua.pc)
|
2007-04-09 21:32:46 +02:00
|
|
|
|
|
|
|
build() {
|
2012-03-14 09:02:18 +01:00
|
|
|
cd $name-$version
|
2007-04-09 21:32:46 +02:00
|
|
|
|
2014-02-17 13:03:38 +11:00
|
|
|
patch -p 1 -i $SRC/liblua.so.patch
|
2015-11-05 19:23:40 +11:00
|
|
|
export CFLAGS="$CFLAGS -fPIC -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1"
|
2007-04-09 21:32:46 +02:00
|
|
|
|
2014-02-17 13:03:38 +11:00
|
|
|
make MYCFLAGS="$CFLAGS" MYLDFLAGS="$LDFLAGS" linux
|
2007-04-09 21:32:46 +02:00
|
|
|
|
2014-02-17 13:03:38 +11:00
|
|
|
make \
|
2015-11-06 12:50:33 +11:00
|
|
|
TO_LIB="liblua.a liblua.so.$version" \
|
2015-11-05 19:23:40 +11:00
|
|
|
INSTALL_TOP=$PKG/usr \
|
|
|
|
INSTALL_MAN=$PKG/usr/share/man/man1 \
|
|
|
|
install
|
2014-02-17 13:03:38 +11:00
|
|
|
|
2015-11-06 12:50:33 +11:00
|
|
|
ln -sf liblua.so.$version $PKG/usr/lib/liblua.so.${version:0:3}
|
|
|
|
ln -sf liblua.so.${version:0:3} $PKG/usr/lib/liblua.so
|
2015-11-05 19:23:40 +11:00
|
|
|
ln -sf /usr/bin/lua $PKG/usr/bin/lua${version:0:3}
|
|
|
|
ln -sf /usr/bin/luac $PKG/usr/bin/luac${version:0:3}
|
2014-02-18 13:03:01 +11:00
|
|
|
|
2014-02-17 13:03:38 +11:00
|
|
|
#make pc > lua.pc
|
2015-11-05 19:23:40 +11:00
|
|
|
sed "s/%VER%/${version:0:3}/g;s/%REL%/$version/g" $SRC/lua.pc > lua.pc
|
2014-02-17 13:03:38 +11:00
|
|
|
install -m 0644 -D lua.pc $PKG/usr/lib/pkgconfig/lua.pc
|
2007-04-09 21:32:46 +02:00
|
|
|
}
|