From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1338511-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 0FDE5158086
	for <garchives@archives.gentoo.org>; Thu, 11 Nov 2021 14:58:42 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 36C26E09A2;
	Thu, 11 Nov 2021 14:58:41 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 6FB8EE09A2
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Nov 2021 14:58:40 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 1D7B3343009
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Nov 2021 14:58:39 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 96F8AEA
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Nov 2021 14:58:37 +0000 (UTC)
From: "Christian Ruppert" <idl0r@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Christian Ruppert" <idl0r@gentoo.org>
Message-ID: <1636642715.e1ac3c774c742a50bf0136111bc5839741aadacb.idl0r@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/haproxy/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-proxy/haproxy/Manifest net-proxy/haproxy/haproxy-2.2.18.ebuild net-proxy/haproxy/haproxy-2.3.15.ebuild net-proxy/haproxy/haproxy-2.4.8.ebuild
X-VCS-Directories: net-proxy/haproxy/
X-VCS-Committer: idl0r
X-VCS-Committer-Name: Christian Ruppert
X-VCS-Revision: e1ac3c774c742a50bf0136111bc5839741aadacb
X-VCS-Branch: master
Date: Thu, 11 Nov 2021 14:58:37 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: e35c45f2-773e-48d4-8aca-d6a2a9e5a8ae
X-Archives-Hash: 7acca163c48942d0f6007703cbe29fe3

commit:     e1ac3c774c742a50bf0136111bc5839741aadacb
Author:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 11 14:58:30 2021 +0000
Commit:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
CommitDate: Thu Nov 11 14:58:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1ac3c77

net-proxy/haproxy: Bumps

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Christian Ruppert <idl0r <AT> gentoo.org>

 net-proxy/haproxy/Manifest              |   3 +
 net-proxy/haproxy/haproxy-2.2.18.ebuild | 186 ++++++++++++++++++++++++++++++++
 net-proxy/haproxy/haproxy-2.3.15.ebuild | 183 +++++++++++++++++++++++++++++++
 net-proxy/haproxy/haproxy-2.4.8.ebuild  | 182 +++++++++++++++++++++++++++++++
 4 files changed, 554 insertions(+)

diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
index 5052a2d4de7..38010503b4e 100644
--- a/net-proxy/haproxy/Manifest
+++ b/net-proxy/haproxy/Manifest
@@ -2,6 +2,9 @@ DIST haproxy-2.0.24.tar.gz 2707476 BLAKE2B 98539bf4affd7efd8703d29f0ef03182f2b58
 DIST haproxy-2.0.25.tar.gz 2707840 BLAKE2B cd85d233623f2791bff8ada00d9ac4ea3743e2c1fbccd45a6fd56b7cc0ae5904619b50849a23576f0a6d21ae2798166acd41692d0311bcf361355dc6ee0da790 SHA512 2c238844a8c82f877d3039b20b76fd22717f95a4e5d94a0bfd501c6e134042ef744d3731fc0ccced0a94e5cb1c1822d3272ed961e07bd9acc4d637eba0529155
 DIST haproxy-2.2.16.tar.gz 2933121 BLAKE2B 89fa4ee3baf2823cab0f664d95c0a00c345f913d059604a6cdd1906b6883b5baec0a0dbaa1badd0b512d4ae953d66e16832bd9b7169f065f97d5ced65aa8ed7f SHA512 5a1e3e8f7c6ce995c5ba9416862622143054abeadd3f2b94acef73267440d941f52c18467eed500af098bdaba8e3ae3054101371f1903e60605443ca9d36335e
 DIST haproxy-2.2.17.tar.gz 2933836 BLAKE2B 750d2c5048f994442d13c05ce6624731d296462951ee2e86110467d517a6708b498e98260a3f0770e110dc5c2cb2bdd746fb76f23ba7cebc1642b0b9c8124a67 SHA512 174197e1e0915a6ae6062b9a070f16102ac7f3429f991f36cdb2e2cce587bd26059bd1dc71a368f904bcdecd292ab5926715160400ae96d498d902aac356864f
