pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/tolua++ Initial import of tolua++, version 1.0.9...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2cd4c3663fba
branches:  trunk
changeset: 603571:2cd4c3663fba
user:      imil <imil%pkgsrc.org@localhost>
date:      Tue May 08 09:34:17 2012 +0000

description:
Initial import of tolua++, version 1.0.93, into the NetBSD Packages Collection.

Tolua++ is an extended version of tolua, a tool to integrate C/C++ code
with Lua. tolua++ includes new features oriented to c++ such as:

* Support for std::string as a basic type (this can be turned off by a
  command line option).
* Support for class templates

As well as other features and bugfixes.

tolua is a tool that greatly simplifies the integration of C/C++ code with
Lua. Based on a cleaned header file (or extracts from real header files),
tolua automatically generates the binding code to access C/C++ features
from Lua. Using Lua API and tag method facilities, tolua maps C/C++
constants, external variables, functions, classes, and methods to Lua.

diffstat:

 devel/tolua++/DESCR                       |  14 ++++++++
 devel/tolua++/Makefile                    |  51 +++++++++++++++++++++++++++++++
 devel/tolua++/PLIST                       |   9 +++++
 devel/tolua++/buildlink3.mk               |  14 ++++++++
 devel/tolua++/distinfo                    |   7 ++++
 devel/tolua++/files/custom.py             |   7 ++++
 devel/tolua++/patches/patch-SConstruct    |  23 +++++++++++++
 devel/tolua++/patches/patch-src_lib_SCsub |  20 ++++++++++++
 8 files changed, 145 insertions(+), 0 deletions(-)

diffs (177 lines):

