1
0
Fork 0
Browse Source

editors/vim, devel/luv: Use luajit-openresty as the Lua backend

After a failed attempt a few months ago, re-enable luajit-openresty
as the default luv backend, and the only neovim backend.

I suspect that it's safe to switch luv unconditionally as well, but I'm
taking a more conservative route at this time and just switching amd64
and i386 to it.

NeoVim is designed specifically for luajit. While it runs on PUC lua,
PUC is not used by upstream and no attempts are made to build for it.

However, luajit is largely a stalled project and is unlikely to ever
see new releases. The OpenResty fork, however, is actively-developed.
It is also the standard neovim lua backend on macOS Homebrew and most
Linux distributions.
main
Adam Weinberger 7 months ago
parent
commit
390b480773
  1. 6
      devel/luv/Makefile
  2. 26
      editors/neovim/Makefile

6
devel/luv/Makefile

@ -1,6 +1,6 @@
PORTNAME= luv
DISTVERSION= 1.41.0-0
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= devel
MAINTAINER= checo1705@secmail.pro
@ -30,8 +30,8 @@ OPTIONS_DEFAULT_powerpc64le= LUAJIT
LUAJIT_DESC= Use LuaJIT (instead of just Lua; recommended)
LUAJIT_LIB_DEPENDS= ${LUAJIT_LIB_DEPENDS_${ARCH}}
LUAJIT_LIB_DEPENDS_aarch64= libluajit-5.1.so:lang/luajit-openresty
LUAJIT_LIB_DEPENDS_amd64= libluajit-5.1.so:lang/luajit
LUAJIT_LIB_DEPENDS_i386= libluajit-5.1.so:lang/luajit
LUAJIT_LIB_DEPENDS_amd64= libluajit-5.1.so:lang/luajit-openresty
LUAJIT_LIB_DEPENDS_i386= libluajit-5.1.so:lang/luajit-openresty
LUAJIT_LIB_DEPENDS_powerpc= libluajit-5.1.so:lang/luajit
LUAJIT_LIB_DEPENDS_powerpc64= libluajit-5.1.so:lang/luajit-openresty
LUAJIT_LIB_DEPENDS_powerpc64le= libluajit-5.1.so:lang/luajit-openresty

26
editors/neovim/Makefile

@ -3,6 +3,7 @@
PORTNAME= neovim
DISTVERSIONPREFIX= v
DISTVERSION= 0.6.1
PORTREVISION= 1
CATEGORIES= editors
MAINTAINER= adamw@FreeBSD.org
@ -13,19 +14,16 @@ LICENSE= APACHE20
BUILD_DEPENDS= gperf:devel/gperf \
${LUA_MODLIBDIR}/bit.so:devel/lua-bitop@${LUA_FLAVOR} \
${LUA_MODLIBDIR}/lpeg.so:devel/lua-lpeg@${LUA_FLAVOR}
LIB_DEPENDS= libluv.so:devel/luv \
LIB_DEPENDS= libluajit-5.1.so:lang/luajit-openresty \
libluv.so:devel/luv \
libmsgpackc.so:devel/msgpack \
libtermkey.so:devel/libtermkey \
libtree-sitter.so:devel/tree-sitter \
libunibilium.so:devel/unibilium \
libuv.so:devel/libuv \
libvterm.so:devel/libvterm
TEST_DEPENDS= autoconf>=0:devel/autoconf \
aclocal:devel/automake \
gmake:devel/gmake \
libtool:devel/libtool
USES= cmake cpe iconv pathfix pkgconfig
USES= cmake cpe iconv lua:52,build pathfix pkgconfig
USE_GITHUB= yes
GH_TUPLE= libmpack:libmpack:1.0.5:libmpack \
libmpack:libmpack-lua:1.0.7:libmpack_lua
@ -38,21 +36,11 @@ CMAKE_ARGS= -DLUA_PRG:FILEPATH="${LUA_CMD}" \
DATADIR= ${PREFIX}/share/nvim
PORTDATA= runtime
OPTIONS_DEFINE= LUAJIT NLS PYNVIM
OPTIONS_DEFAULT=LUAJIT
OPTIONS_EXCLUDE_aarch64= LUAJIT
OPTIONS_EXCLUDE_mips64= LUAJIT
OPTIONS_EXCLUDE_riscv64= LUAJIT
OPTIONS_EXCLUDE_sparc64= LUAJIT
OPTIONS_DEFINE= NLS PYNVIM
OPTIONS_SUB= yes
LUAJIT_DESC= Use LuaJIT for faster Lua code (recommended)
PYNVIM_DESC= Enable support for plugins written in python
LUAJIT_CMAKE_OFF= -DPREFER_LUA:BOOL="ON"
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit
LUAJIT_USES= lua:52,build
LUAJIT_USES_OFF= lua:52
NLS_CMAKE_BOOL= ENABLE_LIBINTL
NLS_USES= gettext
PYNVIM_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pynvim>=0.3.0:editors/py-pynvim@${PY_FLAVOR}
@ -60,10 +48,6 @@ PYNVIM_USES= python:run
.include <bsd.port.options.mk>
.if ${ARCH:Mpowerpc64*}
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit-openresty
.endif
.if ${ARCH} == powerpc64
USES+= compiler:gcc-c++11-lib
.endif

Loading…
Cancel
Save