summaryrefslogtreecommitdiff
path: root/dev-lang/lua
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/lua')
-rw-r--r--dev-lang/lua/Manifest6
-rw-r--r--dev-lang/lua/files/5.2.0/01_all_memory_hoarding.upstream.patch49
-rw-r--r--dev-lang/lua/files/5.2.0/02_all_hex_number_handling.upstream.patch26
-rw-r--r--dev-lang/lua/files/lua-5.2.4-make.patch75
-rw-r--r--dev-lang/lua/lua-5.2.4-r3.ebuild200
5 files changed, 0 insertions, 356 deletions
diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
index 3251085fe490..464ddac68afd 100644
--- a/dev-lang/lua/Manifest
+++ b/dev-lang/lua/Manifest
@@ -1,24 +1,18 @@
-AUX 5.2.0/01_all_memory_hoarding.upstream.patch 1639 BLAKE2B 14ff68362d99e00fa3e5689cb09a84a2303266ba6ce553bd49c3d0be93da976e18dba53efb06f5df1f7e5a0ef021425698b8782923ba6011988045a4562b01ab SHA512 c1e0d0db9899539ade393ddfe7f5b9493576227cc4e29ad6623c869d1e91b0d28061f85e5cf9fc36bb70b5e53aad5d9c8848982ccfbba2cf4a6019fd260eed8f
-AUX 5.2.0/02_all_hex_number_handling.upstream.patch 938 BLAKE2B 4d995b9cc7e90e798a24edaadd5c2db086124cf157aacd1763312c3f813a07a293dcd50e19496bb90a7ef0006f5c7be6181bf330c21ce53cfffecf3e457f49fa SHA512 950c05767fd2fb39cef253323544fe079e88443047f63b495ff7639c980fd410db0f5769fa7a19134db819b1fc0b252e5f34d48fa6c1352874f734586cc2d41e
AUX configure.in 66 BLAKE2B 60319ac9b6bf60c84941673c4949e590e99c5e77b1309e25df797a8deef85d0d8ad0339e8b4fcfa5fc721545ceee62475f2284ea8f930687682265b1d03e4144 SHA512 b61041151ad4be2bb4a62f6659850fcf4179553103c421694ce739b84a57408fc59d09f5ad3f6dd8513be78ffa472689dc729031e3ef42b99f11ecc8e0053ffc
AUX lua-5.1-module_paths.patch 1078 BLAKE2B c8c6def6f3099f61cc750657df1609a0a26b9201db7ae9d07b792a1eebb50be8a7bbb3a6ef6201ec4927a199c116304edaef0b9c9ab0fc833df4d7e56e92332a SHA512 123b115389d01d383af8698d2ed66c75bb7c3e2d33de57b8539ae56a9478930a0a72fa5657e78cc1c5b6bef00d07ec3a51e19ec0e419647e84eb158fb5c4795a
AUX lua-5.1-readline.patch 360 BLAKE2B b528a3566aa59fb1cccb22417b01e86ee0cd3b77a3e278a20d5b476949daf47f0a656c7493a137594f1cf3136d327530ac97833cf584956b35b6a88a808535b9 SHA512 a99154258419dc2e582804eae97517687e5b8b5f731dc91722193d1ff470b8522af6ff4e7142c9258afe4734cd52e6987d3c2108ac52b1487a262f1e89f2f332
AUX lua-5.1.4-deprecated.patch 1417 BLAKE2B 993dd3169ebeaf8abbf5bf34e39f85b5d429c49bb534cbb0351c217705f36d7048d847241e05b3181c0cf0d4e54d449351b27947cea45b7bb880f4f62d8ebaeb SHA512 5b82058ece2cde2a720f9cdae727be0a68895438f90e24f2e37adb1cd79cf637ce20bb283918e44f4f561aa87a9b4f19d3305d71537671f61438962d48970f39
AUX lua-5.1.4-test.patch 271 BLAKE2B 1b8d2fd524d34fce99315d03232984a3cd1ad74fb23a7794a9886613bc96cdd1d48c82913c5b1ebf0765b3e51d5fcba2dfedd8eb9cf62e63e6998036447319fd SHA512 963bd2c53714eb067a55ee4d84b465ee96b2d3de71498bc83ecb4f8de70d59d6574703b36c621b9969d3f595a2c794095aae0d9c59cc02d5778ce0e7a1da8247
AUX lua-5.1.5-make.patch 3079 BLAKE2B cf9b72afd8e08ea23256364f321d49427661de8353f7655b9da3de1ef943125ae86cf1a7aab9f1c459e51063031eb1105b7703ad9e1aee90a848497b58addb12 SHA512 92a1c890e40a8bd621dad4a18fc890850027c4a5a239b8259ef3002ad4835a7a11069ca964a62a096cd651a688b60f5f261c1223e4ac7981e7a8bb43788634ff
-AUX lua-5.2.4-make.patch 2418 BLAKE2B 89f3f8d0222041200cee33079686d049800f74dd6d796205a4089f09a44884d0aa111d47203e778f80e5acdde1d56ad3f87c9a00fc832ec0e0f20d7b518e48c7 SHA512 0f9d7bd63ce6e9aeecd5286fc7069421e2a0e9cffd707d8af96dbce1c8c623084032480e3a16b69f28c44019f284a73390faf84a24e738273f556c5998a5d1e6
AUX lua-5.3.6-make.patch 2830 BLAKE2B 9d3ea717531d93d7f7618335f503528e629aa3582392c49e340b6909860a51e30371530ea06ef1ed81cc4bde4a294e1d6732662703f646a7a3f727159dc83fed SHA512 5d5f0a02f2e11cb7965702ffb2f65c0f19184ae4e27c28e57a100c35e8972e2fba419999af63b65b0f031880dda7851816cef126088ddb105b29d401d03e1132
AUX lua-5.4.2-make.patch 3179 BLAKE2B 68e9af77c2f5931234eefbe953ff127c3b32bdfa67917075435531d43672304e599e706dba2012cf6a13645803b611bee437f2f28137ed0daff9fdfc4afc4b79 SHA512 09cfcea9b736ef90d035a1d2bd7480b813edd99aa7c5ecd4b52a9fbd2bf479623db6045be89642bd3867b5ca143c5640c53a7d72951b33ab4832b9a6323a88b7
AUX lua.pc 658 BLAKE2B 580504c8162c9cbde35b4a817c688b955cad1a35b1c21ed527488eda6e7cf78dfa81fa8b100737cf9ad620d34d94eceec01ba09e4fab0b121c5e4c673677cd3f SHA512 cb476ea6dd004a9aa0094cfc219d1888c5f578b44968a960acf1f2f32783a8e4d770bb033fb1ab4851f225188bbdd434b5d239718cae2c2c35f5b5f124a722ca
DIST lua-5.1.5.tar.gz 221213 BLAKE2B 915eb8e8c9d7e460eacf1d7a59309c60dfc0f5d9d3d76fbc9764e7cae85920b95096db1c27b69ac53378a145c29efde403e88166a1332a67150d9d3a897aba02 SHA512 0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9
-DIST lua-5.2.2-tests.tar.gz 76629 BLAKE2B 323eaae02ee61cfde2535d606ed704d964461c32627cb3ad4097afdc95a16a0921b9b05677c5b9b26cbff0d7d8270045e7df32a2cea0fd99a82e6aa613a0bdae SHA512 699d5703dd1d03312f1e947ca4c68d8808bb226ae01337202c2bfb3d854a9b7d9ef9746630afd1f67e9ffe2868907ce3d600a6f5324a2c798540c5373a24aac8
-DIST lua-5.2.4.tar.gz 252651 BLAKE2B 6f20308d8413438f8446040e8de16274837cb55e626b98a0ae8cfe279dc8610fa2e032a2ce53ef3acda4b96a7198123cbc18eff16775f952e6dc0355fdf331b0 SHA512 cd77148aba4b707b6c159758b5e8444e04f968092eb98f6b4c405b2fb647e709370d5a8dcf604176101d3407e196a7433b5dcdce4fe9605c76191d3649d61a8c
DIST lua-5.3.4-tests.tar.gz 103438 BLAKE2B ac82708022e7729039111c3df4fe24302c8d0efb224afb4828871ac085a3d64c41d674a6f9369035de01ed1f7f75a3d2ce16917f37e774e923216aac0be03e09 SHA512 79575d100a2efabc8243f55b55d912443e09ef7e8b0219cb93541d85c2ba802fb9538015e1228703f09ca57bdb28a640a8f1fa0735716ba1e4bca2179c712dfb
DIST lua-5.3.6.tar.gz 303770 BLAKE2B 07c37c56f43095a4f6ca8eb8b3adf19afd53107c02b62b2bcb3619565cb2100d5f823493eef93092d5e312b30fc28885a6d9e8f0ba5a23b5bed86dc4515a5d61 SHA512 ccc380d5e114d54504de0bfb0321ca25ec325d6ff1bfee44b11870b660762d1a9bf120490c027a0088128b58bb6b5271bbc648400cab84d2dc22b512c4841681
DIST lua-5.4.2-tests.tar.gz 128901 BLAKE2B 10e4f0e8760f9cbd4761fa26665008ae7412539f79a6a7687029808f08f0ae4a24721e787e2e87e5080c16e9dcce8577a7a39ddc6d3e483a3cfe11756139594e SHA512 1516c59deca211c38444bbf97b18e988e939209b03915d3691d756eeed31b52e8d3a1f05b71ac0b561965274c7b6f3afc4244cd2e9069995696e737e2d9dd40b
DIST lua-5.4.2.tar.gz 353472 BLAKE2B 7e0e642684df635ed1c48db45989e86a2638024e30a170addf700b0c7d32276f1eaef80898539c671039c20cb0bed4861b12c58f4b8211653a17e89bad278d87 SHA512 9454a6ffd973598f2f4a2399834c31c4d5090bd12e716776e3189aa57760319d114ee64a8338bbc2ef5e08150bf0adc2ad94a1b2677f38538a43359969d4d920
EBUILD lua-5.1.5-r106.ebuild 4028 BLAKE2B 6ed08f3803ff85e1425b536d42610a9a3ff1787aa1ebb3b0c4776655c6b759b25196fa6a12b53c2ffc6538ad24d1c306d202edac32efeba0c2d74093d28c62da SHA512 12d0ff60bf6f35c549e18f6de7c52c11db7d4695bed3ca36e59bf395ca642b6b315f6034071d5daee4a45e614cd7f15e7e70e06846f4d15d05003d632220bf9f
-EBUILD lua-5.2.4-r3.ebuild 5768 BLAKE2B 3afbc7ac9176d1d57ed778a0a42bbe1c8c8cdf60bd2a17c57ae6292320c3d6eade55e84cac52901a878cc0ee8f71e99b6a936e83db139f0df4333c3fb3f67a80 SHA512 3e15e104b0ef21da5b9e7d57c7730ee5e76c24757714f4b430b779914f7017dd902cc22df21e2dfe7684d0df8e51023ffde9fb82f91e834b73b337907adcc31d
EBUILD lua-5.3.6-r2.ebuild 5752 BLAKE2B 88d746cbe0643295ebacca48b1343acf3c1ddce29b9249df65e498cac970221adb15841b978d7ed16b78a503f107d307f3a6e6b1dec5f2ab7f0a086a65d8054e SHA512 eb9a993fd34799b95ae6fe7d9ee6cc2b05f8298ed0c91546561cd4683a4c57c9c74786ce0950f4b82cd96c4e7d663400bacda9b8734bd440abbc3d312891c428
EBUILD lua-5.4.2-r1.ebuild 5692 BLAKE2B 285a6414e82dbd823a5d11aa145752dc9fe5f1465f9bc0505c30d2b0101f381c361f2af5b7440f54c9e7bff9de1fa8cb5be2b211acbde021bdb875648c0eb3ff SHA512 85c8cfee83ea7bb515a12bcdba42089c210f70d35a7b1d51ae54b80d97e41377b94cddd3e96f8cd12a3f55d3c80fb84d7972796c73092cbee974ed0df8288f87
MISC metadata.xml 524 BLAKE2B 688341a9dfa433bbc2e3fc1edb8a44d53dcee036afeb5b2c7c8fbfa0f81d1e53a6c7910b32bec637ad1cd518e48afdd0806a286dadbb6c7a88853a93aa7f3545 SHA512 92ee6e13c3fcc5ba1d2cf3ec58a54b051f1fae8646b64fae25923108a78abc77b05992abbed5a04afbc2043ea0b47749544e348506ab554d57b19bcf3b435e52
diff --git a/dev-lang/lua/files/5.2.0/01_all_memory_hoarding.upstream.patch b/dev-lang/lua/files/5.2.0/01_all_memory_hoarding.upstream.patch
deleted file mode 100644
index 9fda24ad6609..000000000000
--- a/dev-lang/lua/files/5.2.0/01_all_memory_hoarding.upstream.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- lua-5.2.0.orig/src/ldblib.c 2007/12/28 15:32:23 2.25.1.3
-+++ lua-5.2.0/src/ldblib.c 2009/06/15 14:07:34
-@@ -253,14 +253,15 @@
- }
-
-
--#define gethooktable(L) luaL_getsubtable(L, LUA_REGISTRYINDEX, HOOKKEY);
-+#define gethooktable(L) luaL_getsubtable(L, LUA_REGISTRYINDEX, HOOKKEY)
-
-
- static void hookf (lua_State *L, lua_Debug *ar) {
- static const char *const hooknames[] =
- {"call", "return", "line", "count", "tail call"};
- gethooktable(L);
-- lua_rawgetp(L, -1, L);
-+ lua_pushthread(L);
-+ lua_rawget(L, -2);
- if (lua_isfunction(L, -1)) {
- lua_pushstring(L, hooknames[(int)ar->event]);
- if (ar->currentline >= 0)
-@@ -306,10 +307,15 @@
- count = luaL_optint(L, arg+3, 0);
- func = hookf; mask = makemask(smask, count);
- }
-- gethooktable(L);
-+ if (gethooktable(L) == 0) { /* creating hook table? */
-+ lua_pushstring(L, "k");
-+ lua_setfield(L, -2, "__mode"); /** hooktable.__mode = "k" */
-+ lua_pushvalue(L, -1);
-+ lua_setmetatable(L, -2); /* setmetatable(hooktable) = hooktable */
-+ }
-+ lua_pushthread(L1); lua_xmove(L1, L, 1);
- lua_pushvalue(L, arg+1);
-- lua_rawsetp(L, -2, L1); /* set new hook */
-- lua_pop(L, 1); /* remove hook table */
-+ lua_rawset(L, -3); /* set new hook */
- lua_sethook(L1, func, mask, count); /* set hooks */
- return 0;
- }
-@@ -325,7 +331,8 @@
- lua_pushliteral(L, "external hook");
- else {
- gethooktable(L);
-- lua_rawgetp(L, -1, L1); /* get hook */
-+ lua_pushthread(L1); lua_xmove(L1, L, 1);
-+ lua_rawget(L, -2); /* get hook */
- lua_remove(L, -2); /* remove hook table */
- }
- lua_pushstring(L, unmakemask(mask, buff));
diff --git a/dev-lang/lua/files/5.2.0/02_all_hex_number_handling.upstream.patch b/dev-lang/lua/files/5.2.0/02_all_hex_number_handling.upstream.patch
deleted file mode 100644
index 26519e378e68..000000000000
--- a/dev-lang/lua/files/5.2.0/02_all_hex_number_handling.upstream.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- lua-5.2.0.orig/src/llex.c 2007/12/28 15:32:23 2.25.1.3
-+++ lua-5.2.0/src/llex.c 2009/06/15 14:07:34
-@@ -223,12 +223,19 @@
-
- /* LUA_NUMBER */
- static void read_numeral (LexState *ls, SemInfo *seminfo) {
-+ const char *expo = "Ee";
-+ int first = ls->current;
- lua_assert(lisdigit(ls->current));
-- do {
-- save_and_next(ls);
-- if (check_next(ls, "EePp")) /* exponent part? */
-+ save_and_next(ls);
-+ if (first == '0' && check_next(ls, "Xx")) /* hexadecimal? */
-+ expo = "Pp";
-+ for (;;) {
-+ if (check_next(ls, expo)) /* exponent part? */
- check_next(ls, "+-"); /* optional exponent sign */
-- } while (lislalnum(ls->current) || ls->current == '.');
-+ if (lisxdigit(ls->current) || ls->current == '.')
-+ save_and_next(ls);
-+ else break;
-+ }
- save(ls, '\0');
- buffreplace(ls, '.', ls->decpoint); /* follow locale for decimal point */
- if (!buff2d(ls->buff, &seminfo->r)) /* format error? */
diff --git a/dev-lang/lua/files/lua-5.2.4-make.patch b/dev-lang/lua/files/lua-5.2.4-make.patch
deleted file mode 100644
index 40e1f5aa7d0c..000000000000
--- a/dev-lang/lua/files/lua-5.2.4-make.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- lua-5.1.1.orig/Makefile 2006-06-02 12:53:38.000000000 +0200
-+++ lua-5.1.1/Makefile 2006-11-16 02:16:53.000000000 +0100
-@@ -11,7 +11,7 @@
- # so take care if INSTALL_TOP is not an absolute path.
- INSTALL_TOP= /usr/local
- INSTALL_BIN= $(INSTALL_TOP)/bin
--INSTALL_INC= $(INSTALL_TOP)/include
-+INSTALL_INC= $(INSTALL_TOP)/include/lua$V
- INSTALL_LIB= $(INSTALL_TOP)/lib
- INSTALL_MAN= $(INSTALL_TOP)/man/man1
- #
-@@ -127,3 +127,18 @@
- .PHONY: all $(PLATS) clean install local none dummy echo pecho lecho newer
-
- # (end of Makefile)
-+
-+# Use libtool for binary installs, etc.
-+
-+export V
-+export LIBTOOL = libtool --quiet --tag=CC
-+# See libtool manual about how to set this
-+
-+gentoo_clean:
-+ cd src; $(MAKE) $@
-+
-+gentoo_install:
-+ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
-+ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua$V luac$V $(INSTALL_BIN)
-+ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
-+ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua$V.la $(INSTALL_LIB)
---- lua-5.1.1.orig/src/Makefile 2006-03-22 01:41:49.000000000 +0100
-+++ lua-5.1.1/src/Makefile 2006-11-16 02:10:27.000000000 +0100
-@@ -39,1 +39,1 @@
--LUA_T= lua
-+LUA_T= lua$V
-@@ -42,1 +42,1 @@
--LUAC_T= luac
-+LUAC_T= luac$V
-@@ -54,1 +54,1 @@
--$(LUA_T): $(LUA_O) $(LUA_A)
-+origin$(LUA_T): $(LUA_O) $(LUA_A)
-@@ -57,1 +57,1 @@
--$(LUAC_T): $(LUAC_O) $(LUA_A)
-+origin$(LUAC_T): $(LUAC_O) $(LUA_A)
-@@ -185,3 +185,30 @@
- lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \
- lzio.h
-
-+
-+export LIBTOOL = libtool --quiet --tag=CC
-+export LIB_VERSION = 6:1:1
-+
-+# The following rules use libtool for compiling and linking in order to
-+# provide shared library support.
-+
-+LIB_NAME = liblua$V.la
-+LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo)
-+
-+%.lo %.o: %.c
-+ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
-+
-+$(LIB_NAME): $(LIB_OBJS)
-+ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \
-+ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
-+
-+$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME)
-+ $(LIBTOOL) --mode=link $(CC) -static -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
-+
-+$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME)
-+ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME)
-+
-+gentoo_clean:
-+ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$V luac$V
-+
-+gentoo_all: $(LIB_NAME) $(LUA_T) $(LUAC_T)
diff --git a/dev-lang/lua/lua-5.2.4-r3.ebuild b/dev-lang/lua/lua-5.2.4-r3.ebuild
deleted file mode 100644
index 8f3d3d948b4e..000000000000
--- a/dev-lang/lua/lua-5.2.4-r3.ebuild
+++ /dev/null
@@ -1,200 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit autotools multilib multilib-minimal portability toolchain-funcs
-
-DESCRIPTION="A powerful light-weight programming language designed for extending applications"
-HOMEPAGE="https://www.lua.org/"
-TEST_PV="5.2.2" # no 5.2.3-specific release yet
-TEST_P="${PN}-${TEST_PV}-tests"
-SRC_URI="
- https://www.lua.org/ftp/${P}.tar.gz
- test? ( https://www.lua.org/tests/${TEST_P}.tar.gz )"
-
-LICENSE="MIT"
-SLOT="5.2"
-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"
-IUSE="+deprecated readline test test-complete"
-
-COMMON_DEPEND="
- >=app-eselect/eselect-lua-3
- readline? ( sys-libs/readline:0= )
- !dev-lang/lua:0"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}"
-BDEPEND="sys-devel/libtool"
-
-RESTRICT="!test? ( test )"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/lua${SLOT}/luaconf.h
-)
-
-PATCHES=(
- "${FILESDIR}/lua-5.2.4-make.patch"
-)
-
-src_prepare() {
- default
- # use glibtool on Darwin (versus Apple libtool)
- if [[ ${CHOST} == *-darwin* ]] ; then
- sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
- Makefile src/Makefile || die
- fi
-
- # correct lua versioning
- sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
-
- sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
-
- if ! use readline ; then
- sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die
- fi
-
- # Using dynamic linked lua is not recommended for performance
- # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
- # Mainly, this is of concern if your arch is poor with GPRs, like x86
- # Note that this only affects the interpreter binary (named lua), not the lua
- # compiler (built statically) nor the lua libraries.
-
- # upstream does not use libtool, but we do (see bug #336167)
- cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
- eautoreconf
-
- # custom Makefiles
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- sed -i \
- -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
- -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
- src/luaconf.h \
- || die "failed patching luaconf.h"
-
- econf
-}
-
-multilib_src_compile() {
- tc-export CC
-
- # what to link to liblua
- liblibs="-lm"
- liblibs="${liblibs} $(dlopen_lib)"
-
- # what to link to the executables
- mylibs=
- use readline && mylibs="-lreadline"
-
- cd src
-
- local myCFLAGS=""
- use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
-
- case "${CHOST}" in
- *-mingw*) : ;;
- *) myCFLAGS+=" -DLUA_USE_LINUX" ;;
- esac
-
- emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
- SYSLDFLAGS="${LDFLAGS}" \
- RPATH="${EPREFIX}/usr/$(get_libdir)/" \
- LUA_LIBS="${mylibs}" \
- LIB_LIBS="${liblibs}" \
- V=$(ver_cut 1-2) \
- gentoo_all
-}
-
-multilib_src_install() {
- emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
- V=${SLOT} gentoo_install
-
- case $SLOT in
- 0)
- LIBNAME="lua"
- INCLUDEDIR_SUFFIX=''
- ;;
- *) LIBNAME="lua${SLOT}"
- INCLUDEDIR_SUFFIX="/lua${SLOT}"
- ;;
- esac
-
- # We want packages to find our things...
- # A slotted Lua uses different directories for headers & names for
- # libraries, and pkgconfig should reflect that.
- local PATCH_PV=$(ver_cut 1-2)
- cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
- sed -r -i \
- -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
- -e "s:^prefix= :prefix= ${EPREFIX}:" \
- -e "s:^V=.*:V= ${PATCH_PV}:" \
- -e "s:^R=.*:R= ${PV}:" \
- -e "s:/,lib,:/$(get_libdir):g" \
- -e "/^Libs:/s:( )(-llua)($| ):\1-l${LIBNAME}\3:" \
- -e "/^includedir=/s:include$:include${INCLUDEDIR_SUFFIX}:" \
- "${WORKDIR}/lua.pc" || die
-
- insinto "/usr/$(get_libdir)/pkgconfig"
- newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
- # Copy Debian's symlink support:
- # https://salsa.debian.org/lua-team/lua5.3/blob/master/debian/rules#L19
- # FreeBSD calls the pkgconfig 'lua-5.3.pc'
- # Older systems called it 'lua53.pc'
- dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua-${SLOT}.pc"
- dosym "lua${SLOT}.pc" "/usr/$(get_libdir)/pkgconfig/lua${SLOT/.}.pc"
-}
-
-multilib_src_install_all() {
- DOCS="README"
- HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
- einstalldocs
- newman doc/lua.1 lua${SLOT}.1
- newman doc/luac.1 luac${SLOT}.1
- find "${ED}" -name '*.la' -delete || die
- find "${ED}" -name 'liblua*.a' -delete || die
-}
-
-# Makefile contains a dummy target that doesn't do tests
-# but causes issues with slotted lua (bug #510360)
-src_test() {
- debug-print-function ${FUNCNAME} "$@"
- cd "${WORKDIR}/lua-${TEST_PV}-tests" || die
- # https://www.lua.org/tests/
- # There are two sets:
- # basic
- # complete.
- #
- # The basic subset is selected by passing -e'_U=true'
- # The complete set is noted to contain tests that may consume too much memory or have non-portable tests.
- # attrib.lua for example needs some multilib customization (have to compile the stuff in libs/ for each ABI)
- TEST_OPTS="$(usex test-complete '' '-e_U=true')"
- TEST_MARKER="${T}/test.failed"
- rm -f "${TEST_MARKER}"
-
- # If we are failing, set the marker file, and only check it after done all ABIs
- abi_src_test() {
- debug-print-function ${FUNCNAME} "$@"
- TEST_LOG="${T}/test.${MULTIBUILD_ID}.log"
- eval "${BUILD_DIR}"/src/lua${SLOT} ${TEST_OPTS} all.lua 2>&1 | tee "${TEST_LOG}" || die
- grep -sq -e "final OK" "${TEST_LOG}" || echo "FAIL ${MULTIBUILD_ID}" >>"${TEST_MARKER}"
- return 0
- }
-
- multilib_foreach_abi abi_src_test
-
- if [ -e "${TEST_MARKER}" ]; then
- cat "${TEST_MARKER}"
- die "Tests failed"
- fi
-}
-
-pkg_postinst() {
- eselect lua set --if-unset "${PN}${SLOT}"
-
- if has_version "app-editor/emacs"; then
- if ! has_version "app-emacs/lua-mode"; then
- einfo "Install app-emacs/lua-mode for lua support for emacs"
- fi
- fi
-}