[happy-kitty] r732 committed - add luajit

2 views
Skip to first unread message

happy...@googlecode.com

unread,
Apr 23, 2012, 3:01:08 PM4/23/12
to happy...@googlegroups.com
Revision: 732
Author: ozbekanil
Date: Mon Apr 23 12:00:54 2012
Log: add luajit

http://code.google.com/p/happy-kitty/source/detail?r=732

Added:
/trunk/library/luajit
/trunk/library/luajit/actions.py
/trunk/library/luajit/files
/trunk/library/luajit/files/Makefile.patch
/trunk/library/luajit/files/beta9_hotfix1.patch
/trunk/library/luajit/files/luaconf.patch
/trunk/library/luajit/pspec.xml
/trunk/library/luajit/translations.xml

=======================================
--- /dev/null
+++ /trunk/library/luajit/actions.py Mon Apr 23 12:00:54 2012
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/copyleft/gpl.txt
+
+from pisi.actionsapi import autotools
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import get
+
+def build():
+ autotools.make()
+
+def install():
+ autotools.rawInstall("DESTDIR=%s PREFIX=/usr" % get.installDIR())
+
+ pisitools.dodoc("COPYRIGHT", "README")
=======================================
--- /dev/null
+++ /trunk/library/luajit/files/Makefile.patch Mon Apr 23 12:00:54 2012
@@ -0,0 +1,11 @@
+--- Makefile.orig 2011-12-14 15:15:00.000000000 +0100
++++ Makefile 2012-03-04 14:53:43.137778596 +0100
+@@ -41,7 +41,7 @@
+ INSTALL_MAN= $(INSTALL_SHARE)/man/man1
+ INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
+
+-INSTALL_TNAME= luajit-$(VERSION)
++INSTALL_TNAME= $(INSTALL_TSYMNAME)
+ INSTALL_TSYMNAME= luajit
+ INSTALL_ANAME= libluajit-$(ABIVER).a
+ INSTALL_SONAME= libluajit-$(ABIVER).so.$(MAJVER).$(MINVER).$(RELVER)
=======================================
--- /dev/null
+++ /trunk/library/luajit/files/beta9_hotfix1.patch Mon Apr 23 12:00:54 2012
@@ -0,0 +1,54 @@
+Fix parsing of hex literals with exponents.
+Fix bytecode dump for certain number constants.
+
+--- a/src/lj_lex.c
++++ b/src/lj_lex.c
+@@ -137,14 +137,17 @@ static int lex_number64(LexState *ls, TValue *tv)
+ /* Parse a number literal. */
+ static void lex_number(LexState *ls, TValue *tv)
+ {
+- int c;
++ int c, xp = 'E';
+ lua_assert(lj_char_isdigit(ls->current));
+- do {
++ if ((c = ls->current) == '0') {
++ save_and_next(ls);
++ if ((ls->current & ~0x20) == 'X') xp = 'P';
++ }
++ while (lj_char_isident(ls->current) || ls->current == '.' ||
++ ((ls->current == '-' || ls->current == '+') && (c & ~0x20) == xp)) {
+ c = ls->current;
+ save_and_next(ls);
+- } while (lj_char_isident(ls->current) || ls->current == '.' ||
+- ((ls->current == '-' || ls->current == '+') &&
+- ((c & ~0x20) == 'E' || (c & ~0x20) == 'P')));
++ }
+ #if LJ_HASFFI
+ c &= ~0x20;
+ if ((c == 'I' || c == 'L' || c == 'U') && !ctype_ctsG(G(ls->L)))
+--- a/src/lj_bcwrite.c
++++ b/src/lj_bcwrite.c
+@@ -219,13 +219,19 @@ static void bcwrite_knum(BCWriteCtx *ctx, GCproto
*pt)
+ k = lj_num2int(num);
+ if (num == (lua_Number)k) { /* -0 is never a constant. */
+ save_int:
+- bcwrite_uleb128(ctx, 2*(uint32_t)k);
+- if (k < 0) ctx->sb.buf[ctx->sb.n-1] |= 0x10;
++ bcwrite_uleb128(ctx, 2*(uint32_t)k | ((uint32_t)k & 0x80000000u));
++ if (k < 0) {
++ char *p = &ctx->sb.buf[ctx->sb.n-1];
++ *p = (*p & 7) | ((k>>27) & 0x18);
++ }
+ continue;
+ }
+ }
+- bcwrite_uleb128(ctx, 1+2*o->u32.lo);
+- if (o->u32.lo >= 0x80000000u) ctx->sb.buf[ctx->sb.n-1] |= 0x10;
++ bcwrite_uleb128(ctx, 1+(2*o->u32.lo | (o->u32.lo & 0x80000000u)));
++ if (o->u32.lo >= 0x80000000u) {
++ char *p = &ctx->sb.buf[ctx->sb.n-1];
++ *p = (*p & 7) | ((o->u32.lo>>27) & 0x18);
++ }
+ bcwrite_uleb128(ctx, o->u32.hi);
+ }
+ }
=======================================
--- /dev/null
+++ /trunk/library/luajit/files/luaconf.patch Mon Apr 23 12:00:54 2012
@@ -0,0 +1,11 @@
+--- src/luaconf.h.orig 2010-08-24 15:00:00.000000000 +0200
++++ src/luaconf.h 2010-09-06 15:52:22.043333530 +0200
+@@ -33,7 +33,7 @@
+ #define LUA_CPATH_DEFAULT \
+ ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
+ #else
+-#define LUA_ROOT "/usr/local/"
++#define LUA_ROOT "/usr/"
+ #define LUA_LDIR LUA_ROOT "share/lua/5.1/"
+ #define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
+ #ifdef LUA_XROOT
=======================================
--- /dev/null
+++ /trunk/library/luajit/pspec.xml Mon Apr 23 12:00:54 2012
@@ -0,0 +1,49 @@
+<?xml version="1.0" ?>
+<!DOCTYPE PISI
SYSTEM "http://www.pardus.org.tr/projeler/pisi/pisi-spec.dtd">
+<PISI>
+ <Source>
+ <Name>luajit</Name>
+ <Homepage>http://luajit.org</Homepage>
+ <Packager>
+ <Name>Anıl Özbek</Name>
+ <Email>ozbe...@gmail.com</Email>
+ </Packager>
+ <License>MIT</License>
+ <IsA>app:console</IsA>
+ <Summary>A Just-In-Time compiler for Lua</Summary>
+ <Description>LuaJIT is a Just-In-Time compiler for
Lua.</Description>
+ <Archive sha1sum="c9e5b262b53b4ac714d3ce42be7e7ca0e41ad7f3"
type="targz">http://luajit.org/download/LuaJIT-2.0.0-beta9.tar.gz</Archive>
+ <Patches>
+ <Patch level="1">beta9_hotfix1.patch</Patch>
+ <Patch>luaconf.patch</Patch>
+ <Patch>Makefile.patch</Patch>
+ </Patches>
+ </Source>
+
+ <Package>
+ <Name>luajit</Name>
+ <RuntimeDependencies>
+ <Dependency>libgcc</Dependency>
+ <Dependency>gcc</Dependency>
+ </RuntimeDependencies>
+ <Files>
+ <Path fileType="executable">/usr/bin</Path>
+ <Path fileType="library">/usr/lib</Path>
+ <Path fileType="header">/usr/include</Path>
+ <Path fileType="data">/usr/share/lua</Path>
+ <Path fileType="data">/usr/share/luajit-*</Path>
+ <Path fileType="man">/usr/share/man</Path>
+ <Path fileType="doc">/usr/share/doc</Path>
+ </Files>
+ </Package>
+
+ <History>
+ <Update release="1">
+ <Date>2012-04-23</Date>
+ <Version>2.0.0_beta9</Version>
+ <Comment>First release</Comment>
+ <Name>Anıl Özbek</Name>
+ <Email>ozbe...@gmail.com</Email>
+ </Update>
+ </History>
+</PISI>
=======================================
--- /dev/null
+++ /trunk/library/luajit/translations.xml Mon Apr 23 12:00:54 2012
@@ -0,0 +1,8 @@
+<?xml version="1.0" ?>
+<PISI>
+ <Source>
+ <Name>luajit</Name>
+ <Summary xml:lang="tr">Lua için Just-in-Time derleyici</Summary>
+ <Description xml:lang="tr">LuaJIT, Lua için bir Just-in-Time
derleyicidir.</Description>
+ </Source>
+</PISI>
Reply all
Reply to author
Forward
0 new messages