From owner-svn-src-vendor@freebsd.org Tue Mar 17 16:48:56 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C6C426B7C7; Tue, 17 Mar 2020 16:48:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48hfJS0tFKz4RGm; Tue, 17 Mar 2020 16:48:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7BE7C481; Tue, 17 Mar 2020 16:48:55 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02HGmtYn080421; Tue, 17 Mar 2020 16:48:55 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02HGmq7m080404; Tue, 17 Mar 2020 16:48:52 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003171648.02HGmq7m080404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 17 Mar 2020 16:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r359039 - in vendor/lutok: . dist dist/admin dist/examples dist/include dist/include/lutok dist/m4 X-SVN-Group: vendor X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in vendor/lutok: . dist dist/admin dist/examples dist/include dist/include/lutok dist/m4 X-SVN-Commit-Revision: 359039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Mar 2020 16:48:56 -0000 Author: brooks Date: Tue Mar 17 16:48:52 2020 New Revision: 359039 URL: https://svnweb.freebsd.org/changeset/base/359039 Log: Import lutok, a Lightweight C++ API for Lua. This a snapshot of the latest version with git hash: 8f8eaef. Obtained from: https://github.com/jmmv/lutok Sponsored by: DARPA Added: vendor/lutok/ vendor/lutok/dist/ vendor/lutok/dist/.gitignore vendor/lutok/dist/.travis.yml vendor/lutok/dist/AUTHORS vendor/lutok/dist/COPYING vendor/lutok/dist/Doxyfile.in (contents, props changed) vendor/lutok/dist/INSTALL vendor/lutok/dist/Kyuafile vendor/lutok/dist/Makefile.am (contents, props changed) vendor/lutok/dist/NEWS vendor/lutok/dist/README vendor/lutok/dist/admin/ vendor/lutok/dist/admin/.gitignore vendor/lutok/dist/admin/clean-all.sh (contents, props changed) vendor/lutok/dist/admin/travis-build.sh (contents, props changed) vendor/lutok/dist/admin/travis-install-deps.sh (contents, props changed) vendor/lutok/dist/c_gate.cpp (contents, props changed) vendor/lutok/dist/c_gate.hpp vendor/lutok/dist/c_gate_test.cpp (contents, props changed) vendor/lutok/dist/configure.ac vendor/lutok/dist/debug.cpp (contents, props changed) vendor/lutok/dist/debug.hpp vendor/lutok/dist/debug_test.cpp (contents, props changed) vendor/lutok/dist/examples/ vendor/lutok/dist/examples/Makefile (contents, props changed) vendor/lutok/dist/examples/bindings.cpp (contents, props changed) vendor/lutok/dist/examples/hello.cpp (contents, props changed) vendor/lutok/dist/examples/interpreter.cpp (contents, props changed) vendor/lutok/dist/examples/raii.cpp (contents, props changed) vendor/lutok/dist/examples_test.sh (contents, props changed) vendor/lutok/dist/exceptions.cpp (contents, props changed) vendor/lutok/dist/exceptions.hpp vendor/lutok/dist/exceptions_test.cpp (contents, props changed) vendor/lutok/dist/include/ vendor/lutok/dist/include/lutok/ vendor/lutok/dist/include/lutok/README vendor/lutok/dist/include/lutok/c_gate.hpp vendor/lutok/dist/include/lutok/debug.hpp vendor/lutok/dist/include/lutok/exceptions.hpp vendor/lutok/dist/include/lutok/operations.hpp vendor/lutok/dist/include/lutok/stack_cleaner.hpp vendor/lutok/dist/include/lutok/state.hpp vendor/lutok/dist/include/lutok/state.ipp vendor/lutok/dist/lutok.pc.in (contents, props changed) vendor/lutok/dist/m4/ vendor/lutok/dist/m4/.gitignore vendor/lutok/dist/m4/compiler-features.m4 vendor/lutok/dist/m4/compiler-flags.m4 vendor/lutok/dist/m4/developer-mode.m4 vendor/lutok/dist/m4/doxygen.m4 vendor/lutok/dist/m4/lua.m4 vendor/lutok/dist/operations.cpp (contents, props changed) vendor/lutok/dist/operations.hpp vendor/lutok/dist/operations_test.cpp (contents, props changed) vendor/lutok/dist/stack_cleaner.cpp (contents, props changed) vendor/lutok/dist/stack_cleaner.hpp vendor/lutok/dist/stack_cleaner_test.cpp (contents, props changed) vendor/lutok/dist/state.cpp (contents, props changed) vendor/lutok/dist/state.hpp vendor/lutok/dist/state.ipp vendor/lutok/dist/state_test.cpp (contents, props changed) vendor/lutok/dist/test_utils.hpp Added: vendor/lutok/dist/.gitignore ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/.gitignore Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,21 @@ +*.la +*.lo +*.o +*_test + +.deps +.libs +Doxyfile +Makefile +Makefile.in +aclocal.m4 +api-docs +autom4te.cache +config.h +config.h.in +config.log +config.status +configure +libtool +lutok.pc +stamp-h1 Added: vendor/lutok/dist/.travis.yml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/.travis.yml Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,25 @@ +language: cpp + +compiler: + - gcc + - clang + +before_install: + - ./admin/travis-install-deps.sh + +env: + - ARCH=amd64 AS_ROOT=no + - ARCH=amd64 AS_ROOT=yes + - ARCH=i386 AS_ROOT=no + +matrix: + exclude: + - compiler: clang + env: ARCH=i386 AS_ROOT=no + +script: + - ./admin/travis-build.sh + +notifications: + email: + - lutok-log@googlegroups.com Added: vendor/lutok/dist/AUTHORS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/AUTHORS Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1 @@ +* Julio Merino Added: vendor/lutok/dist/COPYING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/COPYING Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,27 @@ +Copyright 2011, 2012 Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of Google Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Added: vendor/lutok/dist/Doxyfile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/Doxyfile.in Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,53 @@ +# Copyright 2010 Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Google Inc. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +BUILTIN_STL_SUPPORT = YES +ENABLE_PREPROCESSING = YES +EXTRACT_ANON_NSPACES = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXPAND_ONLY_PREDEF = YES +FILE_PATTERNS = *.cpp *.hpp *.ipp +GENERATE_LATEX = NO +GENERATE_TAGFILE = @top_builddir@/api-docs/api-docs.tag +INPUT = @top_srcdir@ +INPUT_ENCODING = ISO-8859-1 +JAVADOC_AUTOBRIEF = YES +MACRO_EXPANSION = YES +OUTPUT_DIRECTORY = @top_builddir@/api-docs +OUTPUT_LANGUAGE = English +PREDEFINED = "UTILS_UNUSED_PARAM(name)=unused_ ## name" +PROJECT_NAME = "@PACKAGE_NAME@" +PROJECT_NUMBER = @VERSION@ +QUIET = YES +RECURSIVE = NO +SHORT_NAMES = YES # Cope with gnutar limitations during 'make dist'. +SORT_BY_SCOPE_NAME = YES +SORT_MEMBERS_CTORS_1ST = YES +WARN_NO_PARAMDOC = YES Added: vendor/lutok/dist/INSTALL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/INSTALL Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,181 @@ +Introduction +============ + +Lutok uses the GNU Automake, GNU Autoconf and GNU Libtool utilities as +its build system. These are used only when compiling the library from +the source code package. If you want to install Lutok from a binary +package, you do not need to read this document. + +For the impatient: + + $ ./configure + $ make + $ make check + Gain root privileges + # make install + Drop root privileges + $ make installcheck + +Or alternatively, install as a regular user into your home directory: + + $ ./configure --prefix ~/local + $ make + $ make check + $ make install + $ make installcheck + + +Dependencies +============ + +To build and use Lutok successfully you need: + +* A standards-compliant C++ complier. +* Lua 5.1 or greater. +* pkg-config. + +Optionally, if you want to build and run the tests (recommended), you +need: + +* Kyua 0.5 or greater. +* ATF 0.15 or greater. + +If you are building Lutok from the code on the repository, you will also +need the following tools: + +* GNU Autoconf. +* GNU Automake. +* GNU Libtool. + + +Regenerating the build system +============================= + +This is not necessary if you are building from a formal release +distribution file. + +On the other hand, if you are building Lutok from code extracted from +the repository, you must first regenerate the files used by the build +system. You will also need to do this if you modify configure.ac, +Makefile.am or any of the other build system files. To do this, simply +run: + + $ autoreconf -i -s + +If ATF is installed in a different prefix than Autoconf, you will also +need to tell autoreconf where the ATF M4 macros are located. Otherwise, +the configure script will be incomplete and will show confusing syntax +errors mentioning, for example, ATF_CHECK_SH. To fix this, you have +to run autoreconf in the following manner, replacing '' with +the appropriate path: + + $ autoreconf -i -s -I /share/aclocal + + +General build procedure +======================= + +To build and install the source package, you must follow these steps: + +1. Configure the sources to adapt to your operating system. This is + done using the 'configure' script located on the sources' top + directory, and it is usually invoked without arguments unless you + want to change the installation prefix. More details on this + procedure are given on a later section. + +2. Build the sources to generate the binaries and scripts. Simply run + 'make' on the sources' top directory after configuring them. No + problems should arise. + +3. Install the library by running 'make install'. You may need to + become root to issue this step. + +4. Issue any manual installation steps that may be required. These are + described later in their own section. + +5. Check that the installed library works by running 'make + installcheck'. You do not need to be root to do this. + + +Configuration flags +=================== + +The most common, standard flags given to 'configure' are: + +* --prefix=directory + Possible values: Any path + Default: /usr/local + + Specifies where the library (binaries and all associated files) will + be installed. + +* --help + Shows information about all available flags and exits immediately, + without running any configuration tasks. + +The following flags are specific to Lutok's 'configure' script: + +* --enable-developer + Possible values: yes, no + Default: 'yes' in Git HEAD builds; 'no' in formal releases. + + Enables several features useful for development, such as the inclusion + of debugging symbols in all objects or the enforcement of compilation + warnings. + + The compiler will be executed with an exhaustive collection of warning + detection features regardless of the value of this flag. However, such + warnings are only fatal when --enable-developer is 'yes'. + +* --with-atf + Possible values: yes, no, auto. + Default: auto. + + Enables usage of ATF to build (and later install) the tests. + + Setting this to 'yes' causes the configure script to look for ATF + unconditionally and abort if not found. Setting this to 'auto' lets + configure perform the best decision based on availability of ATF. + Setting this to 'no' explicitly disables ATF usage. + + When support for tests is enabled, the build process will generate the + test programs and will later install them into the tests tree. + Running 'make check' or 'make installcheck' from within the source + directory will cause these tests to be run with Kyua (assuming it is + also installed). + +* --with-doxygen + Possible values: yes, no, auto or a path. + Default: auto. + + Enables usage of Doxygen to generate documentation for internal APIs. + + Setting this to 'yes' causes the configure script to look for Doxygen + unconditionally and abort if not found. Setting this to 'auto' lets + configure perform the best decision based on availability of Doxygen. + Setting this to 'no' explicitly disables Doxygen usage. And, lastly, + setting this to a path forces configure to use a specific Doxygen + binary, which must exist. + + When support for Doxygen is enabled, the build process will generate + HTML documentation for the Lutok API. This documentation will later + be installed in the HTML directory specified by the configure script. + You can change the location of the HTML documents by providing your + desired override with the '--htmldir' flag to the configure script. + + +Run the tests! +============== + +Lastly, after a successful installation (and assuming you built the +sources with support for ATF), you should periodically run the tests +from the final location to ensure things remain stable. Do so as +follows: + + $ kyua test -k /usr/local/tests/lutok/Kyuafile + +And if you see any tests fail, do not hesitate to report them in: + + https://github.com/jmmv/lutok/issues/ + +Thank you! Added: vendor/lutok/dist/Kyuafile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/Kyuafile Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,11 @@ +syntax("kyuafile", 1) + +test_suite("lutok") + +atf_test_program{name="c_gate_test"} +atf_test_program{name="debug_test"} +atf_test_program{name="examples_test"} +atf_test_program{name="exceptions_test"} +atf_test_program{name="operations_test"} +atf_test_program{name="stack_cleaner_test"} +atf_test_program{name="state_test"} Added: vendor/lutok/dist/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/Makefile.am Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,221 @@ +# Copyright 2010 Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Google Inc. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ACLOCAL_AMFLAGS = -I m4 + +doc_DATA = AUTHORS COPYING NEWS README +noinst_DATA = INSTALL README +EXTRA_DIST = $(doc_DATA) INSTALL README + +LUTOK_CFLAGS = -I$(srcdir)/include $(LUA_CFLAGS) +LUTOK_LIBS = liblutok.la $(LUA_LIBS) + +pkginclude_HEADERS = c_gate.hpp +pkginclude_HEADERS += debug.hpp +pkginclude_HEADERS += exceptions.hpp +pkginclude_HEADERS += operations.hpp +pkginclude_HEADERS += stack_cleaner.hpp +pkginclude_HEADERS += state.hpp +pkginclude_HEADERS += state.ipp +pkginclude_HEADERS += test_utils.hpp + +EXTRA_DIST += include/lutok/README +EXTRA_DIST += include/lutok/c_gate.hpp +EXTRA_DIST += include/lutok/debug.hpp +EXTRA_DIST += include/lutok/exceptions.hpp +EXTRA_DIST += include/lutok/operations.hpp +EXTRA_DIST += include/lutok/stack_cleaner.hpp +EXTRA_DIST += include/lutok/state.hpp +EXTRA_DIST += include/lutok/state.ipp + +lib_LTLIBRARIES = liblutok.la +liblutok_la_SOURCES = c_gate.cpp +liblutok_la_SOURCES += c_gate.hpp +liblutok_la_SOURCES += debug.cpp +liblutok_la_SOURCES += debug.hpp +liblutok_la_SOURCES += exceptions.cpp +liblutok_la_SOURCES += exceptions.hpp +liblutok_la_SOURCES += operations.cpp +liblutok_la_SOURCES += operations.hpp +liblutok_la_SOURCES += stack_cleaner.cpp +liblutok_la_SOURCES += stack_cleaner.hpp +liblutok_la_SOURCES += state.cpp +liblutok_la_SOURCES += state.hpp +liblutok_la_SOURCES += state.ipp +liblutok_la_SOURCES += test_utils.hpp +liblutok_la_CPPFLAGS = $(LUTOK_CFLAGS) +liblutok_la_LDFLAGS = -version-info 3:0:0 +liblutok_la_LIBADD = $(LUA_LIBS) + +pkgconfig_DATA = lutok.pc +CLEANFILES = lutok.pc +EXTRA_DIST += lutok.pc.in +lutok.pc: $(srcdir)/lutok.pc.in Makefile + $(AM_V_GEN)sed -e 's#__INCLUDEDIR__#$(includedir)#g' \ + -e 's#__LIBDIR__#$(libdir)#g' \ + -e 's#__LUA_CFLAGS__#$(LUA_CFLAGS)#g' \ + -e 's#__LUA_LIBS__#$(LUA_LIBS)#g' \ + -e 's#__VERSION__#$(PACKAGE_VERSION)#g' \ + <$(srcdir)/lutok.pc.in >lutok.pc.tmp; \ + mv lutok.pc.tmp lutok.pc + +CLEAN_TARGETS = +DIST_HOOKS = +PHONY_TARGETS = + +examplesdir = $(docdir)/examples +examples_DATA = examples/Makefile +examples_DATA += examples/bindings.cpp +examples_DATA += examples/hello.cpp +examples_DATA += examples/interpreter.cpp +examples_DATA += examples/raii.cpp +EXTRA_DIST += $(examples_DATA) + +if WITH_ATF +tests_DATA = Kyuafile +EXTRA_DIST += $(tests_DATA) + +tests_PROGRAMS = c_gate_test +c_gate_test_SOURCES = c_gate_test.cpp test_utils.hpp +c_gate_test_CXXFLAGS = $(LUTOK_CFLAGS) $(ATF_CXX_CFLAGS) +c_gate_test_LDADD = $(LUTOK_LIBS) $(ATF_CXX_LIBS) + +tests_PROGRAMS += debug_test +debug_test_SOURCES = debug_test.cpp test_utils.hpp +debug_test_CXXFLAGS = $(LUTOK_CFLAGS) $(ATF_CXX_CFLAGS) +debug_test_LDADD = $(LUTOK_LIBS) $(ATF_CXX_LIBS) + +tests_SCRIPTS = examples_test +CLEANFILES += examples_test +EXTRA_DIST += examples_test.sh +examples_test: $(srcdir)/examples_test.sh + $(AM_V_GEN)sed -e 's,__ATF_SH__,$(ATF_SH),g' \ + -e 's,__CXX__,$(CXX),g' \ + -e 's,__EXAMPLESDIR__,$(examplesdir),g' \ + -e 's,__LIBDIR__,$(libdir),g' \ + <$(srcdir)/examples_test.sh >examples_test.tmp; \ + chmod +x examples_test.tmp; \ + rm -f examples_test; \ + mv examples_test.tmp examples_test + +tests_PROGRAMS += exceptions_test +exceptions_test_SOURCES = exceptions_test.cpp +exceptions_test_CXXFLAGS = $(LUTOK_CFLAGS) $(ATF_CXX_CFLAGS) +exceptions_test_LDADD = $(LUTOK_LIBS) $(ATF_CXX_LIBS) + +tests_PROGRAMS += operations_test +operations_test_SOURCES = operations_test.cpp test_utils.hpp +operations_test_CXXFLAGS = $(LUTOK_CFLAGS) $(ATF_CXX_CFLAGS) +operations_test_LDADD = $(LUTOK_LIBS) $(ATF_CXX_LIBS) + +tests_PROGRAMS += stack_cleaner_test +stack_cleaner_test_SOURCES = stack_cleaner_test.cpp test_utils.hpp +stack_cleaner_test_CXXFLAGS = $(LUTOK_CFLAGS) $(ATF_CXX_CFLAGS) +stack_cleaner_test_LDADD = $(LUTOK_LIBS) $(ATF_CXX_LIBS) + +tests_PROGRAMS += state_test +state_test_SOURCES = state_test.cpp test_utils.hpp +state_test_CXXFLAGS = $(LUTOK_CFLAGS) $(ATF_CXX_CFLAGS) +state_test_LDADD = $(LUTOK_LIBS) $(ATF_CXX_LIBS) + +if HAVE_KYUA +check-local: check-kyua +PHONY_TARGETS += check-kyua +check-kyua: + $(TESTS_ENVIRONMENT) kyua test \ + --kyuafile='$(top_srcdir)/Kyuafile' --build-root='$(top_builddir)' + +installcheck-local: installcheck-kyua +PHONY_TARGETS += installcheck-kyua +installcheck-kyua: + cd $(testsdir) && $(TESTS_ENVIRONMENT) kyua test +endif +else +DIST_HOOKS += dist-no-atf +PHONY_TARGETS += dist-no-atf +dist-no-atf: + @echo "Sorry; cannot build a distfile without atf" + @false +endif + +if WITH_DOXYGEN +# This should probably be html-local, but it seems better to generate the +# documentation in all cases to get warnings about missing documentation every +# time the code is modified. (And, after all, the documentation is not +# installed so generating it unconditionally is not a big problem.) +all-local: api-docs/api-docs.tag + +api-docs/api-docs.tag: $(builddir)/Doxyfile $(SOURCES) + $(AM_V_GEN)rm -rf api-docs; \ + mkdir -p api-docs; \ + ${DOXYGEN} $(builddir)/Doxyfile 2>&1 | tee api-docs/warnings; \ + rm -f api-docs/html/installdox +api-docs/html: api-docs/api-docs.tag + +CLEAN_TARGETS += clean-api-docs +clean-api-docs: + rm -rf api-docs + +EXTRA_DIST += api-docs/html +else +DIST_HOOKS += dist-no-doxygen +PHONY_TARGETS += dist-no-doxygen +dist-no-doxygen: + @echo "Sorry; cannot build a distfile without Doxygen" + @false +endif + +install-data-local: install-api-docs +install-api-docs: install-docDATA + @echo "Installing HTML documentation into $(DESTDIR)$(htmldir)" + @if [ -d api-docs/html ]; then \ + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"; \ + ( cd api-docs/html && tar cf - . ) | \ + ( cd "$(DESTDIR)$(htmldir)" && tar xf - ); \ + elif [ -d "$(srcdir)/api-docs/html" ]; then \ + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"; \ + ( cd "$(srcdir)/api-docs/html" && tar cf - . ) | \ + ( cd "$(DESTDIR)$(htmldir)" && tar xf - ); \ + else \ + echo "Doxygen not installed and prebuilt documents not found"; \ + fi + +uninstall-local: uninstall-api-docs +uninstall-api-docs: + find "$(DESTDIR)$(htmldir)" -type d -exec chmod 755 {} \; + rm -rf "$(DESTDIR)$(htmldir)" + +clean-local: $(CLEAN_TARGETS) + +PHONY_TARGETS += clean-all +clean-all: + GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh + +dist-hook: $(DIST_HOOKS) + +.PHONY: ${PHONY_TARGETS} Added: vendor/lutok/dist/NEWS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/NEWS Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,68 @@ +Changes in version 0.4 +====================== + +Released on 2013/12/07. + +* Cope with the lack of AM_PROG_AR in configure.ac, which first + appeared in Automake 1.11.2. Fixes a problem in Ubuntu 10.04 + LTS, which appears stuck in 1.11.1. + +* Stopped shipping an Atffile. The only supported way to run the tests + is via Kyua. + +Interface changes: + +* Issue 5: New methods added to the state class: open_all. + +* Removed default parameter values from all state methods and all + standalone operations. It is often unclear what the default value is + given that it depends on the specific Lua operation. Being explicit + on the caller side is clearer. + +* Modified operations do_file and do_string to support passing a number + of arguments to the loaded chunks and an error handler to the backing + pcall call. + + +Changes in version 0.3 +====================== + +Released on 2013/06/14. + +* Issue 1: Added support for Lua 5.2 while maintaining support for Lua + 5.1. Applications using Lutok can be modified to use the new + interface in this new version and thus support both Lua releases. + However, because of incompatible changes to the Lua API, this release + of Lutok is incompatible with previous releases as well. + +* Issue 3: Tweaked configure to look for Lua using the pkg-config names + lua-5.2 and lua-5.1. These are the names used by FreeBSD. + +Interface changes: + +* New global constants: registry_index. + +* New methods added to the state class: get_global_table. + +* Removed global constants: globals_index. + + +Changes in version 0.2 +====================== + +Released on 2012/05/30. + +* New global constants: globals_index. + +* New methods added to the state class: get_metafield, get_metatable, + insert, push_value, raw_get and raw_set. + +* Acknowledged that Lua 5.2 is currently not supported. + + +Changes in version 0.1 +====================== + +Released on 2012/01/29. + +* This is the first public release of the Lutok package. Added: vendor/lutok/dist/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/README Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,27 @@ +Lutok is a lightweight C++ API library for Lua. + +Lutok provides thin C++ wrappers around the Lua C API to ease the +interaction between C++ and Lua. These wrappers make intensive use of +RAII to prevent resource leakage, expose C++-friendly data types, report +errors by means of exceptions and ensure that the Lua stack is always +left untouched in the face of errors. The library also provides a small +subset of miscellaneous utility functions built on top of the wrappers. + +Lutok focuses on providing a clean and safe C++ interface; the drawback +is that it is not suitable for performance-critical environments. In +order to implement error-safe C++ wrappers on top of a Lua C binary +library, Lutok adds several layers or abstraction and error checking +that go against the original spirit of the Lua C API and thus degrade +performance. + +For further information on the contents of this distribution file, +please refer to the following other documents: + +* AUTHORS: List of authors and contributors to this project. +* COPYING: License information. +* INSTALL: Compilation and installation instructions. +* NEWS: List of major changes between formal releases. + +For general project information, please visit: + + https://github.com/jmmv/lutok/ Added: vendor/lutok/dist/admin/.gitignore ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/admin/.gitignore Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,8 @@ +ar-lib +compile +config.guess +config.sub +depcomp +install-sh +ltmain.sh +missing Added: vendor/lutok/dist/admin/clean-all.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/admin/clean-all.sh Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,90 @@ +#! /bin/sh +# Copyright 2010 Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Google Inc. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Prog_Name=${0##*/} + +if [ ! -f ./state.hpp ]; then + echo "${Prog_Name}: must be run from the source top directory" 1>&2 + exit 1 +fi + +if [ ! -f configure ]; then + echo "${Prog_Name}: configure not found; nothing to clean?" 1>&2 + exit 1 +fi + +[ -f Makefile ] || ./configure +make distclean + +# Top-level directory. +rm -f Makefile.in +rm -f aclocal.m4 +rm -rf autom4te.cache +rm -f config.h.in +rm -f configure +rm -f mkinstalldirs +rm -f lutok-*.tar.gz + +# admin directory. +rm -f admin/compile +rm -f admin/config.guess +rm -f admin/config.sub +rm -f admin/depcomp +rm -f admin/install-sh +rm -f admin/ltmain.sh +rm -f admin/mdate-sh +rm -f admin/missing +rm -f admin/texinfo.tex + +# bootstrap directory. +rm -f bootstrap/package.m4 +rm -f bootstrap/testsuite + +# doc directory. +rm -f doc/*.info +rm -f doc/stamp-vti +rm -f doc/version.texi + +# m4 directory. +rm -f m4/libtool.m4 +rm -f m4/lt*.m4 + +# Files and directories spread all around the tree. +find . -name '#*' | xargs rm -rf +find . -name '*~' | xargs rm -rf +find . -name .deps | xargs rm -rf +find . -name .gdb_history | xargs rm -rf +find . -name .libs | xargs rm -rf +find . -name .tmp | xargs rm -rf + +# Show remaining files. +if [ -n "${GIT}" ]; then + echo ">>> untracked and ignored files" + "${GIT}" status --porcelain --ignored | grep -E '^(\?\?|!!)' || true +fi Added: vendor/lutok/dist/admin/travis-build.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/admin/travis-build.sh Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,51 @@ +#! /bin/sh +# Copyright 2014 Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Google Inc. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -e -x + +if [ -d /usr/local/share/aclocal ]; then + autoreconf -isv -I/usr/local/share/aclocal +else + autoreconf -isv +fi +./configure + +archflags= +[ "${ARCH?}" != i386 ] || archflags=-m32 + +f= +f="${f} CPPFLAGS='-I/usr/local/include'" +f="${f} CXX='${CXX} ${archflags}'" +f="${f} LDFLAGS='-L/usr/local/lib -Wl,-R/usr/local/lib'" +f="${f} PKG_CONFIG_PATH='/usr/local/lib/pkgconfig'" +if [ "${AS_ROOT:-no}" = yes ]; then + sudo -H PATH="${PATH}" make distcheck DISTCHECK_CONFIGURE_FLAGS="${f}" +else + make distcheck DISTCHECK_CONFIGURE_FLAGS="${f}" +fi Added: vendor/lutok/dist/admin/travis-install-deps.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/admin/travis-install-deps.sh Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,109 @@ +#! /bin/sh +# Copyright 2014 Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Google Inc. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -e -x + +install_deps() { + sudo apt-get update -qq + + local pkgsuffix= + local packages= + if [ "${ARCH?}" = i386 ]; then + pkgsuffix=:i386 + packages="${packages} gcc-multilib" + packages="${packages} g++-multilib" + fi + packages="${packages} doxygen" + packages="${packages} gdb" + packages="${packages} liblua5.2-0${pkgsuffix}" + packages="${packages} liblua5.2-dev${pkgsuffix}" + packages="${packages} libsqlite3-0${pkgsuffix}" + packages="${packages} libsqlite3-dev${pkgsuffix}" + packages="${packages} pkg-config${pkgsuffix}" + packages="${packages} sqlite3" + sudo apt-get install -y ${packages} +} + +install_from_github() { + local project="${1}"; shift + local name="${1}"; shift + local release="${1}"; shift + + local distname="${name}-${release}" + + local baseurl="https://github.com/jmmv/${project}" + wget --no-check-certificate \ + "${baseurl}/releases/download/${distname}/${distname}.tar.gz" + tar -xzvf "${distname}.tar.gz" + + local archflags= + [ "${ARCH?}" != i386 ] || archflags=-m32 + + cd "${distname}" + ./configure \ + --disable-developer \ + --without-atf \ + --without-doxygen \ + CFLAGS="${archflags}" \ + CPPFLAGS="-I/usr/local/include" \ + CXXFLAGS="${archflags}" \ + LDFLAGS="-L/usr/local/lib -Wl,-R/usr/local/lib" \ + PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" + make + sudo make install + cd - + + rm -rf "${distname}" "${distname}.tar.gz" +} + +install_from_bintray() { + case "${ARCH?}" in + amd64) + name="20160204-usr-local-kyua-ubuntu-12-04-amd64-${CC?}.tar.gz" + ;; + i386) + name="20160714-usr-local-kyua-ubuntu-12-04-i386-${CC?}.tar.gz" + ;; + *) + echo "ERROR: Unknown ARCH value ${ARCH}" 1>&2 + exit 1 + ;; + esac + wget "http://dl.bintray.com/jmmv/kyua/${name}" || return 1 + sudo tar -xzvp -C / -f "${name}" + rm -f "${name}" +} + +install_deps +if ! install_from_bintray; then + install_from_github atf atf 0.20 + install_from_github lutok lutok 0.4 + install_from_github kyua kyua-testers 0.2 + install_from_github kyua kyua-cli 0.8 +fi Added: vendor/lutok/dist/c_gate.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lutok/dist/c_gate.cpp Tue Mar 17 16:48:52 2020 (r359039) @@ -0,0 +1,76 @@ +// Copyright 2011 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "c_gate.hpp" +#include "state.ipp" + + +/// Creates a new gateway to an existing C++ Lua state. +/// +/// \param state_ The state to connect to. This object must remain alive while +/// the newly-constructed state_c_gate is alive. +lutok::state_c_gate::state_c_gate(state& state_) : + _state(state_) +{ +} + + +/// Destructor. +/// +/// Destroying this object has no implications on the life cycle of the Lua +/// state. Only the corresponding state object controls when the Lua state is +/// closed. +lutok::state_c_gate::~state_c_gate(void) +{ +} + + +/// Creates a C++ state for a C Lua state. +/// +/// \warning The created state object does NOT own the C state. You must take +/// care to properly destroy the input lua_State when you are done with it to +/// not leak resources. +/// +/// \param raw_state The raw state to wrap temporarily. +/// +/// \return The wrapped state without strong ownership on the input state. +lutok::state *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***