Disable LuaJIT on non-x86 architectures

The version of LuaJIT in port doesn't work well (or at all) for neovim
on non-x86 architectures. Plus, some users (at least the submitter, who
made a good argument for it) may not want LuaJIT at all.

So, make LuaJIT an OPTION. Enable it by default, and exclude it from
all the archs that LuaJIT+neovim doesn't work on. Fall back instead on
normal Lua.

PR:		238079
Submitted by:	Greg V
MFH:		2019Q2
This commit is contained in:
Adam Weinberger 2019-05-28 14:04:35 +00:00
parent a0c29b0644
commit c493a6aa54
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=502895

View file

@ -4,6 +4,7 @@
PORTNAME= neovim
DISTVERSIONPREFIX= v
DISTVERSION= 0.3.5
PORTREVISION= 1
CATEGORIES= editors
MAINTAINER= adamw@FreeBSD.org
@ -14,8 +15,7 @@ LICENSE= APACHE20
BUILD_DEPENDS= gperf:devel/gperf \
${LUA_MODLIBDIR}/bit.so:devel/lua-bitop \
${LUA_MODLIBDIR}/lpeg.so:devel/lua-lpeg
LIB_DEPENDS= libluajit-5.1.so:lang/luajit \
libmsgpackc.so:devel/msgpack \
LIB_DEPENDS= libmsgpackc.so:devel/msgpack \
libtermkey.so:devel/libtermkey \
libunibilium.so:devel/unibilium \
libuv.so:devel/libuv \
@ -25,7 +25,7 @@ TEST_DEPENDS= autoconf>=0:devel/autoconf \
gmake:devel/gmake \
libtool:devel/libtool
USES= cmake iconv lua:build pathfix pkgconfig
USES= cmake iconv pathfix pkgconfig
USE_GITHUB= yes
GH_TUPLE= libmpack:libmpack:1.0.5:libmpack \
libmpack:libmpack-lua:1.0.7:libmpack_lua
@ -34,8 +34,20 @@ CMAKE_ARGS= -DLUA_PRG:FILEPATH="${LUA_CMD}" \
-DCMAKE_INSTALL_MANDIR:PATH="${MANPREFIX}/man" \
-DDEPS_PREFIX:PATH="${LOCALBASE}"
OPTIONS_DEFINE= NLS PYNVIM
OPTIONS_DEFINE= LUAJIT NLS PYNVIM
OPTIONS_DEFAULT=LUAJIT
OPTIONS_EXCLUDE_aarch64=LUAJIT
OPTIONS_EXCLUDE_mips64= LUAJIT
OPTIONS_EXCLUDE_powerpc64= LUAJIT
OPTIONS_EXCLUDE_riscv= LUAJIT
OPTIONS_EXCLUDE_sparc64=LUAJIT
OPTIONS_SUB= yes
LUAJIT_DESC= Use LuaJIT for faster Lua code
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit
LUAJIT_USES= lua:build
LUAJIT_CMAKE_OFF= -DPREFER_LUA:BOOL="ON"
LUAJIT_USES_OFF= lua:52
NLS_CMAKE_BOOL= ENABLE_LIBINTL
NLS_USES= gettext
PYNVIM_DESC= Enable support for plugins written in python