Import LuaJIT version 2.0.2.

LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language.
Lua is a powerful, dynamic and light-weight programming language. It may
be embedded or used as a general-purpose, stand-alone language.
This commit is contained in:
alnsn 2013-07-14 21:42:00 +00:00
parent a50f077ee8
commit 238e536eb3
6 changed files with 91 additions and 0 deletions

3
lang/LuaJIT2/DESCR Normal file
View file

@ -0,0 +1,3 @@
LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language.
Lua is a powerful, dynamic and light-weight programming language. It may
be embedded or used as a general-purpose, stand-alone language.

16
lang/LuaJIT2/Makefile Normal file
View file

@ -0,0 +1,16 @@
# $NetBSD: Makefile,v 1.1.1.1 2013/07/14 21:42:00 alnsn Exp $
#
DISTNAME= LuaJIT-2.0.2
PKGNAME= ${DISTNAME:S/LuaJIT/LuaJIT2/}
CATEGORIES= lang
MASTER_SITES= http://luajit.org/download/
MAINTAINER= alnsn@NetBSD.org
HOMEPAGE= http://luajit.org/
COMMENT= Just-In-Time Compiler for the Lua programming language
LICENSE= mit
USE_TOOLS+= gmake
.include "../../mk/bsd.pkg.mk"

27
lang/LuaJIT2/PLIST Normal file
View file

@ -0,0 +1,27 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2013/07/14 21:42:00 alnsn Exp $
bin/luajit
bin/luajit-${PKGVERSION}
include/luajit-2.0/lauxlib.h
include/luajit-2.0/lua.h
include/luajit-2.0/lua.hpp
include/luajit-2.0/luaconf.h
include/luajit-2.0/luajit.h
include/luajit-2.0/lualib.h
lib/libluajit-5.1.a
lib/libluajit-5.1.so
lib/libluajit-5.1.so.${PKGVERSION}
lib/pkgconfig/luajit.pc
share/luajit-${PKGVERSION}/jit/bc.lua
share/luajit-${PKGVERSION}/jit/bcsave.lua
share/luajit-${PKGVERSION}/jit/dis_arm.lua
share/luajit-${PKGVERSION}/jit/dis_mips.lua
share/luajit-${PKGVERSION}/jit/dis_mipsel.lua
share/luajit-${PKGVERSION}/jit/dis_ppc.lua
share/luajit-${PKGVERSION}/jit/dis_x64.lua
share/luajit-${PKGVERSION}/jit/dis_x86.lua
share/luajit-${PKGVERSION}/jit/dump.lua
share/luajit-${PKGVERSION}/jit/v.lua
share/luajit-${PKGVERSION}/jit/vmdef.lua
man/man1/luajit.1
@pkgdir share/lua/5.1
@pkgdir lib/lua/5.1

7
lang/LuaJIT2/distinfo Normal file
View file

@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.1.1.1 2013/07/14 21:42:00 alnsn Exp $
SHA1 (LuaJIT-2.0.2.tar.gz) = d21426c4fc6ad8888255139039a014f7e28e7300
RMD160 (LuaJIT-2.0.2.tar.gz) = 581ead4b18b54000d83f1ff79559c709f781b6c3
Size (LuaJIT-2.0.2.tar.gz) = 843031 bytes
SHA1 (patch-Makefile) = c21c75ec7473aea0e964fc73f3d5d65848df5e75
SHA1 (patch-src_lj__alloc.c) = 48baa3177020c6ef304654dd4ed6380c10bda0a5

View file

@ -0,0 +1,23 @@
$NetBSD: patch-Makefile,v 1.1.1.1 2013/07/14 21:42:00 alnsn Exp $
Fix installation.
--- Makefile.orig 2013-06-03 19:00:00.000000000 +0000
+++ Makefile
@@ -24,7 +24,6 @@ ABIVER= 5.1
# Change the installation path as needed. This automatically adjusts
# the paths in src/luaconf.h, too. Note: PREFIX must be an absolute path!
#
-export PREFIX= /usr/local
##############################################################################
DPREFIX= $(DESTDIR)$(PREFIX)
@@ -39,7 +38,7 @@ INSTALL_LMODD= $(INSTALL_SHARE)/lua
INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER)
INSTALL_CMODD= $(INSTALL_LIB)/lua
INSTALL_CMOD= $(INSTALL_CMODD)/$(ABIVER)
-INSTALL_MAN= $(INSTALL_SHARE)/man/man1
+INSTALL_MAN= $(DPREFIX)/man/man1
INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
INSTALL_TNAME= luajit-$(VERSION)

View file

@ -0,0 +1,15 @@
$NetBSD: patch-src_lj__alloc.c,v 1.1.1.1 2013/07/14 21:42:00 alnsn Exp $
Add NetBSD to a list of "naive" platforms.
--- src/lj_alloc.c.orig 2013-06-03 19:00:00.000000000 +0000
+++ src/lj_alloc.c
@@ -188,7 +188,7 @@ static LJ_AINLINE void *CALL_MMAP(size_t
return ptr;
}
-#elif LJ_TARGET_OSX || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__sun__)
+#elif LJ_TARGET_OSX || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__sun__) || defined(__NetBSD__)
/* OSX and FreeBSD mmap() use a naive first-fit linear search.
** That's perfect for us. Except that -pagezero_size must be set for OSX,