diff -r dae316b5f57e -r 2cd4c3663fba devel/tolua++/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tolua++/DESCR       Tue May 08 09:34:17 2012 +0000
@@ -0,0 +1,14 @@
+Tolua++ is an extended version of tolua, a tool to integrate C/C++ code
+with Lua. tolua++ includes new features oriented to c++ such as:
+
+* Support for std::string as a basic type (this can be turned off by a
+  command line option).
+* Support for class templates
+
+As well as other features and bugfixes.
+
+tolua is a tool that greatly simplifies the integration of C/C++ code with
+Lua. Based on a cleaned header file (or extracts from real header files),
+tolua automatically generates the binding code to access C/C++ features
+from Lua. Using Lua API and tag method facilities, tolua maps C/C++
+constants, external variables, functions, classes, and methods to Lua.
diff -r dae316b5f57e -r 2cd4c3663fba devel/tolua++/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tolua++/Makefile    Tue May 08 09:34:17 2012 +0000
@@ -0,0 +1,51 @@
+# $NetBSD: Makefile,v 1.1.1.1 2012/05/08 09:34:17 imil Exp $
+#
+
+DISTNAME=      tolua++-1.0.93
+CATEGORIES=    devel
+MASTER_SITES=  http://www.codenix.com/~tolua/
+EXTRACT_SUFX=  .tar.bz2
+
+MAINTAINER=    imil%NetBSD.org@localhost
+HOMEPAGE=      http://www.codenix.com/~tolua/
+COMMENT=       Tool to integrate C/C++ code with Lua
+LICENSE=       mit
+
+PKG_DESTDIR_SUPPORT=   user-destdir
+
+USE_LANGUAGES= c c++
+
+BUILD_DEPENDS+=        scons-[0-9]*:../../devel/scons
+
+INSTALLATION_DIRS+=    bin lib include share/doc/tolua++
+
+SCONS=          ${PREFIX}/bin/scons
+SCONS_ARGS=    prefix=${PREFIX} SONAME="libtolua++.so.${LUA_VERSION}"
+
+SUBST_CLASSES+=                prefix
+SUBST_STAGE.prefix=    post-patch
+SUBST_FILES.prefix=    custom.py
+SUBST_SED.prefix=      -e 's|@PREFIX@|${PREFIX}|'
+
+PLIST_SUBST+=          LUA_VERSION=${LUA_VERSION}
+
+pre-patch:
+       ${CP} files/custom.py ${WRKSRC}
+
+do-build:
+       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONS} ${SCONS_ARGS}
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/bin/tolua++ ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_LIB} ${WRKSRC}/lib/libtolua++.a ${DESTDIR}${PREFIX}/lib
+       ${INSTALL_LIB} ${WRKSRC}/lib/libtolua++.so                      \
+               ${DESTDIR}${PREFIX}/lib/libtolua++.so.${LUA_VERSION}
+       ${LN} -sf ${DESTDIR}${PREFIX}/lib/libtolua++.so.${LUA_VERSION}  \
+               ${DESTDIR}${PREFIX}/lib/libtolua++.so
+       ${INSTALL_DATA} ${WRKSRC}/include/tolua++.h ${DESTDIR}${PREFIX}/include
+       ${INSTALL_DATA} ${WRKSRC}/README* ${DESTDIR}${PREFIX}/share/doc/tolua++
+       ${INSTALL_DATA} ${WRKSRC}/doc/tolua++.html                      \
+               ${DESTDIR}${PREFIX}/share/doc/tolua++
+
+.include "../../lang/lua/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r dae316b5f57e -r 2cd4c3663fba devel/tolua++/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tolua++/PLIST       Tue May 08 09:34:17 2012 +0000
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2012/05/08 09:34:17 imil Exp $
+bin/tolua++
+include/tolua++.h
+lib/libtolua++.a
+lib/libtolua++.so
+lib/libtolua++.so.${LUA_VERSION}
+share/doc/tolua++/README
+share/doc/tolua++/README-5.1
+share/doc/tolua++/tolua++.html
diff -r dae316b5f57e -r 2cd4c3663fba devel/tolua++/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tolua++/buildlink3.mk       Tue May 08 09:34:17 2012 +0000
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2012/05/08 09:34:17 imil Exp $
+
+BUILDLINK_TREE+=       toluapp
+
+.if !defined(TOLUAPP_BUILDLINK3_MK)
+TOLUAPP_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.toluapp+=        tolua++>=1.0.93
+BUILDLINK_PKGSRCDIR.toluapp?=  ../../devel/tolua++
+
+.include "../../lang/lua/buildlink3.mk"
+.endif # TOLUAPP_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -toluapp
diff -r dae316b5f57e -r 2cd4c3663fba devel/tolua++/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tolua++/distinfo    Tue May 08 09:34:17 2012 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2012/05/08 09:34:17 imil Exp $
+
+SHA1 (tolua++-1.0.93.tar.bz2) = 4a4d4d948e03320ef74314aa6698677c0af4199f
+RMD160 (tolua++-1.0.93.tar.bz2) = 1e1ffaff985832d2355a07ee6a94c4c67ca38551
+Size (tolua++-1.0.93.tar.bz2) = 163956 bytes
+SHA1 (patch-SConstruct) = dfd520a0c30e64f9c895b956175b1dd996863691
+SHA1 (patch-src_lib_SCsub) = e86f249905b171d248f0a498728ce4b17ae074f7
diff -r dae316b5f57e -r 2cd4c3663fba devel/tolua++/files/custom.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tolua++/files/custom.py     Tue May 08 09:34:17 2012 +0000
@@ -0,0 +1,7 @@
+CCFLAGS = ['-I@PREFIX@/include', '-O2', '-ansi']
+LIBPATH = ['@PREFIX@/lib']
+LIBS = ['lua', 'm']
+LINKFLAGS = ['-Wl,-rpath,@PREFIX@/lib']
+tolua_bin = 'tolua++'
+tolua_lib = 'tolua++'
+TOLUAPP = 'tolua++'
diff -r dae316b5f57e -r 2cd4c3663fba devel/tolua++/patches/patch-SConstruct
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tolua++/patches/patch-SConstruct    Tue May 08 09:34:17 2012 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-SConstruct,v 1.1.1.1 2012/05/08 09:34:17 imil Exp $
+
+Create shared object.
+
+--- SConstruct.orig    2008-04-21 00:05:35.000000000 +0000
++++ SConstruct
+@@ -22,6 +22,7 @@ opts.Add('CXX', 'The C++ compiler (for t
+ opts.Add('CCFLAGS', 'Flags for the compiler.', ['-O2', '-Wall'])
+ opts.Add('LINK', 'The linker.')
+ opts.Add('LINKFLAGS', 'Linker flags.', [])
++opts.Add('SONAME', 'Shared library name.')
+ opts.Add('no_cygwin', 'Use -mno-cygwin to build using the mingw compiler on cygwin', 0)
+ opts.Add('LIBS', 'libraries', [])
+ opts.Add('LIBPATH', 'library path', [])
+@@ -147,6 +148,8 @@ Files will be installed on <prefix>/bin,
+ env['CPPPATH'] = '#/include'
+ env['LIBPATH'] =  ['#/lib'] + env['LIBPATH']
+ 
++env.Append(SHLINKFLAGS=' -Wl,-soname='+env['SONAME'])
++
+ if env['no_cygwin']:
+ 
+       env['CCFLAGS'] += ['-mno-cygwin']
diff -r dae316b5f57e -r 2cd4c3663fba devel/tolua++/patches/patch-src_lib_SCsub
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tolua++/patches/patch-src_lib_SCsub Tue May 08 09:34:17 2012 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_lib_SCsub,v 1.1.1.1 2012/05/08 09:34:17 imil Exp $
+
+Create shared object. 
+
+--- src/lib/SCsub.orig 2008-04-21 00:05:35.000000000 +0000
++++ src/lib/SCsub
+@@ -9,10 +9,6 @@ sources = [
+       'tolua_to.c',
+       ]
+ 
+-env.lib_target_static = env.Library('#/lib/'+env['tolua_lib']+'_static', sources)
+-
+-if env['shared']:
+-      env.lib_target = env.SharedLibrary('#lib/'+env['tolua_lib'], sources)
+-else:
+-      env.lib_target = env.Library('#/lib/'+env['tolua_lib'], sources)
+-
++env.lib_target_static = env.Library('#/lib/'+env['tolua_lib'], sources)
++env.lib_target = env.Library('#/lib/'+env['tolua_lib'], sources)
++env.lib_target += env.SharedLibrary('#/lib/'+env['tolua_lib'], sources)



Home | Main Index | Thread Index | Old Index