summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Bickel <mabi@gentoo.org>2009-07-10 22:50:23 +0000
committerMatti Bickel <mabi@gentoo.org>2009-07-10 22:50:23 +0000
commit4ce052f00dd3f52ce827759a3f3b410467dd54d4 (patch)
tree00664856973e0153324f665c502ed0172aa08120 /dev-lang
parentdesmume bump (diff)
downloadgentoo-2-4ce052f00dd3f52ce827759a3f3b410467dd54d4.tar.gz
gentoo-2-4ce052f00dd3f52ce827759a3f3b410467dd54d4.tar.bz2
gentoo-2-4ce052f00dd3f52ce827759a3f3b410467dd54d4.zip
cleanup and introduce new upstream patches (see http://www.lua.org/bugs.html
for more) (Portage version: 2.1.6.13/cvs/Linux ppc)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/lua/ChangeLog12
-rw-r--r--dev-lang/lua/files/5.1.4/01_all_boolean_expression.upstream.patch48
-rw-r--r--dev-lang/lua/files/5.1.4/02_all_table.upstream.patch22
-rw-r--r--dev-lang/lua/files/lua-5.1.3-deprecated.patch46
-rw-r--r--dev-lang/lua/files/lua-5.1.3-test.patch11
-rw-r--r--dev-lang/lua/lua-5.1.1-r2.ebuild100
-rw-r--r--dev-lang/lua/lua-5.1.4-r2.ebuild (renamed from dev-lang/lua/lua-5.1.3-r3.ebuild)20
7 files changed, 91 insertions, 168 deletions
diff --git a/dev-lang/lua/ChangeLog b/dev-lang/lua/ChangeLog
index b99a9ac7f0d5..8ec8a49daf34 100644
--- a/dev-lang/lua/ChangeLog
+++ b/dev-lang/lua/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for dev-lang/lua
# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.133 2009/04/15 19:30:48 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.134 2009/07/10 22:50:21 mabi Exp $
+
+*lua-5.1.4-r2 (10 Jul 2009)
+
+ 10 Jul 2009; <mabi@gentoo.org> -files/lua-5.1.3-deprecated.patch,
+ -files/lua-5.1.3-test.patch,
+ +files/5.1.4/01_all_boolean_expression.upstream.patch,
+ +files/5.1.4/02_all_table.upstream.patch, -lua-5.1.1-r2.ebuild,
+ -lua-5.1.3-r3.ebuild, +lua-5.1.4-r2.ebuild:
+ cleanup and introduce new upstream patches (see http://www.lua.org/bugs.html
+ for more)
15 Apr 2009; Brent Baude <ranger@gentoo.org> lua-5.1.4.ebuild:
Marking lua-5.1.4 ppc64 for bug 255191
diff --git a/dev-lang/lua/files/5.1.4/01_all_boolean_expression.upstream.patch b/dev-lang/lua/files/5.1.4/01_all_boolean_expression.upstream.patch
new file mode 100644
index 000000000000..f04eb85075a2
--- /dev/null
+++ b/dev-lang/lua/files/5.1.4/01_all_boolean_expression.upstream.patch
@@ -0,0 +1,48 @@
+--- lua-5.1.4.orig/src/lcode.c 2007/12/28 15:32:23 2.25.1.3
++++ lua-5.1.4/src/lcode.c 2009/06/15 14:07:34
+@@ -544,15 +544,18 @@
+ pc = NO_JUMP; /* always true; do nothing */
+ break;
+ }
+- case VFALSE: {
+- pc = luaK_jump(fs); /* always jump */
+- break;
+- }
+ case VJMP: {
+ invertjump(fs, e);
+ pc = e->u.s.info;
+ break;
+ }
++ case VFALSE: {
++ if (!hasjumps(e)) {
++ pc = luaK_jump(fs); /* always jump */
++ break;
++ }
++ /* else go through */
++ }
+ default: {
+ pc = jumponcond(fs, e, 0);
+ break;
+@@ -572,14 +575,17 @@
+ pc = NO_JUMP; /* always false; do nothing */
+ break;
+ }
+- case VTRUE: {
+- pc = luaK_jump(fs); /* always jump */
+- break;
+- }
+ case VJMP: {
+ pc = e->u.s.info;
+ break;
+ }
++ case VTRUE: {
++ if (!hasjumps(e)) {
++ pc = luaK_jump(fs); /* always jump */
++ break;
++ }
++ /* else go through */
++ }
+ default: {
+ pc = jumponcond(fs, e, 1);
+ break;
+
diff --git a/dev-lang/lua/files/5.1.4/02_all_table.upstream.patch b/dev-lang/lua/files/5.1.4/02_all_table.upstream.patch
new file mode 100644
index 000000000000..9ffc1bb28843
--- /dev/null
+++ b/dev-lang/lua/files/5.1.4/02_all_table.upstream.patch
@@ -0,0 +1,22 @@
+--- lua-5.1.4.orig/src/lvm.c 2007/12/28 15:32:23 2.63.1.3
++++ lua-5.1.4/src/lvm.c 2009/07/01 20:36:59
+@@ -133,6 +133,7 @@
+
+ void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
+ int loop;
++ TValue temp;
+ for (loop = 0; loop < MAXTAGLOOP; loop++) {
+ const TValue *tm;
+ if (ttistable(t)) { /* `t' is a table? */
+@@ -152,7 +153,9 @@
+ callTM(L, tm, t, key, val);
+ return;
+ }
+- t = tm; /* else repeat with `tm' */
++ /* else repeat with `tm' */
++ setobj(L, &temp, tm); /* avoid pointing inside table (may rehash) */
++ t = &temp;
+ }
+ luaG_runerror(L, "loop in settable");
+ }
+
diff --git a/dev-lang/lua/files/lua-5.1.3-deprecated.patch b/dev-lang/lua/files/lua-5.1.3-deprecated.patch
deleted file mode 100644
index a88a991d053e..000000000000
--- a/dev-lang/lua/files/lua-5.1.3-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.3-test.patch b/dev-lang/lua/files/lua-5.1.3-test.patch
deleted file mode 100644
index 99b4ad648cc7..000000000000
--- a/dev-lang/lua/files/lua-5.1.3-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/lua-5.1.1-r2.ebuild b/dev-lang/lua/lua-5.1.1-r2.ebuild
deleted file mode 100644
index b2864b5821ec..000000000000
--- a/dev-lang/lua/lua-5.1.1-r2.ebuild
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.1.1-r2.ebuild,v 1.17 2008/02/12 21:21:25 mabi Exp $
-
-inherit eutils portability 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"
-IUSE="readline static"
-
-DEPEND="readline? ( sys-libs/readline )"
-
-src_unpack() {
- local PATCH_PV=$(get_version_component_range 1-2)
- unpack ${A}
- cd "${S}"
-
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make.patch
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
-
- # extra patching not required in lua-5.1.3
- sed -i -e 's:\(INSTALL_.*\= \$(CP)\):#\1:g' Makefile
- sed -i -e 's:#\(INSTALL_.*\= \$(INSTALL)\):\1:g' Makefile
-
- sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
-
- if ! use readline ; then
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-readline.patch
- fi
-
- # Using dynamic linked lua is not recommended upstream 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 the lua compiler is build statically anyway
- if use static ; then
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static.patch
- fi
-
- # We want packages to find our things...
- sed -i -e 's:/usr/local:/usr:' etc/lua.pc
-}
-
-src_compile() {
- myflags=
- # what to link to liblua
- liblibs="-lm"
- mycflags="${mycflags} -DLUA_USE_LINUX"
- liblibs="${liblibs} $(dlopen_lib)"
-
- # what to link to the executables
- mylibs=
- if use readline; then
- mylibs="-lreadline"
- fi
-
- cd src
- emake CFLAGS="${mycflags} ${CFLAGS}" \
- RPATH="/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="${D}/usr/" INSTALL_LIB="${D}/usr/$(get_libdir)/" \
- V=${PV} gentoo_install \
- || die "emake install gentoo_install failed"
-
- dodoc HISTORY README
- dohtml doc/*.html doc/*.gif
-
- insinto /usr/share/pixmaps
- doins etc/lua.ico
- insinto /usr/$(get_libdir)/pkgconfig
- doins etc/lua.pc
-}
-
-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 &> /dev/null || die "test $test failed"
- done
-
- for test in ${negative}; do
- test/lua.static test/${test}.lua &> /dev/null && die "test $test failed"
- done
-}
diff --git a/dev-lang/lua/lua-5.1.3-r3.ebuild b/dev-lang/lua/lua-5.1.4-r2.ebuild
index 72913a62389e..851970f50703 100644
--- a/dev-lang/lua/lua-5.1.3-r3.ebuild
+++ b/dev-lang/lua/lua-5.1.4-r2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.1.3-r3.ebuild,v 1.8 2008/11/04 03:32:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.1.4-r2.ebuild,v 1.1 2009/07/10 22:50:21 mabi Exp $
EAPI="1"
-inherit eutils portability versionator
+inherit eutils portability versionator toolchain-funcs
DESCRIPTION="A powerful light-weight programming language designed for extending applications"
HOMEPAGE="http://www.lua.org/"
@@ -12,7 +12,7 @@ SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
IUSE="+deprecated readline static"
DEPEND="readline? ( sys-libs/readline )"
@@ -22,13 +22,13 @@ src_unpack() {
unpack ${A}
cd "${S}"
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make.patch
+ 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:3:1/' src/Makefile
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:4:1/' src/Makefile
sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
@@ -48,7 +48,7 @@ src_unpack() {
# compiler (built statically) nor the lua libraries (both shared and static
# are installed)
if use static ; then
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static.patch
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static-r1.patch
fi
# We want packages to find our things...
@@ -56,10 +56,10 @@ src_unpack() {
}
src_compile() {
+ tc-export CC
myflags=
# what to link to liblua
liblibs="-lm"
- mycflags="${mycflags} -DLUA_USE_LINUX"
liblibs="${liblibs} $(dlopen_lib)"
# what to link to the executables
@@ -69,8 +69,8 @@ src_compile() {
fi
cd src
- emake CFLAGS="${mycflags} ${CFLAGS}" \
- RPATH="/usr/$(get_libdir)/" \
+ emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \
+ RPATH="${ROOT}/usr/$(get_libdir)/" \
LUA_LIBS="${mylibs}" \
LIB_LIBS="${liblibs}" \
V=${PV} \