diff options
author | Christian Ruppert <idl0r@gentoo.org> | 2022-06-28 11:25:58 +0200 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2022-06-28 11:27:12 +0200 |
commit | 1e135fe1d9b508e778de85d44f40382f2221f7ea (patch) | |
tree | 6202a82d15d713eec7e406728c07cb5734f2c222 /net-proxy | |
parent | profiles/base: Remove obsolte net-proxy/haproxy[lua] mask (diff) | |
download | gentoo-1e135fe1d9b508e778de85d44f40382f2221f7ea.tar.gz gentoo-1e135fe1d9b508e778de85d44f40382f2221f7ea.tar.bz2 gentoo-1e135fe1d9b508e778de85d44f40382f2221f7ea.zip |
net-proxy/haproxy: Add LUA 5.4 support, thanks to Mike Lothian
Bug: https://bugs.gentoo.org/852809
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/haproxy/files/haproxy-lua54.patch | 63 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-2.4.17.ebuild | 6 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-2.4.9999.ebuild | 6 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-2.6.1.ebuild | 6 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-2.6.9999.ebuild | 6 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-9999.ebuild | 6 |
6 files changed, 88 insertions, 5 deletions
diff --git a/net-proxy/haproxy/files/haproxy-lua54.patch b/net-proxy/haproxy/files/haproxy-lua54.patch new file mode 100644 index 000000000000..c89310120ab8 --- /dev/null +++ b/net-proxy/haproxy/files/haproxy-lua54.patch @@ -0,0 +1,63 @@ +From 4634eb54a7dbfb38b0d2db8282ce281aa9ff5296 Mon Sep 17 00:00:00 2001 +From: Christian Ruppert <idl0r@qasl.de> +Date: Tue, 28 Jun 2022 10:03:00 +0200 +Subject: [PATCH] Add Lua 5.4 autodetect + +This patch is based on: +https://www.mail-archive.com/haproxy@formilux.org/msg39689.html +Thanks to Callum Farmer! + +Signed-off-by: Christian Ruppert <idl0r@qasl.de> +--- + INSTALL | 6 +++--- + Makefile | 8 ++++---- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/INSTALL b/INSTALL +index 96936ea46..9269051af 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -324,9 +324,9 @@ Lua is an embedded programming language supported by HAProxy to provide more + advanced scripting capabilities. Only versions 5.3 and above are supported. + In order to enable Lua support, please specify "USE_LUA=1" on the command line. + Some systems provide this library under various names to avoid conflicts with +-previous versions. By default, HAProxy looks for "lua5.3", "lua53", "lua". If +-your system uses a different naming, you may need to set the library name in +-the "LUA_LIB_NAME" variable. ++previous versions. By default, HAProxy looks for "lua5.4", "lua54", "lua5.3", ++"lua53", "lua". If your system uses a different naming, you may need to set the ++library name in the "LUA_LIB_NAME" variable. + + If Lua is not provided on your system, it can be very simply built locally. It + can be downloaded from https://www.lua.org/, extracted and built, for example : +diff --git a/Makefile b/Makefile +index 814837133..85f6c632d 100644 +--- a/Makefile ++++ b/Makefile +@@ -104,7 +104,7 @@ + # LUA_LIB : force the lib path to lua + # LUA_INC : force the include path to lua + # LUA_LIB_NAME : force the lib name (or automatically evaluated, by order of +-# priority : lua5.3, lua53, lua). ++# priority : lua5.4, lua54, lua5.3, lua53, lua). + # OT_DEBUG : compile the OpenTracing filter in debug mode + # OT_INC : force the include path to libopentracing-c-wrapper + # OT_LIB : force the lib path to libopentracing-c-wrapper +@@ -648,11 +648,11 @@ OPTIONS_CFLAGS += $(if $(LUA_INC),-I$(LUA_INC)) + LUA_LD_FLAGS := -Wl,$(if $(EXPORT_SYMBOL),$(EXPORT_SYMBOL),--export-dynamic) $(if $(LUA_LIB),-L$(LUA_LIB)) + ifeq ($(LUA_LIB_NAME),) + # Try to automatically detect the Lua library +-LUA_LIB_NAME := $(firstword $(foreach lib,lua5.3 lua53 lua,$(call check_lua_lib,$(lib),$(LUA_LD_FLAGS)))) ++LUA_LIB_NAME := $(firstword $(foreach lib,lua5.4 lua54 lua5.3 lua53 lua,$(call check_lua_lib,$(lib),$(LUA_LD_FLAGS)))) + ifeq ($(LUA_LIB_NAME),) +-$(error unable to automatically detect the Lua library name, you can enforce its name with LUA_LIB_NAME=<name> (where <name> can be lua5.3, lua53, lua, ...)) ++$(error unable to automatically detect the Lua library name, you can enforce its name with LUA_LIB_NAME=<name> (where <name> can be lua5.4, lua54, lua, ...)) + endif +-LUA_INC := $(firstword $(foreach lib,lua5.3 lua53 lua,$(call check_lua_inc,$(lib),"/usr/include/"))) ++LUA_INC := $(firstword $(foreach lib,lua5.4 lua54 lua5.3 lua53 lua,$(call check_lua_inc,$(lib),"/usr/include/"))) + ifneq ($(LUA_INC),) + OPTIONS_CFLAGS += -I$(LUA_INC) + endif +-- +2.35.1 + diff --git a/net-proxy/haproxy/haproxy-2.4.17.ebuild b/net-proxy/haproxy/haproxy-2.4.17.ebuild index 2b772750ef60..fe83c6a1fb10 100644 --- a/net-proxy/haproxy/haproxy-2.4.17.ebuild +++ b/net-proxy/haproxy/haproxy-2.4.17.ebuild @@ -3,7 +3,7 @@ EAPI="7" -LUA_COMPAT=( lua5-3 ) +LUA_COMPAT=( lua5-4 lua5-3 ) [[ ${PV} == *9999 ]] && SCM="git-r3" inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM} @@ -53,6 +53,10 @@ S="${WORKDIR}/${MY_P}" DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack ) +PATCHES=( + "${FILESDIR}"/${PN}-lua54.patch +) + haproxy_use() { (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" diff --git a/net-proxy/haproxy/haproxy-2.4.9999.ebuild b/net-proxy/haproxy/haproxy-2.4.9999.ebuild index 2b772750ef60..fe83c6a1fb10 100644 --- a/net-proxy/haproxy/haproxy-2.4.9999.ebuild +++ b/net-proxy/haproxy/haproxy-2.4.9999.ebuild @@ -3,7 +3,7 @@ EAPI="7" -LUA_COMPAT=( lua5-3 ) +LUA_COMPAT=( lua5-4 lua5-3 ) [[ ${PV} == *9999 ]] && SCM="git-r3" inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM} @@ -53,6 +53,10 @@ S="${WORKDIR}/${MY_P}" DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack ) +PATCHES=( + "${FILESDIR}"/${PN}-lua54.patch +) + haproxy_use() { (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" diff --git a/net-proxy/haproxy/haproxy-2.6.1.ebuild b/net-proxy/haproxy/haproxy-2.6.1.ebuild index daf0687ac086..dbf2cbf0aea1 100644 --- a/net-proxy/haproxy/haproxy-2.6.1.ebuild +++ b/net-proxy/haproxy/haproxy-2.6.1.ebuild @@ -3,7 +3,7 @@ EAPI="7" -LUA_COMPAT=( lua5-3 ) +LUA_COMPAT=( lua5-4 lua5-3 ) [[ ${PV} == *9999 ]] && SCM="git-r3" inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM} @@ -53,6 +53,10 @@ S="${WORKDIR}/${MY_P}" DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack ) +PATCHES=( + "${FILESDIR}"/${PN}-lua54.patch +) + haproxy_use() { (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" diff --git a/net-proxy/haproxy/haproxy-2.6.9999.ebuild b/net-proxy/haproxy/haproxy-2.6.9999.ebuild index daf0687ac086..dbf2cbf0aea1 100644 --- a/net-proxy/haproxy/haproxy-2.6.9999.ebuild +++ b/net-proxy/haproxy/haproxy-2.6.9999.ebuild @@ -3,7 +3,7 @@ EAPI="7" -LUA_COMPAT=( lua5-3 ) +LUA_COMPAT=( lua5-4 lua5-3 ) [[ ${PV} == *9999 ]] && SCM="git-r3" inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM} @@ -53,6 +53,10 @@ S="${WORKDIR}/${MY_P}" DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack ) +PATCHES=( + "${FILESDIR}"/${PN}-lua54.patch +) + haproxy_use() { (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" diff --git a/net-proxy/haproxy/haproxy-9999.ebuild b/net-proxy/haproxy/haproxy-9999.ebuild index daf0687ac086..dbf2cbf0aea1 100644 --- a/net-proxy/haproxy/haproxy-9999.ebuild +++ b/net-proxy/haproxy/haproxy-9999.ebuild @@ -3,7 +3,7 @@ EAPI="7" -LUA_COMPAT=( lua5-3 ) +LUA_COMPAT=( lua5-4 lua5-3 ) [[ ${PV} == *9999 ]] && SCM="git-r3" inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM} @@ -53,6 +53,10 @@ S="${WORKDIR}/${MY_P}" DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack ) +PATCHES=( + "${FILESDIR}"/${PN}-lua54.patch +) + haproxy_use() { (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |