SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
200
editors/neovim/Makefile
Normal file
200
editors/neovim/Makefile
Normal file
|
@ -0,0 +1,200 @@
|
|||
# Use LuaJIT where possible, as some plugins assume it's available. Arches
|
||||
# that can't use LuaJIT have to use the system Lua (and some plugins may not
|
||||
# work).
|
||||
.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "aarch64" || \
|
||||
${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
|
||||
${MACHINE_ARCH} == "powerpc"
|
||||
EMBED_LUAJIT = Yes
|
||||
.else
|
||||
EMBED_LUAJIT = No
|
||||
.endif
|
||||
|
||||
COMMENT = continuation and extension of Vim
|
||||
|
||||
GH_ACCOUNT = neovim
|
||||
GH_PROJECT = neovim
|
||||
GH_TAGNAME = v0.9.1
|
||||
REVISION = 0
|
||||
|
||||
# embedded luajit
|
||||
USE_NOBTCFI = Yes
|
||||
|
||||
CATEGORIES = editors devel
|
||||
HOMEPAGE = https://neovim.io
|
||||
MAINTAINER = Edd Barrett <edd@openbsd.org>
|
||||
|
||||
# The versions listed here must match those in cmake.deps/CMakeLists.txt.
|
||||
LUV_VER = 093a977b82077591baefe1e880d37dfa2730bd54
|
||||
LUAJIT_VER = 505e2c03de35e2718eef0d2d3660712e06dadf1f
|
||||
LUACOMPAT_VER = v0.9
|
||||
|
||||
MASTER_SITES0 = https://github.com/luvit/luv/archive/
|
||||
MASTER_SITES1 = https://github.com/LuaJIT/LuaJIT/archive/
|
||||
MASTER_SITES2 = https://github.com/keplerproject/lua-compat-5.3/archive/
|
||||
DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \
|
||||
luv-{}${LUV_VER}${EXTRACT_SUFX}:0 \
|
||||
luajit-{}${LUAJIT_VER}${EXTRACT_SUFX}:1 \
|
||||
lua-compat-5.3-{}${LUACOMPAT_VER}${EXTRACT_SUFX}:2
|
||||
|
||||
# Neovim: Apache 2.0 + Vim License
|
||||
# LuaJIT: MIT + public domain
|
||||
# libluv: Apache 2.0
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
DEBUG_PACKAGES = ${BUILD_PACKAGES}
|
||||
|
||||
WANTLIB += c iconv intl m msgpackc pthread termkey
|
||||
WANTLIB += tree-sitter unibilium util uv vterm
|
||||
|
||||
.if ${EMBED_LUAJIT} != "Yes"
|
||||
WANTLIB += ${MODLUA_WANTLIB}
|
||||
.endif
|
||||
|
||||
COMPILER = base-clang ports-gcc
|
||||
|
||||
MODULES = devel/cmake \
|
||||
lang/lua \
|
||||
textproc/intltool
|
||||
|
||||
# LuaJIT is binary compatible with Lua-5.1 extension modules, so we can use
|
||||
# them directly, even on architectures where we will be embedding LuaJIT.
|
||||
# https://luajit.org/extensions.html
|
||||
MODLUA_VERSION = 5.1
|
||||
|
||||
BUILD_DEPENDS = ${RUN_DEPENDS} \
|
||||
devel/gperf \
|
||||
devel/lpeg \
|
||||
devel/lua-bitop
|
||||
|
||||
LIB_DEPENDS = devel/gettext,-runtime \
|
||||
devel/libtermkey \
|
||||
devel/libuv \
|
||||
devel/libvterm \
|
||||
devel/msgpack \
|
||||
devel/unibilium \
|
||||
textproc/tree-sitter>=0.20.8
|
||||
|
||||
RUN_DEPENDS += devel/libmpack/lua \
|
||||
devel/libmpack/main \
|
||||
devel/desktop-file-utils \
|
||||
devel/lua-compat53 \
|
||||
x11/gtk+4,-guic
|
||||
|
||||
SEPARATE_BUILD = Yes
|
||||
CONFIGURE_ARGS += -DUSE_BUNDLED=OFF \
|
||||
-DLIBLUV_INCLUDE_DIR=${STATIC_DEPS_INST}/include \
|
||||
-DLIBLUV_LIBRARY=${STATIC_DEPS_INST}/lib/libluv.a
|
||||
.if ${EMBED_LUAJIT} == "Yes"
|
||||
CONFIGURE_ARGS += -DLUA_PRG=${STATIC_DEPS_INST}/bin/luajit-2.1.0-beta3 \
|
||||
-DLUAJIT_INCLUDE_DIR=${STATIC_DEPS_INST}/include/luajit-2.1 \
|
||||
-DLUAJIT_LIBRARY=${STATIC_DEPS_INST}/lib/libluajit-5.1.a
|
||||
.else
|
||||
CONFIGURE_ARGS += -DPREFER_LUA=ON \
|
||||
-DLUA_PRG=${MODLUA_BIN} \
|
||||
-DLUA_INCLUDE_DIR=${MODLUA_INCL_DIR} \
|
||||
-DLUA_LIBRARIES=${MODLUA_LIB}
|
||||
.endif
|
||||
MAKE_ENV = CCACHE_DISABLE=true
|
||||
|
||||
# Tests need gmake
|
||||
USE_GMAKE = Yes
|
||||
# `test_startup_utf8.vim' requires either bash or zsh
|
||||
MODULES += lang/python
|
||||
MODPY_RUNDEP = No
|
||||
MODPY_BUILDDEP =No
|
||||
TEST_DEPENDS = shells/bash \
|
||||
editors/py-neovim \
|
||||
editors/py-neovim${MODPY_FLAVOR}
|
||||
|
||||
# Move static deps source code under WRKDIST so that they can be patched.
|
||||
STATIC_DEPS_WRKSRC=${WRKDIST}/static-deps/
|
||||
post-extract:
|
||||
mkdir ${STATIC_DEPS_WRKSRC}
|
||||
mv ${WRKDIR}/LuaJIT-${LUAJIT_VER} ${STATIC_DEPS_WRKSRC}/luajit
|
||||
mv ${WRKDIR}/luv-${LUV_VER} ${STATIC_DEPS_WRKSRC}/luv
|
||||
mv ${WRKDIR}/lua-compat-5.3-${LUACOMPAT_VER:C/^v//} \
|
||||
${STATIC_DEPS_WRKSRC}/lua-compat-5.3
|
||||
|
||||
# Build LuaJIT (if required) and libluv as static libraries.
|
||||
#
|
||||
# We opted not to create a libluv port because it must be built for a specific
|
||||
# Lua version and we don't know what version future ports might need. Currently
|
||||
# no other port requires libluv, so it's simpler to build a static library
|
||||
# here.
|
||||
#
|
||||
# Most of the libluv target is lifted from ${MODCMAKE_configure} in
|
||||
# cmake.port.mk. Unfortunately we can't use it directly, as some of the
|
||||
# arguments make assumptions that can't work for us here.
|
||||
#
|
||||
# Neovim plugins expect a very specific version of LuaJIT, so it only really
|
||||
# makes sense to embed it.
|
||||
STATIC_DEPS_WRKBUILD=${WRKBUILD}/static-deps-build
|
||||
STATIC_DEPS_INST=${WRKBUILD}/static-deps-inst
|
||||
.include <bsd.port.arch.mk>
|
||||
.if ${PROPERTIES:Mclang}
|
||||
LUAJIT_TARGET_LIBS = "-lc++abi -lpthread"
|
||||
WANTLIB += c++abi pthread
|
||||
.endif
|
||||
pre-configure:
|
||||
mkdir -p ${STATIC_DEPS_WRKBUILD} ${STATIC_DEPS_PREFIX}
|
||||
|
||||
.if ${EMBED_LUAJIT} == "Yes"
|
||||
# Build LuaJIT.
|
||||
# We can't build LuaJIT out of its src dir, so copy it so that we can
|
||||
# support SEPARATE_BUILD.
|
||||
cp -r ${STATIC_DEPS_WRKSRC}/luajit ${STATIC_DEPS_WRKBUILD}/luajit
|
||||
cd ${STATIC_DEPS_WRKBUILD}/luajit/src && \
|
||||
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} \
|
||||
PREFIX=${STATIC_DEPS_INST} CC=${CC} CCOPT="${CFLAGS}" \
|
||||
CCOPT_x86="" Q="" TARGET_LIBS=${LUAJIT_TARGET_LIBS} \
|
||||
BUILDMODE=static
|
||||
cd ${STATIC_DEPS_WRKBUILD}/luajit && \
|
||||
${SETENV} ${MAKE_ENV} Q="" ${MAKE_PROGRAM} install \
|
||||
PREFIX=${STATIC_DEPS_INST}
|
||||
.endif
|
||||
|
||||
# Build libluv.
|
||||
mkdir -p ${STATIC_DEPS_WRKBUILD}/luv
|
||||
cd ${STATIC_DEPS_WRKBUILD}/luv && \
|
||||
${SETENV} CC="${CC}" \
|
||||
CXX="${CXX}" \
|
||||
CFLAGS="${CFLAGS}" \
|
||||
CXXFLAGS="${CXXFLAGS}" \
|
||||
${CONFIGURE_ENV} \
|
||||
${LOCALBASE}/bin/cmake \
|
||||
-DBUILD_MODULE=OFF \
|
||||
-DBUILD_STATIC_LIBS=ON \
|
||||
-DCMAKE_COLOR_MAKEFILE=OFF \
|
||||
-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON \
|
||||
-DCMAKE_SUPPRESS_REGENERATION=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${STATIC_DEPS_INST} \
|
||||
-DLUA_BUILD_TYPE=System \
|
||||
-DLUA_INCLUDE_DIR=${MODLUA_INCL_DIR} \
|
||||
-DLUA_LIBRARIES=${MODLUA_LIBDIR} \
|
||||
-DWITH_SHARED_LIBUV=ON \
|
||||
-DLUA_COMPAT53_DIR=${STATIC_DEPS_WRKSRC}/lua-compat-5.3 \
|
||||
-DWITH_LUA_ENGINE=Lua \
|
||||
${STATIC_DEPS_WRKSRC}/luv
|
||||
cd ${STATIC_DEPS_WRKBUILD}/luv && \
|
||||
${SETENV} ${MAKE_ENV} VERBOSE=1 \
|
||||
${MAKE_PROGRAM}
|
||||
cd ${STATIC_DEPS_WRKBUILD}/luv && \
|
||||
${SETENV} ${MAKE_ENV} VERBOSE=1 \
|
||||
${MAKE_PROGRAM} install
|
||||
|
||||
# These are the "old tests". There is also a new suite, but we would need the
|
||||
# "busted" test suite for Lua, which is not yet ported.
|
||||
#
|
||||
# Test_language_cmd fails due to:
|
||||
# https://github.com/neovim/neovim/issues/19331
|
||||
#
|
||||
# If cscope is installed, one test fails:
|
||||
# https://github.com/neovim/neovim/issues/12744
|
||||
#
|
||||
do-test:
|
||||
true
|
||||
${SETENV} LC_CTYPE=en_US.UTF-8 \
|
||||
${MAKE_PROGRAM} -C ${WRKSRC}/test/old/testdir \
|
||||
HOME=${WRKBUILD} NVIM_PRG=${WRKBUILD}/bin/nvim ${MAKE_FLAGS}
|
||||
|
||||
.include <bsd.port.mk>
|
8
editors/neovim/distinfo
Normal file
8
editors/neovim/distinfo
Normal file
|
@ -0,0 +1,8 @@
|
|||
SHA256 (lua-compat-5.3-v0.9.tar.gz) = rQVUDS2WpIclu3mh3vNc9mUqTi7CY3biYXyM4rqm9BY=
|
||||
SHA256 (luajit-505e2c03de35e2718eef0d2d3660712e06dadf1f.tar.gz) = Z8iDmbkBoi6aI29Ld+b+Oa8A9rcUTOndb1EUHZIfEHY=
|
||||
SHA256 (luv-093a977b82077591baefe1e880d37dfa2730bd54.tar.gz) = Iis4tkJfCSYhjhTn2oFIH93m+WYMH+rCWlPm+1LohuY=
|
||||
SHA256 (neovim-0.9.1.tar.gz) = jbF8Kh9HdtzaAOWUieoNmLqC99Go6gMoHWQOWNijoA4=
|
||||
SIZE (lua-compat-5.3-v0.9.tar.gz) = 53599
|
||||
SIZE (luajit-505e2c03de35e2718eef0d2d3660712e06dadf1f.tar.gz) = 1075264
|
||||
SIZE (luv-093a977b82077591baefe1e880d37dfa2730bd54.tar.gz) = 127241
|
||||
SIZE (neovim-0.9.1.tar.gz) = 11567358
|
|
@ -0,0 +1,14 @@
|
|||
.gnu_attribute requires binutils 2.18
|
||||
|
||||
Index: static-deps/luajit/src/host/buildvm_asm.c
|
||||
--- static-deps/luajit/src/host/buildvm_asm.c.orig
|
||||
+++ static-deps/luajit/src/host/buildvm_asm.c
|
||||
@@ -327,7 +327,7 @@ void emit_asm(BuildCtx *ctx)
|
||||
#if !(LJ_TARGET_PS3 || LJ_TARGET_PSVITA)
|
||||
fprintf(ctx->fp, "\t.section .note.GNU-stack,\"\"," ELFASM_PX "progbits\n");
|
||||
#endif
|
||||
-#if LJ_TARGET_PPC && !LJ_TARGET_PS3 && !LJ_ABI_SOFTFP
|
||||
+#if 0 || LJ_TARGET_PPC && !LJ_TARGET_PS3 && !LJ_ABI_SOFTFP
|
||||
/* Hard-float ABI. */
|
||||
fprintf(ctx->fp, "\t.gnu_attribute 4, 1\n");
|
||||
#endif
|
|
@ -0,0 +1,16 @@
|
|||
Our base-clang poses as gcc-4.2.1, but building with clang on powerpc
|
||||
"requires" gcc>=4.3, unlike other archs requiring lower versions. Instead,
|
||||
ignore the gcc version check ifdef hell for all base-clang arches.
|
||||
|
||||
Index: static-deps/luajit/src/lj_arch.h
|
||||
--- static-deps/luajit/src/lj_arch.h.orig
|
||||
+++ static-deps/luajit/src/lj_arch.h
|
||||
@@ -432,7 +432,7 @@
|
||||
/* -- Checks for requirements --------------------------------------------- */
|
||||
|
||||
/* Check for minimum required compiler versions. */
|
||||
-#if defined(__GNUC__)
|
||||
+#if defined(__GNUC__) && !defined(__clang__)
|
||||
#if LJ_TARGET_X86
|
||||
#if (__GNUC__ < 3) || ((__GNUC__ == 3) && __GNUC_MINOR__ < 4)
|
||||
#error "Need at least GCC 3.4 or newer"
|
6
editors/neovim/pkg/DESCR
Normal file
6
editors/neovim/pkg/DESCR
Normal file
|
@ -0,0 +1,6 @@
|
|||
Neovim is a project that seeks to aggressively refactor Vim in order to:
|
||||
|
||||
* Simplify maintenance and encourage contributions.
|
||||
* Split the work between multiple developers.
|
||||
* Enable advanced external UIs without modifications to the core.
|
||||
* Improve extensibility with a new plugin architecture.
|
1803
editors/neovim/pkg/PLIST
Normal file
1803
editors/neovim/pkg/PLIST
Normal file
File diff suppressed because it is too large
Load diff
15
editors/neovim/pkg/README
Normal file
15
editors/neovim/pkg/README
Normal file
|
@ -0,0 +1,15 @@
|
|||
+-------------------------------------------------------------------------------
|
||||
| Running ${PKGSTEM} on OpenBSD
|
||||
+-------------------------------------------------------------------------------
|
||||
|
||||
LuaJIT Support
|
||||
==============
|
||||
|
||||
Some Neovim plugins now require LuaJIT. Those plugins won't work on
|
||||
architectures that have no LuaJIT support.
|
||||
|
||||
Why is the Escape Key Not Working Right?
|
||||
========================================
|
||||
|
||||
If you use Neovim under tmux, you are likely being bitten by a libtermkey bug.
|
||||
Read the libtermkey package README for a workaround.
|
Loading…
Add table
Add a link
Reference in a new issue