diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-libs/tntnet | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-libs/tntnet')
-rw-r--r-- | dev-libs/tntnet/Manifest | 6 | ||||
-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, 288 insertions, 0 deletions
diff --git a/dev-libs/tntnet/Manifest b/dev-libs/tntnet/Manifest new file mode 100644 index 000000000000..c2d7f29375bd --- /dev/null +++ b/dev-libs/tntnet/Manifest @@ -0,0 +1,6 @@ +AUX tntnet-2.0-zlib-minizip.patch 1432 BLAKE2B 137e4deaa5c2e6bd57695e19d643657c932c268adfb22f3c593e2bfb312fa979ecc87e14195bf42690883c1fdcde773e91af33823a3abc5ccd592a1cd705bac8 SHA512 13909d58fa2ea73c074816498faaa94dadc3fb750179b8f290600eb8a1adaf6a45464d0ee412ea9d038ab5e524a13da0e44fb07424388f28f16df538845dda07 +AUX tntnet.initd 669 BLAKE2B fbe3bd3fef3cc7519b26b1e15f1eb353c6d7afedcb59cc1a594bc7a53c19814e4107115dd6877f23c7a5de1305f859f5980fb3784df3bda4924a9f6c425ee67c SHA512 f67aa89030da69a7278af9c2b7c2b887373be54e711b31fc362df938baf4c5d09df6bc04568ef70a9eacd73582bb58891a9651782d29392cad3d0a1cd0bb8ccf +DIST tntnet-2.2.1.tar.gz 1127500 BLAKE2B bdb55c879ed00afdde1bfe1560ad4228effaa05b35996df3860631c90c93e57096f590b5ddfd8e8ff0356837e839e2f6ed8f4f6fe8ed478275926dd1143b2051 SHA512 78a26713498fd6eabb0b4a247bb20c130ce967ed22ce5c54da4b1300534dd40155aa62a2dc770be4eca720cadeceac283978a5dc3ce418728994af72e4d8eac1 +EBUILD tntnet-2.2.1-r1.ebuild 1889 BLAKE2B 5205f1c8c547cad508c6c8528dd23001e57f90a25988f73fa892042c80c0a694cc81c442e8ed003afc988bf6d31c2c23e24586ee6b47b61c3b84e27c206c4667 SHA512 c74171d0347eeaa84b64c988c06ac40cbe56c0b5df2e55ab946ca10e1639ed96d1e2ea279d2229a8f3c29cbf3cb4823ef961ce3ec62f3681d72a57c19e4e8272 +EBUILD tntnet-2.2.1.ebuild 1819 BLAKE2B ab388f7b9baff54a23ffbdb045c8d5b24ee315cefa4a6728ce837822984b6c2b9f602db3e4a873129667992188c28d67973b2f319305c526fe06fa45b5cb2941 SHA512 deafb4fa61fdd887da29bb4e62d57eb1e0d6d88ac0a6227a39454285d14689ed92adec2c2d38d84e37ab2d03b374269486fc4a5e5f7da8c388f54c7281ba344b +MISC metadata.xml 555 BLAKE2B 89b58ae15701bd0e48eec8e3adcd99228f4a202b60b9904d04fa1b461c70f06876f36f2ad48b9f5596ca164f9eda7ca2617380503c427698c6a2ab1edc822c44 SHA512 060415a8e9aa8550ba30ef7f987ef5862e03fc9abd905eaec60715401279ed92d467b116cdce70626a3bfb3ca58d0d999611da23b09726a78ad47d553f97d4e4 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 +} |