Add reachover build files for the newly-imported Lutok.

This commit is contained in:
jmmv 2013-02-16 21:29:45 +00:00
parent 56910be779
commit 41ab123075
14 changed files with 341 additions and 0 deletions

5
external/bsd/lutok/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:45 jmmv Exp $
SUBDIR= lib .WAIT share tests
.include <bsd.subdir.mk>

5
external/bsd/lutok/lib/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:46 jmmv Exp $
SUBDIR= liblutok
.include <bsd.subdir.mk>

View File

@ -0,0 +1,60 @@
# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:46 jmmv Exp $
#NOLINT= # defined
.include <bsd.own.mk>
LIB= lutok
LIBISCXX= yes
LIBDPLIBS+= lua ${.CURDIR}/../../../../mit/lua/lib/liblua
.if ${HAVE_GCC} == 4
LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../gnu/lib/libstdc++-v3_4
.else
LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../external/gpl3/gcc/lib/libstdc++-v3
.endif
LIBDPLIBS+= m ${.CURDIR}/../../../../../lib/libm
SRCDIR= ${NETBSDSRCDIR}/external/bsd/lutok/dist
.PATH: ${SRCDIR}
CPPFLAGS+= -I${.CURDIR}
CPPFLAGS+= -I.
CPPFLAGS+= -DHAVE_CONFIG_H
WARNS?= 4
SRCS= c_gate.cpp \
debug.cpp \
exceptions.cpp \
operations.cpp \
stack_cleaner.cpp \
state.cpp
INCS= c_gate.hpp \
debug.hpp \
exceptions.hpp \
operations.hpp \
stack_cleaner.hpp \
state.hpp \
state.ipp
INCSDIR= /usr/include/lutok
.if ${MKSHARE} != "no"
FILES+= lutok.pc
FILESDIR= /usr/lib/pkgconfig
realall: lutok.pc
lutok.pc: Makefile lutok.pc.in
${TOOL_SED} \
-e 's,__INCLUDEDIR__,/usr/include,g' \
-e 's,__LIBDIR__,/usr/lib,g' \
-e 's,__LUA_CFLAGS__,-I/usr/include,g' \
-e 's,__LUA_LIBS,-llua,g' \
-e 's,__VERSION__,0.2,g' \
<${SRCDIR}/lutok.pc.in >lutok.pc
CLEANFILES+= lutok.pc
.endif
.include <bsd.lib.mk>

View File

@ -0,0 +1,63 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "lutok"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "lutok-discuss@googlegroups.com"
/* Define to the full name of this package. */
#define PACKAGE_NAME "Lutok"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "Lutok 0.2"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "lutok"
/* Define to the home page for this package. */
#define PACKAGE_URL "http://code.google.com/p/lutok/"
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.2"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "0.2"

View File

@ -0,0 +1,3 @@
# $NetBSD: shlib_version,v 1.1 2013/02/16 21:29:47 jmmv Exp $
major=1
minor=0

107
external/bsd/lutok/prepare-import.sh vendored Executable file
View File

