mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 08:40:06 +02:00
Add luabind.
This commit is contained in:
76
dev-cpp/luabind/luabind-0.9.1.recipe
Normal file
76
dev-cpp/luabind/luabind-0.9.1.recipe
Normal file
@@ -0,0 +1,76 @@
|
||||
SUMMARY="Create bindings between C++ and Lua"
|
||||
DESCRIPTION="Luabind is a library that helps you create bindings between C++ \
|
||||
and Lua. It has the ability to expose functions and classes, written in C++, \
|
||||
to Lua. It will also supply the functionality to define classes in lua and let \
|
||||
them derive from other lua classes or C++ classes. Lua classes can override \
|
||||
virtual functions from their C++ baseclasses. It is written towards Lua 5.x, \
|
||||
and does not work with Lua 4.
|
||||
|
||||
It is implemented utilizing template meta programming. That means that you \
|
||||
don't need an extra preprocess pass to compile your project (it is done by \
|
||||
the compiler). It also means you don't (usually) have to know the exact \
|
||||
signature of each function you register, since the library will generate code \
|
||||
depending on the compile-time type of the function (which includes the \
|
||||
signature). The main drawback of this approach is that the compilation time \
|
||||
will increase for the file that does the registration, it is therefore \
|
||||
recommended that you register everything in the same cpp-file."
|
||||
HOMEPAGE="http://www.rasterbar.com/products/luabind.html"
|
||||
COPYRIGHT="2005 Rasterbar software"
|
||||
LICENSE="MIT"
|
||||
SOURCE_URI="https://github.com/luabind/luabind/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="0e5ead50a07668d29888f2fa6f53220f900c886e46a2c99c7e8656842f05ff2d"
|
||||
REVISION="1"
|
||||
PATCHES="luabind-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
luabind$secondaryArchSuffix = $portVersion
|
||||
lib:libluabindd$secondaryArchSuffix = 0.9.0
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:liblua$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
luabind${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libluabindd$secondaryArchSuffix = 0.9.0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
luabind$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:liblua5.1$secondaryArchSuffix
|
||||
devel:libboost_config$secondaryArchSuffix >= 1.66
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:bjam
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
bjam $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
bjam install --prefix=$prefix
|
||||
|
||||
# Fix include dir
|
||||
mkdir -p $includeDir
|
||||
mv $prefix/include/luabind $includeDir
|
||||
rmdir $prefix/include
|
||||
|
||||
# Fix lib dir
|
||||
mkdir -p $libDir
|
||||
mv $prefix/lib/*.so* $libDir
|
||||
|
||||
prepareInstalledDevelLib libluabindd
|
||||
packageEntries devel $developDir
|
||||
}
|
||||
62
dev-cpp/luabind/patches/luabind-0.9.1.patchset
Normal file
62
dev-cpp/luabind/patches/luabind-0.9.1.patchset
Normal file
@@ -0,0 +1,62 @@
|
||||
From 8f20d43747b1967317c6beea4a075cc93af93410 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sat, 24 Mar 2018 09:59:56 +0100
|
||||
Subject: Hack in Haiku support in Jamfile
|
||||
|
||||
|
||||
diff --git a/Jamroot b/Jamroot
|
||||
index 94494bf..2a468d1 100755
|
||||
--- a/Jamroot
|
||||
+++ b/Jamroot
|
||||
@@ -112,6 +112,13 @@ else if [ os.name ] in LINUX MACOSX FREEBSD
|
||||
}
|
||||
lib lua : m dl : <name>$(lib-name) <search>$(library:D) : : <include>$(includes) ;
|
||||
}
|
||||
+if [ os.name ] = HAIKU
|
||||
+{
|
||||
+ includes = /system/develop/headers/x86/lua5.1 ;
|
||||
+ library = /system/develop/lib/x86/liblua.so ;
|
||||
+ lib-name = [ MATCH "lib(.*)" : $(library[1]:B) ] ;
|
||||
+ lib lua : : <name>$(lib-name) <search>$(library:D) : : <include>$(includes) ;
|
||||
+}
|
||||
|
||||
rule tag-names ( name : type ? : property-set )
|
||||
{
|
||||
--
|
||||
2.16.1
|
||||
|
||||
|
||||
From adccca31f5bb3b37c9e3d23cc006971e181e6f91 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ga=C3=ABtan=20Lehmann?= <gaetan.lehmann@gmail.com>
|
||||
Date: Sun, 4 Jan 2015 14:02:23 +0100
|
||||
Subject: fix build with boost 1.57
|
||||
|
||||
this is the fix applied in homebrew and in
|
||||
|
||||
https://github.com/luabind/luabind/issues/27
|
||||
|
||||
diff --git a/luabind/object.hpp b/luabind/object.hpp
|
||||
index f7b7ca5..ff99043 100644
|
||||
--- a/luabind/object.hpp
|
||||
+++ b/luabind/object.hpp
|
||||
@@ -536,6 +536,8 @@ namespace detail
|
||||
handle m_key;
|
||||
};
|
||||
|
||||
+#if BOOST_VERSION < 105700
|
||||
+
|
||||
// Needed because of some strange ADL issues.
|
||||
|
||||
#define LUABIND_OPERATOR_ADL_WKND(op) \
|
||||
@@ -557,6 +559,8 @@ namespace detail
|
||||
LUABIND_OPERATOR_ADL_WKND(!=)
|
||||
|
||||
#undef LUABIND_OPERATOR_ADL_WKND
|
||||
+
|
||||
+#endif // BOOST_VERSION < 105700
|
||||
|
||||
} // namespace detail
|
||||
|
||||
--
|
||||
2.16.1
|
||||
|
||||
Reference in New Issue
Block a user