git: 390b480773f0 - main - editors/vim, devel/luv: Use luajit-openresty as the Lua backend

From: Adam Weinberger <adamw_at_FreeBSD.org>
Date: Sat, 29 Jan 2022 12:39:51 UTC
The branch main has been updated by adamw:

URL: https://cgit.FreeBSD.org/ports/commit/?id=390b480773f0bdf76f9695776a061a5a89818a0b

commit 390b480773f0bdf76f9695776a061a5a89818a0b
Author:     Adam Weinberger <adamw@FreeBSD.org>
AuthorDate: 2022-01-29 12:33:56 +0000
Commit:     Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2022-01-29 12:39:24 +0000

    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.
---
 devel/luv/Makefile      |  6 +++---
 editors/neovim/Makefile | 26 +++++---------------------
 2 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/devel/luv/Makefile b/devel/luv/Makefile
index cba39bbd4659..b3d932b7c892 100644
--- a/devel/luv/Makefile
+++ b/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
diff --git a/editors/neovim/Makefile b/editors/neovim/Makefile
index c90474274515..d76e26b504f8 100644
--- a/editors/neovim/Makefile
+++ b/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