summaryrefslogtreecommitdiff
blob: 6cb442be344817faedd6f66bf826d56bb534c33d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_h2/mod_h2-9999.ebuild,v 1.3 2015/06/10 11:30:27 vapier Exp $

EAPI="5"

inherit apache-module

if [[ ${PV} == 9999 ]] ; then
	EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
	inherit git-2
else
	SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
	KEYWORDS="~amd64 ~x86"
fi

DESCRIPTION="HTTP/2 module for Apache"
HOMEPAGE="https://github.com/icing/mod_h2"

LICENSE="Apache-2.0"
SLOT="0"
IUSE="ssl"

RDEPEND="=net-libs/nghttp2-0.7*
	ssl? ( www-servers/apache[alpn] )"
DEPEND="${RDEPEND}"

# The mpm_prefork module doesn't work right.  See upstream docs.
# The threads logic is to handle the default eclass behavior which selects a
# default mpm via the USE=threads flag.
RDEPEND+="
	|| (
		www-servers/apache[apache2_mpms_worker]
		www-servers/apache[apache2_mpms_event]
		www-servers/apache[threads,-apache2_mpms_prefork,-apache2_mpms_peruser]
	)"

need_apache2_4

src_configure() {
	econf \
		--docdir='$(datarootdir)'/doc/${PF} \
		--disable-werror \
		--disable-sandbox
}

src_compile() {
	default
}

src_install() {
	default

	APACHE2_MOD_DEFINE="HTTP2"
	insinto "${APACHE_MODULES_CONFDIR}"
	newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
}