Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/lutok Add reachover build files for the newly-i...



details:   https://anonhg.NetBSD.org/src/rev/44e4662685af
branches:  trunk
changeset: 784988:44e4662685af
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Sat Feb 16 21:29:45 2013 +0000

description:
Add reachover build files for the newly-imported Lutok.

diffstat:

 external/bsd/lutok/Makefile                      |    5 +
 external/bsd/lutok/lib/Makefile                  |    5 +
 external/bsd/lutok/lib/liblutok/Makefile         |   60 ++++++++++++
 external/bsd/lutok/lib/liblutok/config.h         |   63 +++++++++++++
 external/bsd/lutok/lib/liblutok/shlib_version    |    3 +
 external/bsd/lutok/prepare-import.sh             |  107 +++++++++++++++++++++++
 external/bsd/lutok/share/Makefile                |   10 ++
 external/bsd/lutok/share/examples/Makefile       |    5 +
 external/bsd/lutok/share/examples/lutok/Makefile |   15 +++
 external/bsd/lutok/tests/Makefile                |    5 +
 external/bsd/lutok/tests/lib/Makefile            |    5 +
 external/bsd/lutok/tests/lib/liblutok/Makefile   |   25 +++++
 external/bsd/lutok/tests/share/Makefile          |   10 ++
 external/bsd/lutok/tests/share/lutok/Makefile    |   23 ++++
 14 files changed, 341 insertions(+), 0 deletions(-)

diffs (truncated from 397 to 300 lines):

diff -r ab57be0999e6 -r 44e4662685af external/bsd/lutok/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/lutok/Makefile       Sat Feb 16 21:29:45 2013 +0000
@@ -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>
diff -r ab57be0999e6 -r 44e4662685af external/bsd/lutok/lib/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/lutok/lib/Makefile   Sat Feb 16 21:29:45 2013 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:46 jmmv Exp $
+
+SUBDIR= liblutok
+
+.include <bsd.subdir.mk>
diff -r ab57be0999e6 -r 44e4662685af external/bsd/lutok/lib/liblutok/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/lutok/lib/liblutok/Makefile  Sat Feb 16 21:29:45 2013 +0000
@@ -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>
diff -r ab57be0999e6 -r 44e4662685af external/bsd/lutok/lib/liblutok/config.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/lutok/lib/liblutok/config.h  Sat Feb 16 21:29:45 2013 +0000
@@ -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@localhost"
+
+/* 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"
diff -r ab57be0999e6 -r 44e4662685af external/bsd/lutok/lib/liblutok/shlib_version
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/lutok/lib/liblutok/shlib_version     Sat Feb 16 21:29:45 2013 +0000
@@ -0,0 +1,3 @@
+# $NetBSD: shlib_version,v 1.1 2013/02/16 21:29:47 jmmv Exp $
+major=1
+minor=0
diff -r ab57be0999e6 -r 44e4662685af external/bsd/lutok/prepare-import.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/lutok/prepare-import.sh      Sat Feb 16 21:29:45 2013 +0000
@@ -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 "${@}"
diff -r ab57be0999e6 -r 44e4662685af external/bsd/lutok/share/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/lutok/share/Makefile Sat Feb 16 21:29:45 2013 +0000
@@ -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>
diff -r ab57be0999e6 -r 44e4662685af external/bsd/lutok/share/examples/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/lutok/share/examples/Makefile        Sat Feb 16 21:29:45 2013 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:48 jmmv Exp $
+
+SUBDIR= lutok
+
+.include <bsd.subdir.mk>
diff -r ab57be0999e6 -r 44e4662685af external/bsd/lutok/share/examples/lutok/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/lutok/share/examples/lutok/Makefile  Sat Feb 16 21:29:45 2013 +0000
@@ -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



Home | Main Index | Thread Index | Old Index