summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorimil <imil@pkgsrc.org>2012-05-08 09:34:17 +0000
committerimil <imil@pkgsrc.org>2012-05-08 09:34:17 +0000
commitd2f69de5f6bb44a97d80dacbb2b373b8a00eba41 (patch)
tree42e9a98efa61a73d49210d3b9b620e42a32bd718 /devel
parente0783e23cc6b279b33096bc716934c410c485284 (diff)
downloadpkgsrc-d2f69de5f6bb44a97d80dacbb2b373b8a00eba41.tar.gz
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 (limited to 'devel')
-rw-r--r--devel/tolua++/DESCR14
-rw-r--r--devel/tolua++/Makefile51
-rw-r--r--devel/tolua++/PLIST9
-rw-r--r--devel/tolua++/buildlink3.mk14
-rw-r--r--devel/tolua++/distinfo7
-rw-r--r--devel/tolua++/files/custom.py7
-rw-r--r--devel/tolua++/patches/patch-SConstruct23
-rw-r--r--devel/tolua++/patches/patch-src_lib_SCsub20
8 files changed, 145 insertions, 0 deletions
diff --git a/devel/tolua++/DESCR b/devel/tolua++/DESCR
new file mode 100644
index 00000000000..e671c1bd641
--- /dev/null
+++ b/devel/tolua++/DESCR
@@ -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 --git a/devel/tolua++/Makefile b/devel/tolua++/Makefile
new file mode 100644
index 00000000000..0e88b1a38c8
--- /dev/null
+++ b/devel/tolua++/Makefile
@@ -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
+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 --git a/devel/tolua++/PLIST b/devel/tolua++/PLIST
new file mode 100644
index 00000000000..a3e54787b19
--- /dev/null
+++ b/devel/tolua++/PLIST
@@ -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 --git a/devel/tolua++/buildlink3.mk b/devel/tolua++/buildlink3.mk
new file mode 100644
index 00000000000..c005a8774c0
--- /dev/null
+++ b/devel/tolua++/buildlink3.mk
@@ -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 --git a/devel/tolua++/distinfo b/devel/tolua++/distinfo
new file mode 100644
index 00000000000..4230099d7c9
--- /dev/null
+++ b/devel/tolua++/distinfo
@@ -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 --git a/devel/tolua++/files/custom.py b/devel/tolua++/files/custom.py
new file mode 100644
index 00000000000..576ee4db674
--- /dev/null
+++ b/devel/tolua++/files/custom.py
@@ -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 --git a/devel/tolua++/patches/patch-SConstruct b/devel/tolua++/patches/patch-SConstruct
new file mode 100644
index 00000000000..08128b79aee
--- /dev/null
+++ b/devel/tolua++/patches/patch-SConstruct
@@ -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 --git a/devel/tolua++/patches/patch-src_lib_SCsub b/devel/tolua++/patches/patch-src_lib_SCsub
new file mode 100644
index 00000000000..1352c9b9bbc
--- /dev/null
+++ b/devel/tolua++/patches/patch-src_lib_SCsub
@@ -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)