mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bernhard Sessler <bernhard.sessler@corscience.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/2] tntnet: Add new package
Date: Wed,  5 Feb 2014 13:36:34 +0100	[thread overview]
Message-ID: <1391603794-25701-2-git-send-email-bernhard.sessler@corscience.de> (raw)
In-Reply-To: <1391603794-25701-1-git-send-email-bernhard.sessler@corscience.de>

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 <bernhard.sessler@corscience.de>
---
 ...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 <bernhard.sessler@corscience.de>
+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 <bernhard.sessler@corscience.de>
+---
+ 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 <bernhard.sessler@corscience.de>
+#
+# 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 <bernhard.sessler@corscience.de>")
+	@$(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
ptxdist@pengutronix.de

  reply	other threads:[~2014-02-05 12:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05 12:36 [ptxdist] [PATCH 1/2] cxxtools: " Bernhard Sessler
2014-02-05 12:36 ` Bernhard Sessler [this message]
2014-02-12  8:56 ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391603794-25701-2-git-send-email-bernhard.sessler@corscience.de \
    --to=bernhard.sessler@corscience.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox