2015-11-12 12:30:48 +00:00
|
|
|
SUMMARY="A powerful, fast, light-weight, embeddable scripting language"
|
|
|
|
DESCRIPTION="Lua combines simple procedural syntax with powerful data \
|
|
|
|
description constructs based on associative arrays and extensible semantics. \
|
|
|
|
Lua is dynamically typed, runs by interpreting bytecode for a register-based \
|
|
|
|
virtual machine, and has automatic memory management with incremental garbage \
|
|
|
|
collection, making it ideal for configuration, scripting, and rapid \
|
|
|
|
prototyping."
|
|
|
|
HOMEPAGE="http://www.lua.org"
|
2016-02-17 19:26:37 +00:00
|
|
|
COPYRIGHT="1994-2009, Lua.org, PUC-Rio"
|
2015-11-12 12:30:48 +00:00
|
|
|
LICENSE="MIT"
|
2017-10-13 16:54:28 +00:00
|
|
|
REVISION="1"
|
|
|
|
SOURCE_URI="http://www.lua.org/ftp/lua-$portVersion.tar.gz"
|
|
|
|
CHECKSUM_SHA256="2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333"
|
2015-11-12 12:30:48 +00:00
|
|
|
SOURCE_DIR="lua-$portVersion"
|
2017-10-13 16:54:28 +00:00
|
|
|
PATCHES="lua-$portVersion.patchset"
|
2015-11-12 12:30:48 +00:00
|
|
|
|
2021-09-15 19:40:18 +00:00
|
|
|
ARCHITECTURES="all"
|
2016-02-17 19:26:37 +00:00
|
|
|
SECONDARY_ARCHITECTURES="x86 x86_gcc2"
|
|
|
|
|
2015-11-12 12:30:48 +00:00
|
|
|
PROVIDES="
|
|
|
|
lua51${secondaryArchSuffix} = $portVersion compat >= 5.1
|
|
|
|
cmd:lua5.1${secondaryArchSuffix} = $portVersion compat >= 5.1
|
|
|
|
cmd:luac5.1${secondaryArchSuffix} = $portVersion compat >= 5.1
|
|
|
|
lib:liblua${secondaryArchSuffix} = $portVersion compat >= 5.1
|
|
|
|
"
|
|
|
|
REQUIRES="
|
|
|
|
haiku${secondaryArchSuffix}
|
|
|
|
"
|
2016-02-17 19:26:37 +00:00
|
|
|
|
2015-11-12 12:30:48 +00:00
|
|
|
PROVIDES_devel="
|
|
|
|
lua51${secondaryArchSuffix}_devel = $portVersion compat >= 5.1
|
|
|
|
devel:liblua$secondaryArchSuffix = $portVersion compat >= 5.1
|
|
|
|
devel:liblua5.1$secondaryArchSuffix = $portVersion compat >= 5.1
|
|
|
|
"
|
|
|
|
REQUIRES_devel="
|
|
|
|
lua51$secondaryArchSuffix == $portVersion
|
|
|
|
"
|
2016-02-17 19:26:37 +00:00
|
|
|
|
2015-11-12 12:30:48 +00:00
|
|
|
BUILD_REQUIRES="
|
|
|
|
haiku${secondaryArchSuffix}_devel
|
|
|
|
"
|
|
|
|
BUILD_PREREQUIRES="
|
|
|
|
haiku${secondaryArchSuffix}_devel
|
|
|
|
cmd:gcc${secondaryArchSuffix}
|
2018-08-08 14:18:18 +00:00
|
|
|
cmd:make
|
2015-11-12 12:30:48 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
BUILD()
|
|
|
|
{
|
|
|
|
make haiku
|
|
|
|
}
|
|
|
|
|
|
|
|
INSTALL()
|
|
|
|
{
|
|
|
|
make install INSTALL_TOP="$prefix" INSTALL_MAN="$manDir/man1" \
|
|
|
|
INSTALL_INC="$includeDir/lua5.1" INSTALL_LMOD="$dataDir/lua/5.1" \
|
|
|
|
INSTALL_LIB="$libDir" INSTALL_BIN="$binDir"
|
|
|
|
|
|
|
|
mkdir -p $libDir/pkgconfig
|
|
|
|
cp etc/lua.pc $libDir/pkgconfig/lua.pc
|
|
|
|
|
|
|
|
ln -s liblua.so $libDir/liblua.so.5.1
|
|
|
|
ln -s liblua.a $libDir/liblua5.1.a
|
|
|
|
|
|
|
|
mv $binDir/lua $binDir/lua5.1
|
|
|
|
mv $binDir/luac $binDir/luac5.1
|
|
|
|
|
|
|
|
prepareInstalledDevelLib liblua
|
|
|
|
prepareInstalledDevelLib liblua5.1
|
|
|
|
fixPkgconfig
|
|
|
|
|
|
|
|
# The includes are in a subdirectory of includeDir, and fixPkgconfig breaks
|
|
|
|
# that.
|
|
|
|
sed -i -e "s,^includedir=.*,includedir=$prefix/$relativeIncludeDir/lua5.1," \
|
|
|
|
$developLibDir/pkgconfig/lua.pc
|
|
|
|
|
|
|
|
packageEntries devel $developDir
|
|
|
|
}
|