diff options
Diffstat (limited to 'dev-libs/tntnet')
-rw-r--r-- | dev-libs/tntnet/Manifest | 8 | ||||
-rw-r--r-- | dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch | 65 | ||||
-rw-r--r-- | dev-libs/tntnet/files/tntnet.initd | 29 | ||||
-rw-r--r-- | dev-libs/tntnet/metadata.xml | 11 | ||||
-rw-r--r-- | dev-libs/tntnet/tntnet-2.2.1-r1.ebuild | 90 | ||||
-rw-r--r-- | dev-libs/tntnet/tntnet-2.2.1.ebuild | 87 |
6 files changed, 290 insertions, 0 deletions
diff --git a/dev-libs/tntnet/Manifest b/dev-libs/tntnet/Manifest new file mode 100644 index 000000000000..d59213c4154f --- /dev/null +++ b/dev-libs/tntnet/Manifest @@ -0,0 +1,8 @@ +AUX tntnet-2.0-zlib-minizip.patch 1432 SHA256 5ce9dca08f393da15eca1187133d1430b2b7594000891a13fdb31f9c8a88263a SHA512 13909d58fa2ea73c074816498faaa94dadc3fb750179b8f290600eb8a1adaf6a45464d0ee412ea9d038ab5e524a13da0e44fb07424388f28f16df538845dda07 WHIRLPOOL 619e31db6618a911cbb1c5455d448702c64e1e531545cd2292fbcf055f58e055940fca4fe4d81782309d158e8abeff79c36a4c66ee50d5f44a498a14c80f513f +AUX tntnet.initd 669 SHA256 2ac07defe07e95acfa89f08c8b4659ec2777e8d4fb243649fa76b73dba81ce14 SHA512 f67aa89030da69a7278af9c2b7c2b887373be54e711b31fc362df938baf4c5d09df6bc04568ef70a9eacd73582bb58891a9651782d29392cad3d0a1cd0bb8ccf WHIRLPOOL fba4f3bc5402f42f3f26fa27b37e0038a90d70c6c5c9d4854f097e6bc433a726fc585bf65ab6cf25e2efcdb45a92858375987507d6439182810ec73536183942 +DIST tntnet-2.2.1.tar.gz 1127500 SHA256 c83170d08ef04c5868051e1c28c74b9562fe71e9e8263828e755ad5bd3547521 SHA512 78a26713498fd6eabb0b4a247bb20c130ce967ed22ce5c54da4b1300534dd40155aa62a2dc770be4eca720cadeceac283978a5dc3ce418728994af72e4d8eac1 WHIRLPOOL 7429d49b0c48456fb1540c1528cb4edfd629f94a0719688efd771ea85f027d6b8c2fb3d20be3e8f17543339d0cbdf20df3c3c5799351070c8665a5b022bbccf7 +EBUILD tntnet-2.2.1-r1.ebuild 1889 SHA256 7a33daae4f3bbd9befad35874a4aed3af4359bf6992b9cdae670eaa3241b9cf0 SHA512 c74171d0347eeaa84b64c988c06ac40cbe56c0b5df2e55ab946ca10e1639ed96d1e2ea279d2229a8f3c29cbf3cb4823ef961ce3ec62f3681d72a57c19e4e8272 WHIRLPOOL 3625c9fdb6b13b7bf8047f0e08b89980167d622f0821dfd284566e8258bb1737f436e740141b9f66baa4c0991b6757cea1165f229bb4ecff588f0df80c741559 +EBUILD tntnet-2.2.1.ebuild 1819 SHA256 7928ed279644433860a0c32c07fd85bb49e66a5e82025f68339d16c6a0de0086 SHA512 deafb4fa61fdd887da29bb4e62d57eb1e0d6d88ac0a6227a39454285d14689ed92adec2c2d38d84e37ab2d03b374269486fc4a5e5f7da8c388f54c7281ba344b WHIRLPOOL 4cbe547f222c894733aaaea7201fb28fb917c6d6a46dcfaa475ad45e9eb040eb61518d2943d2664500aa3f2b4350cc740be29e5f5d0736746b29b8a6d6b44f50 +MISC ChangeLog 3158 SHA256 4b16210a238e1161ef57e445bafc2024800f379794afa447666e8502c94e2ae4 SHA512 d2468bf416f84f7bbca5a2b29403753b6821c85cefd356453eed11ebca4335befb2e5e8b179473825a613b068bc6475c1c75b938e8e97e327c7ba45f069c6911 WHIRLPOOL 70b79e0d20ae44a7a252bb0ad16e552ddf77a40d0ea376d802f32e49a63bd7d37f174f91b2d6cb7538466460b50ee9220cee02d44452fbbb87570a8e7b73124d +MISC ChangeLog-2015 5038 SHA256 d32f1f8bf1d2b4c313d84ce4f29c3c806f4fdb418a9b92cfe8ad3b4c743ac15d SHA512 5dbb91e12da2a64bf828142679c91aa0ea1426bd8da06989f044c8bc8b9bdbce6eebd5b146115db2fe80046bdf518098229065b21f004083ca0a5d9e07c2435d WHIRLPOOL 7ab220e2f0f94f88360e99740ffb60799ac0f9ca57ca4990d4594024373179e61bf99e8edae496310cc6790ac403a3ae08fc46948b1bf66bb2e22ec09781ee98 +MISC metadata.xml 555 SHA256 aa8752ef19870a1f1dd2f852ab1f417b2bb62e5c273cf9c2519f3a8a637bfb57 SHA512 060415a8e9aa8550ba30ef7f987ef5862e03fc9abd905eaec60715401279ed92d467b116cdce70626a3bfb3ca58d0d999611da23b09726a78ad47d553f97d4e4 WHIRLPOOL 2868b4324ddbf8b3437e362fcb5ed639e35762bfd00f0aa26859c85c130cdbb14e494739328cd0762a2014af742ae7d2be46119618132cf656e756ffdbb6de67 diff --git a/dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch b/dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch new file mode 100644 index 000000000000..07b4836319d4 --- /dev/null +++ b/dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch @@ -0,0 +1,65 @@ +--- a/configure.in ++++ b/configure.in +@@ -18,6 +18,7 @@ + + AC_PROG_CXX + AC_PROG_LIBTOOL ++PKG_PROG_PKG_CONFIG + + AC_LANG(C++) + ACX_PTHREAD +@@ -25,6 +26,12 @@ + AC_CHECK_HEADER([zlib.h], , AC_MSG_ERROR([zlib not found])) + AC_CHECK_HEADER([cxxtools/net/tcpsocket.h], , AC_MSG_ERROR([cxxtools headers not found])) + ++PKG_CHECK_MODULES([MINIZIP], [minizip], ++ [HAVE_MINIZIP=true], [HAVE_MINIZIP=false]) ++AC_SUBST([MINIZIP_CFLAGS]) ++AC_SUBST([MINIZIP_LIBS]) ++AM_CONDITIONAL([HAVE_MINIZIP], [test $HAVE_MINIZIP = true]) ++ + AC_ARG_WITH([epoll], + AS_HELP_STRING([--with-epoll=yes|no|probe], [use epoll]), + [epoll_option=$withval], +--- a/framework/common/Makefile.am ++++ b/framework/common/Makefile.am +@@ -23,7 +23,6 @@ libtntnet_la_SOURCES = \ + httpparser.cpp \ + httprequest.cpp \ + httpreply.cpp \ +- ioapi.c \ + job.cpp \ + langlib.cpp \ + listener.cpp \ +@@ -41,16 +40,13 @@ libtntnet_la_SOURCES = \ + stringlessignorecase.cpp \ + tntconfig.cpp \ + tntnet.cpp \ +- unzip.c \ + unzipfile.cpp \ + urlescostream.cpp \ + urlmapper.cpp \ + util.cpp \ + worker.cpp \ + zdata.cpp \ +- crypt.h \ +- ioapi.h \ +- unzip.h ++ crypt.h + + nobase_include_HEADERS = \ + tnt/applicationunlocker.h \ +@@ -145,3 +141,13 @@ noinst_HEADERS += \ + tnt/stressjob.h + endif + ++if HAVE_MINIZIP ++libtntnet_la_CXXFLAGS += $(MINIZIP_CFLAGS) ++libtntnet_la_LDFLAGS += $(MINIZIP_LIBS) ++else ++libtntnet_la_SOURCES += \ ++ ioapi.c \ ++ ioapi.h \ ++ unzip.c \ ++ unzip.h ++endif diff --git a/dev-libs/tntnet/files/tntnet.initd b/dev-libs/tntnet/files/tntnet.initd new file mode 100644 index 000000000000..54982bddd6e6 --- /dev/null +++ b/dev-libs/tntnet/files/tntnet.initd @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PIDFILE="/var/run/tntnet.pid" + +depend() { + use net +} + +start() { + ebegin "Starting tntnet" + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec /usr/bin/tntnet + eend $? +} + +stop() { + ebegin "Stopping tntnet" + start-stop-daemon --stop --pidfile $PIDFILE --exec /usr/bin/tntnet + eend $? +} + +reload() { + # FIXME: Remove --stop and --oknodo as soon as baselayout-1 has been removed... + # finally... + ebegin "Reloading tntnet configuration" + start-stop-daemon --stop --oknodo --pidfile $PIDFILE --signal HUP --exec /usr/bin/tntnet + eend $? +} diff --git a/dev-libs/tntnet/metadata.xml b/dev-libs/tntnet/metadata.xml new file mode 100644 index 000000000000..7884d9df8a09 --- /dev/null +++ b/dev-libs/tntnet/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>hd_brummy@gentoo.org</email> + <name>Joerg Bornkessel</name> + </maintainer> + <use> + <flag name="server">Enable tntnet server daemon</flag> + </use> +</pkgmetadata> diff --git a/dev-libs/tntnet/tntnet-2.2.1-r1.ebuild b/dev-libs/tntnet/tntnet-2.2.1-r1.ebuild new file mode 100644 index 000000000000..cc25ab03fdfb --- /dev/null +++ b/dev-libs/tntnet/tntnet-2.2.1-r1.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils + +DESCRIPTION="Modular, multithreaded web application server extensible with C++" +HOMEPAGE="http://www.tntnet.org/" +SRC_URI="http://www.tntnet.org/download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" +IUSE="doc gnutls libressl server ssl examples" + +RDEPEND=">=dev-libs/cxxtools-2.2.1 + sys-libs/zlib[minizip] + ssl? ( + gnutls? ( + >=net-libs/gnutls-1.2.0 + dev-libs/libgcrypt:0 + ) + !gnutls? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + )" +DEPEND="${RDEPEND} + virtual/pkgconfig + app-arch/zip" + +src_prepare() { + # Both fixed in the next release + epatch "${FILESDIR}"/${PN}-2.0-zlib-minizip.patch + rm framework/common/{ioapi,unzip}.[ch] || die + + # bug 423697 + sed -e "s:unzip.h:minizip/unzip.h:" -i framework/defcomp/unzipcomp.cpp + + eautoreconf + + sed -i -e 's:@localstatedir@:/var:' etc/tntnet/tntnet.xml.in || die +} + +src_configure() { + local myconf="" + + # Prefer gnutls above SSL + if use gnutls; then + einfo "Using gnutls for ssl support." + myconf="${myconf} --with-ssl=gnutls" + elif use ssl; then + einfo "Using openssl for ssl support." + myconf="${myconf} --with-ssl=openssl" + else + myconf="${myconf} --with-ssl=no" + fi + + # default enabled, will not compile without sdk + myconf="${myconf} --with-sdk" + + econf \ + $(use_with server) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install || die + + dodoc AUTHORS ChangeLog README TODO + if use doc; then + dodoc doc/*.pdf || die + fi + + if use examples; then + cd "${S}/sdk/demos" + emake clean + rm -rf .deps */.deps .libs */.libs + cd "${S}" + + insinto /usr/share/doc/${PF}/examples + doins -r sdk/demos/* || die + fi + + if use server; then + rm -f "${D}/etc/init.d/tntnet" + newinitd "${FILESDIR}/tntnet.initd" tntnet + fi +} diff --git a/dev-libs/tntnet/tntnet-2.2.1.ebuild b/dev-libs/tntnet/tntnet-2.2.1.ebuild new file mode 100644 index 000000000000..6102ea7fb03c --- /dev/null +++ b/dev-libs/tntnet/tntnet-2.2.1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils + +DESCRIPTION="Modular, multithreaded web application server extensible with C++" +HOMEPAGE="http://www.tntnet.org/" +SRC_URI="http://www.tntnet.org/download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 ~sparc x86" +IUSE="doc gnutls server ssl examples" + +RDEPEND=">=dev-libs/cxxtools-2.2.1 + sys-libs/zlib[minizip] + ssl? ( + gnutls? ( + >=net-libs/gnutls-1.2.0 + dev-libs/libgcrypt:0 + ) + !gnutls? ( dev-libs/openssl:* ) + )" +DEPEND="${RDEPEND} + virtual/pkgconfig + app-arch/zip" + +src_prepare() { + # Both fixed in the next release + epatch "${FILESDIR}"/${PN}-2.0-zlib-minizip.patch + rm framework/common/{ioapi,unzip}.[ch] || die + + # bug 423697 + sed -e "s:unzip.h:minizip/unzip.h:" -i framework/defcomp/unzipcomp.cpp + + eautoreconf + + sed -i -e 's:@localstatedir@:/var:' etc/tntnet/tntnet.xml.in || die +} + +src_configure() { + local myconf="" + + # Prefer gnutls above SSL + if use gnutls; then + einfo "Using gnutls for ssl support." + myconf="${myconf} --with-ssl=gnutls" + elif use ssl; then + einfo "Using openssl for ssl support." + myconf="${myconf} --with-ssl=openssl" + else + myconf="${myconf} --with-ssl=no" + fi + + # default enabled, will not compile without sdk + myconf="${myconf} --with-sdk" + + econf \ + $(use_with server) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install || die + + dodoc AUTHORS ChangeLog README TODO + if use doc; then + dodoc doc/*.pdf || die + fi + + if use examples; then + cd "${S}/sdk/demos" + emake clean + rm -rf .deps */.deps .libs */.libs + cd "${S}" + + insinto /usr/share/doc/${PF}/examples + doins -r sdk/demos/* || die + fi + + if use server; then + rm -f "${D}/etc/init.d/tntnet" + newinitd "${FILESDIR}/tntnet.initd" tntnet + fi +} |