aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorosa <osa@FreeBSD.org>2012-01-11 23:05:46 +0800
committerosa <osa@FreeBSD.org>2012-01-11 23:05:46 +0800
commit8d07bbadfe150529f3f8f3f55a1d644f6e111cff (patch)
treea863d4f11b2b61917da20774c677aacb06d04acc /devel
parent93fd8ef86f9762dd7ce3e88c2631bb50ef2b5344 (diff)
downloadfreebsd-ports-gnome-8d07bbadfe150529f3f8f3f55a1d644f6e111cff.tar.gz
freebsd-ports-gnome-8d07bbadfe150529f3f8f3f55a1d644f6e111cff.tar.zst
freebsd-ports-gnome-8d07bbadfe150529f3f8f3f55a1d644f6e111cff.zip
Add luajit - an Just-In-Time Compiler for the Lua programming language.
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/luagit/Makefile36
-rw-r--r--devel/luagit/distinfo2
-rw-r--r--devel/luagit/files/patch-Makefile54
-rw-r--r--devel/luagit/files/patch-src_Makefile29
-rw-r--r--devel/luagit/files/unwind.h241
-rw-r--r--devel/luagit/pkg-descr3
-rw-r--r--devel/luagit/pkg-plist24
8 files changed, 390 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 8c9fe26822ff..000f7555777e 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1008,6 +1008,7 @@
SUBDIR += luabind
SUBDIR += luafilesystem
SUBDIR += luajava
+ SUBDIR += luajit
SUBDIR += lwp
SUBDIR += lxr
SUBDIR += m17n-db
diff --git a/devel/luagit/Makefile b/devel/luagit/Makefile
new file mode 100644
index 000000000000..f235dca635c3
--- /dev/null
+++ b/devel/luagit/Makefile
@@ -0,0 +1,36 @@
+# New ports collection makefile for: luajit
+# Date created: 08 Jan 2012
+# Whom: osa
+#
+# $FreeBSD$
+#
+
+PORTNAME= luajit
+DISTVERSION= 2.0.0-beta9
+CATEGORIES= devel
+MASTER_SITES= http://luajit.org/download/
+DISTNAME= LuaJIT-${DISTVERSION}
+
+MAINTAINER= osa@FreeBSD.org
+COMMENT= A Just-In-Time Compiler for Lua
+
+WRKSRC= ${WRKDIR}/LuaJIT-${DISTVERSION}
+USE_GMAKE= yes
+USE_LDCONFIG= yes
+CFLAGS+= "-I../"
+
+.if !defined(NO_INSTALL_MANPAGES)
+MAN1= luajit.1
+.endif
+
+pre-build:
+ ${CP} ${FILESDIR}/unwind.h ${WRKSRC}
+
+post-install:
+ ${LN} -sf ${PREFIX}/bin/${PORTNAME}-${DISTVERSION} \
+ ${PREFIX}/bin/${PORTNAME}
+.if !defined(NO_INSTALL_MANPAGES)
+ @${INSTALL_MAN} ${WRKSRC}/etc/luajit.1 ${MAN1PREFIX}/man/man1
+.endif
+
+.include <bsd.port.mk>
diff --git a/devel/luagit/distinfo b/devel/luagit/distinfo
new file mode 100644
index 000000000000..546bd3a7f5fc
--- /dev/null
+++ b/devel/luagit/distinfo
@@ -0,0 +1,2 @@
+SHA256 (LuaJIT-2.0.0-beta9.tar.gz) = da3793b4364a17c3700d39d13eae799b82ff23da1f61631d735de05333f46240
+SIZE (LuaJIT-2.0.0-beta9.tar.gz) = 814960
diff --git a/devel/luagit/files/patch-Makefile b/devel/luagit/files/patch-Makefile
new file mode 100644
index 000000000000..d18396187728
--- /dev/null
+++ b/devel/luagit/files/patch-Makefile
@@ -0,0 +1,54 @@
+--- Makefile.orig 2011-12-14 18:15:00.000000000 +0400
++++ Makefile 2012-01-11 15:40:26.000000000 +0400
+@@ -26,26 +26,27 @@
+ # 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
++#export PREFIX= /usr/local
+ ##############################################################################
+
+ DPREFIX= $(DESTDIR)$(PREFIX)
+ INSTALL_BIN= $(DPREFIX)/bin
+ INSTALL_LIB= $(DPREFIX)/lib
++INSTALL_LIBD= $(DPREFIX)/libdata
+ INSTALL_SHARE= $(DPREFIX)/share
+ INSTALL_INC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER)
++INSTALL_MAN= $(DPREFIX)/man/man1
+
+ INSTALL_JITLIB= $(INSTALL_SHARE)/luajit-$(VERSION)/jit
+ INSTALL_LMOD= $(INSTALL_SHARE)/lua/$(ABIVER)
+ INSTALL_CMOD= $(INSTALL_LIB)/lua/$(ABIVER)
+-INSTALL_MAN= $(INSTALL_SHARE)/man/man1
+-INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
++INSTALL_PKGCONFIG= $(INSTALL_LIBD)/pkgconfig
+
+ INSTALL_TNAME= luajit-$(VERSION)
+ INSTALL_TSYMNAME= luajit
+ INSTALL_ANAME= libluajit-$(ABIVER).a
+ INSTALL_SONAME= libluajit-$(ABIVER).so.$(MAJVER).$(MINVER).$(RELVER)
+-INSTALL_SOSHORT= libluajit-$(ABIVER).so
++INSTALL_SOSHORT= libluajit-$(ABIVER).so.$(MAJVER)
+ INSTALL_DYLIBNAME= libluajit-$(NODOTABIVER).$(MAJVER).$(MINVER).$(RELVER).dylib
+ INSTALL_DYLIBSHORT1= libluajit-$(NODOTABIVER).dylib
+ INSTALL_DYLIBSHORT2= libluajit-$(NODOTABIVER).$(MAJVER).dylib
+@@ -59,7 +60,7 @@
+ INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME)
+ INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME)
+
+-INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_MAN) \
++INSTALL_DIRS= $(INSTALL_INC) \
+ $(INSTALL_PKGCONFIG) $(INSTALL_JITLIB) $(INSTALL_LMOD) $(INSTALL_CMOD)
+
+ RM= rm -f
+@@ -105,10 +106,8 @@
+ $(RM) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2)
+ cd src && test -f $(FILE_SO) && \
+ $(INSTALL_X) $(FILE_SO) $(INSTALL_DYN) && \
+- $(LDCONFIG) $(INSTALL_LIB) && \
+ $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \
+ $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || :
+- cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN)
+ cd etc && $(SED_PC) $(FILE_PC) > $(FILE_PC).tmp && \
+ $(INSTALL_F) $(FILE_PC).tmp $(INSTALL_PC) && \
+ $(RM) $(FILE_PC).tmp
diff --git a/devel/luagit/files/patch-src_Makefile b/devel/luagit/files/patch-src_Makefile
new file mode 100644
index 000000000000..09c25b53a574
--- /dev/null
+++ b/devel/luagit/files/patch-src_Makefile
@@ -0,0 +1,29 @@
+--- src/Makefile.orig 2011-12-14 18:15:00.000000000 +0400
++++ src/Makefile 2012-01-09 19:33:28.000000000 +0400
+@@ -25,7 +25,7 @@
+ # with "make clean", followed by "make" if you change any options.
+ #
+ # LuaJIT builds as a native 32 or 64 bit binary by default.
+-CC= gcc
++#CC= gcc
+ #
+ # Use this if you want to force a 32 bit build on a 64 bit multilib OS.
+ #CC= gcc -m32
+@@ -34,7 +34,7 @@
+ # to slow down the C part by not omitting it. Debugging, tracebacks and
+ # unwinding are not affected -- the assembler part has frame unwind
+ # information and GCC emits it where needed (x64) or with -g (see CCDEBUG).
+-CCOPT= -O2 -fomit-frame-pointer
++#CCOPT= -O2 -fomit-frame-pointer
+ # Use this if you want to generate a smaller binary (but it's slower):
+ #CCOPT= -Os -fomit-frame-pointer
+ # Note: it's no longer recommended to use -O3 with GCC 4.x.
+@@ -49,7 +49,7 @@
+ # x86/x64 only: For GCC 4.2 or higher and if you don't intend to distribute
+ # the binaries to a different machine you could also use: -march=native
+ #
+-CCOPT_X86= -march=i686
++CCOPT_X86=
+ CCOPT_X64=
+ CCOPT_ARM=
+ CCOPT_PPC=
diff --git a/devel/luagit/files/unwind.h b/devel/luagit/files/unwind.h
new file mode 100644
index 000000000000..3f4c06530ce1
--- /dev/null
+++ b/devel/luagit/files/unwind.h
@@ -0,0 +1,241 @@
+/* Exception handling and frame unwind runtime interface routines.
+ Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* As a special exception, if you include this header file into source
+ files compiled by GCC, this header file does not by itself cause
+ the resulting executable to be covered by the GNU General Public
+ License. This exception does not however invalidate any other
+ reasons why the executable file might be covered by the GNU General
+ Public License. */
+
+/* This is derived from the C++ ABI for IA-64. Where we diverge
+ for cross-architecture compatibility are noted with "@@@". */
+
+#ifndef _UNWIND_H
+#define _UNWIND_H
+
+#ifndef HIDE_EXPORTS
+#pragma GCC visibility push(default)
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Level 1: Base ABI */
+
+/* @@@ The IA-64 ABI uses uint64 throughout. Most places this is
+ inefficient for 32-bit and smaller machines. */
+typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
+typedef signed _Unwind_Sword __attribute__((__mode__(__word__)));
+#if defined(__ia64__) && defined(__hpux__)
+typedef unsigned _Unwind_Ptr __attribute__((__mode__(__word__)));
+#else
+typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)));
+#endif
+typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__)));
+
+/* @@@ The IA-64 ABI uses a 64-bit word to identify the producer and
+ consumer of an exception. We'll go along with this for now even on
+ 32-bit machines. We'll need to provide some other option for
+ 16-bit machines and for machines with > 8 bits per byte. */
+typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__)));
+
+/* The unwind interface uses reason codes in several contexts to
+ identify the reasons for failures or other actions. */
+typedef enum
+{
+ _URC_NO_REASON = 0,
+ _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
+ _URC_FATAL_PHASE2_ERROR = 2,
+ _URC_FATAL_PHASE1_ERROR = 3,
+ _URC_NORMAL_STOP = 4,
+ _URC_END_OF_STACK = 5,
+ _URC_HANDLER_FOUND = 6,
+ _URC_INSTALL_CONTEXT = 7,
+ _URC_CONTINUE_UNWIND = 8
+} _Unwind_Reason_Code;
+
+
+/* The unwind interface uses a pointer to an exception header object
+ as its representation of an exception being thrown. In general, the
+ full representation of an exception object is language- and
+ implementation-specific, but it will be prefixed by a header
+ understood by the unwind interface. */
+
+struct _Unwind_Exception;
+
+typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code,
+ struct _Unwind_Exception *);
+
+struct _Unwind_Exception
+{
+ _Unwind_Exception_Class exception_class;
+ _Unwind_Exception_Cleanup_Fn exception_cleanup;
+ _Unwind_Word private_1;
+ _Unwind_Word private_2;
+
+ /* @@@ The IA-64 ABI says that this structure must be double-word aligned.
+ Taking that literally does not make much sense generically. Instead we
+ provide the maximum alignment required by any type for the machine. */
+} __attribute__((__aligned__));
+
+
+/* The ACTIONS argument to the personality routine is a bitwise OR of one
+ or more of the following constants. */
+typedef int _Unwind_Action;
+
+#define _UA_SEARCH_PHASE 1
+#define _UA_CLEANUP_PHASE 2
+#define _UA_HANDLER_FRAME 4
+#define _UA_FORCE_UNWIND 8
+#define _UA_END_OF_STACK 16
+
+/* This is an opaque type used to refer to a system-specific data
+ structure used by the system unwinder. This context is created and
+ destroyed by the system, and passed to the personality routine
+ during unwinding. */
+struct _Unwind_Context;
+
+/* Raise an exception, passing along the given exception object. */
+extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *);
+
+/* Raise an exception for forced unwinding. */
+
+typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
+ (int, _Unwind_Action, _Unwind_Exception_Class,
+ struct _Unwind_Exception *, struct _Unwind_Context *, void *);
+
+extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *,
+ _Unwind_Stop_Fn,
+ void *);
+
+/* Helper to invoke the exception_cleanup routine. */
+extern void _Unwind_DeleteException (struct _Unwind_Exception *);
+
+/* Resume propagation of an existing exception. This is used after
+ e.g. executing cleanup code, and not to implement rethrowing. */
+extern void _Unwind_Resume (struct _Unwind_Exception *);
+
+/* @@@ Resume propagation of an FORCE_UNWIND exception, or to rethrow
+ a normal exception that was handled. */
+extern _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *);
+
+/* @@@ Use unwind data to perform a stack backtrace. The trace callback
+ is called for every stack frame in the call chain, but no cleanup
+ actions are performed. */
+typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)
+ (struct _Unwind_Context *, void *);
+
+extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *);
+
+/* These functions are used for communicating information about the unwind
+ context (i.e. the unwind descriptors and the user register state) between
+ the unwind library and the personality routine and landing pad. Only
+ selected registers maybe manipulated. */
+
+extern _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *, int);
+extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word);
+
+extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
+extern _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
+extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr);
+
+/* @@@ Retrieve the CFA of the given context. */
+extern _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *);
+
+extern void *_Unwind_GetLanguageSpecificData (struct _Unwind_Context *);
+
+extern _Unwind_Ptr _Unwind_GetRegionStart (struct _Unwind_Context *);
+
+
+/* The personality routine is the function in the C++ (or other language)
+ runtime library which serves as an interface between the system unwind
+ library and language-specific exception handling semantics. It is
+ specific to the code fragment described by an unwind info block, and
+ it is always referenced via the pointer in the unwind info block, and
+ hence it has no ABI-specified name.
+
+ Note that this implies that two different C++ implementations can
+ use different names, and have different contents in the language
+ specific data area. Moreover, that the language specific data
+ area contains no version info because name of the function invoked
+ provides more effective versioning by detecting at link time the
+ lack of code to handle the different data format. */
+
+typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)
+ (int, _Unwind_Action, _Unwind_Exception_Class,
+ struct _Unwind_Exception *, struct _Unwind_Context *);
+
+/* @@@ The following alternate entry points are for setjmp/longjmp
+ based unwinding. */
+
+struct SjLj_Function_Context;
+extern void _Unwind_SjLj_Register (struct SjLj_Function_Context *);
+extern void _Unwind_SjLj_Unregister (struct SjLj_Function_Context *);
+
+extern _Unwind_Reason_Code _Unwind_SjLj_RaiseException
+ (struct _Unwind_Exception *);
+extern _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind
+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
+extern void _Unwind_SjLj_Resume (struct _Unwind_Exception *);
+extern _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow (struct _Unwind_Exception *);
+
+/* @@@ The following provide access to the base addresses for text
+ and data-relative addressing in the LDSA. In order to stay link
+ compatible with the standard ABI for IA-64, we inline these. */
+
+#ifdef __ia64__
+#include <stdlib.h>
+
+static inline _Unwind_Ptr
+_Unwind_GetDataRelBase (struct _Unwind_Context *_C)
+{
+ /* The GP is stored in R1. */
+ return _Unwind_GetGR (_C, 1);
+}
+
+static inline _Unwind_Ptr
+_Unwind_GetTextRelBase (struct _Unwind_Context *_C __attribute__ ((__unused__)))
+{
+ abort ();
+ return 0;
+}
+
+/* @@@ Retrieve the Backing Store Pointer of the given context. */
+extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *);
+#else
+extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *);
+extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *);
+#endif
+
+/* @@@ Given an address, return the entry point of the function that
+ contains it. */
+extern void * _Unwind_FindEnclosingFunction (void *pc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef HIDE_EXPORTS
+#pragma GCC visibility pop
+#endif
+
+#endif /* unwind.h */
diff --git a/devel/luagit/pkg-descr b/devel/luagit/pkg-descr
new file mode 100644
index 000000000000..a9afdbdb192b
--- /dev/null
+++ b/devel/luagit/pkg-descr
@@ -0,0 +1,3 @@
+LuaJIT is a Just-In-Time Compiler for the Lua programming language.
+
+WWW: http://luajit.org/luajit.html
diff --git a/devel/luagit/pkg-plist b/devel/luagit/pkg-plist
new file mode 100644
index 000000000000..ad0dbcb8097b
--- /dev/null
+++ b/devel/luagit/pkg-plist
@@ -0,0 +1,24 @@
+bin/luajit
+bin/luajit-2.0.0-beta9
+include/luajit-2.0/lua.h
+include/luajit-2.0/luaconf.h
+include/luajit-2.0/luajit.h
+include/luajit-2.0/lualib.h
+include/luajit-2.0/lauxlib.h
+include/luajit-2.0/lua.hpp
+lib/libluajit-5.1.a
+lib/libluajit-5.1.so.2
+lib/libluajit-5.1.so.2.0.0
+libdata/pkgconfig/luajit.pc
+share/luajit-2.0.0-beta9/jit/bc.lua
+share/luajit-2.0.0-beta9/jit/bcsave.lua
+share/luajit-2.0.0-beta9/jit/dis_arm.lua
+share/luajit-2.0.0-beta9/jit/dis_x64.lua
+share/luajit-2.0.0-beta9/jit/dis_x86.lua
+share/luajit-2.0.0-beta9/jit/dis_ppc.lua
+share/luajit-2.0.0-beta9/jit/dump.lua
+share/luajit-2.0.0-beta9/jit/v.lua
+share/luajit-2.0.0-beta9/jit/vmdef.lua
+@dirrm share/luajit-2.0.0-beta9/jit
+@dirrm share/luajit-2.0.0-beta9
+@dirrm include/luajit-2.0