mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
89 lines
2.2 KiB
Bash
89 lines
2.2 KiB
Bash
SUMMARY="Greatly simplifies the integration of C/C++ code with Lua"
|
|
DESCRIPTION="tolua is a tool that greatly simplifies the integration of C/C++ code with Lua.
|
|
|
|
Based on a 'cleaned' header file, tolua automatically generates the binding code to access C/C++ \
|
|
features from Lua.
|
|
|
|
Using Lua API and tag method facilities, the current version automatically maps C/C++ constants, \
|
|
external variables, functions, namespace, classes, and methods to Lua. It also provides \
|
|
facilities to create Lua modules."
|
|
HOMEPAGE="https://web.tecgraf.puc-rio.br/~celes/tolua/"
|
|
COPYRIGHT="2015 Waldemar Celes"
|
|
LICENSE="GNU GPL v2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://web.tecgraf.puc-rio.br/~celes/tolua/tolua-5.2.4.tar.gz"
|
|
CHECKSUM_SHA256="c5a6b701b3ced9a66e7a9881c9d94430f8612040827650abe1aa3c5c3fc95bf2"
|
|
PATCHES="tolua-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
tolua$secondaryArchSuffix = $portVersion
|
|
cmd:tolua
|
|
lib:libtolua$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:liblua$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
tolua${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libtolua$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
tolua$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:liblua$secondaryArchSuffix >= 5.3
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
defineDebugInfoPackage tolua$secondaryArchSuffix \
|
|
$prefix/bin/tolua \
|
|
$libDir/libtolua.so.$libVersion
|
|
|
|
BUILD()
|
|
{
|
|
make LUAINC=$(finddir B_SYSTEM_HEADERS_DIRECTORY)$secondaryArchSubDir/lua53/ \
|
|
LUALIB=$(finddir B_SYSTEM_LIB_DIRECTORY)$secondaryArchSubDir
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make PREFIX=$prefix \
|
|
INCLUDEDIR=$includeDir \
|
|
LIBDIR=$libDir install
|
|
|
|
# Add pkgconfig file
|
|
mkdir -p $developLibDir/pkgconfig
|
|
|
|
cat > $developLibDir/pkgconfig/tolua.pc << EOF
|
|
bindir=$prefix/bin
|
|
exec_prefix=$prefix
|
|
libdir=$libDir
|
|
includedir=$includeDir
|
|
|
|
Name: libtolua
|
|
Description: $SUMMARY
|
|
Version: $portVersion
|
|
Libs: -L$developLibDir -ltolua
|
|
Cflags: -I$includeDir
|
|
EOF
|
|
|
|
prepareInstalledDevelLib libtolua
|
|
fixPkgconfig
|
|
|
|
packageEntries devel \
|
|
$developDir
|
|
}
|