summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-10-11 21:19:15 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-10-11 21:19:15 -0400
commitdd6472d4ccf5d94031e48875e39a3309c5f368df (patch)
tree035aae69dea5eb27e56ea3d808204d152ee860f7 /www-servers/gatling
parentwww-servers/bozohttpd: add libressl support (diff)
downloadgentoo-dd6472d4ccf5d94031e48875e39a3309c5f368df.tar.gz
gentoo-dd6472d4ccf5d94031e48875e39a3309c5f368df.tar.bz2
gentoo-dd6472d4ccf5d94031e48875e39a3309c5f368df.zip
www-servers/gatling: add libressl support
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'www-servers/gatling')
-rw-r--r--www-servers/gatling/gatling-0.13-r1.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/www-servers/gatling/gatling-0.13-r1.ebuild b/www-servers/gatling/gatling-0.13-r1.ebuild
new file mode 100644
index 000000000000..2c6b7b17e9ab
--- /dev/null
+++ b/www-servers/gatling/gatling-0.13-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="High performance web server"
+HOMEPAGE="http://www.fefe.de/gatling/"
+SRC_URI="http://dl.fefe.de/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="libressl ssl diet"
+REQUIRED_USE="ssl? ( !diet )"
+
+DEPEND=">=dev-libs/libowfat-0.25[diet=]
+ diet? ( dev-libs/dietlibc )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ rm Makefile # leaves us with GNUmakefile
+ epatch "${FILESDIR}/${P}-compile.patch"
+}
+
+src_compile() {
+ local DIET=
+ use diet && DIET='/usr/bin/diet'
+
+ local targets='gatling'
+ use ssl && targets+=' tlsgatling'
+
+ emake DIET="${DIET}" CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} -I${ROOT}usr/include/libowfat" \
+ LDFLAGS="${LDFLAGS}" prefix=/usr ${targets} \
+ || die "emake ${targets} failed"
+}
+
+src_install() {
+ doman gatling.1 || die "installing manpage failed"
+
+ newconfd "${FILESDIR}/gatling.confd" gatling || die
+ newinitd "${FILESDIR}/gatling.initd-2" gatling || die
+ dodoc README.{ftp,http} || die "installing docs failed"
+
+ dobin gatling || die "installing gatling binary failed"
+ use ssl && {
+ dodoc README.tls || die "installing docs failed"
+ dobin tlsgatling || die "installing tlsgatling binary failed"
+ }
+}
+
+pkg_setup() {
+ ebegin "Creating gatling user and group"
+ enewgroup gatling
+ enewuser ${PN} -1 -1 /var/www/localhost ${PN}
+}