1 |
commit: fab25cc8ac44fa73bb14821560ac1ba1829447df |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 5 08:19:58 2022 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 5 08:19:58 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fab25cc8 |
7 |
|
8 |
dev-lang/lua: add 5.1.6 |
9 |
|
10 |
* add two patches from Debian |
11 |
|
12 |
Bug: https://bugs.gentoo.org/472230 |
13 |
Bug: https://bugs.gentoo.org/627330 |
14 |
Bug: https://bugs.gentoo.org/689598 |
15 |
Bug: https://bugs.gentoo.org/706378 |
16 |
Bug: https://bugs.gentoo.org/765712 |
17 |
Bug: https://bugs.gentoo.org/791451 |
18 |
Bug: https://bugs.gentoo.org/834911 |
19 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
20 |
|
21 |
dev-lang/lua/Manifest | 1 + |
22 |
dev-lang/lua/files/5.1/0001-extern_C.patch | 20 +++++++++ |
23 |
...02-Fix-stack-overflow-in-vararg-functions.patch | 17 ++++++++ |
24 |
dev-lang/lua/lua-5.1.6.ebuild | 49 ++++++++++++++++++++++ |
25 |
4 files changed, 87 insertions(+) |
26 |
|
27 |
diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest |
28 |
index b3f323cb8f89..960ea5685673 100644 |
29 |
--- a/dev-lang/lua/Manifest |
30 |
+++ b/dev-lang/lua/Manifest |
31 |
@@ -1,4 +1,5 @@ |
32 |
DIST lua-5.1.5.tar.gz 221213 BLAKE2B 915eb8e8c9d7e460eacf1d7a59309c60dfc0f5d9d3d76fbc9764e7cae85920b95096db1c27b69ac53378a145c29efde403e88166a1332a67150d9d3a897aba02 SHA512 0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9 |
33 |
+DIST lua-5.1.6.tar.xz 397312 BLAKE2B 3555cd8ae8756205935af26399586719c5ab22da75036e553cf935df6463219f33896d72b91271a2bb9244238bef894d469817c8a7c0c8312ac05ec875b0ecbb SHA512 33365c29b6c3bf7c3b6fe764b1525c806cb41b9391f99ca267ccc2deda163afd76fe3f62719ff7f248467f09de11789dffab3c464f7fee108ab9ccfd38df104c |
34 |
DIST lua-5.3.4-tests.tar.gz 103438 BLAKE2B ac82708022e7729039111c3df4fe24302c8d0efb224afb4828871ac085a3d64c41d674a6f9369035de01ed1f7f75a3d2ce16917f37e774e923216aac0be03e09 SHA512 79575d100a2efabc8243f55b55d912443e09ef7e8b0219cb93541d85c2ba802fb9538015e1228703f09ca57bdb28a640a8f1fa0735716ba1e4bca2179c712dfb |
35 |
DIST lua-5.3.6.tar.gz 303770 BLAKE2B 07c37c56f43095a4f6ca8eb8b3adf19afd53107c02b62b2bcb3619565cb2100d5f823493eef93092d5e312b30fc28885a6d9e8f0ba5a23b5bed86dc4515a5d61 SHA512 ccc380d5e114d54504de0bfb0321ca25ec325d6ff1bfee44b11870b660762d1a9bf120490c027a0088128b58bb6b5271bbc648400cab84d2dc22b512c4841681 |
36 |
DIST lua-5.4.4-tests.tar.gz 134094 BLAKE2B 63f5888a506f504f849fb2000cf551960df8eca3107601dcc8243e8ea5a1b13a70bff7dea4aebe3ab35b7e9df58c2ca44a7a27aa4de82240877eb8d7a017642e SHA512 08b3d764b3f362a2cddf5a23e71b16eea96a234a970fa0048bab358ebbd77f99d9bd132af12254383c5bb5426516e1ce2107e529e88d3963869255f5a41198ef |
37 |
|
38 |
diff --git a/dev-lang/lua/files/5.1/0001-extern_C.patch b/dev-lang/lua/files/5.1/0001-extern_C.patch |
39 |
new file mode 100644 |
40 |
index 000000000000..6e4f711f0ecd |
41 |
--- /dev/null |
42 |
+++ b/dev-lang/lua/files/5.1/0001-extern_C.patch |
43 |
@@ -0,0 +1,20 @@ |
44 |
+https://salsa.debian.org/lua-team/lua5.1/-/blob/master/debian/patches/0003-extern_C.patch |
45 |
+ |
46 |
+From: "John V. Belmonte" <jbelmonte@××××××.org> |
47 |
+Date: Tue, 26 Aug 2014 16:20:49 +0200 |
48 |
+Subject: extern_C |
49 |
+ |
50 |
+--- a/src/luaconf.h.in |
51 |
++++ b/src/luaconf.h.in |
52 |
+@@ -168,7 +168,11 @@ |
53 |
+ |
54 |
+ #else |
55 |
+ |
56 |
++#ifdef __cplusplus |
57 |
++#define LUA_API extern "C" |
58 |
++#else |
59 |
+ #define LUA_API extern |
60 |
++#endif |
61 |
+ |
62 |
+ #endif |
63 |
+ |
64 |
|
65 |
diff --git a/dev-lang/lua/files/5.1/0002-Fix-stack-overflow-in-vararg-functions.patch b/dev-lang/lua/files/5.1/0002-Fix-stack-overflow-in-vararg-functions.patch |
66 |
new file mode 100644 |
67 |
index 000000000000..a3e4019a4596 |
68 |
--- /dev/null |
69 |
+++ b/dev-lang/lua/files/5.1/0002-Fix-stack-overflow-in-vararg-functions.patch |
70 |
@@ -0,0 +1,17 @@ |
71 |
+https://salsa.debian.org/lua-team/lua5.1/-/blob/master/debian/patches/0004-Fix-stack-overflow-in-vararg-functions.patch |
72 |
+ |
73 |
+From: Enrico Tassi <gareuselesinge@××××××.org> |
74 |
+Date: Tue, 26 Aug 2014 16:20:55 +0200 |
75 |
+Subject: Fix stack overflow in vararg functions |
76 |
+ |
77 |
+--- a/src/ldo.c |
78 |
++++ b/src/ldo.c |
79 |
+@@ -274,7 +274,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) { |
80 |
+ CallInfo *ci; |
81 |
+ StkId st, base; |
82 |
+ Proto *p = cl->p; |
83 |
+- luaD_checkstack(L, p->maxstacksize); |
84 |
++ luaD_checkstack(L, p->maxstacksize + p->numparams); |
85 |
+ func = restorestack(L, funcr); |
86 |
+ if (!p->is_vararg) { /* no varargs? */ |
87 |
+ base = func + 1; |
88 |
|
89 |
diff --git a/dev-lang/lua/lua-5.1.6.ebuild b/dev-lang/lua/lua-5.1.6.ebuild |
90 |
new file mode 100644 |
91 |
index 000000000000..663b24b5579f |
92 |
--- /dev/null |
93 |
+++ b/dev-lang/lua/lua-5.1.6.ebuild |
94 |
@@ -0,0 +1,49 @@ |
95 |
+# Copyright 1999-2022 Gentoo Authors |
96 |
+# Distributed under the terms of the GNU General Public License v2 |
97 |
+ |
98 |
+EAPI=8 |
99 |
+ |
100 |
+inherit optfeature |
101 |
+ |
102 |
+DESCRIPTION="A powerful light-weight programming language designed for extending applications" |
103 |
+HOMEPAGE="https://www.lua.org/" |
104 |
+# tarballs produced from ${PV} branches in https://gitweb.gentoo.org/proj/lua-patches.git |
105 |
+SRC_URI="https://dev.gentoo.org/~soap/distfiles/${P}.tar.xz" |
106 |
+ |
107 |
+LICENSE="MIT" |
108 |
+SLOT="5.1" |
109 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
110 |
+IUSE="+deprecated readline" |
111 |
+ |
112 |
+DEPEND=" |
113 |
+ >=app-eselect/eselect-lua-3 |
114 |
+ readline? ( sys-libs/readline:= ) |
115 |
+ !dev-lang/lua:0" |
116 |
+RDEPEND="${DEPEND}" |
117 |
+BDEPEND="virtual/pkgconfig" |
118 |
+ |
119 |
+PATCHES=( "${FILESDIR}"/${SLOT} ) |
120 |
+ |
121 |
+src_prepare() { |
122 |
+ ! use deprecated && PATCHES+=( |
123 |
+ "${FILESDIR}"/${PN}-5.1.4-test.patch |
124 |
+ ) |
125 |
+ default |
126 |
+} |
127 |
+ |
128 |
+src_configure() { |
129 |
+ econf \ |
130 |
+ $(use_enable deprecated) \ |
131 |
+ $(use_with readline) |
132 |
+} |
133 |
+ |
134 |
+src_install() { |
135 |
+ default |
136 |
+ find "${ED}" -name '*.la' -delete || die |
137 |
+} |
138 |
+ |
139 |
+pkg_postinst() { |
140 |
+ eselect lua set --if-unset "${PN}${SLOT}" |
141 |
+ |
142 |
+ optfeature "Lua support for Emacs" app-emacs/lua-mode |
143 |
+} |