mirror of
https://github.com/outbackdingo/ports.git
synced 2026-02-13 05:50:36 +00:00
50 lines
1.2 KiB
Plaintext
Executable File
50 lines
1.2 KiB
Plaintext
Executable File
# description : Light-weight programming language designed for extending applications
|
|
# homepage : http://www.lua.org/
|
|
# maintainer : Emmett1, emmett1.2miligrams at gmail.com
|
|
|
|
name=lua
|
|
version=5.3.4
|
|
release=1
|
|
source=(http://www.lua.org/ftp/$name-$version.tar.gz
|
|
http://www.linuxfromscratch.org/patches/blfs/8.1/$name-$version-shared_library-1.patch)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
cat > lua.pc << "EOF"
|
|
V=5.3
|
|
R=5.3.4
|
|
|
|
prefix=/usr
|
|
INSTALL_BIN=${prefix}/bin
|
|
INSTALL_INC=${prefix}/include
|
|
INSTALL_LIB=${prefix}/lib
|
|
INSTALL_MAN=${prefix}/share/man/man1
|
|
INSTALL_LMOD=${prefix}/share/lua/${V}
|
|
INSTALL_CMOD=${prefix}/lib/lua/${V}
|
|
exec_prefix=${prefix}
|
|
libdir=${exec_prefix}/lib
|
|
includedir=${prefix}/include
|
|
|
|
Name: Lua
|
|
Description: An Extensible Extension Language
|
|
Version: ${R}
|
|
Requires:
|
|
Libs: -L${libdir} -llua -lm -ldl
|
|
Cflags: -I${includedir}
|
|
EOF
|
|
|
|
patch -Np1 -i ../$name-$version-shared_library-1.patch
|
|
|
|
sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h
|
|
|
|
make MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" linux
|
|
|
|
make INSTALL_TOP=$PKG/usr \
|
|
TO_LIB="liblua.so liblua.so.${version:0:3} liblua.so.$version" \
|
|
INSTALL_DATA="cp -d" \
|
|
INSTALL_MAN=$PKG/usr/share/man/man1 install
|
|
|
|
install -v -m644 -D lua.pc $PKG/usr/lib/pkgconfig/lua.pc
|
|
}
|