diff options
author | Matti Bickel <mabi@gentoo.org> | 2008-08-10 12:51:31 +0000 |
---|---|---|
committer | Matti Bickel <mabi@gentoo.org> | 2008-08-10 12:51:31 +0000 |
commit | 9911c606a7c2b05d1228ef71d914d233be2f1ca7 (patch) | |
tree | ef7243cf3264593cf38730f03f0bf76ec7c5468a | |
parent | x86 stable, bug #229709 (diff) | |
download | gentoo-2-9911c606a7c2b05d1228ef71d914d233be2f1ca7.tar.gz gentoo-2-9911c606a7c2b05d1228ef71d914d233be2f1ca7.tar.bz2 gentoo-2-9911c606a7c2b05d1228ef71d914d233be2f1ca7.zip |
bump to include more upstream patches
(Portage version: 2.2_rc6/cvs/Linux 2.6.23-gentoo-r3-20080120 ppc)
-rw-r--r-- | dev-lang/lua/ChangeLog | 11 | ||||
-rw-r--r-- | dev-lang/lua/files/5.1.3/09_all_string_byte_fix_upstream.patch | 12 | ||||
-rw-r--r-- | dev-lang/lua/files/5.1.3/10_all_gc_loop_fix.upstream.patch | 19 | ||||
-rw-r--r-- | dev-lang/lua/files/5.1.3/11_all_module.upstream.patch | 16 | ||||
-rw-r--r-- | dev-lang/lua/files/5.1.3/12_all_svalue.upstream.patch | 11 | ||||
-rw-r--r-- | dev-lang/lua/lua-5.1.3-r4.ebuild | 112 |
6 files changed, 180 insertions, 1 deletions
diff --git a/dev-lang/lua/ChangeLog b/dev-lang/lua/ChangeLog index d827de629dce..5ddaadf1176d 100644 --- a/dev-lang/lua/ChangeLog +++ b/dev-lang/lua/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-lang/lua # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.107 2008/05/27 22:11:43 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.108 2008/08/10 12:51:31 mabi Exp $ + +*lua-5.1.3-r4 (10 Aug 2008) + + 10 Aug 2008; Matti Bickel <mabi@gentoo.org> + +files/5.1.3/09_all_string_byte_fix_upstream.patch, + +files/5.1.3/10_all_gc_loop_fix.upstream.patch, + +files/5.1.3/11_all_module.upstream.patch, + +files/5.1.3/12_all_svalue.upstream.patch, +lua-5.1.3-r4.ebuild: + bump to include more upstream patches *lua-5.1.3-r3 (27 May 2008) diff --git a/dev-lang/lua/files/5.1.3/09_all_string_byte_fix_upstream.patch b/dev-lang/lua/files/5.1.3/09_all_string_byte_fix_upstream.patch new file mode 100644 index 000000000000..392fa6b75739 --- /dev/null +++ b/dev-lang/lua/files/5.1.3/09_all_string_byte_fix_upstream.patch @@ -0,0 +1,12 @@ +--- lua-5.1.3.orig/src/lstrlib.c 2008-05-15 09:24:32.000000000 +0200 ++++ lua-5.1.3/src/lstrlib.c 2008-08-10 14:21:00.000000000 +0200 +@@ -35,7 +35,8 @@ + + static ptrdiff_t posrelat (ptrdiff_t pos, size_t len) { + /* relative string position: negative means back from end */ +- return (pos>=0) ? pos : (ptrdiff_t)len+pos+1; ++ if (pos < 0) pos += (ptrdiff_t)len + 1; ++ return (pos >= 0) ? pos : 0; + } + + diff --git a/dev-lang/lua/files/5.1.3/10_all_gc_loop_fix.upstream.patch b/dev-lang/lua/files/5.1.3/10_all_gc_loop_fix.upstream.patch new file mode 100644 index 000000000000..83b706d709d6 --- /dev/null +++ b/dev-lang/lua/files/5.1.3/10_all_gc_loop_fix.upstream.patch @@ -0,0 +1,19 @@ +--- lua-5.1.3.orig/src/lapi.c 2008-05-15 09:24:32.000000000 +0200 ++++ lua-5.1.3/src/lapi.c 2008-08-10 14:26:42.000000000 +0200 +@@ -930,10 +930,13 @@ + g->GCthreshold = g->totalbytes - a; + else + g->GCthreshold = 0; +- while (g->GCthreshold <= g->totalbytes) ++ while (g->GCthreshold <= g->totalbytes) { + luaC_step(L); +- if (g->gcstate == GCSpause) /* end of cycle? */ +- res = 1; /* signal it */ ++ if (g->gcstate == GCSpause) { /* end of cycle? */ ++ res = 1; /* signal it */ ++ break; ++ } ++ } + break; + } + case LUA_GCSETPAUSE: { diff --git a/dev-lang/lua/files/5.1.3/11_all_module.upstream.patch b/dev-lang/lua/files/5.1.3/11_all_module.upstream.patch new file mode 100644 index 000000000000..f6231f5fc49a --- /dev/null +++ b/dev-lang/lua/files/5.1.3/11_all_module.upstream.patch @@ -0,0 +1,16 @@ +--- lua-5.1.3.orig/src/loadlib.c 2008-05-15 09:24:32.000000000 +0200 ++++ lua-5.1.3/src/loadlib.c 2008-08-10 14:29:32.000000000 +0200 +@@ -506,8 +506,11 @@ + + static void setfenv (lua_State *L) { + lua_Debug ar; +- lua_getstack(L, 1, &ar); +- lua_getinfo(L, "f", &ar); ++ if (lua_getstack(L, 1, &ar) == 0 || ++ lua_getinfo(L, "f", &ar) == 0 || /* get calling function */ ++ lua_iscfunction(L, -1)) ++ luaL_error(L, "function " LUA_QL("module") ++ " not called from a Lua function"); + lua_pushvalue(L, -2); + lua_setfenv(L, -2); + lua_pop(L, 1); diff --git a/dev-lang/lua/files/5.1.3/12_all_svalue.upstream.patch b/dev-lang/lua/files/5.1.3/12_all_svalue.upstream.patch new file mode 100644 index 000000000000..cec667b28e46 --- /dev/null +++ b/dev-lang/lua/files/5.1.3/12_all_svalue.upstream.patch @@ -0,0 +1,11 @@ +--- lua-5.1.3.orig/src/lobject.h 2008-05-15 09:24:32.000000000 +0200 ++++ lua-5.1.3/src/lobject.h 2008-08-10 14:32:26.000000000 +0200 +@@ -208,7 +208,7 @@ + + + #define getstr(ts) cast(const char *, (ts) + 1) +-#define svalue(o) getstr(tsvalue(o)) ++#define svalue(o) getstr(rawtsvalue(o)) + + + diff --git a/dev-lang/lua/lua-5.1.3-r4.ebuild b/dev-lang/lua/lua-5.1.3-r4.ebuild new file mode 100644 index 000000000000..ede21e1be252 --- /dev/null +++ b/dev-lang/lua/lua-5.1.3-r4.ebuild @@ -0,0 +1,112 @@ +# 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.3-r4.ebuild,v 1.1 2008/08/10 12:51:31 mabi Exp $ + +EAPI="1" + +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 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="+deprecated 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 + + 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:\(/README\)\("\):\1.gz\2:g' doc/readme.html + + if ! use deprecated ; then + epatch "${FILESDIR}"/${P}-deprecated.patch + epatch "${FILESDIR}"/${P}-test.patch + fi + + 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 + # Not 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.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 + + 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 +} |