From b40cc45084b71fe495511a1219539707c4c786f9 Mon Sep 17 00:00:00 2001 From: philip Date: Thu, 7 Jun 2007 09:09:09 +0000 Subject: 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. WWW: http://www.rasterbar.com/products/luabind.html PR: ports/113443 Submitted by: Dmitry Marakasov --- devel/Makefile | 1 + devel/luabind/Makefile | 46 ++++++++++++++++++++ devel/luabind/distinfo | 3 ++ devel/luabind/files/patch-src-makefile | 17 ++++++++ devel/luabind/pkg-descr | 19 +++++++++ devel/luabind/pkg-plist | 76 ++++++++++++++++++++++++++++++++++ 6 files changed, 162 insertions(+) create mode 100644 devel/luabind/Makefile create mode 100644 devel/luabind/distinfo create mode 100644 devel/luabind/files/patch-src-makefile create mode 100644 devel/luabind/pkg-descr create mode 100644 devel/luabind/pkg-plist diff --git a/devel/Makefile b/devel/Makefile index ef03151e6bf5..c6e099967da4 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -676,6 +676,7 @@ SUBDIR += lua-gettext SUBDIR += lua-posix SUBDIR += lua-pty + SUBDIR += luabind SUBDIR += lwp SUBDIR += m17n-db SUBDIR += m17n-docs diff --git a/devel/luabind/Makefile b/devel/luabind/Makefile new file mode 100644 index 000000000000..47a6473e4af7 --- /dev/null +++ b/devel/luabind/Makefile @@ -0,0 +1,46 @@ +# New ports collection makefile for: luabind +# Date created: 06 Jun 2007 +# Whom: Dmitry Marakasov +# +# $FreeBSD$ +# + +PORTNAME= luabind +PORTVERSION= 0.7 +CATEGORIES= devel +MASTER_SITES= SF + +MAINTAINER= amdmi3@amdmi3.ru +COMMENT= Library that helps you create bindings between C++ and Lua + +BUILD_DEPENDS= ${LOCALBASE}/include/boost/python/detail/is_xxx.hpp:${PORTSDIR}/devel/boost-python +RUN_DEPENDS= ${LOCALBASE}/include/boost/python/detail/is_xxx.hpp:${PORTSDIR}/devel/boost-python + +USE_ZIP= yes +USE_LUA= 5.0 +USE_GMAKE= yes + +MAKE_ENV= CXX="${CXX}" LUA_INCDIR="${LUA_INCDIR}" \ + BOOST_ROOT="${LOCALBASE}/include" + +WRKSRC= ${WRKDIR}/${PORTNAME} + +BUILD_WRKSRC= ${WRKSRC}/src + +MAKEFILE= makefile + +PORTDOCS= * + +post-patch: + ${MKDIR} ${WRKSRC}/lib + +do-install: + ${INSTALL_DATA} ${WRKSRC}/lib/libluabind.a ${PREFIX}/lib + (cd ${WRKSRC} && ${COPYTREE_SHARE} luabind ${PREFIX}/include) + +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${DOCSDIR}) +.endif + +.include diff --git a/devel/luabind/distinfo b/devel/luabind/distinfo new file mode 100644 index 000000000000..2bf9acfd0988 --- /dev/null +++ b/devel/luabind/distinfo @@ -0,0 +1,3 @@ +MD5 (luabind-0.7.zip) = f3e8adf1d63785928b043ed377b0e94d +SHA256 (luabind-0.7.zip) = 8a966b5a8b63e5d601eb16bef28bec3ea486bd1f29deb43c5f8fad36ced528f5 +SIZE (luabind-0.7.zip) = 320531 diff --git a/devel/luabind/files/patch-src-makefile b/devel/luabind/files/patch-src-makefile new file mode 100644 index 000000000000..e4458ebe0ac7 --- /dev/null +++ b/devel/luabind/files/patch-src-makefile @@ -0,0 +1,17 @@ +--- src/makefile.orig Mon Nov 28 23:55:34 2005 ++++ src/makefile Wed Jun 6 21:18:26 2007 +@@ -1,5 +1,3 @@ +-include ../config +- + SOURCES = \ + wrapper_base.cpp \ + pcall.cpp \ +@@ -37,7 +35,7 @@ + ranlib $@ + + %.o:%.cpp +- $(CXX) -g -ftemplate-depth-100 -Wall -DLUABIND_BUILDING -c $? -o $@ -I$(LUA_PATH)/include -I- -I.. -I$(BOOST_ROOT) $(CONFIG) ++ $(CXX) $(CXXFLAGS) -ftemplate-depth-100 -Wall -DLUABIND_BUILDING -c $? -o $@ -I$(LUA_INCDIR) -I.. -I$(BOOST_ROOT) -DNODEBUG + + clean: + rm -f $(OBJECTS) $(TARGET) diff --git a/devel/luabind/pkg-descr b/devel/luabind/pkg-descr new file mode 100644 index 000000000000..a2a070924d67 --- /dev/null +++ b/devel/luabind/pkg-descr @@ -0,0 +1,19 @@ +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. + +WWW: http://www.rasterbar.com/products/luabind.html diff --git a/devel/luabind/pkg-plist b/devel/luabind/pkg-plist new file mode 100644 index 000000000000..713d60672df1 --- /dev/null +++ b/devel/luabind/pkg-plist @@ -0,0 +1,76 @@ +include/luabind/adopt_policy.hpp +include/luabind/back_reference.hpp +include/luabind/back_reference_fwd.hpp +include/luabind/class.hpp +include/luabind/class_info.hpp +include/luabind/config.hpp +include/luabind/container_policy.hpp +include/luabind/copy_policy.hpp +include/luabind/dependency_policy.hpp +include/luabind/detail/calc_arity.hpp +include/luabind/detail/call.hpp +include/luabind/detail/call_function.hpp +include/luabind/detail/call_member.hpp +include/luabind/detail/call_operator_iterate.hpp +include/luabind/detail/class_cache.hpp +include/luabind/detail/class_registry.hpp +include/luabind/detail/class_rep.hpp +include/luabind/detail/construct_rep.hpp +include/luabind/detail/constructor.hpp +include/luabind/detail/convert_to_lua.hpp +include/luabind/detail/debug.hpp +include/luabind/detail/decorate_type.hpp +include/luabind/detail/enum_maker.hpp +include/luabind/detail/find_best_match.hpp +include/luabind/detail/garbage_collector.hpp +include/luabind/detail/get_overload_signature.hpp +include/luabind/detail/get_signature.hpp +include/luabind/detail/has_get_pointer.hpp +include/luabind/detail/implicit_cast.hpp +include/luabind/detail/is_indirect_const.hpp +include/luabind/detail/link_compatibility.hpp +include/luabind/detail/method_rep.hpp +include/luabind/detail/most_derived.hpp +include/luabind/detail/object_call.hpp +include/luabind/detail/object_funs.hpp +include/luabind/detail/object_rep.hpp +include/luabind/detail/open.hpp +include/luabind/detail/operator_id.hpp +include/luabind/detail/other.hpp +include/luabind/detail/overload_rep.hpp +include/luabind/detail/overload_rep_base.hpp +include/luabind/detail/pcall.hpp +include/luabind/detail/pointee_sizeof.hpp +include/luabind/detail/pointee_typeid.hpp +include/luabind/detail/policy.hpp +include/luabind/detail/primitives.hpp +include/luabind/detail/property.hpp +include/luabind/detail/ref.hpp +include/luabind/detail/signature_match.hpp +include/luabind/detail/stack_utils.hpp +include/luabind/detail/typetraits.hpp +include/luabind/detail/yes_no.hpp +include/luabind/discard_result_policy.hpp +include/luabind/error.hpp +include/luabind/from_stack.hpp +include/luabind/function.hpp +include/luabind/get_pointer.hpp +include/luabind/handle.hpp +include/luabind/iterator_policy.hpp +include/luabind/lua_include.hpp +include/luabind/luabind.hpp +include/luabind/object.hpp +include/luabind/open.hpp +include/luabind/operator.hpp +include/luabind/out_value_policy.hpp +include/luabind/prefix.hpp +include/luabind/raw_policy.hpp +include/luabind/return_reference_to_policy.hpp +include/luabind/scope.hpp +include/luabind/value_wrapper.hpp +include/luabind/weak_ref.hpp +include/luabind/wrapper_base.hpp +include/luabind/yield_policy.hpp +lib/libluabind.a +@dirrm include/luabind/detail +@dirrm include/luabind -- cgit