From a50ea72816faadd68763c8f8df9e46b2b5d8bef2 Mon Sep 17 00:00:00 2001 From: "Vadim A. Misbakh-Soloviov" Date: Thu, 2 Nov 2017 13:24:39 +0700 Subject: lua: porting to patch eclass, sync with tree --- dev-lang/lua/Manifest | 2 +- dev-lang/lua/files/configure.ac | 5 + dev-lang/lua/files/configure.in | 5 - dev-lang/lua/files/lua-5.1-make-r2.patch | 97 --------------- dev-lang/lua/files/lua-5.1-make_static-r1.patch | 12 -- dev-lang/lua/files/lua-5.1-module_paths.patch | 30 ----- dev-lang/lua/files/lua-5.1-readline.patch | 10 -- dev-lang/lua/files/lua-5.1.4-deprecated.patch | 46 ------- dev-lang/lua/files/lua-5.1.4-test.patch | 11 -- dev-lang/lua/files/lua-5.2-make-r1.patch | 75 ------------ dev-lang/lua/files/lua-5.3-make.patch | 75 ------------ dev-lang/lua/files/patches/5.1.5/0001_make.patch | 97 +++++++++++++++ .../files/patches/5.1.5/0002_module_paths.patch | 30 +++++ .../no-deprecated/0001_no-deprecated.patch | 46 +++++++ .../conditional/no-deprecated/0002_tests.patch | 11 ++ .../conditional/no-readline/0001_no-readline.patch | 10 ++ .../conditional/static/0001_make-static.patch | 12 ++ dev-lang/lua/files/patches/5.2.4/0001_make.patch | 75 ++++++++++++ dev-lang/lua/files/patches/5.3.4/0001_make.patch | 91 ++++++++++++++ dev-lang/lua/lua-5.1.5-r101.ebuild | 68 ++++------- dev-lang/lua/lua-5.2.4.ebuild | 54 +++++---- dev-lang/lua/lua-5.3.3.ebuild | 129 -------------------- dev-lang/lua/lua-5.3.4.ebuild | 135 +++++++++++++++++++++ 23 files changed, 567 insertions(+), 559 deletions(-) create mode 100644 dev-lang/lua/files/configure.ac delete mode 100644 dev-lang/lua/files/configure.in delete mode 100644 dev-lang/lua/files/lua-5.1-make-r2.patch delete mode 100644 dev-lang/lua/files/lua-5.1-make_static-r1.patch delete mode 100644 dev-lang/lua/files/lua-5.1-module_paths.patch delete mode 100644 dev-lang/lua/files/lua-5.1-readline.patch delete mode 100644 dev-lang/lua/files/lua-5.1.4-deprecated.patch delete mode 100644 dev-lang/lua/files/lua-5.1.4-test.patch delete mode 100644 dev-lang/lua/files/lua-5.2-make-r1.patch delete mode 100644 dev-lang/lua/files/lua-5.3-make.patch create mode 100644 dev-lang/lua/files/patches/5.1.5/0001_make.patch create mode 100644 dev-lang/lua/files/patches/5.1.5/0002_module_paths.patch create mode 100644 dev-lang/lua/files/patches/5.1.5/conditional/no-deprecated/0001_no-deprecated.patch create mode 100644 dev-lang/lua/files/patches/5.1.5/conditional/no-deprecated/0002_tests.patch create mode 100644 dev-lang/lua/files/patches/5.1.5/conditional/no-readline/0001_no-readline.patch create mode 100644 dev-lang/lua/files/patches/5.1.5/conditional/static/0001_make-static.patch create mode 100644 dev-lang/lua/files/patches/5.2.4/0001_make.patch create mode 100644 dev-lang/lua/files/patches/5.3.4/0001_make.patch delete mode 100644 dev-lang/lua/lua-5.3.3.ebuild create mode 100644 dev-lang/lua/lua-5.3.4.ebuild diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest index 6b3273b..08f1547 100644 --- a/dev-lang/lua/Manifest +++ b/dev-lang/lua/Manifest @@ -1,3 +1,3 @@ DIST lua-5.1.5.tar.gz 221213 SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 SHA512 0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9 WHIRLPOOL 9dac93b73b9ad1ef6c69e0aa11fb53d5efe89274b65c55a1ac30bab23e8a255851b0e44306db54212b1d481e658cecd38e5ff22a25e1fa974858b7b03fb45b75 DIST lua-5.2.4.tar.gz 252651 SHA256 b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b SHA512 cd77148aba4b707b6c159758b5e8444e04f968092eb98f6b4c405b2fb647e709370d5a8dcf604176101d3407e196a7433b5dcdce4fe9605c76191d3649d61a8c WHIRLPOOL 4ddd1aefa63ea2df5d7e2a774aa89a427fa6753c11db26c70ebf82eece7b05807b7ada2c0966057fe2ddebf8ab792c0060aa51b0d29cd58572b2a0ba9dbabfdc -DIST lua-5.3.3.tar.gz 294290 SHA256 5113c06884f7de453ce57702abaac1d618307f33f6789fa870e87a59d772aca2 SHA512 7b8122ed48ea2a9faa47d1b69b4a5b1523bb7be67e78f252bb4339bf75e957a88c5405156e22b4b63ccf607a5407bf017a4cee1ce12b1aa5262047655960a3cc WHIRLPOOL e9d58093327e3c67e167dad9952796f1f2f0dbfa4f165c0ec5a8808a6a73d3b25e564797a2804d408bdaeb7229e7684f907491137d4521119ba918ce87c781bc +DIST lua-5.3.4.tar.gz 303586 SHA256 f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c SHA512 739e31f82e6a60fa99910c2005e991b3a1e21339af52847f653cb190b30842054d189ca116ffcfdf9b36e07888c9ce5642b1dd2988cc7eff9f8789f9a2e34997 WHIRLPOOL d7d05431f8740c18bea29068f7e82132055d6b236592a5153f2f45043394ac7d6f18982ca62388428e5f57b299351ecf1fe1d675da6e6e9117d3549bb9daf382 diff --git a/dev-lang/lua/files/configure.ac b/dev-lang/lua/files/configure.ac new file mode 100644 index 0000000..e4ba816 --- /dev/null +++ b/dev-lang/lua/files/configure.ac @@ -0,0 +1,5 @@ +top_buildir=. + +AC_INIT(src/luaconf.h) +AC_PROG_LIBTOOL +AC_OUTPUT() diff --git a/dev-lang/lua/files/configure.in b/dev-lang/lua/files/configure.in deleted file mode 100644 index e4ba816..0000000 --- a/dev-lang/lua/files/configure.in +++ /dev/null @@ -1,5 +0,0 @@ -top_buildir=. - -AC_INIT(src/luaconf.h) -AC_PROG_LIBTOOL -AC_OUTPUT() diff --git a/dev-lang/lua/files/lua-5.1-make-r2.patch b/dev-lang/lua/files/lua-5.1-make-r2.patch deleted file mode 100644 index 2905a62..0000000 --- a/dev-lang/lua/files/lua-5.1-make-r2.patch +++ /dev/null @@ -1,97 +0,0 @@ -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) -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.1-make_static-r1.patch b/dev-lang/lua/files/lua-5.1-make_static-r1.patch deleted file mode 100644 index e5fdc3a..0000000 --- a/dev-lang/lua/files/lua-5.1-make_static-r1.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru lua-5.1.1.orig/src/Makefile lua-5.1.1/src/Makefile ---- lua-5.1.1.orig/src/Makefile 2006-11-21 07:19:31 +0000 -+++ lua-5.1.1/src/Makefile 2006-11-21 07:19:52 +0000 -@@ -196,7 +196,7 @@ - -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) - - $(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME) -- $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS) -+ $(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 -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME) diff --git a/dev-lang/lua/files/lua-5.1-module_paths.patch b/dev-lang/lua/files/lua-5.1-module_paths.patch deleted file mode 100644 index 29ac4c3..0000000 --- a/dev-lang/lua/files/lua-5.1-module_paths.patch +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## src_luaconf.h.dpatch by John V. Belmonte -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Set Lua's default PATH and CPATH. - -@DPATCH@ -diff -urNad trunk~/src/luaconf.h trunk/src/luaconf.h ---- trunk~/src/luaconf.h 2006-02-10 12:44:06.000000000 -0500 -+++ trunk/src/luaconf.h 2006-02-17 21:32:55.000000000 -0500 -@@ -83,13 +83,17 @@ - - #else - #define LUA_ROOT "/usr/local/" -+#define LUA_ROOT2 "/usr/" - #define LUA_LDIR LUA_ROOT "share/lua/5.1/" -+#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/" - #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" -+#define LUA_CDIR2 LUA_ROOT2 "lib/lua/5.1/" - #define LUA_PATH_DEFAULT \ - "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ -- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" -+ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ -+ LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua" - #define LUA_CPATH_DEFAULT \ -- "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so" -+ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR"loadall.so" - #endif - - diff --git a/dev-lang/lua/files/lua-5.1-readline.patch b/dev-lang/lua/files/lua-5.1-readline.patch deleted file mode 100644 index f144861..0000000 --- a/dev-lang/lua/files/lua-5.1-readline.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- lua-5.1.1.orig/src/luaconf.h 2006-04-10 20:27:23.000000000 +0200 -+++ lua-5.1.1/src/luaconf.h 2006-11-15 14:53:07.000000000 +0100 -@@ -36,7 +36,6 @@ - #if defined(LUA_USE_LINUX) - #define LUA_USE_POSIX - #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ --#define LUA_USE_READLINE /* needs some extra libraries */ - #endif - - #if defined(LUA_USE_MACOSX) diff --git a/dev-lang/lua/files/lua-5.1.4-deprecated.patch b/dev-lang/lua/files/lua-5.1.4-deprecated.patch deleted file mode 100644 index a88a991..0000000 --- a/dev-lang/lua/files/lua-5.1.4-deprecated.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -rdu lua-5.1.3.orig/src/luaconf.h lua-5.1.3/src/luaconf.h ---- lua-5.1.3.orig/src/luaconf.h 2008-02-12 17:00:03.000000000 +0000 -+++ lua-5.1.3/src/luaconf.h 2008-02-12 17:07:55.000000000 +0000 -@@ -340,14 +340,14 @@ - ** CHANGE it to undefined as soon as your programs use only '...' to - ** access vararg parameters (instead of the old 'arg' table). - */ --#define LUA_COMPAT_VARARG -+#undef LUA_COMPAT_VARARG - - /* - @@ LUA_COMPAT_MOD controls compatibility with old math.mod function. - ** CHANGE it to undefined as soon as your programs use 'math.fmod' or - ** the new '%' operator instead of 'math.mod'. - */ --#define LUA_COMPAT_MOD -+#undef LUA_COMPAT_MOD - - /* - @@ LUA_COMPAT_LSTR controls compatibility with old long string nesting -@@ -355,14 +355,14 @@ - ** CHANGE it to 2 if you want the old behaviour, or undefine it to turn - ** off the advisory error when nesting [[...]]. - */ --#define LUA_COMPAT_LSTR 1 -+#undef LUA_COMPAT_LSTR - - /* - @@ LUA_COMPAT_GFIND controls compatibility with old 'string.gfind' name. - ** CHANGE it to undefined as soon as you rename 'string.gfind' to - ** 'string.gmatch'. - */ --#define LUA_COMPAT_GFIND -+#undef LUA_COMPAT_GFIND - - /* - @@ LUA_COMPAT_OPENLIB controls compatibility with old 'luaL_openlib' -@@ -370,7 +370,7 @@ - ** CHANGE it to undefined as soon as you replace to 'luaL_register' - ** your uses of 'luaL_openlib' - */ --#define LUA_COMPAT_OPENLIB -+#undef LUA_COMPAT_OPENLIB - - - diff --git a/dev-lang/lua/files/lua-5.1.4-test.patch b/dev-lang/lua/files/lua-5.1.4-test.patch deleted file mode 100644 index 99b4ad6..0000000 --- a/dev-lang/lua/files/lua-5.1.4-test.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- test/sieve.lua~ 2002-10-31 03:52:58.000000000 +0100 -+++ test/sieve.lua 2008-02-20 17:44:22.468281121 +0100 -@@ -14,7 +14,7 @@ - while 1 do - local n = g() - if n == nil then return end -- if math.mod(n, p) ~= 0 then coroutine.yield(n) end -+ if math.fmod(n, p) ~= 0 then coroutine.yield(n) end - end - end) - end diff --git a/dev-lang/lua/files/lua-5.2-make-r1.patch b/dev-lang/lua/files/lua-5.2-make-r1.patch deleted file mode 100644 index a0624af..0000000 --- a/dev-lang/lua/files/lua-5.2-make-r1.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 = $(EROOT)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) ---- 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 = $(EROOT)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) -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-make.patch b/dev-lang/lua/files/lua-5.3-make.patch deleted file mode 100644 index ed22597..0000000 --- a/dev-lang/lua/files/lua-5.3-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 -@@ -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 = $(EROOT)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) ---- 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 -@@ -62,1 +62,1 @@ --$(LUA_T): $(LUA_O) $(LUA_A) -+origin$(LUA_T): $(LUA_O) $(LUA_A) -@@ -65,1 +65,1 @@ --$(LUAC_T): $(LUAC_O) $(LUA_A) -+origin$(LUAC_T): $(LUAC_O) $(LUA_A) -@@ -195,3 +195,30 @@ - lobject.h ltm.h lzio.h - - # (end of Makefile) -+ -+export LIBTOOL = $(EROOT)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) -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/patches/5.1.5/0001_make.patch b/dev-lang/lua/files/patches/5.1.5/0001_make.patch new file mode 100644 index 0000000..bcce5b2 --- /dev/null +++ b/dev-lang/lua/files/patches/5.1.5/0001_make.patch @@ -0,0 +1,97 @@ +diff -ru a/Makefile b/Makefile +--- a/Makefile 2014-04-15 17:43:34.845435031 +0200 ++++ b/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 a/src/Makefile b/src/Makefile +--- a/src/Makefile 2014-04-15 17:43:34.844435031 +0200 ++++ b/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) -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/patches/5.1.5/0002_module_paths.patch b/dev-lang/lua/files/patches/5.1.5/0002_module_paths.patch new file mode 100644 index 0000000..5b765c6 --- /dev/null +++ b/dev-lang/lua/files/patches/5.1.5/0002_module_paths.patch @@ -0,0 +1,30 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## src_luaconf.h.dpatch by John V. Belmonte +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Set Lua's default PATH and CPATH. + +@DPATCH@ +diff -urNad a/src/luaconf.h b/src/luaconf.h +--- a/src/luaconf.h 2006-02-10 12:44:06.000000000 -0500 ++++ b/src/luaconf.h 2006-02-17 21:32:55.000000000 -0500 +@@ -83,13 +83,17 @@ + + #else + #define LUA_ROOT "/usr/local/" ++#define LUA_ROOT2 "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" ++#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/" + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" ++#define LUA_CDIR2 LUA_ROOT2 "lib/lua/5.1/" + #define LUA_PATH_DEFAULT \ + "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ +- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" ++ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ ++ LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua" + #define LUA_CPATH_DEFAULT \ +- "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so" ++ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR"loadall.so" + #endif + + diff --git a/dev-lang/lua/files/patches/5.1.5/conditional/no-deprecated/0001_no-deprecated.patch b/dev-lang/lua/files/patches/5.1.5/conditional/no-deprecated/0001_no-deprecated.patch new file mode 100644 index 0000000..8e5296a --- /dev/null +++ b/dev-lang/lua/files/patches/5.1.5/conditional/no-deprecated/0001_no-deprecated.patch @@ -0,0 +1,46 @@ +diff -rdu a/src/luaconf.h b/src/luaconf.h +--- a/src/luaconf.h 2008-02-12 17:00:03.000000000 +0000 ++++ b/src/luaconf.h 2008-02-12 17:07:55.000000000 +0000 +@@ -340,14 +340,14 @@ + ** CHANGE it to undefined as soon as your programs use only '...' to + ** access vararg parameters (instead of the old 'arg' table). + */ +-#define LUA_COMPAT_VARARG ++#undef LUA_COMPAT_VARARG + + /* + @@ LUA_COMPAT_MOD controls compatibility with old math.mod function. + ** CHANGE it to undefined as soon as your programs use 'math.fmod' or + ** the new '%' operator instead of 'math.mod'. + */ +-#define LUA_COMPAT_MOD ++#undef LUA_COMPAT_MOD + + /* + @@ LUA_COMPAT_LSTR controls compatibility with old long string nesting +@@ -355,14 +355,14 @@ + ** CHANGE it to 2 if you want the old behaviour, or undefine it to turn + ** off the advisory error when nesting [[...]]. + */ +-#define LUA_COMPAT_LSTR 1 ++#undef LUA_COMPAT_LSTR + + /* + @@ LUA_COMPAT_GFIND controls compatibility with old 'string.gfind' name. + ** CHANGE it to undefined as soon as you rename 'string.gfind' to + ** 'string.gmatch'. + */ +-#define LUA_COMPAT_GFIND ++#undef LUA_COMPAT_GFIND + + /* + @@ LUA_COMPAT_OPENLIB controls compatibility with old 'luaL_openlib' +@@ -370,7 +370,7 @@ + ** CHANGE it to undefined as soon as you replace to 'luaL_register' + ** your uses of 'luaL_openlib' + */ +-#define LUA_COMPAT_OPENLIB ++#undef LUA_COMPAT_OPENLIB + + + diff --git a/dev-lang/lua/files/patches/5.1.5/conditional/no-deprecated/0002_tests.patch b/dev-lang/lua/files/patches/5.1.5/conditional/no-deprecated/0002_tests.patch new file mode 100644 index 0000000..7ba4495 --- /dev/null +++ b/dev-lang/lua/files/patches/5.1.5/conditional/no-deprecated/0002_tests.patch @@ -0,0 +1,11 @@ +--- a/test/sieve.lua 2002-10-31 03:52:58.000000000 +0100 ++++ b/test/sieve.lua 2008-02-20 17:44:22.468281121 +0100 +@@ -14,7 +14,7 @@ + while 1 do + local n = g() + if n == nil then return end +- if math.mod(n, p) ~= 0 then coroutine.yield(n) end ++ if math.fmod(n, p) ~= 0 then coroutine.yield(n) end + end + end) + end diff --git a/dev-lang/lua/files/patches/5.1.5/conditional/no-readline/0001_no-readline.patch b/dev-lang/lua/files/patches/5.1.5/conditional/no-readline/0001_no-readline.patch new file mode 100644 index 0000000..1ddeffd --- /dev/null +++ b/dev-lang/lua/files/patches/5.1.5/conditional/no-readline/0001_no-readline.patch @@ -0,0 +1,10 @@ +--- a/src/luaconf.h 2006-04-10 20:27:23.000000000 +0200 ++++ b/src/luaconf.h 2006-11-15 14:53:07.000000000 +0100 +@@ -36,7 +36,6 @@ + #if defined(LUA_USE_LINUX) + #define LUA_USE_POSIX + #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ +-#define LUA_USE_READLINE /* needs some extra libraries */ + #endif + + #if defined(LUA_USE_MACOSX) diff --git a/dev-lang/lua/files/patches/5.1.5/conditional/static/0001_make-static.patch b/dev-lang/lua/files/patches/5.1.5/conditional/static/0001_make-static.patch new file mode 100644 index 0000000..2efb414 --- /dev/null +++ b/dev-lang/lua/files/patches/5.1.5/conditional/static/0001_make-static.patch @@ -0,0 +1,12 @@ +diff -ru a/src/Makefile b/src/Makefile +--- a/src/Makefile 2006-11-21 07:19:31 +0000 ++++ b/src/Makefile 2006-11-21 07:19:52 +0000 +@@ -196,7 +196,7 @@ + -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) + + $(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME) +- $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS) ++ $(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 -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME) diff --git a/dev-lang/lua/files/patches/5.2.4/0001_make.patch b/dev-lang/lua/files/patches/5.2.4/0001_make.patch new file mode 100644 index 0000000..a0624af --- /dev/null +++ b/dev-lang/lua/files/patches/5.2.4/0001_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 = $(EROOT)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) +--- 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 = $(EROOT)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) -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/patches/5.3.4/0001_make.patch b/dev-lang/lua/files/patches/5.3.4/0001_make.patch new file mode 100644 index 0000000..b9e9051 --- /dev/null +++ b/dev-lang/lua/files/patches/5.3.4/0001_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 = $(EROOT)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 -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 = $(EROOT)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) -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-r101.ebuild b/dev-lang/lua/lua-5.1.5-r101.ebuild index 11b0934..d4c6967 100644 --- a/dev-lang/lua/lua-5.1.5-r101.ebuild +++ b/dev-lang/lua/lua-5.1.5-r101.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=6 -inherit eutils multilib multilib-minimal portability toolchain-funcs versionator +inherit eutils multilib multilib-minimal portability toolchain-funcs versionator patches DESCRIPTION="A powerful light-weight programming language designed for extending applications" HOMEPAGE="http://www.lua.org/" @@ -12,11 +12,13 @@ SRC_URI="http://www.lua.org/ftp/${P}.tar.gz" LICENSE="MIT" SLOT="5.1" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux" -IUSE="+deprecated emacs readline static" +IUSE="+deprecated emacs readline +static" -RDEPEND="readline? ( >=sys-libs/readline-6.2_p5-r1[${MULTILIB_USEDEP}] ) +RDEPEND=" + readline? ( >=sys-libs/readline-6.3:0[${MULTILIB_USEDEP}] ) app-eselect/eselect-lua - !!dev-lang/lua:0" + !dev-lang/lua:0 +" DEPEND="${RDEPEND} sys-devel/libtool" PDEPEND="emacs? ( app-emacs/lua-mode )" @@ -24,45 +26,29 @@ PDEPEND="emacs? ( app-emacs/lua-mode )" SAN_SLOT="${SLOT//.}" MULTILIB_WRAPPED_HEADERS=( - /usr/include/lua${SLOT}/luaconf.h + "/usr/include/lua${SLOT}/luaconf.h" ) src_prepare() { - local PATCH_PV=${SLOT} - - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r2.patch - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch - - [ -d "${FILESDIR}/${PV}" ] && \ - EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch + patches_src_prepare # 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 - epatch "${FILESDIR}"/${PN}-5.1.4-deprecated.patch - epatch "${FILESDIR}"/${PN}-5.1.4-test.patch - fi - - if ! use readline ; then - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-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 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static-r1.patch - fi - # custom Makefiles multilib_copy_sources + + cp "${FILESDIR}/lua.pc" "${S}" + # A slotted Lua uses different directories for headers & names for + # libraries, and pkgconfig should reflect that. + sed -r -i \ + -e "s:^V=.*:V= ${SLOT}:" \ + -e "s:^R=.*:R= ${PV}:" \ + -e "s:/,lib,:/$(get_libdir):g" \ + -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \ + "${S}"/lua.pc } multilib_src_configure() { @@ -101,20 +87,14 @@ multilib_src_install() { emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ V=${SLOT} gentoo_install - cp "${FILESDIR}/lua.pc" "${WORKDIR}" - sed \ - -e "s:^V=.*:V= ${SLOT}:" \ - -e "s:^R=.*:R= ${PV}:" \ - -e "s:/,lib,:/$(get_libdir):g" \ - -i "${WORKDIR}/lua.pc" - insinto "/usr/$(get_libdir)/pkgconfig" - newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc" + newins "${S}/lua.pc" "lua${SLOT}.pc" } multilib_src_install_all() { - dodoc HISTORY README - dohtml doc/*.html doc/*.png doc/*.css doc/*.gif + DOCS=(HISTORY README) + HTML_DOCS=(doc/*.html doc/*.png doc/*.css doc/*.gif) + einstalldocs doicon etc/lua.ico diff --git a/dev-lang/lua/lua-5.2.4.ebuild b/dev-lang/lua/lua-5.2.4.ebuild index f93da1d..d355aff 100644 --- a/dev-lang/lua/lua-5.2.4.ebuild +++ b/dev-lang/lua/lua-5.2.4.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=6 -inherit eutils autotools multilib multilib-minimal portability toolchain-funcs +inherit eutils autotools multilib multilib-minimal portability toolchain-funcs patches DESCRIPTION="A powerful light-weight programming language designed for extending applications" HOMEPAGE="http://www.lua.org/" @@ -12,26 +12,29 @@ SRC_URI="http://www.lua.org/ftp/${P}.tar.gz" LICENSE="MIT" SLOT="5.2" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux" -IUSE="+deprecated emacs readline static" +IUSE="+deprecated emacs readline +static" -RDEPEND="readline? ( sys-libs/readline ) +RDEPEND=" + readline? ( >=sys-libs/readline-6.3:0[${MULTILIB_USEDEP}] ) app-eselect/eselect-lua - !dev-lang/lua:0" + !dev-lang/lua:0 +" DEPEND="${RDEPEND} sys-devel/libtool" PDEPEND="emacs? ( app-emacs/lua-mode )" MULTILIB_WRAPPED_HEADERS=( - /usr/include/lua${SLOT}/luaconf.h + "/usr/include/lua${SLOT}/luaconf.h" ) src_prepare() { - local PATCH_PV=${SLOT} + patches_src_prepare - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch - - [ -d "${FILESDIR}/${PV}" ] && \ - EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch + # 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 @@ -53,11 +56,21 @@ src_prepare() { fi # upstream does not use libtool, but we do (see bug #336167) - cp "${FILESDIR}/configure.in" "${S}"/ || die + cp "${FILESDIR}/configure.ac" "${S}"/ || die eautoreconf # custom Makefiles multilib_copy_sources + + cp "${FILESDIR}/lua.pc" "${S}" + # A slotted Lua uses different directories for headers & names for + # libraries, and pkgconfig should reflect that. + sed -r -i \ + -e "s:^V=.*:V= ${SLOT}:" \ + -e "s:^R=.*:R= ${PV}:" \ + -e "s:/,lib,:/$(get_libdir):g" \ + -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \ + "${S}"/lua.pc } multilib_src_configure() { @@ -104,21 +117,14 @@ multilib_src_install() { emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ V=${SLOT} gentoo_install - # We want packages to find our things... - cp "${FILESDIR}/lua.pc" "${WORKDIR}" - sed \ - -e "s:^V=.*:V= ${SLOT}:" \ - -e "s:^R=.*:R= ${PV}:" \ - -e "s:/,lib,:/$(get_libdir):g" \ - -i "${WORKDIR}/lua.pc" - insinto "/usr/$(get_libdir)/pkgconfig" - newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc" + newins "${S}/lua.pc" "lua${SLOT}.pc" } multilib_src_install_all() { - dodoc README - dohtml doc/*.html doc/*.png doc/*.css doc/*.gif + 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 diff --git a/dev-lang/lua/lua-5.3.3.ebuild b/dev-lang/lua/lua-5.3.3.ebuild deleted file mode 100644 index e2fe750..0000000 --- a/dev-lang/lua/lua-5.3.3.ebuild +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils autotools 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.3" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux" -IUSE="+deprecated emacs readline static" - -RDEPEND="readline? ( sys-libs/readline ) - app-eselect/eselect-lua - !dev-lang/lua:0" -DEPEND="${RDEPEND} - sys-devel/libtool" -PDEPEND="emacs? ( app-emacs/lua-mode )" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/lua${SLOT}/luaconf.h -) - -src_prepare() { - local PATCH_PV=${SLOT} - - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make.patch - - [ -d "${FILESDIR}/${PV}" ] && \ - EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch - - 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 - - sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || 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}"/ || 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_2 -DLUA_COMPAT_5_1" -# -DLUA_COMPAT_FLOATSTRING" - - 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=${SLOT} \ - gentoo_all -} - -multilib_src_install() { - emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ - V=${SLOT} gentoo_install - - # We want packages to find our things... - cp "${FILESDIR}/lua.pc" "${WORKDIR}" - sed \ - -e "s:^V=.*:V= ${SLOT}:" \ - -e "s:^R=.*:R= ${PV}:" \ - -e "s:/,lib,:/$(get_libdir):g" \ - -i "${WORKDIR}/lua.pc" - - insinto "/usr/$(get_libdir)/pkgconfig" - newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc" -} - -multilib_src_install_all() { - dodoc README - dohtml doc/*.html doc/*.png doc/*.css doc/*.gif - - 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() { :; } diff --git a/dev-lang/lua/lua-5.3.4.ebuild b/dev-lang/lua/lua-5.3.4.ebuild new file mode 100644 index 0000000..060ee45 --- /dev/null +++ b/dev-lang/lua/lua-5.3.4.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils autotools multilib multilib-minimal portability toolchain-funcs patches + +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.3" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-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.3:0[${MULTILIB_USEDEP}] ) + app-eselect/eselect-lua + !dev-lang/lua:0 +" +DEPEND="${RDEPEND} + sys-devel/libtool" +PDEPEND="emacs? ( app-emacs/lua-mode )" + +MULTILIB_WRAPPED_HEADERS=( + "/usr/include/lua${SLOT}/luaconf.h" +) + +src_prepare() { + patches_src_prepare + + # use glibtool on Darwin (versus Apple libtool) + if [[ ${CHOST} == *-darwin* ]] ; then + sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \ + Makefile src/Makefile || die + fi + + 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 + + sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || 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.ac" "${S}"/ || die + eautoreconf + + # custom Makefiles + multilib_copy_sources + + cp "${FILESDIR}/lua.pc" "${S}" + # A slotted Lua uses different directories for headers & names for + # libraries, and pkgconfig should reflect that. + sed -r -i \ + -e "s:^V=.*:V= ${SLOT}:" \ + -e "s:^R=.*:R= ${PV}:" \ + -e "s:/,lib,:/$(get_libdir):g" \ + -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \ + "${S}"/lua.pc +} + +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_2 -DLUA_COMPAT_5_1 -DLUA_COMPAT_ALL" +# -DLUA_COMPAT_FLOATSTRING" + + 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=${SLOT} \ + gentoo_all +} + +multilib_src_install() { + emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ + V=${SLOT} gentoo_install + + insinto "/usr/$(get_libdir)/pkgconfig" + newins "${S}/lua.pc" "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() { :; } -- cgit v1.2.3-65-gdbad