+DIST haproxy-2.2.18.tar.gz 2940789 BLAKE2B e932c53b67052a2696a00cc9e0ee79ca2c7bdc5ba51bbb6c5bf3e7d5ef8bcf3c4e0f6524d40bcbc3342f86c3ddec6e27a0a2ad329ee5ad510260dc2f24b3913b SHA512 255b5d5984578a8d018b80e213ff2bca583de30d835aa3de345fabb05c229277d18007251b441dfdbf863e0297a2fa6e08e41b7b57dd76eba7f2e50879ae2cfa
 DIST haproxy-2.3.14.tar.gz 2954299 BLAKE2B 656108e3860ee2f174b218eda362aa9b1fff56fed3f9a4cf7fb491342fb4379d84ead4754a5f422d6763fdb6ead6f0f20217763abc1082cbbf355b095a467da2 SHA512 4e008b79b809dfc32b18728e0a39e7d78cbbbda61d33514cc40034916d46b9df3398bed0f6deda03216a82b5debb08cf91120d841a988bff2385fdc0508a326d
+DIST haproxy-2.3.15.tar.gz 2962490 BLAKE2B ac55ddc8f73a8c727483e431a0eae4fa63adbfe4c6f38ed21eccc6ddffca23417ae05735d0b662473010c5fc375ab1c052a9576d7584f8224ef9c2dec6863de0 SHA512 cbb8360c51edaf0112758ebfdb284779f5345598408a94118bde7bfe2ea56a01db020a249b569937ae17b3aab14b9b958b56968135d186a06d7d194242268547
 DIST haproxy-2.4.4.tar.gz 3587306 BLAKE2B 983f5919b738419d616b35c1cad6aa2400b0b857160ecfac3bcdfcc14c15280283ae3f33036652a3a9b5bfff0fbb6a54912807ea7c83c828d2b5ba72274fe1a8 SHA512 a8987e8342fdbec7e48de09a4391a67e77e05493260e0e561e8c185b6457b8e1086cc45ce04ebf3365699c008dff81667490e2fe99c33c0ac3c7513df8ae025c
 DIST haproxy-2.4.7.tar.gz 3594183 BLAKE2B 170697fd7bcb886033d4dba5a9f7b7289cb651b82f3959354e393553fdac8fe8470cfacbece46f801a0e3f35d418d304f189e1f14c7142047ffb81f37c38251f SHA512 7ad8e9bd506d6f5919ff9ea97b08a4ec283bf580baefc7945632ea5a88a73081bb3d82586855efc7b7b9194558f12823c26b7a7498ac08c3efc158ea6583ec9f
+DIST haproxy-2.4.8.tar.gz 3599555 BLAKE2B 6b5a6460be73c643ab9606f65e5ba35250233845ae8cd2decbc19df05ef28c2868d8f331e8a18d96555f292ceee179abd5ae99da11c1c4d98a503b1b9b2c16d3 SHA512 8e1d28191a8c26d46989359a213444f30a09e439d32b5ab6cb01a3ca267788fc7677dd14deaa43a7f6c7741cbf6c8fcf6cdd5cf927d23e48f82b9e7723d8a6f9

