Tntnet is a web application framework for C++. It can generate dynamic
content via pre-compiled C++ modules. These modules can either be
loaded by the standalone tntnet server executable or built to actually
_be_ standalone server executables.

Signed-off-by: Bernhard Sessler <[email protected]>
---
 ...Include-unistd.h-for-read-and-write-calls.patch | 21 ++++++
 patches/tntnet-2.2.1/series                        |  4 ++
 rules/tntnet.in                                    | 51 +++++++++++++
 rules/tntnet.make                                  | 83 ++++++++++++++++++++++
 4 files changed, 159 insertions(+)
 create mode 100644 
patches/tntnet-2.2.1/0001-gnutls.cpp-Include-unistd.h-for-read-and-write-calls.patch
 create mode 100644 patches/tntnet-2.2.1/series
 create mode 100644 rules/tntnet.in
 create mode 100644 rules/tntnet.make

diff --git 
a/patches/tntnet-2.2.1/0001-gnutls.cpp-Include-unistd.h-for-read-and-write-calls.patch
 
b/patches/tntnet-2.2.1/0001-gnutls.cpp-Include-unistd.h-for-read-and-write-calls.patch
new file mode 100644
index 0000000..a8b4428
--- /dev/null
+++ 
b/patches/tntnet-2.2.1/0001-gnutls.cpp-Include-unistd.h-for-read-and-write-calls.patch
@@ -0,0 +1,21 @@
+From: Bernhard Sessler <[email protected]>
+Date: Tue, 4 Feb 2014 15:19:48 +0100
+Subject: [PATCH] gnutls.cpp: Include unistd.h for ::read() and ::write() calls
+
+Signed-off-by: Bernhard Sessler <[email protected]>
+---
+ framework/common/gnutls.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/framework/common/gnutls.cpp b/framework/common/gnutls.cpp
+index f1c019b..8b23928 100644
+--- a/framework/common/gnutls.cpp
++++ b/framework/common/gnutls.cpp
+@@ -31,6 +31,7 @@
+ #include "tnt/tntnet.h"
+ #include <cxxtools/mutex.h>
+ #include <cxxtools/log.h>
++#include <unistd.h>
+ #include <sstream>
+ #include <sys/poll.h>
+ #include <errno.h>
diff --git a/patches/tntnet-2.2.1/series b/patches/tntnet-2.2.1/series
new file mode 100644
index 0000000..0511405
--- /dev/null
+++ b/patches/tntnet-2.2.1/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-gnutls.cpp-Include-unistd.h-for-read-and-write-calls.patch
+# 767fa92bc5a4cfb026e5a51db92fc9f2  - git-ptx-patches magic
diff --git a/rules/tntnet.in b/rules/tntnet.in
new file mode 100644
index 0000000..d6d54e5
--- /dev/null
+++ b/rules/tntnet.in
@@ -0,0 +1,51 @@
+## SECTION=networking
+
+menuconfig TNTNET
+       tristate
+       prompt "tntnet                        "
+       select LIBC_PTHREAD
+       select LIBC_DL
+       select GCCLIBS_GCC_S
+       select GCCLIBS_CXX
+       select ZLIB
+       select CXXTOOLS
+       select OPENSSL if TNTNET_SSL_OPENSSL
+       select GNUTLS if TNTNET_SSL_GNUTLS
+       help
+         web application server for C++
+
+if TNTNET
+
+comment "build options  ---"
+
+choice # SSL
+       prompt "SSL support"
+       default TNTNET_SSL_NONE
+
+       config TNTNET_SSL_OPENSSL
+               bool
+               prompt "OpenSSL"
+               help
+                 Tntnet uses OpenSSL
+
+       config TNTNET_SSL_GNUTLS
+               bool
+               prompt "GNU TLS"
+               help
+                 Tntnet uses GNU TLS
+
+       config TNTNET_SSL_NONE
+               bool
+               prompt "none"
+               help
+                 No SSL support for tntnet
+
+endchoice # SSL
+
+config TNTNET_SERVER
+       bool "Build server executable"
+       depends on TNTNET
+       help
+         Build and install the standalone server executable
+
+endif # TNTNET
diff --git a/rules/tntnet.make b/rules/tntnet.make
new file mode 100644
index 0000000..421b4fc
--- /dev/null
+++ b/rules/tntnet.make
@@ -0,0 +1,83 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Bernhard Seßler <[email protected]>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_TNTNET) += tntnet
+
+#
+# Paths and names
+#
+TNTNET_VERSION := 2.2.1
+TNTNET_MD5             := febe799675c1b8b2f7259bad30cf6f23
+TNTNET                 := tntnet-$(TNTNET_VERSION)
+TNTNET_SUFFIX  := tar.gz
+TNTNET_URL             := 
http://www.tntnet.org/download/$(TNTNET).$(TNTNET_SUFFIX)
+TNTNET_SOURCE  := $(SRCDIR)/$(TNTNET).$(TNTNET_SUFFIX)
+TNTNET_DIR             := $(BUILDDIR)/$(TNTNET)
+TNTNET_LICENSE := LGPLv2.1
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+TNTNET_CONF_ENV                := $(CROSS_ENV)
+TNTNET_CONF_TOOL       := autoconf
+TNTNET_CONF_OPT                := $(CROSS_AUTOCONF_USR) \
+       --disable-static \
+       --disable-unittest \
+       --disable-dependency-tracking \
+       --with-sdk=no \
+       --with-demos=no \
+       --with-stressjob=no \
+       --with-epoll=yes \
+       --with-sendfile=yes
+
+ifdef PTXCONF_TNTNET_SSL_NONE
+TNTNET_CONF_OPT                += --with-ssl=no
+endif
+ifdef PTXCONF_TNTNET_SSL_OPENSSL
+TNTNET_CONF_OPT                += --with-ssl=openssl
+endif
+ifdef PTXCONF_TNTNET_SSL_GNUTLS
+TNTNET_CONF_OPT                += --with-ssl=gnutls
+endif
+
+ifdef PTXCONF_TNTNET_SERVER
+TNTNET_CONF_OPT                += --with-server=yes
+else
+TNTNET_CONF_OPT                += --with-server=no
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tntnet.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, tntnet)
+       @$(call install_fixup, tntnet,PRIORITY,optional)
+       @$(call install_fixup, tntnet,SECTION,base)
+       @$(call install_fixup, tntnet,AUTHOR,"Bernhard Seßler 
<[email protected]>")
+       @$(call install_fixup, tntnet,DESCRIPTION,missing)
+
+       @$(call install_lib, tntnet, 0, 0, 0644, libtntnet)
+
+ifdef PTXCONF_TNTNET_SERVER
+       @$(call install_copy, tntnet, 0, 0, 0755, -, /usr/bin/tntnet)
+endif
+
+       @$(call install_finish, tntnet)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
1.8.3.2


-- 
ptxdist mailing list
[email protected]

Reply via email to