summaryrefslogtreecommitdiff
path: root/net-proxy/haproxy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-02-29 18:01:47 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-02-29 18:01:47 +0000
commitceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (patch)
tree9f47ee47c31a0f13f9496879cd88a1042550aa81 /net-proxy/haproxy
parent53cba99042fa967e2a93da9f8db806fe2d035543 (diff)
gentoo (leap year) resync : 29.02.2020
Diffstat (limited to 'net-proxy/haproxy')
-rw-r--r--net-proxy/haproxy/Manifest6
-rw-r--r--net-proxy/haproxy/haproxy-1.8.24.ebuild169
-rw-r--r--net-proxy/haproxy/haproxy-1.9.14.ebuild173
-rw-r--r--net-proxy/haproxy/haproxy-2.0.13.ebuild176
4 files changed, 524 insertions, 0 deletions
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
index 70d848175261..5905614436bd 100644
--- a/net-proxy/haproxy/Manifest
+++ b/net-proxy/haproxy/Manifest
@@ -2,21 +2,27 @@ AUX haproxy.confd 610 BLAKE2B 89c6ea0c2f623bbe7aa80a4f42de1d7fb38a2fa6e9edb5b9c7
AUX haproxy.initd-r6 1705 BLAKE2B af8b9ad2fcb499d7fec97fe4210af8685a15881aa98634551bad8ec90bd2fe412a7af337fcb5f3ced7715433fb1d98fa175ecb83fa61108802973976109a7c6d SHA512 59693dfb0ae004559e57fb751ebd4abc85a982733699230ff51aa94a2bb7db9875bc63f6a03355b7434448736beb513e923b2ad9c70661f4110e4b2ad2bba753
DIST haproxy-1.8.13.tar.gz 2063046 BLAKE2B 9ebccf2520719cdf209bc9a87bf28d015b5b673e0d017d5387af4025f930ac401f6a2cfa851583ffe6b6645b7b91ad255bb5db737688a1f310958072a11c8a80 SHA512 54d4cb0721a3868267d7e085b3d3bb050384e4279eb49e88abb925bb3ea8cc39ef9069bdc99b7b18a23fd22e0d29e24dfcb8a0507ddca9243a845e4418be9cc5
DIST haproxy-1.8.23.tar.gz 2101424 BLAKE2B e1be06fd604f8715d52ad66ea77a1eb56d38eae46442eca9d497bd4eb5f34124ba32f5c9f44d0232063af3f3803e37b205eda9bd21266064de6db287b49fabe6 SHA512 bfd65179345285f6f4581a7dce42e638b89e12717d4cb9218afa085759161e04b6c78307d04265a6c97cd484b67949781639da5236edb89137585c625130be4f
+DIST haproxy-1.8.24.tar.gz 2178823 BLAKE2B 4b040133b22f78fa8c4cdbe04183c6ae6a70fb20703907c63b6437d441ba260a41cb2d6067833700a230553648152dde0cbd3a443f05ec7935ff76939db996ae SHA512 1c53c7f579ee7eb95c3e614441745c644e5cb5b00efb1da4db9b202e2ae58ffb331ce0b94da9fe5dd4db591c5a0995030739dd3f925f66bd5b9dcce70d6b6de6
DIST haproxy-1.8.9.tar.gz 2057051 BLAKE2B d81d18f68a27ae8a77660c1ecb1dfc28599263ebfd57f25ea574af2b101b35eb7a1a89ba4034b55dfa89673ae6ac4c0dca5428b4b494a02184b1b157850ce96b SHA512 e59c29af3a39d6212f012ae8341b169436e10e42fadaf8f1aa68d2bb7ee181fd1fe3b74640bfcd8c37c17dfc5062b36bd69d90290d7c59cd3e4648ef2ab1c8dd
DIST haproxy-1.9.10.tar.gz 2386066 BLAKE2B 4dea3f42686cd41d9f6f6849c42f9cf604b26f33925747ec5311243117bcf51729d16e5c09c5eb2cfc9fea88cf49c976a0542dcd90ddee4016b467de699e8bdc SHA512 b204c91633949d20dd06c29c69d2c783134819493f132430aaedddd2aad74eac08da7de7ddc1c45b250446273c35b268ab37fcb3b98eaa6b97b6caf5530ed628
DIST haproxy-1.9.13.tar.gz 2395999 BLAKE2B 1b54aa732e7972b151ea00d76c6dd152fd6e0537f2885a75adf7cee9237ea344b79d7e45cf384c7836bfd2484848fbd8dbe6df0b146a7b6cfce8854caecb049b SHA512 3b5f76da7ebfa9ed6aefa5c3b49c43c103591c1d52168d587f787724cc88d7f13b2cf4ee6a643fb3ecbcbac31ef8c507ad71bde68156d44efe61d4b758e7e0a8
+DIST haproxy-1.9.14.tar.gz 2476753 BLAKE2B 3bf2b685b04b77fec6637b2c56e824681fe6fbd32de0b66a03fbdc9e71e52357b74eb315c17e72f345d255d9763b719c5d201f994a11c62e96f8f6e50208cb2e SHA512 ee0b0a994f25dff9538326c0e124e291a74a1381f9526352fe01317756ab59dfb523ee7968587f31883c59dabeb5b17effa699e65dbb67a4a18d094f32fab88a
DIST haproxy-2.0.10.tar.gz 2557865 BLAKE2B 0e98fd2461414b4b55fc2bf100c80f17cbc34da2cae6d5c09fdbf708b4606f564c51bf54f77b98a2f455b61f31ac793fdc92873beb269dcbd15ea45379f0aca1 SHA512 d3f0c0a7cce49d394dda7553ed79102cfef2c21ea6d640fbc325246806c93d862cb48c40f4717d9e1b50b2390698466282fe8c4d8b305259e3057f3711e69a39
DIST haproxy-2.0.12.tar.gz 2634202 BLAKE2B 0f2ea426076cdda20b18f068e7a5f5e92045056115a057ac4785fb5ad528697e2ecfdc482c5291c28f803ee817b8cb569ed966fbcc2db886d70e3f897285ac3f SHA512 bc81a5f88278b56bddfec52dba5231a06567177fe806faeb5ffb1965d8c4731704e0b92949cc72de0b4738c8baad28c5211d46d1dc980c4145c90081fc2d838c
+DIST haproxy-2.0.13.tar.gz 2643134 BLAKE2B a14ff8488b6d187feea2b0ed81253392b4f26d546b602597bf7dc2802a2b4b2119d5769668cc0eeda1bf448d2f544ce3e456ef78af43719ab6a4c0e0829ab291 SHA512 b0a218e1cebd2c356e81605157d6cee9f448bad59172d31d9b67eb2bab4c72dbc32f48690d84c92faac8c47d8c22002b3a93af49b61a3e7bb97fcf3fa8fe081a
DIST haproxy-2.1.2.tar.gz 2663193 BLAKE2B ebe48e25fb636b71fc5d621d57822dfc6c6a530ae7e79aeec29a72631643158d99d69ff94cb056e834c8905cdb94dbc7375a9e465e93e9024c0f728e07caa249 SHA512 929d244a67f93337e3c791b1a29f9643ac288acdf0090dc7a05c72caf61c3b04ef376b84737351f0c54d58bca66ed8af18faa20ec3adc97067313732e0dfcd7d
DIST haproxy-2.1.3.tar.gz 2675529 BLAKE2B be663fd629c001c1c91d6e3db5a8d940ed5ee674d5b886283284d2077ed8e0d13d295aeb376f6580131bdeb105c9d88f7afe367f2279d6c548d5888bd943e2b6 SHA512 4728c1177b2bba69465cbc56b1ed73a1b2d36891ba2d94d29bb49714ad98ccfac4b52947735aded211f0cd8070002f5406ddd77cabd2f8230b00438189dd7a60
EBUILD haproxy-1.8.13.ebuild 4886 BLAKE2B 61bc37ea42b0dd5bc447b68cb45532c184f14ad40461faddb940e041682e88ac81af36ce44d961d1011bc54b788ad9baa4c9447950a97708ea33dcb9d677fc32 SHA512 5dad241368a64aba2b07e429ab82adff67df556fc2b5a447d4863a12d50098545127f30725887b447e6ed583e39177458267777c5b321636211aab5a61b85a65
EBUILD haproxy-1.8.23.ebuild 4886 BLAKE2B 94d1654d71261f4d4e3d4984cf2afae1721c3f5d85f5caec1f7ba7be2a2f3c0889a2de02fd542b18f8a2fe0222debfd35f47c3fdcde0cbb8122dc493fec021a5 SHA512 a006987c4cf8f56bca0347537cf86e9282d5f0b5cb1864665104d1e93da53084711bac338dce99b1f6cdccfa1fec7534dc58cb7139c126fcc3b6131d371b7dce
+EBUILD haproxy-1.8.24.ebuild 4886 BLAKE2B 1408220c0147fa84297d0f87a834f5a44e69b34a7b2c48b216de4971b16f8fa2e125120d9fce05c20882577685a792f1b82735fda94aaaed01ac11fe4e06772a SHA512 a7d1789de3f46c2561cffe26786ae8fece3313993c536f7072208793b8b4e8c0b0c70f8b1d103e29e2c15f38fef37edda7cd5ba6c7ab73b59c0b44663348c042
EBUILD haproxy-1.8.9.ebuild 4885 BLAKE2B beb86eb5714d77b8dad4ac0abc55b46a0e4727ceae1a503ff1febe3943f6393f8ce99f97c098e4046c17de04a32c4f9d0a8708fd4c81eeb69e82f900f156285a SHA512 93290df98b67334d2c89ced563d15d25943a5c87c691fdce2ace423ca38acc364f9307f8a28a6654fb390d41c72ec627e005d0179d10138d92396365496ab8b8
EBUILD haproxy-1.9.10.ebuild 5018 BLAKE2B 93d3a44ccbdbc8abb196df919c8e7515ef58507b208341d5490391590b005ce4a43f91a1c62f810fe5559d21de349611f9d4da05a7d2b1418a3b405b67b603d9 SHA512 c5c4627a42bea17e1a459e4eb5b427ef469959bfe1882fb3ec6f1aba3462d4389c425399caeb2822ee2952af01b75d04e0b770a520c22e5487652d455676955d
EBUILD haproxy-1.9.13.ebuild 5018 BLAKE2B 93d3a44ccbdbc8abb196df919c8e7515ef58507b208341d5490391590b005ce4a43f91a1c62f810fe5559d21de349611f9d4da05a7d2b1418a3b405b67b603d9 SHA512 c5c4627a42bea17e1a459e4eb5b427ef469959bfe1882fb3ec6f1aba3462d4389c425399caeb2822ee2952af01b75d04e0b770a520c22e5487652d455676955d
+EBUILD haproxy-1.9.14.ebuild 5018 BLAKE2B fa166d23ef442cba45d4362ff480946dda97f3fca49cfc11bdafbc82c2c6ffd158d788af4b8218983a17a604623b0b97d08b670382f807b3143ee51e25a7711b SHA512 7eb2b7e1010ae2e962db93aff0740c875dfacea4b976c5378b5f81e4f5406a5ab6b33a86945301e4520c8d120597fed632d798849a874be485a27faf81005ac7
EBUILD haproxy-1.9.9999.ebuild 5018 BLAKE2B 93d3a44ccbdbc8abb196df919c8e7515ef58507b208341d5490391590b005ce4a43f91a1c62f810fe5559d21de349611f9d4da05a7d2b1418a3b405b67b603d9 SHA512 c5c4627a42bea17e1a459e4eb5b427ef469959bfe1882fb3ec6f1aba3462d4389c425399caeb2822ee2952af01b75d04e0b770a520c22e5487652d455676955d
EBUILD haproxy-2.0.10.ebuild 5245 BLAKE2B 39175f93f60e5ed921e0b176eaa380eac45d85c59ace787f151224e79f53e4915865ef3e68ffead27a0e5d57afda3e29b30de58d4b14f87da563163e6605b84b SHA512 240fb06ccb7e0a9830d6d20807dab2c8d789d4912397a77b6cf8047b947a59389f2e34d980fde0aad06d313249e2abc7510a6120af6b9b6230d5f3d0979da4cc
EBUILD haproxy-2.0.12.ebuild 5245 BLAKE2B 8a92ac753a2722fa580a24bfb5a51e735c2467b41ebbfb9b3e31bf5bbc55b23cf48ac338f2cf3a813bac8a24284b4fa8a4c2586f9ed8bbbe73a80966cb815d64 SHA512 0edeb36bcb0676a045523cf3aeaf69e81a6201442a6aa970f2e85174e4f4c1407a920c0c2794ae9c6a05ba22d833b88ae05a978e90c25702d2a3e5ce36762f67
+EBUILD haproxy-2.0.13.ebuild 5245 BLAKE2B 8a92ac753a2722fa580a24bfb5a51e735c2467b41ebbfb9b3e31bf5bbc55b23cf48ac338f2cf3a813bac8a24284b4fa8a4c2586f9ed8bbbe73a80966cb815d64 SHA512 0edeb36bcb0676a045523cf3aeaf69e81a6201442a6aa970f2e85174e4f4c1407a920c0c2794ae9c6a05ba22d833b88ae05a978e90c25702d2a3e5ce36762f67
EBUILD haproxy-2.0.9999.ebuild 5245 BLAKE2B 39175f93f60e5ed921e0b176eaa380eac45d85c59ace787f151224e79f53e4915865ef3e68ffead27a0e5d57afda3e29b30de58d4b14f87da563163e6605b84b SHA512 240fb06ccb7e0a9830d6d20807dab2c8d789d4912397a77b6cf8047b947a59389f2e34d980fde0aad06d313249e2abc7510a6120af6b9b6230d5f3d0979da4cc
EBUILD haproxy-2.1.2.ebuild 5245 BLAKE2B 8a92ac753a2722fa580a24bfb5a51e735c2467b41ebbfb9b3e31bf5bbc55b23cf48ac338f2cf3a813bac8a24284b4fa8a4c2586f9ed8bbbe73a80966cb815d64 SHA512 0edeb36bcb0676a045523cf3aeaf69e81a6201442a6aa970f2e85174e4f4c1407a920c0c2794ae9c6a05ba22d833b88ae05a978e90c25702d2a3e5ce36762f67
EBUILD haproxy-2.1.3.ebuild 5245 BLAKE2B 8a92ac753a2722fa580a24bfb5a51e735c2467b41ebbfb9b3e31bf5bbc55b23cf48ac338f2cf3a813bac8a24284b4fa8a4c2586f9ed8bbbe73a80966cb815d64 SHA512 0edeb36bcb0676a045523cf3aeaf69e81a6201442a6aa970f2e85174e4f4c1407a920c0c2794ae9c6a05ba22d833b88ae05a978e90c25702d2a3e5ce36762f67
diff --git a/net-proxy/haproxy/haproxy-1.8.24.ebuild b/net-proxy/haproxy/haproxy-1.8.24.ebuild
new file mode 100644
index 000000000000..840825cd8eaf
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.8.24.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit user versionator toolchain-funcs flag-o-matic 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/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+else
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/"
+ EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit pcre2 pcre2-jit ssl
+systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+ pcre2-jit? ( pcre2 )
+ pcre? ( !pcre2 )
+ device-atlas? ( pcre )
+ ?? ( slz zlib )"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ pcre2? (
+ dev-libs/libpcre
+ pcre2-jit? ( dev-libs/libpcre2[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ slz? ( dev-libs/libslz:= )
+ zlib? ( sys-libs/zlib )
+ lua? ( dev-lang/lua:5.3 )
+ device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+CONTRIBS=( halog iprange )
+# ip6range is present in 1.6, but broken.
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop )
+# TODO: mod_defender - requires apache / APR, modsecurity - the same
+version_is_at_least 1.8.0 $PV && CONTRIBS+=( hpack )
+
+haproxy_use() {
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+ usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+
+ if use net_ns; then
+ CONFIG_CHECK="~NET_NS"
+ linux-info_pkg_setup
+ fi
+}
+
+src_compile() {
+ local -a args=(
+ TARGET=linux2628
+ USE_GETADDRINFO=1
+ USE_TFO=1
+ )
+
+ # 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 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
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ emake -C contrib/systemd SBINDIR=/usr/sbin
+
+ if use tools ; then
+ for contrib in ${CONTRIBS[@]} ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" 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 examples/seamless_reload.txt
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/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-1.9.14.ebuild b/net-proxy/haproxy/haproxy-1.9.14.ebuild
new file mode 100644
index 000000000000..9c532b354464
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.9.14.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit user toolchain-funcs flag-o-matic 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"
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit pcre2 pcre2-jit ssl
+systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+ pcre2-jit? ( pcre2 )
+ pcre? ( !pcre2 )
+ device-atlas? ( pcre )
+ ?? ( slz zlib )"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ pcre2? (
+ dev-libs/libpcre
+ pcre2-jit? ( dev-libs/libpcre2[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ slz? ( dev-libs/libslz:= )
+ zlib? ( sys-libs/zlib )
+ lua? ( dev-lang/lua:5.3 )
+ device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}"
+
+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() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+
+ if use net_ns; then
+ CONFIG_CHECK="~NET_NS"
+ linux-info_pkg_setup
+ fi
+}
+
+src_compile() {
+ local -a args=(
+ V=1
+ TARGET=linux2628
+ USE_GETADDRINFO=1
+ USE_TFO=1
+ )
+
+ # 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
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${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 examples/seamless_reload.txt
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/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.0.13.ebuild b/net-proxy/haproxy/haproxy-2.0.13.ebuild
new file mode 100644
index 000000000000..9d63986726c7
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-2.0.13.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit user toolchain-funcs flag-o-matic 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"
+IUSE="+crypt doc examples libressl 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 )
+ device-atlas? ( pcre )
+ ?? ( slz zlib )"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ pcre2? (
+ dev-libs/libpcre
+ pcre2-jit? ( dev-libs/libpcre2[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ slz? ( dev-libs/libslz:= )
+ zlib? ( sys-libs/zlib )
+ lua? ( dev-lang/lua:5.3 )
+ device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}"
+
+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() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+
+ 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
+
+ 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}" ${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
+}