diff --git a/net-proxy/haproxy/haproxy-2.2.18.ebuild b/net-proxy/haproxy/haproxy-2.2.18.ebuild
new file mode 100644
index 00000000000..894bf001b81
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-2.2.18.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+LUA_COMPAT=( lua5-3 )
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://www.haproxy.org"
+if [[ ${PV} != *9999 ]]; then
+	SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz"
+	KEYWORDS="~amd64 ~arm ~ppc ~x86"
+else
+	EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/"
+	EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="+crypt doc examples slz +net_ns +pcre pcre-jit pcre2 pcre2-jit prometheus-exporter
+ssl systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+	pcre2-jit? ( pcre2 )
+	pcre? ( !pcre2 )
+	lua? ( ${LUA_REQUIRED_USE} )
+	device-atlas? ( pcre )
+	?? ( slz zlib )"
+
+BDEPEND="virtual/pkgconfig"
+DEPEND="
+	crypt? ( virtual/libcrypt:= )
+	pcre? (
+		dev-libs/libpcre
+		pcre-jit? ( dev-libs/libpcre[jit] )
+	)
+	pcre2? (
+		dev-libs/libpcre2:=
+		pcre2-jit? ( dev-libs/libpcre2:=[jit] )
+	)
+	ssl? (
+		dev-libs/openssl:0=
+	)
+	slz? ( dev-libs/libslz:= )
+	systemd? ( sys-apps/systemd )
+	zlib? ( sys-libs/zlib )
+	lua? ( ${LUA_DEPS} )
+	device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}
+	acct-group/haproxy
+	acct-user/haproxy"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+CONTRIBS=( halog iprange )
+# ip6range is present in 1.6, but broken.
+ver_test ${PV} -ge 1.7.0 && CONTRIBS+=( ip6range spoa_example tcploop )
+# TODO: mod_defender - requires apache / APR, modsecurity - the same
+ver_test ${PV} -ge 1.8.0 && CONTRIBS+=( hpack )
+
+haproxy_use() {
+	(( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+	usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+	use lua && lua-single_pkg_setup
+	if use net_ns; then
+		CONFIG_CHECK="~NET_NS"
+		linux-info_pkg_setup
+	fi
+}
+
+src_compile() {
+	local -a args=(
+		V=1
+		TARGET=linux-glibc
+	)
+
+	# TODO: PCRE2_WIDTH?
+	args+=( $(haproxy_use threads THREAD) )
+	args+=( $(haproxy_use crypt LIBCRYPT) )
+	args+=( $(haproxy_use net_ns NS) )
+	args+=( $(haproxy_use pcre PCRE) )
+	args+=( $(haproxy_use pcre-jit PCRE_JIT) )
+	args+=( $(haproxy_use pcre2 PCRE2) )
+	args+=( $(haproxy_use pcre2-jit PCRE2_JIT) )
+	args+=( $(haproxy_use ssl OPENSSL) )
+	args+=( $(haproxy_use slz SLZ) )
+	args+=( $(haproxy_use zlib ZLIB) )
+	args+=( $(haproxy_use lua LUA) )
+	args+=( $(haproxy_use 51degrees 51DEGREES) )
+	args+=( $(haproxy_use device-atlas DEVICEATLAS) )
+	args+=( $(haproxy_use wurfl WURFL) )
+	args+=( $(haproxy_use systemd SYSTEMD) )
+
+	# For now, until the strict-aliasing breakage will be fixed
+	append-cflags -fno-strict-aliasing
+
+	# Bug #668002
+	if use ppc || use arm || use hppa; then
+		TARGET_LDFLAGS=-latomic
+	fi
+
+	if use prometheus-exporter; then
+		EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
+	fi
+
+	# HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing
+	emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" ${args[@]}
+	emake -C contrib/systemd SBINDIR=/usr/sbin
+
+	if use tools ; then
+		for contrib in ${CONTRIBS[@]} ; do
+			# Those two includes are a workaround for hpack Makefile missing those
+			emake -C contrib/${contrib} \
+				CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+		done
+	fi
+}
+
+src_install() {
+	dosbin haproxy
+	dosym ../sbin/haproxy /usr/bin/haproxy
+
+	newconfd "${FILESDIR}/${PN}.confd" ${PN}
+	newinitd "${FILESDIR}/${PN}.initd-r6" ${PN}
+
+	doman doc/haproxy.1
+
+	systemd_dounit contrib/systemd/haproxy.service
+
+	einstalldocs
+
+	# The errorfiles are used by upstream defaults.
+	insinto /etc/haproxy/errors/
+	doins examples/errorfiles/*
+
+	if use doc; then
+		dodoc ROADMAP doc/*.txt
+		#if use lua; then
+		# TODO: doc/lua-api/
+		#fi
+	fi
+
+	if use tools ; then
+		has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
+		has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
+		has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
+		has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
+		has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
+		has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
+		has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack
+	fi
+
+	if use examples ; then
+		docinto examples
+		dodoc examples/*.cfg
+		dodoc doc/seamless_reload.txt
+	fi
+
+	if use vim-syntax ; then
+		insinto /usr/share/vim/vimfiles/syntax
+		doins contrib/syntax-highlight/haproxy.vim
+	fi
+}
+
+pkg_postinst() {
+	if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
+		ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
+		ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+		ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+		if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
+			einfo "Please consult the installed documentation for learning the configuration file's syntax."
+			einfo "The documentation and sample configuration files are installed here:"
+			einfo "   ${EROOT}/usr/share/doc/${PF}"
+		fi
+	fi
+}

diff --git a/net-proxy/haproxy/haproxy-2.3.15.ebuild b/net-proxy/haproxy/haproxy-2.3.15.ebuild
new file mode 100644
index 00000000000..d2978148fb5
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-2.3.15.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+LUA_COMPAT=( lua5-3 )
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://www.haproxy.org"
+if [[ ${PV} != *9999 ]]; then
+	SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz"
+	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+else
+	EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/"
+	EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="+crypt doc examples slz +net_ns +pcre pcre-jit pcre2 pcre2-jit prometheus-exporter
+ssl systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+	pcre2-jit? ( pcre2 )
+	pcre? ( !pcre2 )
+	lua? ( ${LUA_REQUIRED_USE} )
+	device-atlas? ( pcre )
+	?? ( slz zlib )"
+
+BDEPEND="virtual/pkgconfig"
+DEPEND="
+	crypt? ( virtual/libcrypt:= )
+	pcre? (
+		dev-libs/libpcre
+		pcre-jit? ( dev-libs/libpcre[jit] )
+	)
+	pcre2? (
+		dev-libs/libpcre2:=
+		pcre2-jit? ( dev-libs/libpcre2:=[jit] )
+	)
+	ssl? (
+		dev-libs/openssl:0=
+	)
+	slz? ( dev-libs/libslz:= )
+	systemd? ( sys-apps/systemd )
+	zlib? ( sys-libs/zlib )
+	lua? ( ${LUA_DEPS} )
+	device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}
+	acct-group/haproxy
+	acct-user/haproxy"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+CONTRIBS=( halog iprange )
+# ip6range is present in 1.6, but broken.
+ver_test ${PV} -ge 1.7.0 && CONTRIBS+=( ip6range spoa_example tcploop )
+# TODO: mod_defender - requires apache / APR, modsecurity - the same
+ver_test ${PV} -ge 1.8.0 && CONTRIBS+=( hpack )
+
+haproxy_use() {
+	(( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+	usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+	use lua && lua-single_pkg_setup
+	if use net_ns; then
+		CONFIG_CHECK="~NET_NS"
+		linux-info_pkg_setup
+	fi
+}
+
+src_compile() {
+	local -a args=(
+		V=1
+		TARGET=linux-glibc
+	)
+
+	# TODO: PCRE2_WIDTH?
+	args+=( $(haproxy_use threads THREAD) )
+	args+=( $(haproxy_use crypt LIBCRYPT) )
+	args+=( $(haproxy_use net_ns NS) )
+	args+=( $(haproxy_use pcre PCRE) )
+	args+=( $(haproxy_use pcre-jit PCRE_JIT) )
+	args+=( $(haproxy_use pcre2 PCRE2) )
+	args+=( $(haproxy_use pcre2-jit PCRE2_JIT) )
+	args+=( $(haproxy_use ssl OPENSSL) )
+	args+=( $(haproxy_use slz SLZ) )
+	args+=( $(haproxy_use zlib ZLIB) )
+	args+=( $(haproxy_use lua LUA) )
+	args+=( $(haproxy_use 51degrees 51DEGREES) )
+	args+=( $(haproxy_use device-atlas DEVICEATLAS) )
+	args+=( $(haproxy_use wurfl WURFL) )
+	args+=( $(haproxy_use systemd SYSTEMD) )
+
+	# Bug #668002
+	if use ppc || use arm || use hppa; then
+		TARGET_LDFLAGS=-latomic
+	fi
+
+	if use prometheus-exporter; then
+		EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
+	fi
+
+	# HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing
+	emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" ${args[@]}
+	emake -C contrib/systemd SBINDIR=/usr/sbin
+
+	if use tools ; then
+		for contrib in ${CONTRIBS[@]} ; do
+			# Those two includes are a workaround for hpack Makefile missing those
+			emake -C contrib/${contrib} \
+				CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+		done
+	fi
+}
+
+src_install() {
+	dosbin haproxy
+	dosym ../sbin/haproxy /usr/bin/haproxy
+
+	newconfd "${FILESDIR}/${PN}.confd" ${PN}
+	newinitd "${FILESDIR}/${PN}.initd-r6" ${PN}
+
+	doman doc/haproxy.1
+
+	systemd_dounit contrib/systemd/haproxy.service
+
+	einstalldocs
+
+	# The errorfiles are used by upstream defaults.
+	insinto /etc/haproxy/errors/
+	doins examples/errorfiles/*
+
+	if use doc; then
+		dodoc ROADMAP doc/*.txt
+		#if use lua; then
+		# TODO: doc/lua-api/
+		#fi
+	fi
+
+	if use tools ; then
+		has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
+		has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
+		has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
+		has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
+		has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
+		has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
+		has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack
+	fi
+
+	if use examples ; then
+		docinto examples
+		dodoc examples/*.cfg
+		dodoc doc/seamless_reload.txt
+	fi
+
+	if use vim-syntax ; then
+		insinto /usr/share/vim/vimfiles/syntax
+		doins contrib/syntax-highlight/haproxy.vim
+	fi
+}
+
+pkg_postinst() {
+	if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
+		ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
+		ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+		ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+		if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
+			einfo "Please consult the installed documentation for learning the configuration file's syntax."
+			einfo "The documentation and sample configuration files are installed here:"
+			einfo "   ${EROOT}/usr/share/doc/${PF}"
+		fi
+	fi
+}

diff --git a/net-proxy/haproxy/haproxy-2.4.8.ebuild b/net-proxy/haproxy/haproxy-2.4.8.ebuild
new file mode 100644
index 00000000000..5c4cee22742
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-2.4.8.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+LUA_COMPAT=( lua5-3 )
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://www.haproxy.org"
+if [[ ${PV} != *9999 ]]; then
+	SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz"
+	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+else
+	EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/"
+	EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="+crypt doc examples +slz +net_ns +pcre pcre-jit pcre2 pcre2-jit prometheus-exporter
+ssl systemd +threads tools vim-syntax zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+	pcre2-jit? ( pcre2 )
+	pcre? ( !pcre2 )
+	lua? ( ${LUA_REQUIRED_USE} )
+	device-atlas? ( pcre )
+	?? ( slz zlib )"
+
+BDEPEND="virtual/pkgconfig"
+DEPEND="
+	crypt? ( virtual/libcrypt:= )
+	pcre? (
+		dev-libs/libpcre
+		pcre-jit? ( dev-libs/libpcre[jit] )
+	)
+	pcre2? (
+		dev-libs/libpcre2:=
+		pcre2-jit? ( dev-libs/libpcre2:=[jit] )
+	)
+	ssl? (
+		dev-libs/openssl:0=
+	)
+	systemd? ( sys-apps/systemd )
+	zlib? ( sys-libs/zlib )
+	lua? ( ${LUA_DEPS} )
+	device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}
+	acct-group/haproxy
+	acct-user/haproxy"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack )
+
+haproxy_use() {
+	(( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+	usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+	use lua && lua-single_pkg_setup
+	if use net_ns; then
+		CONFIG_CHECK="~NET_NS"
+		linux-info_pkg_setup
+	fi
+}
+
+src_compile() {
+	local -a args=(
+		V=1
+		TARGET=linux-glibc
+	)
+
+	# TODO: PCRE2_WIDTH?
+	args+=( $(haproxy_use threads THREAD) )
+	args+=( $(haproxy_use crypt LIBCRYPT) )
+	args+=( $(haproxy_use net_ns NS) )
+	args+=( $(haproxy_use pcre PCRE) )
+	args+=( $(haproxy_use pcre-jit PCRE_JIT) )
+	args+=( $(haproxy_use pcre2 PCRE2) )
+	args+=( $(haproxy_use pcre2-jit PCRE2_JIT) )
+	args+=( $(haproxy_use ssl OPENSSL) )
+	args+=( $(haproxy_use slz SLZ) )
+	args+=( $(haproxy_use zlib ZLIB) )
+	args+=( $(haproxy_use lua LUA) )
+	args+=( $(haproxy_use 51degrees 51DEGREES) )
+	args+=( $(haproxy_use device-atlas DEVICEATLAS) )
+	args+=( $(haproxy_use wurfl WURFL) )
+	args+=( $(haproxy_use systemd SYSTEMD) )
+	args+=( $(haproxy_use prometheus-exporter PROMEX) )
+
+	# Bug #668002
+	if use ppc || use arm || use hppa; then
+		TARGET_LDFLAGS=-latomic
+	fi
+
+	# HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing
+	emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}"	TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ERROT}/usr/$(get_libdir) ${args[@]}
+	emake -C admin/systemd CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ERROT}/usr/$(get_libdir) SBINDIR=/usr/sbin
+
+	if use tools ; then
+		for extra in ${EXTRAS[@]} ; do
+			if [ "${extra}" = "admin/halog" ]; then
+				emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ERROT}/usr/$(get_libdir) ${args[@]} admin/halog/halog
+			elif [ "${extra}" = "dev/hpack" ]; then
+				emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ERROT}/usr/$(get_libdir) ${args[@]} dev/hpack/{decode,gen-enc,gen-rht}
+			else
+				# Those two includes are a workaround for hpack Makefile missing those
+				emake -C ${extra} \
+					CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+			fi
+		done
+	fi
+}
+
+src_install() {
+	dosbin haproxy
+	dosym ../sbin/haproxy /usr/bin/haproxy
+
+	newconfd "${FILESDIR}/${PN}.confd" ${PN}
+	newinitd "${FILESDIR}/${PN}.initd-r6" ${PN}
+
+	doman doc/haproxy.1
+
+	systemd_dounit admin/systemd/haproxy.service
+
+	einstalldocs
+
+	# The errorfiles are used by upstream defaults.
+	insinto /etc/haproxy/errors/
+	doins examples/errorfiles/*
+
+	if use doc; then
+		dodoc ROADMAP doc/*.txt
+		#if use lua; then
+		# TODO: doc/lua-api/
+		#fi
+	fi
+
+	if use tools ; then
+		has admin/halog "${EXTRAS[@]}" && dobin admin/halog/halog
+		has admin/iprange "${EXTRAS[@]}" && { newbin admin/iprange/iprange haproxy_iprange; newbin admin/iprange/ip6range haproxy_ip6range; }
+		has dev/tcploop "${EXTRAS[@]}" && newbin dev/tcploop/tcploop haproxy_tcploop
+		has dev/hpack "${EXTRAS[@]}" && {
+			newbin dev/hpack/gen-rht haproxy_gen-rht
+			newbin dev/hpack/gen-enc haproxy_gen-enc
+			newbin dev/hpack/decode haproxy_decode
+		}
+	fi
+
+	if use examples ; then
+		docinto examples
+		dodoc examples/*.cfg
+		dodoc doc/seamless_reload.txt
+	fi
+
+	if use vim-syntax ; then
+		insinto /usr/share/vim/vimfiles/syntax
+		doins admin/syntax-highlight/haproxy.vim
+	fi
+}
+
+pkg_postinst() {
+	if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
+		ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
+		ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+		ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+		if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
+			einfo "Please consult the installed documentation for learning the configuration file's syntax."
+			einfo "The documentation and sample configuration files are installed here:"
+			einfo "   ${EROOT}/usr/share/doc/${PF}"
+		fi
+	fi
+}