From 129160ec854dca4c3fedb5bcfbcb56930371da0f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 1 Jan 2021 21:06:00 +0000 Subject: gentoo new year resync : 01.01.2021 --- dev-lang/lua/Manifest | 19 +-- dev-lang/lua/files/lua-5.1.5-make.patch | 97 +++++++++++++++ dev-lang/lua/files/lua-5.2.4-make.patch | 75 ++++++++++++ dev-lang/lua/files/lua-5.3.6-make.patch | 91 ++++++++++++++ dev-lang/lua/files/lua-5.4.2-make.patch | 99 ++++++++++++++++ dev-lang/lua/lua-5.1.5-r105.ebuild | 150 ------------------------ dev-lang/lua/lua-5.1.5-r106.ebuild | 151 ++++++++++++++++++++++++ dev-lang/lua/lua-5.1.5-r4.ebuild | 2 +- dev-lang/lua/lua-5.1.5-r5.ebuild | 113 ------------------ dev-lang/lua/lua-5.2.4-r2.ebuild | 202 -------------------------------- dev-lang/lua/lua-5.2.4-r3.ebuild | 200 +++++++++++++++++++++++++++++++ dev-lang/lua/lua-5.3.6-r1.ebuild | 202 -------------------------------- dev-lang/lua/lua-5.3.6-r2.ebuild | 200 +++++++++++++++++++++++++++++++ dev-lang/lua/lua-5.4.1-r1.ebuild | 199 ------------------------------- dev-lang/lua/lua-5.4.2-r1.ebuild | 197 +++++++++++++++++++++++++++++++ 15 files changed, 1122 insertions(+), 875 deletions(-) create mode 100644 dev-lang/lua/files/lua-5.1.5-make.patch create mode 100644 dev-lang/lua/files/lua-5.2.4-make.patch create mode 100644 dev-lang/lua/files/lua-5.3.6-make.patch create mode 100644 dev-lang/lua/files/lua-5.4.2-make.patch delete mode 100644 dev-lang/lua/lua-5.1.5-r105.ebuild create mode 100644 dev-lang/lua/lua-5.1.5-r106.ebuild delete mode 100644 dev-lang/lua/lua-5.1.5-r5.ebuild delete mode 100644 dev-lang/lua/lua-5.2.4-r2.ebuild create mode 100644 dev-lang/lua/lua-5.2.4-r3.ebuild delete mode 100644 dev-lang/lua/lua-5.3.6-r1.ebuild create mode 100644 dev-lang/lua/lua-5.3.6-r2.ebuild delete mode 100644 dev-lang/lua/lua-5.4.1-r1.ebuild create mode 100644 dev-lang/lua/lua-5.4.2-r1.ebuild (limited to 'dev-lang/lua') diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest index bfc13415a53a..799e16aa3b9e 100644 --- a/dev-lang/lua/Manifest +++ b/dev-lang/lua/Manifest @@ -20,22 +20,25 @@ AUX lua-5.1.4-test.patch 271 BLAKE2B 1b8d2fd524d34fce99315d03232984a3cd1ad74fb23 AUX lua-5.1.5-disable-deprecated.patch 1823 BLAKE2B 82d9e7c12d98606b29960182d8e069704683e136e06f422d6109a3c2ade165bc12e151d9e1c7933c65be3b441f1363db4f054866c0c7a894e9282a82b01a435d SHA512 1dc8f8a789bc8374137adce70c6614afe383255b5a2e59e36fdddf5a8fb9c7458b42e7b4483f09635d0ec38f8ed7925f8d1f12ce0fe0fdf0373a8e59b6f84322 AUX lua-5.1.5-fix_vararg_calls.patch 470 BLAKE2B fa5863445dbca630dbe00fd03a09f752dc27d0106cb7a5cc8bddf51dc9bd01ae843ad29219ed2ba29dd3088b933bcbf91fc87d5c58a972f4bac99fe112f05aff SHA512 630e8537bd80771fecc4c8216ec96e243654bd0b7bd006b6867baca4effab90bab4a922951661d4fc3ac2700c3bd7c0c40227b9eeee7dd5a87c07a6382055b04 AUX lua-5.1.5-gentoo-build.patch 3108 BLAKE2B fae72673638387311749949840ce3df6f56763af6f5027c9f71c2262abdf3ed1cc2fe49fccb3ceef110584ac5034b1dceef03c773b68c12558b30c33ea6a10d4 SHA512 85165a0cae5f951d53741a7a07bc291bf16a4e575d82262b744ba177dfee54a91acc37000e17299f4f6a13acf8b611aac618e257b45e4f65012a9cf632ab4ab7 +AUX lua-5.1.5-make.patch 3079 BLAKE2B cf9b72afd8e08ea23256364f321d49427661de8353f7655b9da3de1ef943125ae86cf1a7aab9f1c459e51063031eb1105b7703ad9e1aee90a848497b58addb12 SHA512 92a1c890e40a8bd621dad4a18fc890850027c4a5a239b8259ef3002ad4835a7a11069ca964a62a096cd651a688b60f5f261c1223e4ac7981e7a8bb43788634ff AUX lua-5.1.5-readline.patch 638 BLAKE2B 9f15fc99ae7abaa6b99ed0e1daf45bc6c8d2980159e3f721d3ec415108c0b612091822c56177804a333dc0abe038229d5adcd8982e50712dcee4b493d8ff04e1 SHA512 0167466adde2827455587001c02ab1cedd3845b6646cd3ce58f85d808157c0d9320106a8055319c338640b4494152e0b494fe92943070d4cdbdfcc1cfd44c82e AUX lua-5.2-make-r1.patch 2410 BLAKE2B e2c8607c96dcc89ee130aa2a24eb8ca3c0191902528fab1563f40f2c26a5c12c40b5c41679df6a5997821c0cf08ea87e12bbfe2ac09470ab93285255935eba14 SHA512 e34b41740e672ba3511569884fe053a2d71e197f6738f1c22f74f7ffc657cb7b91e6efe97374730a5f8f6e82419a30d3b96e9af0b3a66caf78c523a4493492b8 +AUX lua-5.2.4-make.patch 2418 BLAKE2B 89f3f8d0222041200cee33079686d049800f74dd6d796205a4089f09a44884d0aa111d47203e778f80e5acdde1d56ad3f87c9a00fc832ec0e0f20d7b518e48c7 SHA512 0f9d7bd63ce6e9aeecd5286fc7069421e2a0e9cffd707d8af96dbce1c8c623084032480e3a16b69f28c44019f284a73390faf84a24e738273f556c5998a5d1e6 AUX lua-5.3-make-r1.patch 2822 BLAKE2B 4b12793d85e28d69a871c946f48a4f7e3b326dc78167e7ed1c207fab77883bb47f845c24a08ababa69c146e60f548f0f6eb2ae8b70b670b540124ca4d3628485 SHA512 40692d71a7ca59d495f8af7969ccc295373e5b0993b67142c43dcb216d57893da41fcf7d1bc49382fc89986eedaaa0f7da6fe62b42e41ac450c30dfa6d4bcdec +AUX lua-5.3.6-make.patch 2830 BLAKE2B 9d3ea717531d93d7f7618335f503528e629aa3582392c49e340b6909860a51e30371530ea06ef1ed81cc4bde4a294e1d6732662703f646a7a3f727159dc83fed SHA512 5d5f0a02f2e11cb7965702ffb2f65c0f19184ae4e27c28e57a100c35e8972e2fba419999af63b65b0f031880dda7851816cef126088ddb105b29d401d03e1132 AUX lua-5.4-makefiles.patch 3187 BLAKE2B 22911f5fd5d26753e952cd435350cc120f7736a3a1fe4301d58265965c36a0d64a98af731f186b0374f7fb29f8a2ddcf3a95fc6746b3955295dc8e8a5425b62c SHA512 5df57cf6379f245f855423d6fee33d9e42f4100aa69d19bc9b608db7e7001ef3c9e74c81f97b9e74e8decd78c149bc4689d56008a1704054c6e416c892c362f3 +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.1-tests.tar.gz 128646 BLAKE2B 2dae666e89bacf986228a33fc665bbc510e738d9f8791933f5048e4bbecaf6cd59c5e70e488d332b16960225aac3b9fae46e500f3b54856bb6aabe8cd3a5c932 SHA512 ac7cf113d96f8fe2af4f104297a70debd3bede5997627fc18db6b5d9c78ff49e05a165f5855894def5656c6dcc2d7d9ccce741c90da17698a5c714a33828f49a -DIST lua-5.4.1.tar.gz 353965 BLAKE2B e5b46fcf2eb2ea9bd235793cefec2bf19f185ed51b11bc6133bda4e3639f09194378b2fd55544972ee32576751e80bba87b3b61ec3d4a0910592d6e5cb4a4c77 SHA512 49ffbe814ec41e515fc8502b6958151c6c56aa171412f0b211ad9de934be2c958c3709d49435885ddea0fa6765ed511dafb3537558950ff3b4261338214f1571 -EBUILD lua-5.1.5-r105.ebuild 4047 BLAKE2B 91971f1b59e3a7c94a2ef4f7585a6925e54e74ae5a677c2880c97a2ba839ed43e4fdcea1e48ab09a0e029fa6699e830350326329298c63375624aa5973da3861 SHA512 dc3642a6527797d706ad2413efb9be5e4079cbcdf8d7d59684ae59364f18a342cddff5d92596de42d2b34c316e9127446521c9f18026ad56686031746d0d9fb7 -EBUILD lua-5.1.5-r4.ebuild 3626 BLAKE2B b8940a7010239a29ad1920fe7d9e9f799ac1472c10ec92f4b24f122afbc9dce6bc807e93b4e1f4f0c4413661dc28d5205a2e53c5228a34e2e26b26d184e2d24e SHA512 89721d186390aae36b3b64f0c12ddbd14f8dec843e4f46b0ac6e384c39f6c70d657827ac0af24db51733f8fc534168859391178804c0c06920071f66c2e14235 -EBUILD lua-5.1.5-r5.ebuild 3181 BLAKE2B 190ef3d7da2eaada3c3eb25e5d524e4b3efb81d77d7ae566b25713b50cad8f2c7822eb490a4ebdf0ab6eb3f6f6d9a5ac0c6bc813f7d0329905b9f98e6ca04213 SHA512 7497bf82661f2c17c4cf07ff6511b8595f06336defbad1feb2ac483ef024ae6473bec3cdcb925b9d18eaa5091980f1c10c21ea1d48418af1d0cd5ced4cc3b349 -EBUILD lua-5.2.4-r2.ebuild 5815 BLAKE2B e3741fe56b47d500f6bf9ed09a9b4345564e9beaeae4546860223d5bf97d6099db6cd5e4799f2e85b793fe67f3233e291476a9dca68b1a5389a15a3be69667d8 SHA512 1d07f7d52b8c6a773d486d83dfdb2a13b8504c065a68cf500fca4fc086c9a49bbe489e03151b05af42d74e20627a13b879131aade0a941439c923efa69014041 -EBUILD lua-5.3.6-r1.ebuild 5800 BLAKE2B d3ba9b65ef465fd0ba3350eacc83d282618591c72e4866c7f1730406c118f2956cb53e2f0b015d14cfe2ed601820e44cd415658f518512fe6f811438b9d15c6a SHA512 e25977c341752f4f3e65aac0746969df628009e288bb81545e4b7897e6a4d56da0f6021c59162ad7473ff0487e2aa71015f2ca75d893c84fe883f447e911c241 -EBUILD lua-5.4.1-r1.ebuild 5763 BLAKE2B c36fbfbfe4d672a96334fc9a8d02ebe727490b3bc674a9895a9e90a315a2d507e04925392f9a02a848e0514de5eb2937680c3fb32da863f2f0fa5f90d2d330b0 SHA512 7469c2131d815a830eee6822623022ea29ae6526534eff52ad983955ae521e2165a07c15ada3daec2547b633d22f1b99cb5d5a8ebf158a9a98948ab864f2b294 +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 4040 BLAKE2B c7fc570461c3d6683c1f916213c1529a5eca0ddc923a38a4f5ca140b9f1390766226dd2f94be28ed99a0cad9c5e51c77bc93a388101c4547f22958b26e2bf08c SHA512 1fac4df1b91756d832b5f415c541d1085ce20808cc293b3108d6be99776f8d817be1057499422f6c026ac2b93c267cf3004d4f05faabfe4baf8508b00d71a3fe +EBUILD lua-5.1.5-r4.ebuild 3617 BLAKE2B a5eef5cf7e7419c6ab130768b094ec0cf20e8b66bd60637d78adcfe03bf56ef6ff82a99a71190177d6457a118e91b68a5ab132afef06a9dabfffb962500581c0 SHA512 e613f945395ddf642bf5d8613f01b6d536fe7c35bde4a0009335eed65ff872384e272eaecee8cb408cd76cc75af6aaca6b7c6c0361d63188d5dc8f3089ceb0f5 +EBUILD lua-5.2.4-r3.ebuild 5779 BLAKE2B a9d7b0cf295ef6d2dd959ef1b7d04a1db966562bac30492c1d67a195601145fea03213295cfe7a0a60aa4d9f851f71661dee42a9dce2ef0c279cdb04084e4078 SHA512 e740561dd931bede1dd8def84b88ec493b880e22f28789d04a560c08c03b7fe319f6f645d5c583cafa4a9e1f859cdd0a9f47115c6ca4cf7b0445abd6287fafd0 +EBUILD lua-5.3.6-r2.ebuild 5764 BLAKE2B 3d7250d840406b8b76e80d5389e2fc1d8e31a13fa6379ffd9da64e765e7187f962145daaaad8db1f948f963b94e9a30041269dd53fdf9ef0ac56583b9c3d16c1 SHA512 7ad3147fe330d8ac979f6eedd18356fead9286395f7861a5e1d548e40dc46dcdeb849eeea57892a42393a1223b246f81ec84ebe0039d2abcceb3914b26a174bd +EBUILD lua-5.4.2-r1.ebuild 5704 BLAKE2B b893018704077a96dd2e5942a961f559253d46f65501ea3849790d422ae8907e31e2eff3f77cd780fd81846f4ca4c6715acaa9d88aa8653e88af8e67b05ebc37 SHA512 ed8892acb8870299ab8d781d71e4edddde3ac11ba9a97bc72b82a6c5ced5ba8d04748d90d191c8f4a67731515f468b8bd525523a6e5d812e2545f83645ae3868 MISC metadata.xml 524 BLAKE2B 688341a9dfa433bbc2e3fc1edb8a44d53dcee036afeb5b2c7c8fbfa0f81d1e53a6c7910b32bec637ad1cd518e48afdd0806a286dadbb6c7a88853a93aa7f3545 SHA512 92ee6e13c3fcc5ba1d2cf3ec58a54b051f1fae8646b64fae25923108a78abc77b05992abbed5a04afbc2043ea0b47749544e348506ab554d57b19bcf3b435e52 diff --git a/dev-lang/lua/files/lua-5.1.5-make.patch b/dev-lang/lua/files/lua-5.1.5-make.patch new file mode 100644 index 000000000000..032652c0a5e1 --- /dev/null +++ b/dev-lang/lua/files/lua-5.1.5-make.patch @@ -0,0 +1,97 @@ +diff -ru lua-5.1.5.orig/Makefile lua-5.1.5/Makefile +--- lua-5.1.5.orig/Makefile 2014-04-15 17:43:34.845435031 +0200 ++++ lua-5.1.5/Makefile 2014-04-15 19:05:08.669304987 +0200 +@@ -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 + # +@@ -126,3 +126,21 @@ + .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho + + # (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_test: gentoo_linux ++ test/lua.static test/hello.lua ++ ++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) +diff -ru lua-5.1.5.orig/src/Makefile lua-5.1.5/src/Makefile +--- lua-5.1.5.orig/src/Makefile 2014-04-15 17:43:34.844435031 +0200 ++++ lua-5.1.5/src/Makefile 2014-04-15 18:07:21.427397122 +0200 +@@ -29,10 +29,10 @@ + LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \ + lstrlib.o loadlib.o linit.o + +-LUA_T= lua ++LUA_T= lua$V + LUA_O= lua.o + +-LUAC_T= luac ++LUAC_T= luac$V + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) +@@ -51,10 +51,10 @@ + $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files + $(RANLIB) $@ + +-$(LUA_T): $(LUA_O) $(LUA_A) ++origin$(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +-$(LUAC_T): $(LUAC_O) $(LUA_A) ++origin$(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) + + clean: +@@ -180,3 +180,33 @@ + ltm.h lzio.h lmem.h lopcodes.h lundump.h + + # (end of Makefile) ++ ++export LIBTOOL = libtool --tag=CC ++export LIB_VERSION = 5:1:5 ++ ++# 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 0:0:0 \ ++ -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) ++ ++lua_test: $(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) lua_test $(LUAC_T) diff --git a/dev-lang/lua/files/lua-5.2.4-make.patch b/dev-lang/lua/files/lua-5.2.4-make.patch new file mode 100644 index 000000000000..40e1f5aa7d0c --- /dev/null +++ b/dev-lang/lua/files/lua-5.2.4-make.patch @@ -0,0 +1,75 @@ +--- 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/files/lua-5.3.6-make.patch b/dev-lang/lua/files/lua-5.3.6-make.patch new file mode 100644 index 000000000000..6e842caf4f65 --- /dev/null +++ b/dev-lang/lua/files/lua-5.3.6-make.patch @@ -0,0 +1,91 @@ +diff -uNr lua-5.3.3.orig/Makefile lua-5.3.3/Makefile +--- lua-5.3.3.orig/Makefile 2016-12-04 22:29:54.839135901 +0100 ++++ lua-5.3.3/Makefile 2016-12-04 22:31:14.235851109 +0100 +@@ -12,7 +12,7 @@ + # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. + 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 + INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V +@@ -112,3 +112,18 @@ + .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho + + # (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) +diff -uNr lua-5.3.3.orig/src/Makefile lua-5.3.3/src/Makefile +--- lua-5.3.3.orig/src/Makefile 2016-12-04 22:29:54.840135910 +0100 ++++ lua-5.3.3/src/Makefile 2016-12-04 22:34:55.980848068 +0100 +@@ -36,10 +36,10 @@ + lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o + BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) + +-LUA_T= lua ++LUA_T= lua$V + LUA_O= lua.o + +-LUAC_T= luac ++LUAC_T= luac$V + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +@@ -59,10 +59,10 @@ + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + +-$(LUA_T): $(LUA_O) $(LUA_A) ++origin$(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +-$(LUAC_T): $(LUAC_O) $(LUA_A) ++origin$(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) + + clean: +@@ -195,3 +195,30 @@ + lobject.h ltm.h lzio.h + + # (end of Makefile) ++ ++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/files/lua-5.4.2-make.patch b/dev-lang/lua/files/lua-5.4.2-make.patch new file mode 100644 index 000000000000..8758e88de91b --- /dev/null +++ b/dev-lang/lua/files/lua-5.4.2-make.patch @@ -0,0 +1,99 @@ +diff --git a/Makefile b/Makefile +index 1797df9..90284d8 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,11 +10,11 @@ PLAT= guess + # so take care if INSTALL_TOP is not an absolute path. See the local target. + # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with + # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. +-INSTALL_TOP= /usr/local ++INSTALL_TOP= /usr + 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 ++INSTALL_MAN= $(INSTALL_TOP)/share/man/man1 + INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V + INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V + +@@ -104,3 +104,18 @@ pc: + .PHONY: all $(PLATS) help test clean install uninstall local dummy echo pc + + # (end of Makefile) ++ ++# Use libtool for binary installs, etc. ++ ++export V ++export LIBTOOL = /usr/bin/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) +diff --git a/src/Makefile b/src/Makefile +index 514593d..8af8f99 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -37,10 +37,10 @@ CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem + LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o + BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) + +-LUA_T= lua ++LUA_T= lua$V + LUA_O= lua.o + +-LUAC_T= luac ++LUAC_T= luac$V + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +@@ -60,10 +60,10 @@ $(LUA_A): $(BASE_O) + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + +-$(LUA_T): $(LUA_O) $(LUA_A) ++origin$(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +-$(LUAC_T): $(LUAC_O) $(LUA_A) ++origin$(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) + + test: +@@ -218,3 +218,30 @@ lzio.o: lzio.c lprefix.h lua.h luaconf.h llimits.h lmem.h lstate.h \ + lobject.h ltm.h lzio.h + + # (end of Makefile) ++ ++export LIBTOOL = /usr/bin/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.1.5-r105.ebuild b/dev-lang/lua/lua-5.1.5-r105.ebuild deleted file mode 100644 index 31cf0b445a0f..000000000000 --- a/dev-lang/lua/lua-5.1.5-r105.ebuild +++ /dev/null @@ -1,150 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multilib multilib-minimal portability toolchain-funcs - -DESCRIPTION="A powerful light-weight programming language designed for extending applications" -HOMEPAGE="http://www.lua.org/" -SRC_URI="http://www.lua.org/ftp/${P}.tar.gz" - -LICENSE="MIT" -SLOT="5.1" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="+deprecated readline static" - -RDEPEND="readline? ( >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] ) - >=app-eselect/eselect-lua-3 - !dev-lang/lua:0" -DEPEND="${RDEPEND} - sys-devel/libtool" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/lua${SLOT}/luaconf.h -) - -PATCHES=( - "${FILESDIR}/${PN}-$(ver_cut 1-2)-make-r2.patch" - "${FILESDIR}/${PN}-$(ver_cut 1-2)-module_paths.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/\16:5:1/' src/Makefile - - sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html - - if ! use deprecated ; then - # patches from 5.1.4 still apply - eapply "${FILESDIR}"/${PN}-5.1.4-deprecated.patch - eapply "${FILESDIR}"/${PN}-5.1.4-test.patch - fi - - if ! use readline ; then - eapply "${FILESDIR}"/${PN}-$(ver_cut 1-2)-readline.patch - 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 (both shared and static - # are installed) - if use static ; then - sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die - fi - - # A slotted Lua uses different directories for headers & names for - # libraries, and pkgconfig should reflect that. - sed -r -i \ - -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \ - -e "/^includedir=/s,(/include)$,\1/lua${SLOT}," \ - -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \ - "${S}"/etc/lua.pc - - # custom Makefiles - multilib_copy_sources -} - -multilib_src_configure() { - # We want packages to find our things... - sed -i \ - -e 's:/usr/local:'${EPREFIX}'/usr:' \ - -e "s:\([/\"]\)\:\1$(get_libdir):g" \ - etc/lua.pc src/luaconf.h || die -} - -multilib_src_compile() { - tc-export CC - myflags= - # what to link to liblua - liblibs="-lm" - liblibs="${liblibs} $(dlopen_lib)" - - # what to link to the executables - mylibs= - if use readline; then - mylibs="-lreadline" - fi - - cd src - emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \ - RPATH="${EPREFIX}/usr/$(get_libdir)/" \ - LUA_LIBS="${mylibs}" \ - LIB_LIBS="${liblibs}" \ - V=$(ver_cut 1-2) \ - gentoo_all - - mv lua_test ../test/lua.static -} - -multilib_src_install() { - emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ - V=${SLOT} gentoo_install - - insinto /usr/$(get_libdir)/pkgconfig - newins etc/lua.pc lua${SLOT}.pc -} - -multilib_src_install_all() { - DOCS="HISTORY 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 -} - -multilib_src_test() { - local positive="bisect cf echo env factorial fib fibfor hello printf sieve - sort trace-calls trace-globals" - local negative="readonly" - local test - - cd "${BUILD_DIR}" || die - for test in ${positive}; do - test/lua.static test/${test}.lua || die "test $test failed" - done - - for test in ${negative}; do - test/lua.static test/${test}.lua && die "test $test failed" - done -} - -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 -} diff --git a/dev-lang/lua/lua-5.1.5-r106.ebuild b/dev-lang/lua/lua-5.1.5-r106.ebuild new file mode 100644 index 000000000000..7ed88b370326 --- /dev/null +++ b/dev-lang/lua/lua-5.1.5-r106.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit multilib multilib-minimal portability toolchain-funcs + +DESCRIPTION="A powerful light-weight programming language designed for extending applications" +HOMEPAGE="https://www.lua.org/" +SRC_URI="https://www.lua.org/ftp/${P}.tar.gz" + +LICENSE="MIT" +SLOT="5.1" +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" +IUSE="+deprecated readline" + +COMMON_DEPEND=" + >=app-eselect/eselect-lua-3 + readline? ( >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] ) + !dev-lang/lua:0" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +BDEPEND="sys-devel/libtool" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/lua${SLOT}/luaconf.h +) + +src_prepare() { + PATCHES=( + "${FILESDIR}/lua-5.1.5-make.patch" + "${FILESDIR}/${PN}-$(ver_cut 1-2)-module_paths.patch" + ) + if ! use deprecated ; then + # patches from 5.1.4 still apply + PATCHES+=( + "${FILESDIR}"/${PN}-5.1.4-deprecated.patch + "${FILESDIR}"/${PN}-5.1.4-test.patch + ) + fi + if ! use readline ; then + PATCHES+=( + "${FILESDIR}"/${PN}-$(ver_cut 1-2)-readline.patch + ) + fi + + 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/\16:5:1/' src/Makefile + + sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html + + # 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. + + # A slotted Lua uses different directories for headers & names for + # libraries, and pkgconfig should reflect that. + sed -r -i \ + -e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \ + -e "/^includedir=/s,(/include)$,\1/lua${SLOT}," \ + -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \ + "${S}"/etc/lua.pc + + # custom Makefiles + multilib_copy_sources +} + +multilib_src_configure() { + # We want packages to find our things... + sed -i \ + -e 's:/usr/local:'${EPREFIX}'/usr:' \ + -e "s:\([/\"]\)\:\1$(get_libdir):g" \ + etc/lua.pc src/luaconf.h || die +} + +multilib_src_compile() { + tc-export CC + myflags= + # what to link to liblua + liblibs="-lm" + liblibs="${liblibs} $(dlopen_lib)" + + # what to link to the executables + mylibs= + if use readline; then + mylibs="-lreadline" + fi + + cd src + emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \ + RPATH="${EPREFIX}/usr/$(get_libdir)/" \ + LUA_LIBS="${mylibs}" \ + LIB_LIBS="${liblibs}" \ + V=$(ver_cut 1-2) \ + gentoo_all + + mv lua_test ../test/lua.static +} + +multilib_src_install() { + emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ + V=${SLOT} gentoo_install + + insinto /usr/$(get_libdir)/pkgconfig + newins etc/lua.pc lua${SLOT}.pc +} + +multilib_src_install_all() { + DOCS="HISTORY 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 +} + +multilib_src_test() { + local positive="bisect cf echo env factorial fib fibfor hello printf sieve + sort trace-calls trace-globals" + local negative="readonly" + local test + + cd "${BUILD_DIR}" || die + for test in ${positive}; do + test/lua.static test/${test}.lua || die "test $test failed" + done + + for test in ${negative}; do + test/lua.static test/${test}.lua && die "test $test failed" + done +} + +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 +} diff --git a/dev-lang/lua/lua-5.1.5-r4.ebuild b/dev-lang/lua/lua-5.1.5-r4.ebuild index 224f3123c8ac..3cd5a3b9c7d6 100644 --- a/dev-lang/lua/lua-5.1.5-r4.ebuild +++ b/dev-lang/lua/lua-5.1.5-r4.ebuild @@ -11,7 +11,7 @@ SRC_URI="http://www.lua.org/ftp/${P}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +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" IUSE="+deprecated emacs readline static" RDEPEND="readline? ( >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] )" diff --git a/dev-lang/lua/lua-5.1.5-r5.ebuild b/dev-lang/lua/lua-5.1.5-r5.ebuild deleted file mode 100644 index bd982069373e..000000000000 --- a/dev-lang/lua/lua-5.1.5-r5.ebuild +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit eutils multilib multilib-minimal portability toolchain-funcs versionator flag-o-matic - -DESCRIPTION="A powerful light-weight programming language designed for extending applications" -HOMEPAGE="http://www.lua.org/" -SRC_URI="http://www.lua.org/ftp/${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="+deprecated emacs readline doc" - -RDEPEND="readline? ( >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND}" -PDEPEND="emacs? ( app-emacs/lua-mode )" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/luaconf.h -) - -src_prepare() { - # Correct documentation link - sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die - - # 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. - - # Therefore both lua interpreter and compiler are statically linked to - # the core library modules. - - # Note: This patch only adds the required targets to the makefiles - # instead of relying upon libtool, which fails cross-compiling. Both - # shared and static versions of lua libraries are installed. - epatch "${FILESDIR}"/${P}-gentoo-build.patch - - # Rename deprecated functions in scripts - use deprecated || epatch "${FILESDIR}"/${P}-disable-deprecated.patch - - # Remove readline dependency if not requested - use readline || epatch "${FILESDIR}"/${P}-disable-readline.patch - - epatch "${FILESDIR}/${P}-fix_vararg_calls.patch" - - # Required by EAPI >= 6 - eapply_user - - # Add documentation URIs if needed - use doc && \ - HTML_DOCS=( doc/*.{html,css,png,gif} ) && \ - DOCS="HISTORY README" - - # custom Makefiles - multilib_copy_sources -} - -multilib_src_configure() { - # Fix directories according to FHS/Gentoo policy paths and ABI - sed -i \ - -e 's:/usr/local:'${EPREFIX}'/usr:' \ - -e 's:/man/:/share/man/:' \ - -e "s:\([/\"]\)\:\1$(get_libdir):g" \ - Makefile etc/lua.pc src/luaconf.h doc/manual.html || die -} - -multilib_src_compile() { - append-cflags "-DLUA_USE_LINUX" - append-ldflags "-Wl,-E" - tc-export AR CC CPP LD RANLIB - emake \ - MYLDFLAGS="${LDFLAGS}" \ - MYCFLAGS="${CFLAGS}" \ - linux -} - -multilib_src_install() { - emake -j1 install INSTALL_TOP="${ED}/usr" - - insinto usr/$(get_libdir)/pkgconfig - doins etc/lua.pc -} - -multilib_src_install_all() { - einstalldocs -r - - doicon etc/lua.ico - - doman doc/lua.1 doc/luac.1 -} - -multilib_src_test() { - # These tests MUST succeed for the ebuild to succeed - local MUST_SUCCEED="bisect cf echo env factorial fib fibfor hello printf sieve - sort trace-calls trace-globals" - - # These tests MUST fail for the ebuild to succeed - local MUST_FAIL="readonly" - - cd "${BUILD_DIR}" || die - - local test - for test in ${MUST_SUCCEED}; do - src/lua test/${test}.lua || die "test $test failed" - done - - for test in ${MUST_FAIL}; do - src/lua test/${test}.lua && die "test $test failed" - done -} diff --git a/dev-lang/lua/lua-5.2.4-r2.ebuild b/dev-lang/lua/lua-5.2.4-r2.ebuild deleted file mode 100644 index 79355e284ced..000000000000 --- a/dev-lang/lua/lua-5.2.4-r2.ebuild +++ /dev/null @@ -1,202 +0,0 @@ -# Copyright 1999-2020 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="http://www.lua.org/" -TEST_PV="5.2.2" # no 5.2.3-specific release yet -TEST_A="${PN}-${TEST_PV}-tests.tar.gz" -PKG_A="${P}.tar.gz" -SRC_URI=" - http://www.lua.org/ftp/${PKG_A} - test? ( https://www.lua.org/tests/${TEST_A} )" - -LICENSE="MIT" -SLOT="5.2" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="+deprecated readline static test test-complete" -RESTRICT="!test? ( test )" - -RDEPEND="readline? ( sys-libs/readline:0= ) - >=app-eselect/eselect-lua-3 - !dev-lang/lua:0" -DEPEND="${RDEPEND} - sys-devel/libtool" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/lua${SLOT}/luaconf.h -) - -PATCHES=( - "${FILESDIR}/${PN}-$(ver_cut 1-2)-make-r1.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 (both shared and static - # are installed) - if use static ; then - sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die - fi - - # 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 -} - -# 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) - use test-complete || TEST_OPTS="-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 -} diff --git a/dev-lang/lua/lua-5.2.4-r3.ebuild b/dev-lang/lua/lua-5.2.4-r3.ebuild new file mode 100644 index 000000000000..81b65efd45f7 --- /dev/null +++ b/dev-lang/lua/lua-5.2.4-r3.ebuild @@ -0,0 +1,200 @@ +# Copyright 1999-2020 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 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-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 +} diff --git a/dev-lang/lua/lua-5.3.6-r1.ebuild b/dev-lang/lua/lua-5.3.6-r1.ebuild deleted file mode 100644 index f6968026e01c..000000000000 --- a/dev-lang/lua/lua-5.3.6-r1.ebuild +++ /dev/null @@ -1,202 +0,0 @@ -# Copyright 1999-2020 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="http://www.lua.org/" -TEST_PV="5.3.4" -TEST_A="${PN}-${TEST_PV}-tests.tar.gz" -PKG_A="${P}.tar.gz" -SRC_URI=" - http://www.lua.org/ftp/${PKG_A} - test? ( https://www.lua.org/tests/${TEST_A} )" - -LICENSE="MIT" -SLOT="5.3" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="+deprecated readline static test test-complete" -RESTRICT="!test? ( test )" - -RDEPEND="readline? ( sys-libs/readline:0= ) - >=app-eselect/eselect-lua-3 - !dev-lang/lua:0" -DEPEND="${RDEPEND} - sys-devel/libtool" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/lua${SLOT}/luaconf.h -) - -PATCHES=( - "${FILESDIR}/${PN}-$(ver_cut 1-2)-make-r1.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 (both shared and static - # are installed) - if use static ; then - sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die - fi - - # 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_5_1 -DLUA_COMPAT_5_2" - - 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 -} - -# 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) - use test-complete || TEST_OPTS="-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 -} diff --git a/dev-lang/lua/lua-5.3.6-r2.ebuild b/dev-lang/lua/lua-5.3.6-r2.ebuild new file mode 100644 index 000000000000..78ce29e81b00 --- /dev/null +++ b/dev-lang/lua/lua-5.3.6-r2.ebuild @@ -0,0 +1,200 @@ +# Copyright 1999-2020 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.3.4" +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.3" +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" +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.3.6-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_5_1 -DLUA_COMPAT_5_2" + + 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 +} diff --git a/dev-lang/lua/lua-5.4.1-r1.ebuild b/dev-lang/lua/lua-5.4.1-r1.ebuild deleted file mode 100644 index e21e767c10b0..000000000000 --- a/dev-lang/lua/lua-5.4.1-r1.ebuild +++ /dev/null @@ -1,199 +0,0 @@ -# Copyright 1999-2020 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="http://www.lua.org/" -TEST_PV="5.4.1" -TEST_P="${PN}-${TEST_PV}-tests" -SRC_URI=" - http://www.lua.org/ftp/${P}.tar.gz - test? ( https://www.lua.org/tests/${TEST_P}.tar.gz )" - -LICENSE="MIT" -SLOT="5.4" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="+deprecated readline static 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.4-makefiles.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 - - # 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 (both shared and static - # are installed) - if use static ; then - sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die - fi - - # 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_5_3" - use readline && myCFLAGS="-DLUA_USE_READLINE" - - 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 -} - -# 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 -} diff --git a/dev-lang/lua/lua-5.4.2-r1.ebuild b/dev-lang/lua/lua-5.4.2-r1.ebuild new file mode 100644 index 000000000000..8f04e23301a7 --- /dev/null +++ b/dev-lang/lua/lua-5.4.2-r1.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2020 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.4.2" +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.4" +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" +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.4.2-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 + + # 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_5_3 " + use readline && myCFLAGS+="-DLUA_USE_READLINE " + + 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 +} -- cgit v1.2.3