summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2013-06-04 00:37:01 +0200
committerBertrand Jacquin <beber@meleeweb.net>2013-06-04 01:39:26 +0200
commitbae24760ad414e60e879a7db9e17502466c1d9b9 (patch)
treeda31d05f8f70250a6bff652a0c445fc82f25ea15
parentmedia-sound/pulseaudio: Add explicit RDEPEND on libpcre when libc doesn't pro... (diff)
downloadportage-bae24760ad414e60e879a7db9e17502466c1d9b9.tar.xz
dev-lang/lua: Fix cross compiling for mingw64, #472230
Package-Manager: portage-2.1.12.2
-rw-r--r--dev-lang/lua/ChangeLog13
-rw-r--r--dev-lang/lua/Manifest11
-rw-r--r--dev-lang/lua/files/lua-5.1-make-r1.patch66
-rw-r--r--dev-lang/lua/files/lua-5.1-make_static-r1.patch12
-rw-r--r--dev-lang/lua/files/lua-5.1-module_paths.patch30
-rw-r--r--dev-lang/lua/files/lua-5.1-readline.patch10
-rw-r--r--dev-lang/lua/files/lua-5.1.4-deprecated.patch46
-rw-r--r--dev-lang/lua/files/lua-5.1.4-test.patch11
-rw-r--r--dev-lang/lua/files/lua-BJA-libtool-patch.diff22
-rw-r--r--dev-lang/lua/lua-5.1.5.ebuild127
-rw-r--r--dev-lang/lua/metadata.xml13
-rw-r--r--profiles/use.local.desc1
12 files changed, 362 insertions, 0 deletions
diff --git a/dev-lang/lua/ChangeLog b/dev-lang/lua/ChangeLog
new file mode 100644
index 00000000..d5d10208
--- /dev/null
+++ b/dev-lang/lua/ChangeLog
@@ -0,0 +1,13 @@
+ 03 Jun 2013; Bertrand Jacquin <beber@meleeweb.net> -files/configure.in,
+ -files/lua.pc:
+ ffr
+
+*lua-5.1.5 (03 Jun 2013)
+
+ 03 Jun 2013; Bertrand Jacquin <beber@meleeweb.net> +files/configure.in,
+ +files/lua-5.1-make-r1.patch, +files/lua-5.1-make_static-r1.patch,
+ +files/lua-5.1-module_paths.patch, +files/lua-5.1-readline.patch,
+ +files/lua-5.1.4-deprecated.patch, +files/lua-5.1.4-test.patch,
+ +files/lua-BJA-libtool-patch.diff, +files/lua.pc, +lua-5.1.5.ebuild,
+ +metadata.xml:
+ dev-lang/lua: Fix cross compiling for mingw64, #472230
diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
new file mode 100644
index 00000000..b8452d1b
--- /dev/null
+++ b/dev-lang/lua/Manifest
@@ -0,0 +1,11 @@
+AUX lua-5.1-make-r1.patch 2229 SHA256 bf691afd2480a496bfa9b2c46fcbb396e7034ea58e94399788e05ab7872ae46f WHIRLPOOL fe780fb12a45c7c8a702ce71e6dfad83f45d9a23c16428d4216464019d065010a1015e786fee6830db0f424d9bfffb4214cca3fa16f7dffc33945d04960ef5b6
+AUX lua-5.1-make_static-r1.patch 644 SHA256 077f5da55b9b354b8b901d8a769c92aad104d79ba0a6acee0096c9a5d94b259a WHIRLPOOL 9874b62e02b38bb1b935cba4b2a07e6b181c30bc2efc907478d2d48b98634718727ab5417825cfafd222090447ff900a09f1a71228756bc3b5f761576204bf74
+AUX lua-5.1-module_paths.patch 1078 SHA256 1115b6aa00eb4e918156ae70c763534bd2f603ba888da75e4908c19c2ac3e5f7 WHIRLPOOL 08ee01e2758274e66096caba4a06f258a8fe1cdfba01623d075efae5502ebd706bcd1e689cede736d63e8f9582e64d11e9e0c9df903d55d400cd5bfa7163b55e
+AUX lua-5.1-readline.patch 360 SHA256 1f0f90eb8103e338f1188cc884c0c59cc6afd023828c11d86b8145b2a8d1efc2 WHIRLPOOL 6523ca31a979d3af78346479da5b70d60a1880ed78715eb68373f4a21bb9e5a6afe3ee341f7d872f3ca9ecb02ae04826be6790565f288952657e3a92254730f6
+AUX lua-5.1.4-deprecated.patch 1417 SHA256 8d4d3c35d9cfb65f6caa360c09d1fa0c5dc1ee0de3389c1e73602fef86cd0e9f WHIRLPOOL 34fad887d3a1eb1eedb4ba73852bd976c9397fbacc294adf31862684e1b957512c5a23ca54b2c5f0adebf9ce70b4d7e23103c3cbd0a1efda54a88e9fbb46a8e2
+AUX lua-5.1.4-test.patch 340 SHA256 cdbb06f6fc5e75512c912360e1efc12e1e62ac7079972ff1c9c9273898bf9e31 WHIRLPOOL ff625882f25d9b638031f29498ee0de3b92b353c48c381160294156e500c6b9735ddb5c09a0739243c0cceb40bcd234bd4bd3faab41b0b8c7f91c3f5c42889b4
+AUX lua-BJA-libtool-patch.diff 738 SHA256 d06bfc8511193230549ee1da3e36377779a9188c39c709a03f9193b72b9149f3 WHIRLPOOL e5c8b688f2fcb11109fbf48791db59d1398c400da71dad9ea4f67be754f2b356b29548fe228027fd85bf2b89c50fb15d2cac17b78cf3cab0f03af6b037d6f14d
+DIST lua-5.1.5.tar.gz 221213 SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 WHIRLPOOL 9dac93b73b9ad1ef6c69e0aa11fb53d5efe89274b65c55a1ac30bab23e8a255851b0e44306db54212b1d481e658cecd38e5ff22a25e1fa974858b7b03fb45b75
+EBUILD lua-5.1.5.ebuild 3428 SHA256 44ff0e0d8930d0e6dc7279feb2539e161e9576611a351049ef5889acd2605488 WHIRLPOOL 5eed72252cbad8eb58bf6c52aa73f92de572b544eaa8a0c044f51f005580b11fa093bef2e26871907842413b14814a48148cd16cd40983839ff411ea7378fa7a
+MISC ChangeLog 546 SHA256 886add681e4f105d2eb6416727277d099e617573927b58a5b3ba02717cf5883f WHIRLPOOL 284ad5b34c7d819c73551529ddb1a8195e923baf9792dac7482c2df77f2e1b5876066de22a93f7c7a8b5ec6f7075f54494e9c41d466dcb6b19e5699a73425d33
+MISC metadata.xml 418 SHA256 ecdbace4d7d07830cc308755b909384644dc449cf7a3f32faefeecf6d3752b55 WHIRLPOOL e9e84ca81f1e173e723e07bed3fc954b3d39fd288b47792c1cb61fd7e493eafe6401247a5e35ac7bc4845b21ea40d64aa1f2f643df2942491f6815a9fe7ecb2a
diff --git a/dev-lang/lua/files/lua-5.1-make-r1.patch b/dev-lang/lua/files/lua-5.1-make-r1.patch
new file mode 100644
index 00000000..8eecbdd4
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1-make-r1.patch
@@ -0,0 +1,66 @@
+--- 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
+@@ -127,3 +127,21 @@
+ .PHONY: all $(PLATS) clean test 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_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 luac $(INSTALL_BIN)
++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua.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
+@@ -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)
+@@ -176,3 +176,33 @@
+ ltm.h lzio.h lmem.h lopcodes.h lundump.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.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)
++
++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 luac
++
++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 00000000..e5fdc3a6
--- /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 00000000..29ac4c3b
--- /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 00000000..f144861e
--- /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 00000000..a88a991d
--- /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 00000000..99b4ad64
--- /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-BJA-libtool-patch.diff b/dev-lang/lua/files/lua-BJA-libtool-patch.diff
new file mode 100644
index 00000000..49561684
--- /dev/null
+++ b/dev-lang/lua/files/lua-BJA-libtool-patch.diff
@@ -0,0 +1,22 @@
+--- Makefile 2013-06-04 00:09:16.000000000 +0200
++++ Makefile 2013-06-04 00:09:28.000000000 +0200
+@@ -130,7 +130,7 @@ lecho:
+ # Use libtool for binary installs, etc.
+
+ export V
+-export LIBTOOL = libtool --quiet --tag=CC
++export LIBTOOL = $(ROOT)/usr/bin/libtool --quiet --tag=CC
+ # See libtool manual about how to set this
+
+ gentoo_clean:
+--- src/Makefile 2013-06-04 00:01:58.000000000 +0200
++++ src/Makefile 2013-06-04 00:02:18.000000000 +0200
+@@ -181,7 +181,7 @@ print.o: print.c ldebug.h lstate.h lua.h
+
+ # (end of Makefile)
+
+-export LIBTOOL = libtool --quiet --tag=CC
++export LIBTOOL = $(ROOT)/usr/bin/libtool --quiet --tag=CC
+ export LIB_VERSION = 6:5:1
+
+ # The following rules use libtool for compiling and linking in order to
diff --git a/dev-lang/lua/lua-5.1.5.ebuild b/dev-lang/lua/lua-5.1.5.ebuild
new file mode 100644
index 00000000..e4bb31d6
--- /dev/null
+++ b/dev-lang/lua/lua-5.1.5.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.1.5.ebuild,v 1.16 2013/03/10 16:23:50 ago Exp $
+
+EAPI=4
+
+inherit eutils multilib 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="0"
+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 )"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+PDEPEND="emacs? ( app-emacs/lua-mode )"
+
+src_prepare() {
+ local PATCH_PV=$(get_version_component_range 1-2)
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
+
+ #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
+
+ epatch "${FILESDIR}"/lua-BJA-libtool-patch.diff
+
+ # We want packages to find our things...
+ sed -i \
+ -e 's:/usr/local:'${EPREFIX}'/usr:' \
+ -e "s:/\<lib\>:/$(get_libdir):g" \
+ etc/lua.pc src/luaconf.h || die
+}
+
+# no need for a configure phase
+src_configure() { true; }
+
+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
+
+ local myCFLAGS
+ case "${CHOST}" in
+ *-mingw*) myCFLAGS="" ;;
+ *) myCFLAGS="-DLUA_USE_LINUX" ;;
+ esac
+
+ cd src
+ emake CC="${CC}" CFLAGS="${CFLAGS} ${myCFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=${PV} \
+ gentoo_all || die "emake failed"
+
+ mv lua_test ../test/lua.static
+}
+
+src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${PV} gentoo_install \
+ || die "emake install gentoo_install failed"
+
+ dodoc HISTORY README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ doicon etc/lua.ico
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins etc/lua.pc
+
+ doman doc/lua.1 doc/luac.1
+}
+
+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 "${S}"
+ 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/metadata.xml b/dev-lang/lua/metadata.xml
new file mode 100644
index 00000000..cfb994f9
--- /dev/null
+++ b/dev-lang/lua/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>mabi@gentoo.org</email>
+ <name>Matti Bickel</name>
+</maintainer>
+<maintainer>
+ <email>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+</maintainer>
+<use><flag name='deprecated'>make deprecated data structures/routines available</flag></use>
+</pkgmetadata>
diff --git a/profiles/use.local.desc b/profiles/use.local.desc
index e5a6fa9a..13e59061 100644
--- a/profiles/use.local.desc
+++ b/profiles/use.local.desc
@@ -2,6 +2,7 @@
# your descriptions to your package's metadata.xml ONLY.
# * generated automatically using egencache *
+dev-lang/lua:deprecated - make deprecated data structures/routines available
dev-lang/php:adabas - Adds support for the Adabas database engine
dev-lang/php:birdstep - Adds support for the Birdstep Database Server
dev-lang/php:cli - Enable CLI SAPI