Gentoo Archives: gentoo-commits

From: Christian Ruppert <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/haproxy/files/, net-proxy/haproxy/
Date: Tue, 28 Jun 2022 09:27:20
Message-Id: 1656408432.1e135fe1d9b508e778de85d44f40382f2221f7ea.idl0r@gentoo
1 commit: 1e135fe1d9b508e778de85d44f40382f2221f7ea
2 Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 28 09:25:58 2022 +0000
4 Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 28 09:27:12 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e135fe1
7
8 net-proxy/haproxy: Add LUA 5.4 support, thanks to Mike Lothian
9
10 Bug: https://bugs.gentoo.org/852809
11 Package-Manager: Portage-3.0.30, Repoman-3.0.3
12 Signed-off-by: Christian Ruppert <idl0r <AT> gentoo.org>
13
14 net-proxy/haproxy/files/haproxy-lua54.patch | 63 +++++++++++++++++++++++++++++
15 net-proxy/haproxy/haproxy-2.4.17.ebuild | 6 ++-
16 net-proxy/haproxy/haproxy-2.4.9999.ebuild | 6 ++-
17 net-proxy/haproxy/haproxy-2.6.1.ebuild | 6 ++-
18 net-proxy/haproxy/haproxy-2.6.9999.ebuild | 6 ++-
19 net-proxy/haproxy/haproxy-9999.ebuild | 6 ++-
20 6 files changed, 88 insertions(+), 5 deletions(-)
21
22 diff --git a/net-proxy/haproxy/files/haproxy-lua54.patch b/net-proxy/haproxy/files/haproxy-lua54.patch
23 new file mode 100644
24 index 000000000000..c89310120ab8
25 --- /dev/null
26 +++ b/net-proxy/haproxy/files/haproxy-lua54.patch
27 @@ -0,0 +1,63 @@
28 +From 4634eb54a7dbfb38b0d2db8282ce281aa9ff5296 Mon Sep 17 00:00:00 2001
29 +From: Christian Ruppert <idl0r@××××.de>
30 +Date: Tue, 28 Jun 2022 10:03:00 +0200
31 +Subject: [PATCH] Add Lua 5.4 autodetect
32 +
33 +This patch is based on:
34 +https://www.mail-archive.com/haproxy@××××××××.org/msg39689.html
35 +Thanks to Callum Farmer!
36 +
37 +Signed-off-by: Christian Ruppert <idl0r@××××.de>
38 +---
39 + INSTALL | 6 +++---
40 + Makefile | 8 ++++----
41 + 2 files changed, 7 insertions(+), 7 deletions(-)
42 +
43 +diff --git a/INSTALL b/INSTALL
44 +index 96936ea46..9269051af 100644
45 +--- a/INSTALL
46 ++++ b/INSTALL
47 +@@ -324,9 +324,9 @@ Lua is an embedded programming language supported by HAProxy to provide more
48 + advanced scripting capabilities. Only versions 5.3 and above are supported.
49 + In order to enable Lua support, please specify "USE_LUA=1" on the command line.
50 + Some systems provide this library under various names to avoid conflicts with
51 +-previous versions. By default, HAProxy looks for "lua5.3", "lua53", "lua". If
52 +-your system uses a different naming, you may need to set the library name in
53 +-the "LUA_LIB_NAME" variable.
54 ++previous versions. By default, HAProxy looks for "lua5.4", "lua54", "lua5.3",
55 ++"lua53", "lua". If your system uses a different naming, you may need to set the
56 ++library name in the "LUA_LIB_NAME" variable.
57 +
58 + If Lua is not provided on your system, it can be very simply built locally. It
59 + can be downloaded from https://www.lua.org/, extracted and built, for example :
60 +diff --git a/Makefile b/Makefile
61 +index 814837133..85f6c632d 100644
62 +--- a/Makefile
63 ++++ b/Makefile
64 +@@ -104,7 +104,7 @@
65 + # LUA_LIB : force the lib path to lua
66 + # LUA_INC : force the include path to lua
67 + # LUA_LIB_NAME : force the lib name (or automatically evaluated, by order of
68 +-# priority : lua5.3, lua53, lua).
69 ++# priority : lua5.4, lua54, lua5.3, lua53, lua).
70 + # OT_DEBUG : compile the OpenTracing filter in debug mode
71 + # OT_INC : force the include path to libopentracing-c-wrapper
72 + # OT_LIB : force the lib path to libopentracing-c-wrapper
73 +@@ -648,11 +648,11 @@ OPTIONS_CFLAGS += $(if $(LUA_INC),-I$(LUA_INC))
74 + LUA_LD_FLAGS := -Wl,$(if $(EXPORT_SYMBOL),$(EXPORT_SYMBOL),--export-dynamic) $(if $(LUA_LIB),-L$(LUA_LIB))
75 + ifeq ($(LUA_LIB_NAME),)
76 + # Try to automatically detect the Lua library
77 +-LUA_LIB_NAME := $(firstword $(foreach lib,lua5.3 lua53 lua,$(call check_lua_lib,$(lib),$(LUA_LD_FLAGS))))
78 ++LUA_LIB_NAME := $(firstword $(foreach lib,lua5.4 lua54 lua5.3 lua53 lua,$(call check_lua_lib,$(lib),$(LUA_LD_FLAGS))))
79 + ifeq ($(LUA_LIB_NAME),)
80 +-$(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, ...))
81 ++$(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, ...))
82 + endif
83 +-LUA_INC := $(firstword $(foreach lib,lua5.3 lua53 lua,$(call check_lua_inc,$(lib),"/usr/include/")))
84 ++LUA_INC := $(firstword $(foreach lib,lua5.4 lua54 lua5.3 lua53 lua,$(call check_lua_inc,$(lib),"/usr/include/")))
85 + ifneq ($(LUA_INC),)
86 + OPTIONS_CFLAGS += -I$(LUA_INC)
87 + endif
88 +--
89 +2.35.1
90 +
91
92 diff --git a/net-proxy/haproxy/haproxy-2.4.17.ebuild b/net-proxy/haproxy/haproxy-2.4.17.ebuild
93 index 2b772750ef60..fe83c6a1fb10 100644
94 --- a/net-proxy/haproxy/haproxy-2.4.17.ebuild
95 +++ b/net-proxy/haproxy/haproxy-2.4.17.ebuild
96 @@ -3,7 +3,7 @@
97
98 EAPI="7"
99
100 -LUA_COMPAT=( lua5-3 )
101 +LUA_COMPAT=( lua5-4 lua5-3 )
102
103 [[ ${PV} == *9999 ]] && SCM="git-r3"
104 inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
105 @@ -53,6 +53,10 @@ S="${WORKDIR}/${MY_P}"
106 DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
107 EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack )
108
109 +PATCHES=(
110 + "${FILESDIR}"/${PN}-lua54.patch
111 +)
112 +
113 haproxy_use() {
114 (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
115
116
117 diff --git a/net-proxy/haproxy/haproxy-2.4.9999.ebuild b/net-proxy/haproxy/haproxy-2.4.9999.ebuild
118 index 2b772750ef60..fe83c6a1fb10 100644
119 --- a/net-proxy/haproxy/haproxy-2.4.9999.ebuild
120 +++ b/net-proxy/haproxy/haproxy-2.4.9999.ebuild
121 @@ -3,7 +3,7 @@
122
123 EAPI="7"
124
125 -LUA_COMPAT=( lua5-3 )
126 +LUA_COMPAT=( lua5-4 lua5-3 )
127
128 [[ ${PV} == *9999 ]] && SCM="git-r3"
129 inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
130 @@ -53,6 +53,10 @@ S="${WORKDIR}/${MY_P}"
131 DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
132 EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack )
133
134 +PATCHES=(
135 + "${FILESDIR}"/${PN}-lua54.patch
136 +)
137 +
138 haproxy_use() {
139 (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
140
141
142 diff --git a/net-proxy/haproxy/haproxy-2.6.1.ebuild b/net-proxy/haproxy/haproxy-2.6.1.ebuild
143 index daf0687ac086..dbf2cbf0aea1 100644
144 --- a/net-proxy/haproxy/haproxy-2.6.1.ebuild
145 +++ b/net-proxy/haproxy/haproxy-2.6.1.ebuild
146 @@ -3,7 +3,7 @@
147
148 EAPI="7"
149
150 -LUA_COMPAT=( lua5-3 )
151 +LUA_COMPAT=( lua5-4 lua5-3 )
152
153 [[ ${PV} == *9999 ]] && SCM="git-r3"
154 inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
155 @@ -53,6 +53,10 @@ S="${WORKDIR}/${MY_P}"
156 DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
157 EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack )
158
159 +PATCHES=(
160 + "${FILESDIR}"/${PN}-lua54.patch
161 +)
162 +
163 haproxy_use() {
164 (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
165
166
167 diff --git a/net-proxy/haproxy/haproxy-2.6.9999.ebuild b/net-proxy/haproxy/haproxy-2.6.9999.ebuild
168 index daf0687ac086..dbf2cbf0aea1 100644
169 --- a/net-proxy/haproxy/haproxy-2.6.9999.ebuild
170 +++ b/net-proxy/haproxy/haproxy-2.6.9999.ebuild
171 @@ -3,7 +3,7 @@
172
173 EAPI="7"
174
175 -LUA_COMPAT=( lua5-3 )
176 +LUA_COMPAT=( lua5-4 lua5-3 )
177
178 [[ ${PV} == *9999 ]] && SCM="git-r3"
179 inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
180 @@ -53,6 +53,10 @@ S="${WORKDIR}/${MY_P}"
181 DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
182 EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack )
183
184 +PATCHES=(
185 + "${FILESDIR}"/${PN}-lua54.patch
186 +)
187 +
188 haproxy_use() {
189 (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
190
191
192 diff --git a/net-proxy/haproxy/haproxy-9999.ebuild b/net-proxy/haproxy/haproxy-9999.ebuild
193 index daf0687ac086..dbf2cbf0aea1 100644
194 --- a/net-proxy/haproxy/haproxy-9999.ebuild
195 +++ b/net-proxy/haproxy/haproxy-9999.ebuild
196 @@ -3,7 +3,7 @@
197
198 EAPI="7"
199
200 -LUA_COMPAT=( lua5-3 )
201 +LUA_COMPAT=( lua5-4 lua5-3 )
202
203 [[ ${PV} == *9999 ]] && SCM="git-r3"
204 inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
205 @@ -53,6 +53,10 @@ S="${WORKDIR}/${MY_P}"
206 DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
207 EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack )
208
209 +PATCHES=(
210 + "${FILESDIR}"/${PN}-lua54.patch
211 +)
212 +
213 haproxy_use() {
214 (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"