Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/lua/
Date: Wed, 24 Aug 2022 16:24:16
Message-Id: 1661358239.061cfa329cdce1745f6cefe4ac146204b2338370.soap@gentoo
1 commit: 061cfa329cdce1745f6cefe4ac146204b2338370
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 24 16:23:59 2022 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 24 16:23:59 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=061cfa32
7
8 dev-lang/lua: drop 5.1.5-r106, 5.3.6-r2, 5.4.2-r1, 5.4.2-r2
9
10 Signed-off-by: David Seifert <soap <AT> gentoo.org>
11
12 dev-lang/lua/Manifest | 2 -
13 dev-lang/lua/lua-5.1.5-r106.ebuild | 151 ---------------------------
14 dev-lang/lua/lua-5.3.6-r2.ebuild | 200 ------------------------------------
15 dev-lang/lua/lua-5.4.2-r1.ebuild | 197 -----------------------------------
16 dev-lang/lua/lua-5.4.2-r2.ebuild | 203 -------------------------------------
17 5 files changed, 753 deletions(-)
18
19 diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
20 index 9c5d059a97a0..b3f323cb8f89 100644
21 --- a/dev-lang/lua/Manifest
22 +++ b/dev-lang/lua/Manifest
23 @@ -1,7 +1,5 @@
24 DIST lua-5.1.5.tar.gz 221213 BLAKE2B 915eb8e8c9d7e460eacf1d7a59309c60dfc0f5d9d3d76fbc9764e7cae85920b95096db1c27b69ac53378a145c29efde403e88166a1332a67150d9d3a897aba02 SHA512 0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9
25 DIST lua-5.3.4-tests.tar.gz 103438 BLAKE2B ac82708022e7729039111c3df4fe24302c8d0efb224afb4828871ac085a3d64c41d674a6f9369035de01ed1f7f75a3d2ce16917f37e774e923216aac0be03e09 SHA512 79575d100a2efabc8243f55b55d912443e09ef7e8b0219cb93541d85c2ba802fb9538015e1228703f09ca57bdb28a640a8f1fa0735716ba1e4bca2179c712dfb
26 DIST lua-5.3.6.tar.gz 303770 BLAKE2B 07c37c56f43095a4f6ca8eb8b3adf19afd53107c02b62b2bcb3619565cb2100d5f823493eef93092d5e312b30fc28885a6d9e8f0ba5a23b5bed86dc4515a5d61 SHA512 ccc380d5e114d54504de0bfb0321ca25ec325d6ff1bfee44b11870b660762d1a9bf120490c027a0088128b58bb6b5271bbc648400cab84d2dc22b512c4841681
27 -DIST lua-5.4.2-tests.tar.gz 128901 BLAKE2B 10e4f0e8760f9cbd4761fa26665008ae7412539f79a6a7687029808f08f0ae4a24721e787e2e87e5080c16e9dcce8577a7a39ddc6d3e483a3cfe11756139594e SHA512 1516c59deca211c38444bbf97b18e988e939209b03915d3691d756eeed31b52e8d3a1f05b71ac0b561965274c7b6f3afc4244cd2e9069995696e737e2d9dd40b
28 -DIST lua-5.4.2.tar.gz 353472 BLAKE2B 7e0e642684df635ed1c48db45989e86a2638024e30a170addf700b0c7d32276f1eaef80898539c671039c20cb0bed4861b12c58f4b8211653a17e89bad278d87 SHA512 9454a6ffd973598f2f4a2399834c31c4d5090bd12e716776e3189aa57760319d114ee64a8338bbc2ef5e08150bf0adc2ad94a1b2677f38538a43359969d4d920
29 DIST lua-5.4.4-tests.tar.gz 134094 BLAKE2B 63f5888a506f504f849fb2000cf551960df8eca3107601dcc8243e8ea5a1b13a70bff7dea4aebe3ab35b7e9df58c2ca44a7a27aa4de82240877eb8d7a017642e SHA512 08b3d764b3f362a2cddf5a23e71b16eea96a234a970fa0048bab358ebbd77f99d9bd132af12254383c5bb5426516e1ce2107e529e88d3963869255f5a41198ef
30 DIST lua-5.4.4.tar.gz 360876 BLAKE2B 8747ef5c83bd4c54b73eeaad6991ab5fccc54ee000973afd9cf3367b8945f03c54e843ec88c48043003cd9d3b42281c593cb485b7165add2744cfea06d8b7668 SHA512 af0c35d5ba00fecbb2dd617bd7b825edf7418a16a73076e04f2a0df58cdbf098dc3ff4402e974afd789eb5d86d2e12ec6df9c84b99b23656ea694a85f83bcd21
31
32 diff --git a/dev-lang/lua/lua-5.1.5-r106.ebuild b/dev-lang/lua/lua-5.1.5-r106.ebuild
33 deleted file mode 100644
34 index 27d6f60db390..000000000000
35 --- a/dev-lang/lua/lua-5.1.5-r106.ebuild
36 +++ /dev/null
37 @@ -1,151 +0,0 @@
38 -# Copyright 1999-2021 Gentoo Authors
39 -# Distributed under the terms of the GNU General Public License v2
40 -
41 -EAPI=7
42 -inherit multilib multilib-minimal portability toolchain-funcs
43 -
44 -DESCRIPTION="A powerful light-weight programming language designed for extending applications"
45 -HOMEPAGE="https://www.lua.org/"
46 -SRC_URI="https://www.lua.org/ftp/${P}.tar.gz"
47 -
48 -LICENSE="MIT"
49 -SLOT="5.1"
50 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
51 -IUSE="+deprecated readline"
52 -
53 -COMMON_DEPEND="
54 - >=app-eselect/eselect-lua-3
55 - readline? ( >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] )
56 - !dev-lang/lua:0"
57 -DEPEND="${COMMON_DEPEND}"
58 -RDEPEND="${COMMON_DEPEND}"
59 -BDEPEND="sys-devel/libtool"
60 -
61 -MULTILIB_WRAPPED_HEADERS=(
62 - /usr/include/lua${SLOT}/luaconf.h
63 -)
64 -
65 -src_prepare() {
66 - PATCHES=(
67 - "${FILESDIR}/lua-5.1.5-make.patch"
68 - "${FILESDIR}/${PN}-$(ver_cut 1-2)-module_paths.patch"
69 - )
70 - if ! use deprecated ; then
71 - # patches from 5.1.4 still apply
72 - PATCHES+=(
73 - "${FILESDIR}"/${PN}-5.1.4-deprecated.patch
74 - "${FILESDIR}"/${PN}-5.1.4-test.patch
75 - )
76 - fi
77 - if ! use readline ; then
78 - PATCHES+=(
79 - "${FILESDIR}"/${PN}-$(ver_cut 1-2)-readline.patch
80 - )
81 - fi
82 -
83 - default
84 -
85 - # use glibtool on Darwin (versus Apple libtool)
86 - if [[ ${CHOST} == *-darwin* ]] ; then
87 - sed -i -e '/LIBTOOL = /s:libtool:glibtool:' \
88 - Makefile src/Makefile || die
89 - fi
90 -
91 - # correct lua versioning
92 - sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:5:1/' src/Makefile
93 -
94 - sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
95 -
96 - # Using dynamic linked lua is not recommended for performance
97 - # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
98 - # Mainly, this is of concern if your arch is poor with GPRs, like x86
99 - # Note that this only affects the interpreter binary (named lua), not the lua
100 - # compiler (built statically) nor the lua libraries.
101 -
102 - # A slotted Lua uses different directories for headers & names for
103 - # libraries, and pkgconfig should reflect that.
104 - sed -r -i \
105 - -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
106 - -e "/^includedir=/s,(/include)$,\1/lua${SLOT}," \
107 - -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \
108 - "${S}"/etc/lua.pc
109 -
110 - # custom Makefiles
111 - multilib_copy_sources
112 -}
113 -
114 -multilib_src_configure() {
115 - # We want packages to find our things...
116 - sed -i \
117 - -e 's:/usr/local:'${EPREFIX}'/usr:' \
118 - -e "s:\([/\"]\)\<lib\>:\1$(get_libdir):g" \
119 - etc/lua.pc src/luaconf.h || die
120 -}
121 -
122 -multilib_src_compile() {
123 - tc-export CC
124 - myflags=
125 - # what to link to liblua
126 - liblibs="-lm"
127 - liblibs="${liblibs} $(dlopen_lib)"
128 -
129 - # what to link to the executables
130 - mylibs=
131 - if use readline; then
132 - mylibs="-lreadline"
133 - fi
134 -
135 - cd src
136 - emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \
137 - RPATH="${EPREFIX}/usr/$(get_libdir)/" \
138 - LUA_LIBS="${mylibs}" \
139 - LIB_LIBS="${liblibs}" \
140 - V=$(ver_cut 1-2) \
141 - gentoo_all
142 -
143 - mv lua_test ../test/lua.static
144 -}
145 -
146 -multilib_src_install() {
147 - emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
148 - V=${SLOT} gentoo_install
149 -
150 - insinto /usr/$(get_libdir)/pkgconfig
151 - newins etc/lua.pc lua${SLOT}.pc
152 -}
153 -
154 -multilib_src_install_all() {
155 - DOCS="HISTORY README"
156 - HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
157 - einstalldocs
158 - newman doc/lua.1 lua${SLOT}.1
159 - newman doc/luac.1 luac${SLOT}.1
160 - find "${ED}" -name '*.la' -delete || die
161 - find "${ED}" -name 'liblua*.a' -delete || die
162 -}
163 -
164 -multilib_src_test() {
165 - local positive="bisect cf echo env factorial fib fibfor hello printf sieve
166 - sort trace-calls trace-globals"
167 - local negative="readonly"
168 - local test
169 -
170 - cd "${BUILD_DIR}" || die
171 - for test in ${positive}; do
172 - test/lua.static test/${test}.lua || die "test $test failed"
173 - done
174 -
175 - for test in ${negative}; do
176 - test/lua.static test/${test}.lua && die "test $test failed"
177 - done
178 -}
179 -
180 -pkg_postinst() {
181 - eselect lua set --if-unset "${PN}${SLOT}"
182 -
183 - if has_version "app-editor/emacs"; then
184 - if ! has_version "app-emacs/lua-mode"; then
185 - einfo "Install app-emacs/lua-mode for lua support for emacs"
186 - fi
187 - fi
188 -}
189
190 diff --git a/dev-lang/lua/lua-5.3.6-r2.ebuild b/dev-lang/lua/lua-5.3.6-r2.ebuild
191 deleted file mode 100644
192 index 3e04892b3645..000000000000
193 --- a/dev-lang/lua/lua-5.3.6-r2.ebuild
194 +++ /dev/null
195 @@ -1,200 +0,0 @@
196 -# Copyright 1999-2021 Gentoo Authors
197 -# Distributed under the terms of the GNU General Public License v2
198 -
199 -EAPI=7
200 -inherit autotools multilib multilib-minimal portability toolchain-funcs
201 -
202 -DESCRIPTION="A powerful light-weight programming language designed for extending applications"
203 -HOMEPAGE="https://www.lua.org/"
204 -TEST_PV="5.3.4"
205 -TEST_P="${PN}-${TEST_PV}-tests"
206 -SRC_URI="
207 - https://www.lua.org/ftp/${P}.tar.gz
208 - test? ( https://www.lua.org/tests/${TEST_P}.tar.gz )"
209 -
210 -LICENSE="MIT"
211 -SLOT="5.3"
212 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
213 -IUSE="+deprecated readline test test-complete"
214 -
215 -COMMON_DEPEND="
216 - >=app-eselect/eselect-lua-3
217 - readline? ( sys-libs/readline:0= )
218 - !dev-lang/lua:0"
219 -DEPEND="${COMMON_DEPEND}"
220 -RDEPEND="${COMMON_DEPEND}"
221 -BDEPEND="sys-devel/libtool"
222 -
223 -RESTRICT="!test? ( test )"
224 -
225 -MULTILIB_WRAPPED_HEADERS=(
226 - /usr/include/lua${SLOT}/luaconf.h
227 -)
228 -
229 -PATCHES=(
230 - "${FILESDIR}/lua-5.3.6-make.patch"
231 -)
232 -
233 -src_prepare() {
234 - default
235 - # use glibtool on Darwin (versus Apple libtool)
236 - if [[ ${CHOST} == *-darwin* ]] ; then
237 - sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
238 - Makefile src/Makefile || die
239 - fi
240 -
241 - # correct lua versioning
242 - sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
243 -
244 - sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
245 -
246 - if ! use readline ; then
247 - sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die
248 - fi
249 -
250 - # Using dynamic linked lua is not recommended for performance
251 - # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
252 - # Mainly, this is of concern if your arch is poor with GPRs, like x86
253 - # Note that this only affects the interpreter binary (named lua), not the lua
254 - # compiler (built statically) nor the lua libraries.
255 -
256 - # upstream does not use libtool, but we do (see bug #336167)
257 - cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
258 - eautoreconf
259 -
260 - # custom Makefiles
261 - multilib_copy_sources
262 -}
263 -
264 -multilib_src_configure() {
265 - sed -i \
266 - -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
267 - -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
268 - src/luaconf.h \
269 - || die "failed patching luaconf.h"
270 -
271 - econf
272 -}
273 -
274 -multilib_src_compile() {
275 - tc-export CC
276 -
277 - # what to link to liblua
278 - liblibs="-lm"
279 - liblibs="${liblibs} $(dlopen_lib)"
280 -
281 - # what to link to the executables
282 - mylibs=
283 - use readline && mylibs="-lreadline"
284 -
285 - cd src
286 -
287 - local myCFLAGS=""
288 - use deprecated && myCFLAGS="-DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2"
289 -
290 - case "${CHOST}" in
291 - *-mingw*) : ;;
292 - *) myCFLAGS+=" -DLUA_USE_LINUX" ;;
293 - esac
294 -
295 - emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
296 - SYSLDFLAGS="${LDFLAGS}" \
297 - RPATH="${EPREFIX}/usr/$(get_libdir)/" \
298 - LUA_LIBS="${mylibs}" \
299 - LIB_LIBS="${liblibs}" \
300 - V=$(ver_cut 1-2) \
301 - gentoo_all
302 -}
303 -
304 -multilib_src_install() {
305 - emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
306 - V=${SLOT} gentoo_install
307 -
308 - case $SLOT in
309 - 0)
310 - LIBNAME="lua"
311 - INCLUDEDIR_SUFFIX=''
312 - ;;
313 - *) LIBNAME="lua${SLOT}"
314 - INCLUDEDIR_SUFFIX="/lua${SLOT}"
315 - ;;
316 - esac
317 -
318 - # We want packages to find our things...
319 - # A slotted Lua uses different directories for headers & names for
320 - # libraries, and pkgconfig should reflect that.
321 - local PATCH_PV=$(ver_cut 1-2)
322 - cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
323 - sed -r -i \
324 - -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
325 - -e "s:^prefix= :prefix= ${EPREFIX}:" \
326 - -e "s:^V=.*:V= ${PATCH_PV}:" \
327 - -e "s:^R=.*:R= ${PV}:" \
328 - -e "s:/,lib,:/$(get_libdir):g" \
329 - -e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \
330 - -e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \
331 - "${WORKDIR}/lua.pc" || die
332 -
333 - insinto "/usr/$(get_libdir)/pkgconfig"
334 - newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
335 - # Copy Debian's symlink support:
336 - # https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19
337 - # FreeBSD calls the pkgconfig 'lua-5.3.pc'
338 - # Older systems called it 'lua53.pc'
339 - dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc"
340 - dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc"
341 -}
342 -
343 -multilib_src_install_all() {
344 - DOCS="README"
345 - HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
346 - einstalldocs
347 - newman doc/lua.1 lua${SLOT}.1
348 - newman doc/luac.1 luac${SLOT}.1
349 - find "${ED}" -name '*.la' -delete || die
350 - find "${ED}" -name 'liblua*.a' -delete || die
351 -}
352 -
353 -# Makefile contains a dummy target that doesn't do tests
354 -# but causes issues with slotted lua (bug #510360)
355 -src_test() {
356 - debug-print-function ${FUNCNAME} "$@"
357 - cd "${WORKDIR}/lua-${TEST_PV}-tests" || die
358 - # https://www.lua.org/tests/
359 - # There are two sets:
360 - # basic
361 - # complete.
362 - #
363 - # The basic subset is selected by passing -e'_U=true'
364 - # The complete set is noted to contain tests that may consume too much memory or have non-portable tests.
365 - # attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI)
366 - TEST_OPTS="$(usex test-complete '' '-e_U=true')"
367 - TEST_MARKER="${T}/test.failed"
368 - rm -f "${TEST_MARKER}"
369 -
370 - # If we are failing, set the marker file, and only check it after done all ABIs
371 - abi_src_test() {
372 - debug-print-function ${FUNCNAME} "$@"
373 - TEST_LOG="${T}/test.${MULTIBUILD_ID}.log"
374 - eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die
375 - grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}"
376 - return 0
377 - }
378 -
379 - multilib_foreach_abi abi_src_test
380 -
381 - if [ -e "${TEST_MARKER}" ]; then
382 - cat "${TEST_MARKER}"
383 - die "Tests failed"
384 - fi
385 -}
386 -
387 -pkg_postinst() {
388 - eselect lua set --if-unset "${PN}${SLOT}"
389 -
390 - if has_version "app-editor/emacs"; then
391 - if ! has_version "app-emacs/lua-mode"; then
392 - einfo "Install app-emacs/lua-mode for lua support for emacs"
393 - fi
394 - fi
395 -}
396
397 diff --git a/dev-lang/lua/lua-5.4.2-r1.ebuild b/dev-lang/lua/lua-5.4.2-r1.ebuild
398 deleted file mode 100644
399 index ab6a4fcb4fee..000000000000
400 --- a/dev-lang/lua/lua-5.4.2-r1.ebuild
401 +++ /dev/null
402 @@ -1,197 +0,0 @@
403 -# Copyright 1999-2021 Gentoo Authors
404 -# Distributed under the terms of the GNU General Public License v2
405 -
406 -EAPI=7
407 -inherit autotools multilib multilib-minimal portability toolchain-funcs
408 -
409 -DESCRIPTION="A powerful light-weight programming language designed for extending applications"
410 -HOMEPAGE="https://www.lua.org/"
411 -TEST_PV="5.4.2"
412 -TEST_P="${PN}-${TEST_PV}-tests"
413 -SRC_URI="
414 - https://www.lua.org/ftp/${P}.tar.gz
415 - test? ( https://www.lua.org/tests/${TEST_P}.tar.gz )"
416 -
417 -LICENSE="MIT"
418 -SLOT="5.4"
419 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
420 -IUSE="+deprecated readline test test-complete"
421 -
422 -COMMON_DEPEND="
423 - >=app-eselect/eselect-lua-3
424 - readline? ( sys-libs/readline:0= )
425 - !dev-lang/lua:0"
426 -DEPEND="${COMMON_DEPEND}"
427 -RDEPEND="${COMMON_DEPEND}"
428 -BDEPEND="sys-devel/libtool"
429 -
430 -RESTRICT="!test? ( test )"
431 -
432 -MULTILIB_WRAPPED_HEADERS=(
433 - /usr/include/lua${SLOT}/luaconf.h
434 -)
435 -
436 -PATCHES=(
437 - "${FILESDIR}"/lua-5.4.2-make.patch
438 -)
439 -
440 -src_prepare() {
441 - default
442 - # use glibtool on Darwin (versus Apple libtool)
443 - if [[ ${CHOST} == *-darwin* ]] ; then
444 - sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
445 - Makefile src/Makefile || die
446 - fi
447 -
448 - # correct lua versioning
449 - sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
450 -
451 - sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
452 -
453 - # Using dynamic linked lua is not recommended for performance
454 - # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
455 - # Mainly, this is of concern if your arch is poor with GPRs, like x86
456 - # Note that this only affects the interpreter binary (named lua), not the lua
457 - # compiler (built statically) nor the lua libraries.
458 -
459 - # upstream does not use libtool, but we do (see bug #336167)
460 - cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
461 - eautoreconf
462 -
463 - # custom Makefiles
464 - multilib_copy_sources
465 -}
466 -
467 -multilib_src_configure() {
468 - sed -i \
469 - -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
470 - -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
471 - src/luaconf.h \
472 - || die "failed patching luaconf.h"
473 -
474 - econf
475 -}
476 -
477 -multilib_src_compile() {
478 - tc-export CC
479 -
480 - # what to link to liblua
481 - liblibs="-lm"
482 - liblibs="${liblibs} $(dlopen_lib)"
483 -
484 - # what to link to the executables
485 - mylibs=
486 - use readline && mylibs="-lreadline"
487 -
488 - cd src
489 -
490 - local myCFLAGS=""
491 - use deprecated && myCFLAGS+="-DLUA_COMPAT_5_3 "
492 - use readline && myCFLAGS+="-DLUA_USE_READLINE "
493 -
494 - case "${CHOST}" in
495 - *-mingw*) : ;;
496 - *) myCFLAGS+="-DLUA_USE_LINUX " ;;
497 - esac
498 -
499 - emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
500 - SYSLDFLAGS="${LDFLAGS}" \
501 - RPATH="${EPREFIX}/usr/$(get_libdir)/" \
502 - LUA_LIBS="${mylibs}" \
503 - LIB_LIBS="${liblibs}" \
504 - V=$(ver_cut 1-2) \
505 - gentoo_all
506 -}
507 -
508 -multilib_src_install() {
509 - emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
510 - V=${SLOT} gentoo_install
511 -
512 - case $SLOT in
513 - 0)
514 - LIBNAME="lua"
515 - INCLUDEDIR_SUFFIX=''
516 - ;;
517 - *) LIBNAME="lua${SLOT}"
518 - INCLUDEDIR_SUFFIX="/lua${SLOT}"
519 - ;;
520 - esac
521 -
522 - # We want packages to find our things...
523 - # A slotted Lua uses different directories for headers & names for
524 - # libraries, and pkgconfig should reflect that.
525 - local PATCH_PV=$(ver_cut 1-2)
526 - cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
527 - sed -r -i \
528 - -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
529 - -e "s:^prefix= :prefix= ${EPREFIX}:" \
530 - -e "s:^V=.*:V= ${PATCH_PV}:" \
531 - -e "s:^R=.*:R= ${PV}:" \
532 - -e "s:/,lib,:/$(get_libdir):g" \
533 - -e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \
534 - -e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \
535 - "${WORKDIR}/lua.pc" || die
536 -
537 - insinto "/usr/$(get_libdir)/pkgconfig"
538 - newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
539 - # Copy Debian's symlink support:
540 - # https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19
541 - # FreeBSD calls the pkgconfig 'lua-5.3.pc'
542 - # Older systems called it 'lua53.pc'
543 - dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc"
544 - dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc"
545 -}
546 -
547 -multilib_src_install_all() {
548 - DOCS="README"
549 - HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
550 - einstalldocs
551 - newman doc/lua.1 lua${SLOT}.1
552 - newman doc/luac.1 luac${SLOT}.1
553 - find "${ED}" -name '*.la' -delete || die
554 - find "${ED}" -name 'liblua*.a' -delete || die
555 -}
556 -
557 -# Makefile contains a dummy target that doesn't do tests
558 -# but causes issues with slotted lua (bug #510360)
559 -src_test() {
560 - debug-print-function ${FUNCNAME} "$@"
561 - cd "${WORKDIR}/lua-${TEST_PV}-tests" || die
562 - # https://www.lua.org/tests/
563 - # There are two sets:
564 - # basic
565 - # complete.
566 - #
567 - # The basic subset is selected by passing -e'_U=true'
568 - # The complete set is noted to contain tests that may consume too much memory or have non-portable tests.
569 - # attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI)
570 - TEST_OPTS="$(usex test-complete '' '-e_U=true')"
571 - TEST_MARKER="${T}/test.failed"
572 - rm -f "${TEST_MARKER}"
573 -
574 - # If we are failing, set the marker file, and only check it after done all ABIs
575 - abi_src_test() {
576 - debug-print-function ${FUNCNAME} "$@"
577 - TEST_LOG="${T}/test.${MULTIBUILD_ID}.log"
578 - eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die
579 - grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}"
580 - return 0
581 - }
582 -
583 - multilib_foreach_abi abi_src_test
584 -
585 - if [ -e "${TEST_MARKER}" ]; then
586 - cat "${TEST_MARKER}"
587 - die "Tests failed"
588 - fi
589 -}
590 -
591 -pkg_postinst() {
592 - eselect lua set --if-unset "${PN}${SLOT}"
593 -
594 - if has_version "app-editor/emacs"; then
595 - if ! has_version "app-emacs/lua-mode"; then
596 - einfo "Install app-emacs/lua-mode for lua support for emacs"
597 - fi
598 - fi
599 -}
600
601 diff --git a/dev-lang/lua/lua-5.4.2-r2.ebuild b/dev-lang/lua/lua-5.4.2-r2.ebuild
602 deleted file mode 100644
603 index d3ea0294a6c4..000000000000
604 --- a/dev-lang/lua/lua-5.4.2-r2.ebuild
605 +++ /dev/null
606 @@ -1,203 +0,0 @@
607 -# Copyright 1999-2022 Gentoo Authors
608 -# Distributed under the terms of the GNU General Public License v2
609 -
610 -EAPI=7
611 -inherit autotools multilib multilib-minimal portability toolchain-funcs
612 -
613 -DESCRIPTION="A powerful light-weight programming language designed for extending applications"
614 -HOMEPAGE="https://www.lua.org/"
615 -TEST_PV="5.4.2"
616 -TEST_P="${PN}-${TEST_PV}-tests"
617 -SRC_URI="
618 - https://www.lua.org/ftp/${P}.tar.gz
619 - test? ( https://www.lua.org/tests/${TEST_P}.tar.gz )"
620 -
621 -LICENSE="MIT"
622 -SLOT="5.4"
623 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
624 -IUSE="+deprecated readline test test-complete"
625 -
626 -COMMON_DEPEND="
627 - >=app-eselect/eselect-lua-3
628 - readline? ( sys-libs/readline:0= )
629 - !dev-lang/lua:0"
630 -# Cross-compiling note:
631 -# Must use libtool from the target system (DEPEND) because
632 -# libtool from the build system (BDEPEND) is for building
633 -# native binaries.
634 -DEPEND="
635 - ${COMMON_DEPEND}
636 - sys-devel/libtool"
637 -RDEPEND="${COMMON_DEPEND}"
638 -
639 -RESTRICT="!test? ( test )"
640 -
641 -MULTILIB_WRAPPED_HEADERS=(
642 - /usr/include/lua${SLOT}/luaconf.h
643 -)
644 -
645 -PATCHES=(
646 - "${FILESDIR}"/lua-5.4.2-r2-make.patch
647 -)
648 -
649 -src_prepare() {
650 - default
651 - # use glibtool on Darwin (versus Apple libtool)
652 - if [[ ${CHOST} == *-darwin* ]] ; then
653 - sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
654 - Makefile src/Makefile || die
655 - fi
656 -
657 - # correct lua versioning
658 - sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
659 -
660 - sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
661 -
662 - # Using dynamic linked lua is not recommended for performance
663 - # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
664 - # Mainly, this is of concern if your arch is poor with GPRs, like x86
665 - # Note that this only affects the interpreter binary (named lua), not the lua
666 - # compiler (built statically) nor the lua libraries.
667 -
668 - # upstream does not use libtool, but we do (see bug #336167)
669 - cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
670 - eautoreconf
671 -
672 - # custom Makefiles
673 - multilib_copy_sources
674 -}
675 -
676 -multilib_src_configure() {
677 - sed -i \
678 - -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
679 - -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
680 - src/luaconf.h \
681 - || die "failed patching luaconf.h"
682 -
683 - econf
684 -}
685 -
686 -multilib_src_compile() {
687 - tc-export CC
688 -
689 - # what to link to liblua
690 - liblibs="-lm"
691 - liblibs="${liblibs} $(dlopen_lib)"
692 -
693 - # what to link to the executables
694 - mylibs=
695 - use readline && mylibs="-lreadline"
696 -
697 - cd src
698 -
699 - local myCFLAGS=""
700 - use deprecated && myCFLAGS+="-DLUA_COMPAT_5_3 "
701 - use readline && myCFLAGS+="-DLUA_USE_READLINE "
702 -
703 - case "${CHOST}" in
704 - *-mingw*) : ;;
705 - *) myCFLAGS+="-DLUA_USE_LINUX " ;;
706 - esac
707 -
708 - emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
709 - SYSLDFLAGS="${LDFLAGS}" \
710 - RPATH="${EPREFIX}/usr/$(get_libdir)/" \
711 - LUA_LIBS="${mylibs}" \
712 - LIB_LIBS="${liblibs}" \
713 - V=$(ver_cut 1-2) \
714 - LIBTOOL="${ESYSROOT}/usr/bin/libtool" \
715 - gentoo_all
716 -}
717 -
718 -multilib_src_install() {
719 - emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
720 - V=${SLOT} gentoo_install
721 -
722 - case $SLOT in
723 - 0)
724 - LIBNAME="lua"
725 - INCLUDEDIR_SUFFIX=''
726 - ;;
727 - *) LIBNAME="lua${SLOT}"
728 - INCLUDEDIR_SUFFIX="/lua${SLOT}"
729 - ;;
730 - esac
731 -
732 - # We want packages to find our things...
733 - # A slotted Lua uses different directories for headers & names for
734 - # libraries, and pkgconfig should reflect that.
735 - local PATCH_PV=$(ver_cut 1-2)
736 - cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
737 - sed -r -i \
738 - -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
739 - -e "s:^prefix= :prefix= ${EPREFIX}:" \
740 - -e "s:^V=.*:V= ${PATCH_PV}:" \
741 - -e "s:^R=.*:R= ${PV}:" \
742 - -e "s:/,lib,:/$(get_libdir):g" \
743 - -e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \
744 - -e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \
745 - "${WORKDIR}/lua.pc" || die
746 -
747 - insinto "/usr/$(get_libdir)/pkgconfig"
748 - newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
749 - # Copy Debian's symlink support:
750 - # https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19
751 - # FreeBSD calls the pkgconfig 'lua-5.3.pc'
752 - # Older systems called it 'lua53.pc'
753 - dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc"
754 - dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc"
755 -}
756 -
757 -multilib_src_install_all() {
758 - DOCS="README"
759 - HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
760 - einstalldocs
761 - newman doc/lua.1 lua${SLOT}.1
762 - newman doc/luac.1 luac${SLOT}.1
763 - find "${ED}" -name '*.la' -delete || die
764 - find "${ED}" -name 'liblua*.a' -delete || die
765 -}
766 -
767 -# Makefile contains a dummy target that doesn't do tests
768 -# but causes issues with slotted lua (bug #510360)
769 -src_test() {
770 - debug-print-function ${FUNCNAME} "$@"
771 - cd "${WORKDIR}/lua-${TEST_PV}-tests" || die
772 - # https://www.lua.org/tests/
773 - # There are two sets:
774 - # basic
775 - # complete.
776 - #
777 - # The basic subset is selected by passing -e'_U=true'
778 - # The complete set is noted to contain tests that may consume too much memory or have non-portable tests.
779 - # attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI)
780 - TEST_OPTS="$(usex test-complete '' '-e_U=true')"
781 - TEST_MARKER="${T}/test.failed"
782 - rm -f "${TEST_MARKER}"
783 -
784 - # If we are failing, set the marker file, and only check it after done all ABIs
785 - abi_src_test() {
786 - debug-print-function ${FUNCNAME} "$@"
787 - TEST_LOG="${T}/test.${MULTIBUILD_ID}.log"
788 - eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die
789 - grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}"
790 - return 0
791 - }
792 -
793 - multilib_foreach_abi abi_src_test
794 -
795 - if [ -e "${TEST_MARKER}" ]; then
796 - cat "${TEST_MARKER}"
797 - die "Tests failed"
798 - fi
799 -}
800 -
801 -pkg_postinst() {
802 - eselect lua set --if-unset "${PN}${SLOT}"
803 -
804 - if has_version "app-editor/emacs"; then
805 - if ! has_version "app-emacs/lua-mode"; then
806 - einfo "Install app-emacs/lua-mode for lua support for emacs"
807 - fi
808 - fi
809 -}