opt/lua/Pkgfile

41 lines
1.1 KiB
Plaintext
Raw Normal View History

2012-06-23 12:28:07 +02:00
# Description: A programming language designed for extending applications.
# URL: http://www.lua.org/
2014-11-10 13:25:50 +01:00
# Maintainer: Danny Rawlins, crux at romster dot me
2012-06-23 12:28:07 +02:00
# Depends on: readline
2007-04-09 21:32:46 +02:00
name=lua
2019-03-07 08:02:50 +01:00
version=5.3.5
2015-12-03 10:20:26 +01:00
release=1
2019-03-07 08:02:50 +01:00
source=(https://www.lua.org/ftp/$name-$version.tar.gz
2014-02-17 03:03:38 +01: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
2019-03-07 08:02:50 +01:00
patch -p1 -i $SRC/liblua.so.patch
2007-04-09 21:32:46 +02:00
2019-03-07 08:02:50 +01:00
sed "s/%VER%/${version:0:3}/g;s/%REL%/$version/g" $SRC/lua.pc > lua.pc
# Lua 5.3.4 has wrong release version in its Makefile. Fix it.
sed "s/^R= \$V.4/R= \$V.5/" -i Makefile
make MYCFLAGS="$CFLAGS -fPIC -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" MYLDFLAGS="$LDFLAGS" linux
2007-04-09 21:32:46 +02:00
2014-02-17 03:03:38 +01:00
make \
2019-03-07 08:02:50 +01:00
TO_LIB="liblua.a liblua.so liblua.so.${version:0:3} liblua.so.$version" \
INSTALL_DATA='cp -d' \
2015-11-05 09:23:40 +01:00
INSTALL_TOP=$PKG/usr \
INSTALL_MAN=$PKG/usr/share/man/man1 \
install
2014-02-17 03:03:38 +01:00
2019-03-07 08:02:50 +01:00
# odd behaviour
chmod -v u+w $PKG/usr/share/man/man1/lua.1
2014-02-18 03:03:01 +01:00
2019-03-07 08:02:50 +01:00
ln -s lua $PKG/usr/bin/lua${version:0:3}
ln -s luac $PKG/usr/bin/luac${version:0:3}
ln -s liblua.so.$version $PKG/usr/lib/liblua${version:0:3}.so
install -m 0644 -D lua.pc $PKG/usr/lib/pkgconfig/lua53.pc
ln -s lua53.pc $PKG/usr/lib/pkgconfig/lua.pc
2007-04-09 21:32:46 +02:00
}