@ -0,0 +1,107 @@
#!/bin/sh
# $NetBSD: prepare-import.sh,v 1.1 2013/02/16 21:29:45 jmmv Exp $
#
# Use this script to recreate the 'dist' subdirectory from a newly released
# distfile. The script takes care of unpacking the distfile, removing any
# files that are not relevant to NetBSD and checking if there are any new
# files in the new release that need to be addressed.
#
set -e
ProgName=${0##*/}
CLEAN_PATTERNS=
CLEAN_PATTERNS="${CLEAN_PATTERNS} *.m4"
CLEAN_PATTERNS="${CLEAN_PATTERNS} INSTALL TODO"
CLEAN_PATTERNS="${CLEAN_PATTERNS} Doxyfile*"
CLEAN_PATTERNS="${CLEAN_PATTERNS} Makefile* */Makefile* */*/Makefile*"
CLEAN_PATTERNS="${CLEAN_PATTERNS} admin"
CLEAN_PATTERNS="${CLEAN_PATTERNS} api-docs"
CLEAN_PATTERNS="${CLEAN_PATTERNS} config.h.in"
CLEAN_PATTERNS="${CLEAN_PATTERNS} configure*"
CLEAN_PATTERNS="${CLEAN_PATTERNS} include"
CLEAN_PATTERNS="${CLEAN_PATTERNS} m4"
err() {
echo "${ProgName}:" "${@}" 1>&2
exit 1
}
log() {
echo "${ProgName}:" "${@}"
}
backup_dist() {
if [ -d dist.old ]; then
log "Removing dist; dist.old exists"
rm -rf dist
else
log "Backing up dist as dist.old"
mv dist dist.old
fi
}
extract_distfile() {
local distfile="${1}"; shift
local distname="${1}"; shift
log "Extracting ${distfile}"
tar -xzf "${distfile}"
[ -d "${distname}" ] || err "Distfile did not create ${distname}"
log "Renaming ${distname} to dist"
mv "${distname}" dist
}
get_distname() {
local distfile="${1}"; shift
basename "${distfile}" | sed -e 's,\.tar.*,,'
}
cleanup_dist() {
log "Removing unnecessary files from dist"
( cd dist && rm -rf ${CLEAN_PATTERNS} )
}
diff_dirs() {
local old_dir="${1}"; shift
local new_dir="${1}"; shift
local old_list=$(mktemp -t lutok-import.XXXXXX)
local new_list=$(mktemp -t lutok-import.XXXXXX)
local diff=$(mktemp -t lutok-import.XXXXXX)
trap "rm -f '${old_list}' '${new_list}' '${diff}'; exit 1" \
HUP INT QUIT TERM
( cd "${old_dir}" && find . | sort >>"${old_list}" )
( cd "${new_dir}" && find . | sort >>"${new_list}" )
diff -u "${old_list}" "${new_list}" | grep '^+\.' >>"${diff}" || true
if [ -s "${diff}" ]; then
log "New files found"
diff -u "${old_list}" "${new_list}" | grep '^+\.'
log "Check if any files have to be cleaned up and update" \
"the prepare-import.sh script accordingly"
else
log "No new files; all good!"
fi
rm -f "${old_list}" "${new_list}" "${diff}"
}
main() {
[ ${#} -eq 1 ] || err "Must provide a distfile name"
local distfile="${1}"; shift
[ -f Makefile -a -f prepare-import.sh ] || \
err "Must be run from the src/external/bsd/lutok subdirectory"
local distname="$(get_distname ${distfile})"
backup_dist
extract_distfile "${distfile}" "${distname}"
cleanup_dist
diff_dirs dist.old dist
}
main "${@}"

10
external/bsd/lutok/share/Makefile vendored Normal file
View File

@ -0,0 +1,10 @@
# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:48 jmmv Exp $
.include <bsd.own.mk>
.if ${MKSHARE} != "no" || \
make(clean) || make(cleandir) || make(distclean) || make(obj)
SUBDIR= examples
.endif
.include <bsd.subdir.mk>

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:48 jmmv Exp $
SUBDIR= lutok
.include <bsd.subdir.mk>

View File

@ -0,0 +1,15 @@
# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:48 jmmv Exp $
.include <bsd.own.mk>
SRCDIR= ${NETBSDSRCDIR}/external/bsd/lutok/dist
.PATH: ${SRCDIR}/examples
FILESDIR= /usr/share/examples/lutok
FILESMODE= 444
FILES= bindings.cpp \
hello.cpp \
interpreter.cpp \
raii.cpp
.include <bsd.prog.mk>

5
external/bsd/lutok/tests/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:49 jmmv Exp $
SUBDIR= lib share
.include <bsd.subdir.mk>

5
external/bsd/lutok/tests/lib/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:49 jmmv Exp $
SUBDIR= liblutok
.include <bsd.subdir.mk>

View File

@ -0,0 +1,25 @@
# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:50 jmmv Exp $
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/lib/liblutok
SRCDIR= ${NETBSDSRCDIR}/external/bsd/lutok/dist
.PATH: ${SRCDIR}
CPPFLAGS+= -DHAVE_CONFIG_H
CPPFLAGS+= -I${NETBSDSRCDIR}/lib/liblutok
FILESDIR= ${TESTSDIR}
TESTS_CXX= c_gate_test \
debug_test \
exceptions_test \
operations_test \
stack_cleaner_test \
state_test
LDADD+= -llutok
DPADD+= ${LIBLUTOK}
.include <bsd.test.mk>

10
external/bsd/lutok/tests/share/Makefile vendored Normal file
View File

@ -0,0 +1,10 @@
# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:50 jmmv Exp $
.include <bsd.own.mk>
.if ${MKSHARE} != "no" || \
make(clean) || make(cleandir) || make(distclean) || make(obj)
SUBDIR= lutok
.endif
.include <bsd.subdir.mk>

View File

@ -0,0 +1,23 @@
# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:51 jmmv Exp $
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/share/examples/lutok
SRCDIR= ${NETBSDSRCDIR}/external/bsd/lutok/dist
.PATH: ${SRCDIR}
FILESDIR= ${TESTSDIR}
TESTS_SH= examples_test
TESTS_SH_SRC_examples_test= examples_test.patched
examples_test.patched: examples_test.sh
${TOOL_SED} \
-e 's,__ATF_SH__,/bin/sh,g' \
-e 's,__EXAMPLESDIR__,/usr/share/examples/lutok,g' \
-e 's,__LIBDIR__,/usr/lib,g' \
<${SRCDIR}/examples_test.sh >examples_test.patched
CLEANFILES+= examples_test.patched
.include <bsd.test.mk>