diff options
author | Vadim A. Misbakh-Soloviov <git@mva.name> | 2015-09-12 19:17:11 +0600 |
---|---|---|
committer | Vadim A. Misbakh-Soloviov <git@mva.name> | 2015-09-12 19:17:11 +0600 |
commit | e81d4e9013537aaadc792c1265f94931c8c5bc0a (patch) | |
tree | 5e0d3240e01055a8675192312c3548c917f0919c /dev-lang | |
parent | lua-htmlparser: remove lua-set dep (diff) | |
download | lua-e81d4e9013537aaadc792c1265f94931c8c5bc0a.tar.gz lua-e81d4e9013537aaadc792c1265f94931c8c5bc0a.tar.bz2 lua-e81d4e9013537aaadc792c1265f94931c8c5bc0a.zip |
eclass/lua: added; dev-lua/*: moving to lua eclass
Signed-off-by: Vadim A. Misbakh-Soloviov <git@mva.name>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/lua/Manifest | 4 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.1-make-r2.patch | 97 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.1-make_static-r1.patch | 12 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.1-module_paths.patch | 30 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.1-readline.patch | 10 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.1.4-deprecated.patch | 46 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.1.4-test.patch | 11 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.2-make-r1.patch | 75 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.3-make.patch | 23 | ||||
-rw-r--r-- | dev-lang/lua/lua-5.1.5-r101.ebuild | 140 | ||||
-rw-r--r-- | dev-lang/lua/lua-5.2.4.ebuild | 130 | ||||
-rw-r--r-- | dev-lang/lua/lua-5.3.1.ebuild (renamed from dev-lang/lua/lua-5.3.0.ebuild) | 8 | ||||
-rw-r--r-- | dev-lang/luajit/luajit-2.0.9999.ebuild | 51 | ||||
-rw-r--r-- | dev-lang/luajit/luajit-2.1.9999.ebuild | 53 |
14 files changed, 630 insertions, 60 deletions
diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest index d9ea152..78e7891 100644 --- a/dev-lang/lua/Manifest +++ b/dev-lang/lua/Manifest @@ -1 +1,3 @@ -DIST lua-5.3.0.tar.gz 278045 SHA256 ae4a5eb2d660515eb191bfe3e061f2b8ffe94dce73d32cfd0de090ddcc0ddb01 SHA512 2b423e70c4c992a08d28ef12f1d0b078f2ee7043cda302d93e9d59ff6ab79152bb4971455d37666a98cf5cfe3cafd3d16e30b33a11fd585743d5d817424a2d51 WHIRLPOOL bae9f472f61d45fc6a2f20119a947de5719ca911c3c90d85cd93e82dd95538a421e1d35c1d4726f1544f12a4285f9548612f9ac255cce3617ee6bc092f352a40 +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.1.tar.gz 282401 SHA256 072767aad6cc2e62044a66e8562f51770d941e972dc1e4068ba719cd8bffac17 SHA512 94c5e77d25172c1f5de0ea5457fe62f2bea618e573659df989297d1a8cb1b062c4b0133b88ffa9ce74cdbe98d0d1ea356c69115cae308030e1f989a3f6f26321 WHIRLPOOL 4530bb7623b754e5736af6b98538ec17931237f38d66acf0845707da09e3ced241a431c7dfb41718000a9295ca1489e8478e10f99d46b71a61c49db229e01ae2 diff --git a/dev-lang/lua/files/lua-5.1-make-r2.patch b/dev-lang/lua/files/lua-5.1-make-r2.patch new file mode 100644 index 0000000..2905a62 --- /dev/null +++ b/dev-lang/lua/files/lua-5.1-make-r2.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) -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 new file mode 100644 index 0000000..e5fdc3a --- /dev/null +++ b/dev-lang/lua/files/lua-5.1-make_static-r1.patch @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..29ac4c3 --- /dev/null +++ b/dev-lang/lua/files/lua-5.1-module_paths.patch @@ -0,0 +1,30 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## src_luaconf.h.dpatch by John V. Belmonte <jbelmonte@debian.org> +## +## 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 new file mode 100644 index 0000000..f144861 --- /dev/null +++ b/dev-lang/lua/files/lua-5.1-readline.patch @@ -0,0 +1,10 @@ +--- 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 new file mode 100644 index 0000000..a88a991 --- /dev/null +++ b/dev-lang/lua/files/lua-5.1.4-deprecated.patch @@ -0,0 +1,46 @@ +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 new file mode 100644 index 0000000..99b4ad6 --- /dev/null +++ b/dev-lang/lua/files/lua-5.1.4-test.patch @@ -0,0 +1,11 @@ +--- 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 new file mode 100644 index 0000000..a0624af --- /dev/null +++ b/dev-lang/lua/files/lua-5.2-make-r1.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/lua-5.3-make.patch b/dev-lang/lua/files/lua-5.3-make.patch index f84176d..ed22597 100644 --- a/dev-lang/lua/files/lua-5.3-make.patch +++ b/dev-lang/lua/files/lua-5.3-make.patch @@ -1,16 +1,16 @@ --- 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. +@@ -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 - # -@@ -127,3 +127,18 @@ - .PHONY: all $(PLATS) clean install local none dummy echo pecho lecho newer + 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) + @@ -36,15 +36,16 @@ @@ -42,1 +42,1 @@ -LUAC_T= luac +LUAC_T= luac$V -@@ -54,1 +54,1 @@ +@@ -62,1 +62,1 @@ -$(LUA_T): $(LUA_O) $(LUA_A) +origin$(LUA_T): $(LUA_O) $(LUA_A) -@@ -57,1 +57,1 @@ +@@ -65,1 +65,1 @@ -$(LUAC_T): $(LUAC_O) $(LUA_A) +origin$(LUAC_T): $(LUAC_O) $(LUA_A) -@@ -185,3 +185,30 @@ - lzio.o: lzio.c lprefix.h lua.h luaconf.h llimits.h lmem.h lstate.h \ - lobject.h ltm.h lzio.h +@@ -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 @@ -72,5 +73,3 @@ + $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$V luac$V + +gentoo_all: $(LIB_NAME) $(LUA_T) $(LUAC_T) - - # (end of Makefile) diff --git a/dev-lang/lua/lua-5.1.5-r101.ebuild b/dev-lang/lua/lua-5.1.5-r101.ebuild new file mode 100644 index 0000000..bcfd7b1 --- /dev/null +++ b/dev-lang/lua/lua-5.1.5-r101.ebuild @@ -0,0 +1,140 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib multilib-minimal portability toolchain-funcs versionator + +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 ~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-6.2_p5-r1[${MULTILIB_USEDEP}] ) + app-eselect/eselect-lua + !dev-lang/lua:0" +DEPEND="${RDEPEND} + sys-devel/libtool" +PDEPEND="emacs? ( app-emacs/lua-mode )" + +SAN_SLOT="${SLOT//.}" + +MULTILIB_WRAPPED_HEADERS=( + /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 + + # 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 +} + +multilib_src_configure() { + # We want packages to find our things... + sed -i \ + -e 's:/usr/local:'${EPREFIX}'/usr:' \ + -e "s:\([/\"]\)\<lib\>:\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=$(get_version_component_range 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 + + 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 HISTORY README + dohtml doc/*.html doc/*.png doc/*.css doc/*.gif + + doicon etc/lua.ico + + 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 +} diff --git a/dev-lang/lua/lua-5.2.4.ebuild b/dev-lang/lua/lua-5.2.4.ebuild new file mode 100644 index 0000000..d3d989d --- /dev/null +++ b/dev-lang/lua/lua-5.2.4.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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.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" + +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-r1.patch + + [ -d "${FILESDIR}/${PV}" ] && \ + EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch + + # 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}"/ || 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=${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.0.ebuild b/dev-lang/lua/lua-5.3.1.ebuild index 45e8629..04f3437 100644 --- a/dev-lang/lua/lua-5.3.0.ebuild +++ b/dev-lang/lua/lua-5.3.1.ebuild @@ -4,7 +4,7 @@ EAPI="5" -inherit eutils autotools multilib multilib-minimal portability toolchain-funcs versionator +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/" @@ -16,7 +16,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 IUSE="+deprecated emacs readline static" RDEPEND="readline? ( sys-libs/readline ) - app-admin/eselect-lua + app-eselect/eselect-lua !dev-lang/lua:0" DEPEND="${RDEPEND} sys-devel/libtool" @@ -27,7 +27,7 @@ MULTILIB_WRAPPED_HEADERS=( ) src_prepare() { - local PATCH_PV=$(get_version_component_range 1-2) + local PATCH_PV=${SLOT} epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make.patch @@ -97,7 +97,7 @@ multilib_src_compile() { RPATH="${EPREFIX}/usr/$(get_libdir)/" \ LUA_LIBS="${mylibs}" \ LIB_LIBS="${liblibs}" \ - V=$(get_version_component_range 1-2) \ + V=${SLOT} \ gentoo_all } diff --git a/dev-lang/luajit/luajit-2.0.9999.ebuild b/dev-lang/luajit/luajit-2.0.9999.ebuild index 67c9fb0..ff280a5 100644 --- a/dev-lang/luajit/luajit-2.0.9999.ebuild +++ b/dev-lang/luajit/luajit-2.0.9999.ebuild @@ -10,7 +10,7 @@ DESCRIPTION="Just-In-Time Compiler for the Lua programming language" HOMEPAGE="http://luajit.org/" SRC_URI="" EGIT_REPO_URI="git://repo.or.cz/luajit-2.0.git" -SLOT="2.0" +SLOT="2" LICENSE="MIT" KEYWORDS="" @@ -53,28 +53,36 @@ pkg_setup() { src_prepare(){ # fixing prefix and version +# sed -r \ +# -e 's|^(VERSION)=.*|\1=$(MAJVER).$(MINVER)|' \ +# -e 's|\$\(MAJVER\)\.\$\(MINVER\)\.\$\(RELVER\)|$(VERSION)|' \ +# -e 's|^(FILE_MAN)=.*|\1=${PN}-$(VERSION).1|' \ +# -e 's|^(INSTALL_PCNAME)=.*|\1=${PN}-$(VERSION).pc|' \ +# -e 's|^(INSTALL_SOSHORT)=.*|\1=lib${PN}-${SLOT}.so|' \ +# -e 's|^(INSTALL_ANAME)=.*|\1=lib${PN}-${SLOT}.a|' \ +# -e 's|^(INSTALL_SONAME)=.*|\1=lib${PN}-${SLOT}.so.${PV}|' \ +# -e 's|( PREFIX)=.*|\1=/usr|' \ +# -e '/\$\(SYMLINK\)\ \$\(INSTALL_TNAME\)\ \$\(INSTALL_TSYM\)/d' \ +# -i Makefile || die "failed to fix prefix in Makefile" + sed -r \ - -e 's|^(VERSION)=.*|\1=$(MAJVER).$(MINVER)|' \ - -e 's|^(FILE_MAN)=.*|\1=${PN}-$(VERSION).1|' \ + -e 's|^(VERSION)=.*|\1=${PV}|' \ -e 's|\$\(MAJVER\)\.\$\(MINVER\)\.\$\(RELVER\)|$(VERSION)|' \ - -e 's|^(INSTALL_PCNAME)=.*|\1=${PN}-$(VERSION).pc|' \ - -e 's|^(INSTALL_SOSHORT)=.*|\1=lib${PN}-${SLOT}.so|' \ - -e 's|^(INSTALL_ANAME)=.*|\1=lib${PN}-${SLOT}.a|' \ - -e 's|^(INSTALL_SONAME)=.*|\1=lib${PN}-${SLOT}.so.${PV}|' \ + -e 's|^(INSTALL_PCNAME)=.*|\1=${P}.pc|' \ -e 's|( PREFIX)=.*|\1=/usr|' \ - -e '/\$\(SYMLINK\)\ \$\(INSTALL_TNAME\)\ \$\(INSTALL_TSYM\)/d' \ + -e 's|^(FILE_MAN)=.*|\1=${P}.1|' \ -i Makefile || die "failed to fix prefix in Makefile" - sed -r \ - -e 's|^(libname=.*-)\$\{abiver\}|\1${majver}.${minver}|' \ - -i "etc/${PN}.pc" || die "Failed to slottify" +# sed -r \ +# -e 's|^(libname=.*-)\$\{abiver\}|\1${majver}.${minver}|' \ +# -i "etc/${PN}.pc" || die "Failed to slottify" - sed -r \ - -e 's|^(TARGET_SONAME)=.*|\1=lib${PN}-${SLOT}.so.${PV}|' \ - -i src/Makefile || die "Failed to slottify" +# sed -r \ +# -e 's|^(TARGET_SONAME)=.*|\1=lib${PN}-${SLOT}.so.${PV}|' \ +# -i src/Makefile || die "Failed to slottify" sed -r \ - -e 's|^(#define LUA_LJDIR).*|\1 "/'${PN}-${SLOT}'/"|' \ + -e 's|^(#define LUA_LJDIR).*|\1 "/'${P}'/"|' \ -i src/luaconf.h || die "Failed to slotify" use debug && ( @@ -82,7 +90,7 @@ src_prepare(){ -e 's/#(CCDEBUG= -g)/\1 -ggdb/' \ -i src/Makefile || die "Failed to enable debug" ) - mv "${S}"/etc/${PN}.1 "${S}"/etc/${PN}-${SLOT}.1 + mv "${S}"/etc/${PN}.1 "${S}"/etc/${P}.1 multilib_copy_sources } @@ -120,16 +128,17 @@ multilib_src_install() { base_src_install_docs - host-is-pax && pax-mark m "${ED}usr/bin/${PN}-${SLOT}" - newman "etc/${PN}-${SLOT}.1" "luacjit-${SLOT}.1" - newbin "${FILESDIR}/luac.jit" "luacjit-${SLOT}" + host-is-pax && pax-mark m "${ED}usr/bin/${P}" + newman "etc/${P}.1" "luacjit-${PV}.1" + newbin "${FILESDIR}/luac.jit" "luacjit-${PV}" + ln -s "${P}" "${ED}usr/bin/${PN}-${SLOT}" } pkg_postinst() { if [[ ! -n $(readlink "${ROOT}"usr/bin/luajit) ]] ; then - eselect luajit set luajit-${SLOT} + eselect luajit set luajit-${PV} fi if [[ ! -n $(readlink "${ROOT}"usr/bin/lua) ]] ; then - eselect lua set jit-${SLOT} + eselect lua set jit-${PV} fi } diff --git a/dev-lang/luajit/luajit-2.1.9999.ebuild b/dev-lang/luajit/luajit-2.1.9999.ebuild index ba75be0..9d5a682 100644 --- a/dev-lang/luajit/luajit-2.1.9999.ebuild +++ b/dev-lang/luajit/luajit-2.1.9999.ebuild @@ -10,8 +10,8 @@ DESCRIPTION="Just-In-Time Compiler for the Lua programming language" HOMEPAGE="http://luajit.org/" SRC_URI="" EGIT_REPO_URI="git://repo.or.cz/luajit-2.0.git" -SLOT="2.1" -EGIT_BRANCH="v${SLOT}" +SLOT="2" +EGIT_BRANCH="v2.1" LICENSE="MIT" KEYWORDS="" @@ -54,28 +54,36 @@ pkg_setup() { src_prepare(){ # fixing prefix and version +# sed -r \ +# -e 's|^(VERSION)=.*|\1=$(MAJVER).$(MINVER)|' \ +# -e 's|\$\(MAJVER\)\.\$\(MINVER\)\.\$\(RELVER\)|$(VERSION)|' \ +# -e 's|^(FILE_MAN)=.*|\1=${PN}-$(VERSION).1|' \ +# -e 's|^(INSTALL_PCNAME)=.*|\1=${PN}-$(VERSION).pc|' \ +# -e 's|^(INSTALL_SOSHORT)=.*|\1=lib${PN}-${SLOT}.so|' \ +# -e 's|^(INSTALL_ANAME)=.*|\1=lib${PN}-${SLOT}.a|' \ +# -e 's|^(INSTALL_SONAME)=.*|\1=lib${PN}-${SLOT}.so.${PV}|' \ +# -e 's|( PREFIX)=.*|\1=/usr|' \ +# -e '/\$\(SYMLINK\)\ \$\(INSTALL_TNAME\)\ \$\(INSTALL_TSYM\)/d' \ +# -i Makefile || die "failed to fix prefix in Makefile" + sed -r \ - -e 's|^(VERSION)=.*|\1=$(MAJVER).$(MINVER)|' \ - -e 's|^(FILE_MAN)=.*|\1=${PN}-$(VERSION).1|' \ + -e 's|^(VERSION)=.*|\1=${PV}|' \ -e 's|\$\(MAJVER\)\.\$\(MINVER\)\.\$\(RELVER\)|$(VERSION)|' \ - -e 's|^(INSTALL_PCNAME)=.*|\1=${PN}-$(VERSION).pc|' \ - -e 's|^(INSTALL_SOSHORT)=.*|\1=lib${PN}-${SLOT}.so|' \ - -e 's|^(INSTALL_ANAME)=.*|\1=lib${PN}-${SLOT}.a|' \ - -e 's|^(INSTALL_SONAME)=.*|\1=lib${PN}-${SLOT}.so.${PV}|' \ + -e 's|^(INSTALL_PCNAME)=.*|\1=${P}.pc|' \ -e 's|( PREFIX)=.*|\1=/usr|' \ - -e '/\$\(SYMLINK\)\ \$\(INSTALL_TNAME\)\ \$\(INSTALL_TSYM\)/d' \ + -e 's|^(FILE_MAN)=.*|\1=${P}.1|' \ -i Makefile || die "failed to fix prefix in Makefile" - sed -r \ - -e 's|^(libname=.*-)\$\{abiver\}|\1${majver}.${minver}|' \ - -i "etc/${PN}.pc" || die "Failed to slottify" +# sed -r \ +# -e 's|^(libname=.*-)\$\{abiver\}|\1${majver}.${minver}|' \ +# -i "etc/${PN}.pc" || die "Failed to slottify" - sed -r \ - -e 's|^(TARGET_SONAME)=.*|\1=lib${PN}-${SLOT}.so.${PV}|' \ - -i src/Makefile || die "Failed to slottify" +# sed -r \ +# -e 's|^(TARGET_SONAME)=.*|\1=lib${PN}-${SLOT}.so.${PV}|' \ +# -i src/Makefile || die "Failed to slottify" sed -r \ - -e 's|^(#define LUA_LJDIR).*|\1 "/'${PN}-${SLOT}'/"|' \ + -e 's|^(#define LUA_LJDIR).*|\1 "/'${P}'/"|' \ -i src/luaconf.h || die "Failed to slotify" use debug && ( @@ -83,7 +91,7 @@ src_prepare(){ -e 's/#(CCDEBUG= -g)/\1 -ggdb/' \ -i src/Makefile || die "Failed to enable debug" ) - mv "${S}"/etc/${PN}.1 "${S}"/etc/${PN}-${SLOT}.1 + mv "${S}"/etc/${PN}.1 "${S}"/etc/${P}.1 multilib_copy_sources } @@ -121,16 +129,17 @@ multilib_src_install() { base_src_install_docs - host-is-pax && pax-mark m "${ED}usr/bin/${PN}-${SLOT}" - newman "etc/${PN}-${SLOT}.1" "luacjit-${SLOT}.1" - newbin "${FILESDIR}/luac.jit" "luacjit-${SLOT}" + host-is-pax && pax-mark m "${ED}usr/bin/${P}" + newman "etc/${P}.1" "luacjit-${PV}.1" + newbin "${FILESDIR}/luac.jit" "luacjit-${PV}" + ln -s "${P}" "${ED}usr/bin/${PN}-${SLOT}" } pkg_postinst() { if [[ ! -n $(readlink "${ROOT}"usr/bin/luajit) ]] ; then - eselect luajit set luajit-${SLOT} + eselect luajit set luajit-${PV} fi if [[ ! -n $(readlink "${ROOT}"usr/bin/lua) ]] ; then - eselect lua set jit-${SLOT} + eselect lua set jit-${PV} fi } |