commit:     edc20f11d95197bcae933e54c59c7a54150fca31
Author:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 21 17:01:07 2023 +0000
Commit:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
CommitDate: Mon Aug 21 17:02:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edc20f11

net-proxy/haproxy: Bump to 2.4.24

Signed-off-by: Christian Ruppert <idl0r <AT> gentoo.org>

 net-proxy/haproxy/Manifest              |   1 +
 net-proxy/haproxy/haproxy-2.4.24.ebuild | 190 ++++++++++++++++++++++++++++++++
 2 files changed, 191 insertions(+)

diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
index 9a74bc0ab513..f5597547e170 100644
--- a/net-proxy/haproxy/Manifest
+++ b/net-proxy/haproxy/Manifest
@@ -2,6 +2,7 @@ DIST haproxy-2.2.25.tar.gz 2957420 BLAKE2B 
58f85c063bada9c943415ff8a8e51232dec0f
 DIST haproxy-2.2.30.tar.gz 2974259 BLAKE2B 
fd506d4f449194ea3c72190f2d92233ba7bac04f9cc69173c0c1b95ba66658ddcaa49fca10737b5af5ad8bc4d5efcfd17e3209f703e9399093786c72647ddafb
 SHA512 
9c8486fac3794df97151468a1cbe26aa1fd07e1e9fd00f8adf35144e39eebe01795741e984891f0501184228ac431a3cf8676361aa9d8d415a58edabcc515c28
 DIST haproxy-2.4.18.tar.gz 3626923 BLAKE2B 
1ec312a5607634f7906cfcf5d4e22d829bdca9ee436d2364ff30552375b3acaf748a79dd8a67e215007786aa57ae305e9270d62a07397bfc34f72799e4870220
 SHA512 
4362ebf5eef6560adf558a4db596c2a0349dca05ee51e69c60f5e995d364e4f68d3422391fc5286dd8e2e65ce41a459dbbcba01e6f7b5918870b214683922488
 DIST haproxy-2.4.23.tar.gz 3652465 BLAKE2B 
271fd166365f5589653b6651d30306689e99710c27964e70a126469c3b9b616af2923be2276fc8c87362303388ee2bf28e80ca8bfa02dc45bc0e2d931e33e685
 SHA512 
d40203f9bf4f4a76dce09d0b1c785060d545dd8b7907b752d7fec9b12d7e2e4c2c7aca915d72c79e19040a75bd7d338c0783f9897cf1a46bdb047e336a0aa227
+DIST haproxy-2.4.24.tar.gz 3657466 BLAKE2B 
b8b7065ee87a02b239e55e2b6943aa56a6613e87bb76e086b60bda35221c7a6a0a70e4dd8765914c6af9c4f4f3d54e77143f3d32409473bb2d139f956fc3d2b2
 SHA512 
48ff30ab27c6c92309255ba8aae25e950be8342d35f527bd5ff4eba05fa4049c7bdbc5acbcf7c62cff81af0b0746fe29079334a859cd7a99b7ab4688774239db
 DIST haproxy-2.6.14.tar.gz 4067797 BLAKE2B 
20439faeca2c3e789542cf34d988f4de2ef643e7dd1214cad4cb2d70e39b047f32bd180cd8c410a4f7b17f7ed891938bf1b18e21d20bb41eef603ae99619810d
 SHA512 
5acfaffba8df65d4dbbc57cdb61fd4a9e415214ee2dc8dabc3877da5501c46f4abe64a4512999ebd391e03d38f8ed146fe8a6a5deb90197c5255325f8749a601
 DIST haproxy-2.6.15.tar.gz 4074156 BLAKE2B 
b785cb30fe34382dfd65efd1c6492434af154004bc96109a65988ff67974dedd22ddcc68f1907f9af7b3ba6e8ffde13db7ac5fef513ece1495ab559c6c2560f2
 SHA512 
e308f8f89df06503e10132afcaf7df9d0253122f38c44acd1ddf3e2a3d769f7721dd361d12db5948248ae42bcd7aab368e6515ccfe1e38c7bd78df764a6833eb
 DIST haproxy-2.7.10.tar.gz 4191948 BLAKE2B 
66a64f7315d8ff4ca28d94b3dc06b327d5845bce146aa84b0b7414ef264836e1e172dc03ae44d255ddb1366eeead8959189a918669559e4e91934f68690f0b46
 SHA512 
47896b1084eb02a84ef6d08697c0e57147bdda1abc9b2e0eec4403297236f49f81011656a4d4f53379a8259d1dc3a55abc639905983f8cb0e97f41ac83ff871e

diff --git a/net-proxy/haproxy/haproxy-2.4.24.ebuild 
b/net-proxy/haproxy/haproxy-2.4.24.ebuild
new file mode 100644
index 000000000000..291a00595e4a
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-2.4.24.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+LUA_COMPAT=( lua5-4 lua5-3 )
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit toolchain-funcs 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"
+elif [[ ${PV} == 9999 ]]; then
+       EGIT_REPO_URI="https://git.haproxy.org/git/haproxy.git/";
+       EGIT_BRANCH=master
+else
+       EGIT_REPO_URI="https://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 prometheus-exporter
+ssl systemd +threads tools zlib lua 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+       lua? ( ${LUA_REQUIRED_USE} )
+       ?? ( slz zlib )"
+
+BDEPEND="virtual/pkgconfig"
+DEPEND="
+       crypt? ( virtual/libcrypt:= )
+       pcre? (
+               dev-libs/libpcre2:=
+               pcre-jit? ( dev-libs/libpcre2:=[jit] )
+       )
+       ssl? (
+               dev-libs/openssl:0=
+       )
+       systemd? ( sys-apps/systemd )
+       zlib? ( sys-libs/zlib )
+       lua? ( ${LUA_DEPS} )"
+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
+               # Switching to PCRE2 by default, bug 838013
+               PCRE=
+               PCRE_JIT=
+       )
+
+       if use elibc_musl; then
+               args+=( TARGET=linux-musl )
+       else
+               args+=( TARGET=linux-glibc )
+       fi
+
+       # TODO: PCRE2_WIDTH?
+       args+=( $(haproxy_use threads THREAD) )
+       args+=( $(haproxy_use crypt LIBCRYPT) )
+       args+=( $(haproxy_use net_ns NS) )
+       args+=( $(haproxy_use pcre PCRE2) )
+       args+=( $(haproxy_use pcre-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 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="${ESYSROOT}"/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="${ESYSROOT}"/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="${ESYSROOT}"/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="${ESYSROOT}"/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
+
+       newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+       newinitd "${FILESDIR}/${PN}.initd-r8" ${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
+
+       insinto /usr/share/vim/vimfiles/syntax
+       doins admin/syntax-highlight/haproxy.vim
+}
+
+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
+}

Reply via email to