1 |
commit: 5e2104f864ce3304e58c43f0441078aa3a670bfb |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 29 20:39:01 2020 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 29 20:39:20 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e2104f8 |
7 |
|
8 |
dev-lang/lua: remove old slotted versions |
9 |
|
10 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
11 |
|
12 |
dev-lang/lua/Manifest | 2 - |
13 |
dev-lang/lua/lua-5.1.5-r105.ebuild | 150 --------------------------- |
14 |
dev-lang/lua/lua-5.2.4-r2.ebuild | 202 ------------------------------------- |
15 |
dev-lang/lua/lua-5.3.6-r1.ebuild | 202 ------------------------------------- |
16 |
dev-lang/lua/lua-5.4.1-r1.ebuild | 199 ------------------------------------ |
17 |
dev-lang/lua/lua-5.4.2.ebuild | 197 ------------------------------------ |
18 |
6 files changed, 952 deletions(-) |
19 |
|
20 |
diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest |
21 |
index c395e9f376a..bbafef164e1 100644 |
22 |
--- a/dev-lang/lua/Manifest |
23 |
+++ b/dev-lang/lua/Manifest |
24 |
@@ -3,7 +3,5 @@ DIST lua-5.2.2-tests.tar.gz 76629 BLAKE2B 323eaae02ee61cfde2535d606ed704d964461c |
25 |
DIST lua-5.2.4.tar.gz 252651 BLAKE2B 6f20308d8413438f8446040e8de16274837cb55e626b98a0ae8cfe279dc8610fa2e032a2ce53ef3acda4b96a7198123cbc18eff16775f952e6dc0355fdf331b0 SHA512 cd77148aba4b707b6c159758b5e8444e04f968092eb98f6b4c405b2fb647e709370d5a8dcf604176101d3407e196a7433b5dcdce4fe9605c76191d3649d61a8c |
26 |
DIST lua-5.3.4-tests.tar.gz 103438 BLAKE2B ac82708022e7729039111c3df4fe24302c8d0efb224afb4828871ac085a3d64c41d674a6f9369035de01ed1f7f75a3d2ce16917f37e774e923216aac0be03e09 SHA512 79575d100a2efabc8243f55b55d912443e09ef7e8b0219cb93541d85c2ba802fb9538015e1228703f09ca57bdb28a640a8f1fa0735716ba1e4bca2179c712dfb |
27 |
DIST lua-5.3.6.tar.gz 303770 BLAKE2B 07c37c56f43095a4f6ca8eb8b3adf19afd53107c02b62b2bcb3619565cb2100d5f823493eef93092d5e312b30fc28885a6d9e8f0ba5a23b5bed86dc4515a5d61 SHA512 ccc380d5e114d54504de0bfb0321ca25ec325d6ff1bfee44b11870b660762d1a9bf120490c027a0088128b58bb6b5271bbc648400cab84d2dc22b512c4841681 |
28 |
-DIST lua-5.4.1-tests.tar.gz 128646 BLAKE2B 2dae666e89bacf986228a33fc665bbc510e738d9f8791933f5048e4bbecaf6cd59c5e70e488d332b16960225aac3b9fae46e500f3b54856bb6aabe8cd3a5c932 SHA512 ac7cf113d96f8fe2af4f104297a70debd3bede5997627fc18db6b5d9c78ff49e05a165f5855894def5656c6dcc2d7d9ccce741c90da17698a5c714a33828f49a |
29 |
-DIST lua-5.4.1.tar.gz 353965 BLAKE2B e5b46fcf2eb2ea9bd235793cefec2bf19f185ed51b11bc6133bda4e3639f09194378b2fd55544972ee32576751e80bba87b3b61ec3d4a0910592d6e5cb4a4c77 SHA512 49ffbe814ec41e515fc8502b6958151c6c56aa171412f0b211ad9de934be2c958c3709d49435885ddea0fa6765ed511dafb3537558950ff3b4261338214f1571 |
30 |
DIST lua-5.4.2-tests.tar.gz 128901 BLAKE2B 10e4f0e8760f9cbd4761fa26665008ae7412539f79a6a7687029808f08f0ae4a24721e787e2e87e5080c16e9dcce8577a7a39ddc6d3e483a3cfe11756139594e SHA512 1516c59deca211c38444bbf97b18e988e939209b03915d3691d756eeed31b52e8d3a1f05b71ac0b561965274c7b6f3afc4244cd2e9069995696e737e2d9dd40b |
31 |
DIST lua-5.4.2.tar.gz 353472 BLAKE2B 7e0e642684df635ed1c48db45989e86a2638024e30a170addf700b0c7d32276f1eaef80898539c671039c20cb0bed4861b12c58f4b8211653a17e89bad278d87 SHA512 9454a6ffd973598f2f4a2399834c31c4d5090bd12e716776e3189aa57760319d114ee64a8338bbc2ef5e08150bf0adc2ad94a1b2677f38538a43359969d4d920 |
32 |
|
33 |
diff --git a/dev-lang/lua/lua-5.1.5-r105.ebuild b/dev-lang/lua/lua-5.1.5-r105.ebuild |
34 |
deleted file mode 100644 |
35 |
index c1d9a607bba..00000000000 |
36 |
--- a/dev-lang/lua/lua-5.1.5-r105.ebuild |
37 |
+++ /dev/null |
38 |
@@ -1,150 +0,0 @@ |
39 |
-# Copyright 1999-2020 Gentoo Authors |
40 |
-# Distributed under the terms of the GNU General Public License v2 |
41 |
- |
42 |
-EAPI=7 |
43 |
- |
44 |
-inherit multilib multilib-minimal portability toolchain-funcs |
45 |
- |
46 |
-DESCRIPTION="A powerful light-weight programming language designed for extending applications" |
47 |
-HOMEPAGE="http://www.lua.org/" |
48 |
-SRC_URI="http://www.lua.org/ftp/${P}.tar.gz" |
49 |
- |
50 |
-LICENSE="MIT" |
51 |
-SLOT="5.1" |
52 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
53 |
-IUSE="+deprecated readline static" |
54 |
- |
55 |
-RDEPEND="readline? ( >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] ) |
56 |
- >=app-eselect/eselect-lua-3 |
57 |
- !dev-lang/lua:0" |
58 |
-DEPEND="${RDEPEND} |
59 |
- sys-devel/libtool" |
60 |
- |
61 |
-MULTILIB_WRAPPED_HEADERS=( |
62 |
- /usr/include/lua${SLOT}/luaconf.h |
63 |
-) |
64 |
- |
65 |
-PATCHES=( |
66 |
- "${FILESDIR}/${PN}-$(ver_cut 1-2)-make-r2.patch" |
67 |
- "${FILESDIR}/${PN}-$(ver_cut 1-2)-module_paths.patch" |
68 |
-) |
69 |
- |
70 |
-src_prepare() { |
71 |
- default |
72 |
- |
73 |
- # use glibtool on Darwin (versus Apple libtool) |
74 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
75 |
- sed -i -e '/LIBTOOL = /s:libtool:glibtool:' \ |
76 |
- Makefile src/Makefile || die |
77 |
- fi |
78 |
- |
79 |
- # correct lua versioning |
80 |
- sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:5:1/' src/Makefile |
81 |
- |
82 |
- sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html |
83 |
- |
84 |
- if ! use deprecated ; then |
85 |
- # patches from 5.1.4 still apply |
86 |
- eapply "${FILESDIR}"/${PN}-5.1.4-deprecated.patch |
87 |
- eapply "${FILESDIR}"/${PN}-5.1.4-test.patch |
88 |
- fi |
89 |
- |
90 |
- if ! use readline ; then |
91 |
- eapply "${FILESDIR}"/${PN}-$(ver_cut 1-2)-readline.patch |
92 |
- fi |
93 |
- |
94 |
- # Using dynamic linked lua is not recommended for performance |
95 |
- # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519 |
96 |
- # Mainly, this is of concern if your arch is poor with GPRs, like x86 |
97 |
- # Note that this only affects the interpreter binary (named lua), not the lua |
98 |
- # compiler (built statically) nor the lua libraries (both shared and static |
99 |
- # are installed) |
100 |
- if use static ; then |
101 |
- sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die |
102 |
- fi |
103 |
- |
104 |
- # A slotted Lua uses different directories for headers & names for |
105 |
- # libraries, and pkgconfig should reflect that. |
106 |
- sed -r -i \ |
107 |
- -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \ |
108 |
- -e "/^includedir=/s,(/include)$,\1/lua${SLOT}," \ |
109 |
- -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \ |
110 |
- "${S}"/etc/lua.pc |
111 |
- |
112 |
- # custom Makefiles |
113 |
- multilib_copy_sources |
114 |
-} |
115 |
- |
116 |
-multilib_src_configure() { |
117 |
- # We want packages to find our things... |
118 |
- sed -i \ |
119 |
- -e 's:/usr/local:'${EPREFIX}'/usr:' \ |
120 |
- -e "s:\([/\"]\)\<lib\>:\1$(get_libdir):g" \ |
121 |
- etc/lua.pc src/luaconf.h || die |
122 |
-} |
123 |
- |
124 |
-multilib_src_compile() { |
125 |
- tc-export CC |
126 |
- myflags= |
127 |
- # what to link to liblua |
128 |
- liblibs="-lm" |
129 |
- liblibs="${liblibs} $(dlopen_lib)" |
130 |
- |
131 |
- # what to link to the executables |
132 |
- mylibs= |
133 |
- if use readline; then |
134 |
- mylibs="-lreadline" |
135 |
- fi |
136 |
- |
137 |
- cd src |
138 |
- emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \ |
139 |
- RPATH="${EPREFIX}/usr/$(get_libdir)/" \ |
140 |
- LUA_LIBS="${mylibs}" \ |
141 |
- LIB_LIBS="${liblibs}" \ |
142 |
- V=$(ver_cut 1-2) \ |
143 |
- gentoo_all |
144 |
- |
145 |
- mv lua_test ../test/lua.static |
146 |
-} |
147 |
- |
148 |
-multilib_src_install() { |
149 |
- emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ |
150 |
- V=${SLOT} gentoo_install |
151 |
- |
152 |
- insinto /usr/$(get_libdir)/pkgconfig |
153 |
- newins etc/lua.pc lua${SLOT}.pc |
154 |
-} |
155 |
- |
156 |
-multilib_src_install_all() { |
157 |
- DOCS="HISTORY README" |
158 |
- HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif" |
159 |
- einstalldocs |
160 |
- newman doc/lua.1 lua${SLOT}.1 |
161 |
- newman doc/luac.1 luac${SLOT}.1 |
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.2.4-r2.ebuild b/dev-lang/lua/lua-5.2.4-r2.ebuild |
191 |
deleted file mode 100644 |
192 |
index 64b1ad5f9ca..00000000000 |
193 |
--- a/dev-lang/lua/lua-5.2.4-r2.ebuild |
194 |
+++ /dev/null |
195 |
@@ -1,202 +0,0 @@ |
196 |
-# Copyright 1999-2020 Gentoo Authors |
197 |
-# Distributed under the terms of the GNU General Public License v2 |
198 |
- |
199 |
-EAPI=7 |
200 |
- |
201 |
-inherit autotools multilib multilib-minimal portability toolchain-funcs |
202 |
- |
203 |
-DESCRIPTION="A powerful light-weight programming language designed for extending applications" |
204 |
-HOMEPAGE="http://www.lua.org/" |
205 |
-TEST_PV="5.2.2" # no 5.2.3-specific release yet |
206 |
-TEST_A="${PN}-${TEST_PV}-tests.tar.gz" |
207 |
-PKG_A="${P}.tar.gz" |
208 |
-SRC_URI=" |
209 |
- http://www.lua.org/ftp/${PKG_A} |
210 |
- test? ( https://www.lua.org/tests/${TEST_A} )" |
211 |
- |
212 |
-LICENSE="MIT" |
213 |
-SLOT="5.2" |
214 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
215 |
-IUSE="+deprecated readline static test test-complete" |
216 |
-RESTRICT="!test? ( test )" |
217 |
- |
218 |
-RDEPEND="readline? ( sys-libs/readline:0= ) |
219 |
- >=app-eselect/eselect-lua-3 |
220 |
- !dev-lang/lua:0" |
221 |
-DEPEND="${RDEPEND} |
222 |
- sys-devel/libtool" |
223 |
- |
224 |
-MULTILIB_WRAPPED_HEADERS=( |
225 |
- /usr/include/lua${SLOT}/luaconf.h |
226 |
-) |
227 |
- |
228 |
-PATCHES=( |
229 |
- "${FILESDIR}/${PN}-$(ver_cut 1-2)-make-r1.patch" |
230 |
-) |
231 |
- |
232 |
-src_prepare() { |
233 |
- default |
234 |
- |
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 (both shared and static |
255 |
- # are installed) |
256 |
- if use static ; then |
257 |
- sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die |
258 |
- fi |
259 |
- |
260 |
- # upstream does not use libtool, but we do (see bug #336167) |
261 |
- cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die |
262 |
- eautoreconf |
263 |
- |
264 |
- # custom Makefiles |
265 |
- multilib_copy_sources |
266 |
-} |
267 |
- |
268 |
-multilib_src_configure() { |
269 |
- sed -i \ |
270 |
- -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \ |
271 |
- -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \ |
272 |
- src/luaconf.h \ |
273 |
- || die "failed patching luaconf.h" |
274 |
- |
275 |
- econf |
276 |
-} |
277 |
- |
278 |
-multilib_src_compile() { |
279 |
- tc-export CC |
280 |
- |
281 |
- # what to link to liblua |
282 |
- liblibs="-lm" |
283 |
- liblibs="${liblibs} $(dlopen_lib)" |
284 |
- |
285 |
- # what to link to the executables |
286 |
- mylibs= |
287 |
- use readline && mylibs="-lreadline" |
288 |
- |
289 |
- cd src |
290 |
- |
291 |
- local myCFLAGS="" |
292 |
- use deprecated && myCFLAGS="-DLUA_COMPAT_ALL" |
293 |
- |
294 |
- case "${CHOST}" in |
295 |
- *-mingw*) : ;; |
296 |
- *) myCFLAGS+=" -DLUA_USE_LINUX" ;; |
297 |
- esac |
298 |
- |
299 |
- emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \ |
300 |
- SYSLDFLAGS="${LDFLAGS}" \ |
301 |
- RPATH="${EPREFIX}/usr/$(get_libdir)/" \ |
302 |
- LUA_LIBS="${mylibs}" \ |
303 |
- LIB_LIBS="${liblibs}" \ |
304 |
- V=$(ver_cut 1-2) \ |
305 |
- gentoo_all |
306 |
-} |
307 |
- |
308 |
-multilib_src_install() { |
309 |
- emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ |
310 |
- V=${SLOT} gentoo_install |
311 |
- |
312 |
- case $SLOT in |
313 |
- 0) |
314 |
- LIBNAME="lua" |
315 |
- INCLUDEDIR_SUFFIX='' |
316 |
- ;; |
317 |
- *) LIBNAME="lua${SLOT}" |
318 |
- INCLUDEDIR_SUFFIX="/lua${SLOT}" |
319 |
- ;; |
320 |
- esac |
321 |
- |
322 |
- # We want packages to find our things... |
323 |
- # A slotted Lua uses different directories for headers & names for |
324 |
- # libraries, and pkgconfig should reflect that. |
325 |
- local PATCH_PV=$(ver_cut 1-2) |
326 |
- cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die |
327 |
- sed -r -i \ |
328 |
- -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \ |
329 |
- -e "s:^prefix= :prefix= ${EPREFIX}:" \ |
330 |
- -e "s:^V=.*:V= ${PATCH_PV}:" \ |
331 |
- -e "s:^R=.*:R= ${PV}:" \ |
332 |
- -e "s:/,lib,:/$(get_libdir):g" \ |
333 |
- -e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \ |
334 |
- -e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \ |
335 |
- "${WORKDIR}/lua.pc" || die |
336 |
- |
337 |
- insinto "/usr/$(get_libdir)/pkgconfig" |
338 |
- newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc" |
339 |
- # Copy Debian's symlink support: |
340 |
- # https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19 |
341 |
- # FreeBSD calls the pkgconfig 'lua-5.3.pc' |
342 |
- # Older systems called it 'lua53.pc' |
343 |
- dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc" |
344 |
- dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc" |
345 |
-} |
346 |
- |
347 |
-multilib_src_install_all() { |
348 |
- DOCS="README" |
349 |
- HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif" |
350 |
- einstalldocs |
351 |
- newman doc/lua.1 lua${SLOT}.1 |
352 |
- newman doc/luac.1 luac${SLOT}.1 |
353 |
-} |
354 |
- |
355 |
-# Makefile contains a dummy target that doesn't do tests |
356 |
-# but causes issues with slotted lua (bug #510360) |
357 |
-src_test() { |
358 |
- debug-print-function ${FUNCNAME} "$@" |
359 |
- cd "${WORKDIR}/lua-${TEST_PV}-tests" || die |
360 |
- # https://www.lua.org/tests/ |
361 |
- # There are two sets: |
362 |
- # basic |
363 |
- # complete. |
364 |
- # |
365 |
- # The basic subset is selected by passing -e'_U=true' |
366 |
- # The complete set is noted to contain tests that may consume too much memory or have non-portable tests. |
367 |
- # attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI) |
368 |
- use test-complete || TEST_OPTS="-e_U=true" |
369 |
- TEST_MARKER="${T}/test.failed" |
370 |
- rm -f "${TEST_MARKER}" |
371 |
- |
372 |
- # If we are failing, set the marker file, and only check it after done all ABIs |
373 |
- abi_src_test() { |
374 |
- debug-print-function ${FUNCNAME} "$@" |
375 |
- TEST_LOG="${T}/test.${MULTIBUILD_ID}.log" |
376 |
- eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die |
377 |
- grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}" |
378 |
- return 0 |
379 |
- } |
380 |
- |
381 |
- multilib_foreach_abi abi_src_test |
382 |
- |
383 |
- if [ -e "${TEST_MARKER}" ]; then |
384 |
- cat "${TEST_MARKER}" |
385 |
- die "Tests failed" |
386 |
- fi |
387 |
-} |
388 |
- |
389 |
-pkg_postinst() { |
390 |
- eselect lua set --if-unset "${PN}${SLOT}" |
391 |
- |
392 |
- if has_version "app-editor/emacs"; then |
393 |
- if ! has_version "app-emacs/lua-mode"; then |
394 |
- einfo "Install app-emacs/lua-mode for lua support for emacs" |
395 |
- fi |
396 |
- fi |
397 |
-} |
398 |
|
399 |
diff --git a/dev-lang/lua/lua-5.3.6-r1.ebuild b/dev-lang/lua/lua-5.3.6-r1.ebuild |
400 |
deleted file mode 100644 |
401 |
index 096baf22ce1..00000000000 |
402 |
--- a/dev-lang/lua/lua-5.3.6-r1.ebuild |
403 |
+++ /dev/null |
404 |
@@ -1,202 +0,0 @@ |
405 |
-# Copyright 1999-2020 Gentoo Authors |
406 |
-# Distributed under the terms of the GNU General Public License v2 |
407 |
- |
408 |
-EAPI=7 |
409 |
- |
410 |
-inherit autotools multilib multilib-minimal portability toolchain-funcs |
411 |
- |
412 |
-DESCRIPTION="A powerful light-weight programming language designed for extending applications" |
413 |
-HOMEPAGE="http://www.lua.org/" |
414 |
-TEST_PV="5.3.4" |
415 |
-TEST_A="${PN}-${TEST_PV}-tests.tar.gz" |
416 |
-PKG_A="${P}.tar.gz" |
417 |
-SRC_URI=" |
418 |
- http://www.lua.org/ftp/${PKG_A} |
419 |
- test? ( https://www.lua.org/tests/${TEST_A} )" |
420 |
- |
421 |
-LICENSE="MIT" |
422 |
-SLOT="5.3" |
423 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
424 |
-IUSE="+deprecated readline static test test-complete" |
425 |
-RESTRICT="!test? ( test )" |
426 |
- |
427 |
-RDEPEND="readline? ( sys-libs/readline:0= ) |
428 |
- >=app-eselect/eselect-lua-3 |
429 |
- !dev-lang/lua:0" |
430 |
-DEPEND="${RDEPEND} |
431 |
- sys-devel/libtool" |
432 |
- |
433 |
-MULTILIB_WRAPPED_HEADERS=( |
434 |
- /usr/include/lua${SLOT}/luaconf.h |
435 |
-) |
436 |
- |
437 |
-PATCHES=( |
438 |
- "${FILESDIR}/${PN}-$(ver_cut 1-2)-make-r1.patch" |
439 |
-) |
440 |
- |
441 |
-src_prepare() { |
442 |
- default |
443 |
- |
444 |
- # use glibtool on Darwin (versus Apple libtool) |
445 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
446 |
- sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \ |
447 |
- Makefile src/Makefile || die |
448 |
- fi |
449 |
- |
450 |
- # correct lua versioning |
451 |
- sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die |
452 |
- |
453 |
- sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die |
454 |
- |
455 |
- if ! use readline ; then |
456 |
- sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die |
457 |
- fi |
458 |
- |
459 |
- # Using dynamic linked lua is not recommended for performance |
460 |
- # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519 |
461 |
- # Mainly, this is of concern if your arch is poor with GPRs, like x86 |
462 |
- # Note that this only affects the interpreter binary (named lua), not the lua |
463 |
- # compiler (built statically) nor the lua libraries (both shared and static |
464 |
- # are installed) |
465 |
- if use static ; then |
466 |
- sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die |
467 |
- fi |
468 |
- |
469 |
- # upstream does not use libtool, but we do (see bug #336167) |
470 |
- cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die |
471 |
- eautoreconf |
472 |
- |
473 |
- # custom Makefiles |
474 |
- multilib_copy_sources |
475 |
-} |
476 |
- |
477 |
-multilib_src_configure() { |
478 |
- sed -i \ |
479 |
- -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \ |
480 |
- -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \ |
481 |
- src/luaconf.h \ |
482 |
- || die "failed patching luaconf.h" |
483 |
- |
484 |
- econf |
485 |
-} |
486 |
- |
487 |
-multilib_src_compile() { |
488 |
- tc-export CC |
489 |
- |
490 |
- # what to link to liblua |
491 |
- liblibs="-lm" |
492 |
- liblibs="${liblibs} $(dlopen_lib)" |
493 |
- |
494 |
- # what to link to the executables |
495 |
- mylibs= |
496 |
- use readline && mylibs="-lreadline" |
497 |
- |
498 |
- cd src |
499 |
- |
500 |
- local myCFLAGS="" |
501 |
- use deprecated && myCFLAGS="-DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2" |
502 |
- |
503 |
- case "${CHOST}" in |
504 |
- *-mingw*) : ;; |
505 |
- *) myCFLAGS+=" -DLUA_USE_LINUX" ;; |
506 |
- esac |
507 |
- |
508 |
- emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \ |
509 |
- SYSLDFLAGS="${LDFLAGS}" \ |
510 |
- RPATH="${EPREFIX}/usr/$(get_libdir)/" \ |
511 |
- LUA_LIBS="${mylibs}" \ |
512 |
- LIB_LIBS="${liblibs}" \ |
513 |
- V=$(ver_cut 1-2) \ |
514 |
- gentoo_all |
515 |
-} |
516 |
- |
517 |
-multilib_src_install() { |
518 |
- emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ |
519 |
- V=${SLOT} gentoo_install |
520 |
- |
521 |
- case $SLOT in |
522 |
- 0) |
523 |
- LIBNAME="lua" |
524 |
- INCLUDEDIR_SUFFIX='' |
525 |
- ;; |
526 |
- *) LIBNAME="lua${SLOT}" |
527 |
- INCLUDEDIR_SUFFIX="/lua${SLOT}" |
528 |
- ;; |
529 |
- esac |
530 |
- |
531 |
- # We want packages to find our things... |
532 |
- # A slotted Lua uses different directories for headers & names for |
533 |
- # libraries, and pkgconfig should reflect that. |
534 |
- local PATCH_PV=$(ver_cut 1-2) |
535 |
- cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die |
536 |
- sed -r -i \ |
537 |
- -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \ |
538 |
- -e "s:^prefix= :prefix= ${EPREFIX}:" \ |
539 |
- -e "s:^V=.*:V= ${PATCH_PV}:" \ |
540 |
- -e "s:^R=.*:R= ${PV}:" \ |
541 |
- -e "s:/,lib,:/$(get_libdir):g" \ |
542 |
- -e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \ |
543 |
- -e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \ |
544 |
- "${WORKDIR}/lua.pc" || die |
545 |
- |
546 |
- insinto "/usr/$(get_libdir)/pkgconfig" |
547 |
- newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc" |
548 |
- # Copy Debian's symlink support: |
549 |
- # https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19 |
550 |
- # FreeBSD calls the pkgconfig 'lua-5.3.pc' |
551 |
- # Older systems called it 'lua53.pc' |
552 |
- dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc" |
553 |
- dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc" |
554 |
-} |
555 |
- |
556 |
-multilib_src_install_all() { |
557 |
- DOCS="README" |
558 |
- HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif" |
559 |
- einstalldocs |
560 |
- newman doc/lua.1 lua${SLOT}.1 |
561 |
- newman doc/luac.1 luac${SLOT}.1 |
562 |
-} |
563 |
- |
564 |
-# Makefile contains a dummy target that doesn't do tests |
565 |
-# but causes issues with slotted lua (bug #510360) |
566 |
-src_test() { |
567 |
- debug-print-function ${FUNCNAME} "$@" |
568 |
- cd "${WORKDIR}/lua-${TEST_PV}-tests" || die |
569 |
- # https://www.lua.org/tests/ |
570 |
- # There are two sets: |
571 |
- # basic |
572 |
- # complete. |
573 |
- # |
574 |
- # The basic subset is selected by passing -e'_U=true' |
575 |
- # The complete set is noted to contain tests that may consume too much memory or have non-portable tests. |
576 |
- # attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI) |
577 |
- use test-complete || TEST_OPTS="-e_U=true" |
578 |
- TEST_MARKER="${T}/test.failed" |
579 |
- rm -f "${TEST_MARKER}" |
580 |
- |
581 |
- # If we are failing, set the marker file, and only check it after done all ABIs |
582 |
- abi_src_test() { |
583 |
- debug-print-function ${FUNCNAME} "$@" |
584 |
- TEST_LOG="${T}/test.${MULTIBUILD_ID}.log" |
585 |
- eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die |
586 |
- grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}" |
587 |
- return 0 |
588 |
- } |
589 |
- |
590 |
- multilib_foreach_abi abi_src_test |
591 |
- |
592 |
- if [ -e "${TEST_MARKER}" ]; then |
593 |
- cat "${TEST_MARKER}" |
594 |
- die "Tests failed" |
595 |
- fi |
596 |
-} |
597 |
- |
598 |
-pkg_postinst() { |
599 |
- eselect lua set --if-unset "${PN}${SLOT}" |
600 |
- |
601 |
- if has_version "app-editor/emacs"; then |
602 |
- if ! has_version "app-emacs/lua-mode"; then |
603 |
- einfo "Install app-emacs/lua-mode for lua support for emacs" |
604 |
- fi |
605 |
- fi |
606 |
-} |
607 |
|
608 |
diff --git a/dev-lang/lua/lua-5.4.1-r1.ebuild b/dev-lang/lua/lua-5.4.1-r1.ebuild |
609 |
deleted file mode 100644 |
610 |
index 54b2f5b1b4e..00000000000 |
611 |
--- a/dev-lang/lua/lua-5.4.1-r1.ebuild |
612 |
+++ /dev/null |
613 |
@@ -1,199 +0,0 @@ |
614 |
-# Copyright 1999-2020 Gentoo Authors |
615 |
-# Distributed under the terms of the GNU General Public License v2 |
616 |
- |
617 |
-EAPI=7 |
618 |
-inherit autotools multilib multilib-minimal portability toolchain-funcs |
619 |
- |
620 |
-DESCRIPTION="A powerful light-weight programming language designed for extending applications" |
621 |
-HOMEPAGE="http://www.lua.org/" |
622 |
-TEST_PV="5.4.1" |
623 |
-TEST_P="${PN}-${TEST_PV}-tests" |
624 |
-SRC_URI=" |
625 |
- http://www.lua.org/ftp/${P}.tar.gz |
626 |
- test? ( https://www.lua.org/tests/${TEST_P}.tar.gz )" |
627 |
- |
628 |
-LICENSE="MIT" |
629 |
-SLOT="5.4" |
630 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
631 |
-IUSE="+deprecated readline static test test-complete" |
632 |
- |
633 |
-COMMON_DEPEND=" |
634 |
- >=app-eselect/eselect-lua-3 |
635 |
- readline? ( sys-libs/readline:0= ) |
636 |
- !dev-lang/lua:0" |
637 |
-DEPEND="${COMMON_DEPEND}" |
638 |
-RDEPEND="${COMMON_DEPEND}" |
639 |
-BDEPEND="sys-devel/libtool" |
640 |
- |
641 |
-RESTRICT="!test? ( test )" |
642 |
- |
643 |
-MULTILIB_WRAPPED_HEADERS=( |
644 |
- /usr/include/lua${SLOT}/luaconf.h |
645 |
-) |
646 |
- |
647 |
-PATCHES=( |
648 |
- "${FILESDIR}"/lua-5.4-makefiles.patch |
649 |
-) |
650 |
- |
651 |
-src_prepare() { |
652 |
- default |
653 |
- # use glibtool on Darwin (versus Apple libtool) |
654 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
655 |
- sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \ |
656 |
- Makefile src/Makefile || die |
657 |
- fi |
658 |
- |
659 |
- # correct lua versioning |
660 |
- sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die |
661 |
- |
662 |
- sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die |
663 |
- |
664 |
- # Using dynamic linked lua is not recommended for performance |
665 |
- # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519 |
666 |
- # Mainly, this is of concern if your arch is poor with GPRs, like x86 |
667 |
- # Note that this only affects the interpreter binary (named lua), not the lua |
668 |
- # compiler (built statically) nor the lua libraries (both shared and static |
669 |
- # are installed) |
670 |
- if use static ; then |
671 |
- sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die |
672 |
- fi |
673 |
- |
674 |
- # upstream does not use libtool, but we do (see bug #336167) |
675 |
- cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die |
676 |
- eautoreconf |
677 |
- |
678 |
- # custom Makefiles |
679 |
- multilib_copy_sources |
680 |
-} |
681 |
- |
682 |
-multilib_src_configure() { |
683 |
- sed -i \ |
684 |
- -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \ |
685 |
- -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \ |
686 |
- src/luaconf.h \ |
687 |
- || die "failed patching luaconf.h" |
688 |
- |
689 |
- econf |
690 |
-} |
691 |
- |
692 |
-multilib_src_compile() { |
693 |
- tc-export CC |
694 |
- |
695 |
- # what to link to liblua |
696 |
- liblibs="-lm" |
697 |
- liblibs="${liblibs} $(dlopen_lib)" |
698 |
- |
699 |
- # what to link to the executables |
700 |
- mylibs= |
701 |
- use readline && mylibs="-lreadline" |
702 |
- |
703 |
- cd src |
704 |
- |
705 |
- local myCFLAGS="" |
706 |
- use deprecated && myCFLAGS="-DLUA_COMPAT_5_3" |
707 |
- use readline && myCFLAGS="-DLUA_USE_READLINE" |
708 |
- |
709 |
- case "${CHOST}" in |
710 |
- *-mingw*) : ;; |
711 |
- *) myCFLAGS+=" -DLUA_USE_LINUX" ;; |
712 |
- esac |
713 |
- |
714 |
- emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \ |
715 |
- SYSLDFLAGS="${LDFLAGS}" \ |
716 |
- RPATH="${EPREFIX}/usr/$(get_libdir)/" \ |
717 |
- LUA_LIBS="${mylibs}" \ |
718 |
- LIB_LIBS="${liblibs}" \ |
719 |
- V=$(ver_cut 1-2) \ |
720 |
- gentoo_all |
721 |
-} |
722 |
- |
723 |
-multilib_src_install() { |
724 |
- emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ |
725 |
- V=${SLOT} gentoo_install |
726 |
- |
727 |
- case $SLOT in |
728 |
- 0) |
729 |
- LIBNAME="lua" |
730 |
- INCLUDEDIR_SUFFIX='' |
731 |
- ;; |
732 |
- *) LIBNAME="lua${SLOT}" |
733 |
- INCLUDEDIR_SUFFIX="/lua${SLOT}" |
734 |
- ;; |
735 |
- esac |
736 |
- |
737 |
- # We want packages to find our things... |
738 |
- # A slotted Lua uses different directories for headers & names for |
739 |
- # libraries, and pkgconfig should reflect that. |
740 |
- local PATCH_PV=$(ver_cut 1-2) |
741 |
- cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die |
742 |
- sed -r -i \ |
743 |
- -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \ |
744 |
- -e "s:^prefix= :prefix= ${EPREFIX}:" \ |
745 |
- -e "s:^V=.*:V= ${PATCH_PV}:" \ |
746 |
- -e "s:^R=.*:R= ${PV}:" \ |
747 |
- -e "s:/,lib,:/$(get_libdir):g" \ |
748 |
- -e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \ |
749 |
- -e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \ |
750 |
- "${WORKDIR}/lua.pc" || die |
751 |
- |
752 |
- insinto "/usr/$(get_libdir)/pkgconfig" |
753 |
- newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc" |
754 |
- # Copy Debian's symlink support: |
755 |
- # https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19 |
756 |
- # FreeBSD calls the pkgconfig 'lua-5.3.pc' |
757 |
- # Older systems called it 'lua53.pc' |
758 |
- dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc" |
759 |
- dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc" |
760 |
-} |
761 |
- |
762 |
-multilib_src_install_all() { |
763 |
- DOCS="README" |
764 |
- HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif" |
765 |
- einstalldocs |
766 |
- newman doc/lua.1 lua${SLOT}.1 |
767 |
- newman doc/luac.1 luac${SLOT}.1 |
768 |
-} |
769 |
- |
770 |
-# Makefile contains a dummy target that doesn't do tests |
771 |
-# but causes issues with slotted lua (bug #510360) |
772 |
-src_test() { |
773 |
- debug-print-function ${FUNCNAME} "$@" |
774 |
- cd "${WORKDIR}/lua-${TEST_PV}-tests" || die |
775 |
- # https://www.lua.org/tests/ |
776 |
- # There are two sets: |
777 |
- # basic |
778 |
- # complete. |
779 |
- # |
780 |
- # The basic subset is selected by passing -e'_U=true' |
781 |
- # The complete set is noted to contain tests that may consume too much memory or have non-portable tests. |
782 |
- # attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI) |
783 |
- TEST_OPTS="$(usex test-complete '' '-e_U=true')" |
784 |
- TEST_MARKER="${T}/test.failed" |
785 |
- rm -f "${TEST_MARKER}" |
786 |
- |
787 |
- # If we are failing, set the marker file, and only check it after done all ABIs |
788 |
- abi_src_test() { |
789 |
- debug-print-function ${FUNCNAME} "$@" |
790 |
- TEST_LOG="${T}/test.${MULTIBUILD_ID}.log" |
791 |
- eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die |
792 |
- grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}" |
793 |
- return 0 |
794 |
- } |
795 |
- |
796 |
- multilib_foreach_abi abi_src_test |
797 |
- |
798 |
- if [ -e "${TEST_MARKER}" ]; then |
799 |
- cat "${TEST_MARKER}" |
800 |
- die "Tests failed" |
801 |
- fi |
802 |
-} |
803 |
- |
804 |
-pkg_postinst() { |
805 |
- eselect lua set --if-unset "${PN}${SLOT}" |
806 |
- |
807 |
- if has_version "app-editor/emacs"; then |
808 |
- if ! has_version "app-emacs/lua-mode"; then |
809 |
- einfo "Install app-emacs/lua-mode for lua support for emacs" |
810 |
- fi |
811 |
- fi |
812 |
-} |
813 |
|
814 |
diff --git a/dev-lang/lua/lua-5.4.2.ebuild b/dev-lang/lua/lua-5.4.2.ebuild |
815 |
deleted file mode 100644 |
816 |
index b4b2ec33d2f..00000000000 |
817 |
--- a/dev-lang/lua/lua-5.4.2.ebuild |
818 |
+++ /dev/null |
819 |
@@ -1,197 +0,0 @@ |
820 |
-# Copyright 1999-2020 Gentoo Authors |
821 |
-# Distributed under the terms of the GNU General Public License v2 |
822 |
- |
823 |
-EAPI=7 |
824 |
-inherit autotools multilib multilib-minimal portability toolchain-funcs |
825 |
- |
826 |
-DESCRIPTION="A powerful light-weight programming language designed for extending applications" |
827 |
-HOMEPAGE="https://www.lua.org/" |
828 |
-TEST_PV="5.4.2" |
829 |
-TEST_P="${PN}-${TEST_PV}-tests" |
830 |
-SRC_URI=" |
831 |
- https://www.lua.org/ftp/${P}.tar.gz |
832 |
- test? ( https://www.lua.org/tests/${TEST_P}.tar.gz )" |
833 |
- |
834 |
-LICENSE="MIT" |
835 |
-SLOT="5.4" |
836 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
837 |
-IUSE="+deprecated readline test test-complete" |
838 |
- |
839 |
-COMMON_DEPEND=" |
840 |
- >=app-eselect/eselect-lua-3 |
841 |
- readline? ( sys-libs/readline:0= ) |
842 |
- !dev-lang/lua:0" |
843 |
-DEPEND="${COMMON_DEPEND}" |
844 |
-RDEPEND="${COMMON_DEPEND}" |
845 |
-BDEPEND="sys-devel/libtool" |
846 |
- |
847 |
-RESTRICT="!test? ( test )" |
848 |
- |
849 |
-MULTILIB_WRAPPED_HEADERS=( |
850 |
- /usr/include/lua${SLOT}/luaconf.h |
851 |
-) |
852 |
- |
853 |
-PATCHES=( |
854 |
- "${FILESDIR}"/lua-5.4.2-make.patch |
855 |
-) |
856 |
- |
857 |
-src_prepare() { |
858 |
- default |
859 |
- # use glibtool on Darwin (versus Apple libtool) |
860 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
861 |
- sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \ |
862 |
- Makefile src/Makefile || die |
863 |
- fi |
864 |
- |
865 |
- # correct lua versioning |
866 |
- sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die |
867 |
- |
868 |
- sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die |
869 |
- |
870 |
- # Using dynamic linked lua is not recommended for performance |
871 |
- # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519 |
872 |
- # Mainly, this is of concern if your arch is poor with GPRs, like x86 |
873 |
- # Note that this only affects the interpreter binary (named lua), not the lua |
874 |
- # compiler (built statically) nor the lua libraries. |
875 |
- |
876 |
- # upstream does not use libtool, but we do (see bug #336167) |
877 |
- cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die |
878 |
- eautoreconf |
879 |
- |
880 |
- # custom Makefiles |
881 |
- multilib_copy_sources |
882 |
-} |
883 |
- |
884 |
-multilib_src_configure() { |
885 |
- sed -i \ |
886 |
- -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \ |
887 |
- -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \ |
888 |
- src/luaconf.h \ |
889 |
- || die "failed patching luaconf.h" |
890 |
- |
891 |
- econf |
892 |
-} |
893 |
- |
894 |
-multilib_src_compile() { |
895 |
- tc-export CC |
896 |
- |
897 |
- # what to link to liblua |
898 |
- liblibs="-lm" |
899 |
- liblibs="${liblibs} $(dlopen_lib)" |
900 |
- |
901 |
- # what to link to the executables |
902 |
- mylibs= |
903 |
- use readline && mylibs="-lreadline" |
904 |
- |
905 |
- cd src |
906 |
- |
907 |
- local myCFLAGS="" |
908 |
- use deprecated && myCFLAGS="-DLUA_COMPAT_5_3" |
909 |
- use readline && myCFLAGS="-DLUA_USE_READLINE" |
910 |
- |
911 |
- case "${CHOST}" in |
912 |
- *-mingw*) : ;; |
913 |
- *) myCFLAGS+=" -DLUA_USE_LINUX" ;; |
914 |
- esac |
915 |
- |
916 |
- emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \ |
917 |
- SYSLDFLAGS="${LDFLAGS}" \ |
918 |
- RPATH="${EPREFIX}/usr/$(get_libdir)/" \ |
919 |
- LUA_LIBS="${mylibs}" \ |
920 |
- LIB_LIBS="${liblibs}" \ |
921 |
- V=$(ver_cut 1-2) \ |
922 |
- gentoo_all |
923 |
-} |
924 |
- |
925 |
-multilib_src_install() { |
926 |
- emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ |
927 |
- V=${SLOT} gentoo_install |
928 |
- |
929 |
- case $SLOT in |
930 |
- 0) |
931 |
- LIBNAME="lua" |
932 |
- INCLUDEDIR_SUFFIX='' |
933 |
- ;; |
934 |
- *) LIBNAME="lua${SLOT}" |
935 |
- INCLUDEDIR_SUFFIX="/lua${SLOT}" |
936 |
- ;; |
937 |
- esac |
938 |
- |
939 |
- # We want packages to find our things... |
940 |
- # A slotted Lua uses different directories for headers & names for |
941 |
- # libraries, and pkgconfig should reflect that. |
942 |
- local PATCH_PV=$(ver_cut 1-2) |
943 |
- cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die |
944 |
- sed -r -i \ |
945 |
- -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \ |
946 |
- -e "s:^prefix= :prefix= ${EPREFIX}:" \ |
947 |
- -e "s:^V=.*:V= ${PATCH_PV}:" \ |
948 |
- -e "s:^R=.*:R= ${PV}:" \ |
949 |
- -e "s:/,lib,:/$(get_libdir):g" \ |
950 |
- -e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \ |
951 |
- -e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \ |
952 |
- "${WORKDIR}/lua.pc" || die |
953 |
- |
954 |
- insinto "/usr/$(get_libdir)/pkgconfig" |
955 |
- newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc" |
956 |
- # Copy Debian's symlink support: |
957 |
- # https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19 |
958 |
- # FreeBSD calls the pkgconfig 'lua-5.3.pc' |
959 |
- # Older systems called it 'lua53.pc' |
960 |
- dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc" |
961 |
- dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc" |
962 |
-} |
963 |
- |
964 |
-multilib_src_install_all() { |
965 |
- DOCS="README" |
966 |
- HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif" |
967 |
- einstalldocs |
968 |
- newman doc/lua.1 lua${SLOT}.1 |
969 |
- newman doc/luac.1 luac${SLOT}.1 |
970 |
- find "${ED}" -name '*.la' -delete || die |
971 |
- find "${ED}" -name 'liblua*.a' -delete || die |
972 |
-} |
973 |
- |
974 |
-# Makefile contains a dummy target that doesn't do tests |
975 |
-# but causes issues with slotted lua (bug #510360) |
976 |
-src_test() { |
977 |
- debug-print-function ${FUNCNAME} "$@" |
978 |
- cd "${WORKDIR}/lua-${TEST_PV}-tests" || die |
979 |
- # https://www.lua.org/tests/ |
980 |
- # There are two sets: |
981 |
- # basic |
982 |
- # complete. |
983 |
- # |
984 |
- # The basic subset is selected by passing -e'_U=true' |
985 |
- # The complete set is noted to contain tests that may consume too much memory or have non-portable tests. |
986 |
- # attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI) |
987 |
- TEST_OPTS="$(usex test-complete '' '-e_U=true')" |
988 |
- TEST_MARKER="${T}/test.failed" |
989 |
- rm -f "${TEST_MARKER}" |
990 |
- |
991 |
- # If we are failing, set the marker file, and only check it after done all ABIs |
992 |
- abi_src_test() { |
993 |
- debug-print-function ${FUNCNAME} "$@" |
994 |
- TEST_LOG="${T}/test.${MULTIBUILD_ID}.log" |
995 |
- eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die |
996 |
- grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}" |
997 |
- return 0 |
998 |
- } |
999 |
- |
1000 |
- multilib_foreach_abi abi_src_test |
1001 |
- |
1002 |
- if [ -e "${TEST_MARKER}" ]; then |
1003 |
- cat "${TEST_MARKER}" |
1004 |
- die "Tests failed" |
1005 |
- fi |
1006 |
-} |
1007 |
- |
1008 |
-pkg_postinst() { |
1009 |
- eselect lua set --if-unset "${PN}${SLOT}" |
1010 |
- |
1011 |
- if has_version "app-editor/emacs"; then |
1012 |
- if ! has_version "app-emacs/lua-mode"; then |
1013 |
- einfo "Install app-emacs/lua-mode for lua support for emacs" |
1014 |
- fi |
1015 |
- fi |
1016 |
-} |