On Thu, Nov 14, 2019 at 11:54:30AM -0800, Travis Cole wrote:
> Oops, sorry found a couple of things I didn't like in my neovim diff.

Doh! We've raced.

Here is my review of the old diff. You probably want to merge my changes
with yours.

On Thu, Nov 14, 2019 at 11:54:30AM -0800, Travis Cole wrote:
> +pre-configure:
> +     @mkdir -p ${WRKBUILD}/build
> +     @(cd ${WRKBUILD}/build && \
> +             cmake -DWITH_LUA_ENGINE=Lua \
> +             -DLUA_LIBRARIES=${MODLUA_LIB} \
> +             -DLUA_INCLUDE_DIR=${MODLUA_INCL_DIR} -DBUILD_MODULE=OFF \
> +             -DLUA_BUILD_TYPE=System -DCMAKE_COLOR_MAKEFILE=OFF \
> +             -DCMAKE_INSTALL_PREFIX=${WRKBUILD}/deps ${WRKDIR}/${LUV} && \
> +             ${MAKE_PROGRAM} install)

At the very least, this part of the build needs to honour CC, CXX,
CFLAGS and CXXFLAGS.

At the moment it doesn't. You can verify this by adding something like:
CFLAGS +=       -DXXX

to the port Makefile, and adding `env VERBOSE=1` where you run make.

This will print the compiler invocations, and you will see that the
output doesn't contain our (otherwise conspicuous) -DXXX flag.

If we look in ports/devel/cmake/cmake.port.mk, we see the cmake
invocation is as follows:

---8<---
MODCMAKE_configure= cd ${WRKBUILD} && ${SETENV} \
        CC="${CC}" CFLAGS="${CFLAGS}" \
        CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
        ${CONFIGURE_ENV} ${LOCALBASE}/bin/cmake \
        -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON \
        -G ${_MODCMAKE_GEN} ${CONFIGURE_ARGS} ${WRKSRC}
--->8---

Ideally, we'd just invoke ${MODCMAKE_configure} having set any extra configure
flags needed for luv, but we can't do that without also adding flags to the
main build, so I *think* we probably want to copy as much of the above cmake
invocation as possible, and put a comment saying that this fragment needs to be
kept close to cmake.port.mk.

Ideally we'd also use `-G ${_MODCMAKE_GEN}` and
${MODCMAKE_INSTALL_TARGET} to invoke either make or ninja automatically,
but it makes assumptions about the build dir, so we can't.

I wouldn't bother prefixing commands in make targets with @ myself.

I've posted below an updated diff, but are you sure it isn't easier to invoke
the neovim deps builder, just having downloaded the luv distfile on its behalf?

(edit: remember the diff is based on your older diff)

I fell we are close to having this working.


diff --git Makefile Makefile
index e9b174a..c717c94 100644
--- Makefile
+++ Makefile
@@ -4,7 +4,7 @@ COMMENT =       continuation and extension of Vim
 
 GH_ACCOUNT =   neovim
 GH_PROJECT =   neovim
-GH_TAGNAME =   v0.3.8
+GH_TAGNAME =   v0.4.2
 
 CATEGORIES =   editors devel
 HOMEPAGE =     https://neovim.io
@@ -30,18 +30,29 @@ BUILD_DEPENDS =             ${RUN_DEPENDS} \
 LIB_DEPENDS =          devel/gettext,-runtime \
                        devel/libtermkey \
                        devel/libuv \
-                       devel/libvterm \
+                       devel/libvterm>=1.0 \
                        devel/msgpack \
-                       devel/unibilium
+                       devel/unibilium>=1.0
 
 RUN_DEPENDS +=         devel/libmpack/lua \
                        devel/libmpack/main \
                        devel/desktop-file-utils
 
-MAKE_FLAGS +=          USE_BUNDLED_DEPS=OFF
+MAKE_FLAGS +=          USE_BUNDLED=OFF
 CONFIGURE_ARGS +=      -DLUA_PRG=${MODLUA_BIN} \
                        -DLUA_INCLUDE_DIR=${MODLUA_INCL_DIR} \
                        -DLUA_LIBRARIES=${MODLUA_LIB} \
+                       -DUSE_BUNDLED_GPERF=Off \
+                       -DUSE_BUNDLED_UNIBILIUM=Off \
+                       -DUSE_BUNDLED_LIBTERMKEY=Off \
+                       -DUSE_BUNDLED_LIBVTERM=Off \
+                       -DUSE_BUNDLED_LIBUV=Off \
+                       -DUSE_BUNDLED_MSGPACK=Off \
+                       -DUSE_BUNDLED_LUAJIT=Off \
+                       -DUSE_BUNDLED_LUAROCKS=Off \
+                       -DUSE_BUNDLED_LUV=On \
+                       -DLIBLUV_INCLUDE_DIR=${WRKBUILD}/.deps/usr/include \
+                       -DLIBLUV_LIBRARY=${WRKBUILD}/.deps/usr/lib/libluv.a \
                        -DPREFER_LUA=ON # disables LuaJIT
 
 # Tests need gmake
@@ -51,6 +62,15 @@ TEST_DEPENDS =       shells/bash \
                editors/py-neovim \
                editors/py-neovim,python3
 
+# Build third-party dependencies first for libluv. 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 use the bundled library.
+pre-configure:
+       mkdir -p ${WRKBUILD}/.deps
+       cd ${WRKBUILD}/.deps && cmake ${CONFIGURE_ARGS} ${WRKSRC}/third-party 
&& \
+               ${MAKE_PROGRAM}
+
 # 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.
 #
diff --git distinfo distinfo
index 890fd75..d0dd0a3 100644
--- distinfo
+++ distinfo
@@ -1,2 +1,2 @@
-SHA256 (neovim-0.3.8.tar.gz) = lT4TRWjYJNrXy/Mu4xFJUXMvmnUMRi5DDmtZP0GK92w=
-SIZE (neovim-0.3.8.tar.gz) = 9233661
+SHA256 (neovim-0.4.2.tar.gz) = n4dNPSp08zuTHbYq3r4o+NLsEWJw0eE5mLWKczSLblY=
+SIZE (neovim-0.4.2.tar.gz) = 9552134
diff --git patches/patch-src_nvim_os_process_c 
patches/patch-src_nvim_os_process_c
deleted file mode 100644
index a2e2b6f..0000000
--- patches/patch-src_nvim_os_process_c
+++ /dev/null
@@ -1,40 +0,0 @@
-$OpenBSD: patch-src_nvim_os_process_c,v 1.1 2019/03/17 13:13:40 edd Exp $
-
-Port job stopping bug fix to neovim:
-
-Original vim fix:
-https://github.com/vim/vim/commit/76ab4fd61901090e6af3451ca6c5ca0fc370571f#diff-b68adb4fa34020d8d7f0ab40a2704335
-
-Index: src/nvim/os/process.c
---- src/nvim/os/process.c.orig
-+++ src/nvim/os/process.c
-@@ -89,21 +89,16 @@ bool os_proc_tree_kill(int pid, int sig)
- bool os_proc_tree_kill(int pid, int sig)
- {
-   assert(sig == SIGTERM || sig == SIGKILL);
--  int pgid = getpgid(pid);
--  if (pgid > 0) {  // Ignore error. Never kill self (pid=0).
--    if (pgid == pid) {
--      ILOG("sending %s to process group: -%d",
--           sig == SIGTERM ? "SIGTERM" : "SIGKILL", pgid);
--      int rv = uv_kill(-pgid, sig);
--      return rv == 0;
--    } else {
--      // Should never happen, because process_spawn() did setsid() in the 
child.
--      ELOG("pgid %d != pid %d", pgid, pid);
--    }
-+  if (pid != 0) {  // Never kill self (pid=0).
-+    ILOG("sending %s to PIDs %d and %d",
-+      sig == SIGTERM ? "SIGTERM" : "SIGKILL", -pid, pid);
-+
-+    int rv1 = uv_kill(-pid, sig);
-+    int rv2 = uv_kill(pid, sig);
-+    return (rv1 == 0) && (rv2 == 0);
-   } else {
--    ELOG("getpgid(%d) returned %d", pid, pgid);
-+    return false;
-   }
--  return false;
- }
- #endif
- 
diff --git pkg/PLIST pkg/PLIST
index 38ff796..65288f9 100644
--- pkg/PLIST
+++ pkg/PLIST
@@ -220,7 +220,6 @@ share/nvim/runtime/doc/diff.txt
 share/nvim/runtime/doc/digraph.txt
 share/nvim/runtime/doc/editing.txt
 share/nvim/runtime/doc/eval.txt
-share/nvim/runtime/doc/farsi.txt
 share/nvim/runtime/doc/filetype.txt
 share/nvim/runtime/doc/fold.txt
 share/nvim/runtime/doc/ft_ada.txt
@@ -253,7 +252,6 @@ share/nvim/runtime/doc/options.txt
 share/nvim/runtime/doc/pattern.txt
 share/nvim/runtime/doc/pi_gzip.txt
 share/nvim/runtime/doc/pi_health.txt
-share/nvim/runtime/doc/pi_matchit.txt
 share/nvim/runtime/doc/pi_msgpack.txt
 share/nvim/runtime/doc/pi_netrw.txt
 share/nvim/runtime/doc/pi_paren.txt
@@ -325,6 +323,7 @@ share/nvim/runtime/filetype.vim
 share/nvim/runtime/ftoff.vim
 share/nvim/runtime/ftplugin/
 share/nvim/runtime/ftplugin.vim
+share/nvim/runtime/ftplugin/8th.vim
 share/nvim/runtime/ftplugin/a2ps.vim
 share/nvim/runtime/ftplugin/aap.vim
 share/nvim/runtime/ftplugin/abap.vim
@@ -337,6 +336,7 @@ share/nvim/runtime/ftplugin/art.vim
 share/nvim/runtime/ftplugin/aspvbs.vim
 share/nvim/runtime/ftplugin/automake.vim
 share/nvim/runtime/ftplugin/awk.vim
+share/nvim/runtime/ftplugin/bash.vim
 share/nvim/runtime/ftplugin/bdf.vim
 share/nvim/runtime/ftplugin/bst.vim
 share/nvim/runtime/ftplugin/btm.vim
@@ -344,6 +344,7 @@ share/nvim/runtime/ftplugin/bzl.vim
 share/nvim/runtime/ftplugin/c.vim
 share/nvim/runtime/ftplugin/calendar.vim
 share/nvim/runtime/ftplugin/cdrdaoconf.vim
+share/nvim/runtime/ftplugin/cfg.vim
 share/nvim/runtime/ftplugin/ch.vim
 share/nvim/runtime/ftplugin/changelog.vim
 share/nvim/runtime/ftplugin/chicken.vim
@@ -374,6 +375,7 @@ share/nvim/runtime/ftplugin/dosbatch.vim
 share/nvim/runtime/ftplugin/dosini.vim
 share/nvim/runtime/ftplugin/dtd.vim
 share/nvim/runtime/ftplugin/dtrace.vim
+share/nvim/runtime/ftplugin/dune.vim
 share/nvim/runtime/ftplugin/eiffel.vim
 share/nvim/runtime/ftplugin/elinks.vim
 share/nvim/runtime/ftplugin/erlang.vim
@@ -413,6 +415,7 @@ share/nvim/runtime/ftplugin/ishd.vim
 share/nvim/runtime/ftplugin/j.vim
 share/nvim/runtime/ftplugin/java.vim
 share/nvim/runtime/ftplugin/javascript.vim
+share/nvim/runtime/ftplugin/javascriptreact.vim
 share/nvim/runtime/ftplugin/jproperties.vim
 share/nvim/runtime/ftplugin/json.vim
 share/nvim/runtime/ftplugin/jsp.vim
@@ -442,6 +445,7 @@ share/nvim/runtime/ftplugin/manconf.vim
 share/nvim/runtime/ftplugin/markdown.vim
 share/nvim/runtime/ftplugin/matlab.vim
 share/nvim/runtime/ftplugin/mf.vim
+share/nvim/runtime/ftplugin/mma.vim
 share/nvim/runtime/ftplugin/modconf.vim
 share/nvim/runtime/ftplugin/mp.vim
 share/nvim/runtime/ftplugin/mplayerconf.vim
@@ -451,6 +455,7 @@ share/nvim/runtime/ftplugin/muttrc.vim
 share/nvim/runtime/ftplugin/nanorc.vim
 share/nvim/runtime/ftplugin/neomuttrc.vim
 share/nvim/runtime/ftplugin/netrc.vim
+share/nvim/runtime/ftplugin/nroff.vim
 share/nvim/runtime/ftplugin/nsis.vim
 share/nvim/runtime/ftplugin/objc.vim
 share/nvim/runtime/ftplugin/ocaml.vim
@@ -595,6 +600,7 @@ share/nvim/runtime/indent/ishd.vim
 share/nvim/runtime/indent/j.vim
 share/nvim/runtime/indent/java.vim
 share/nvim/runtime/indent/javascript.vim
+share/nvim/runtime/indent/javascriptreact.vim
 share/nvim/runtime/indent/json.vim
 share/nvim/runtime/indent/jsp.vim
 share/nvim/runtime/indent/ld.vim
@@ -624,6 +630,7 @@ share/nvim/runtime/indent/prolog.vim
 share/nvim/runtime/indent/pyrex.vim
 share/nvim/runtime/indent/python.vim
 share/nvim/runtime/indent/r.vim
+share/nvim/runtime/indent/raml.vim
 share/nvim/runtime/indent/readline.vim
 share/nvim/runtime/indent/rhelp.vim
 share/nvim/runtime/indent/rmd.vim
@@ -652,6 +659,7 @@ share/nvim/runtime/indent/tex.vim
 share/nvim/runtime/indent/tf.vim
 share/nvim/runtime/indent/tilde.vim
 share/nvim/runtime/indent/treetop.vim
+share/nvim/runtime/indent/typescript.vim
 share/nvim/runtime/indent/vb.vim
 share/nvim/runtime/indent/verilog.vim
 share/nvim/runtime/indent/vhdl.vim
@@ -747,6 +755,8 @@ share/nvim/runtime/lua/
 share/nvim/runtime/lua/man.lua
 share/nvim/runtime/lua/vim/
 share/nvim/runtime/lua/vim/compat.lua
+share/nvim/runtime/lua/vim/inspect.lua
+share/nvim/runtime/lua/vim/shared.lua
 share/nvim/runtime/macmap.vim
 share/nvim/runtime/macros/
 share/nvim/runtime/macros/editexisting.vim
@@ -770,6 +780,14 @@ share/nvim/runtime/pack/dist/opt/cfilter/plugin/cfilter.vim
 share/nvim/runtime/pack/dist/opt/justify/
 share/nvim/runtime/pack/dist/opt/justify/plugin/
 share/nvim/runtime/pack/dist/opt/justify/plugin/justify.vim
+share/nvim/runtime/pack/dist/opt/matchit/
+share/nvim/runtime/pack/dist/opt/matchit/autoload/
+share/nvim/runtime/pack/dist/opt/matchit/autoload/matchit.vim
+share/nvim/runtime/pack/dist/opt/matchit/doc/
+share/nvim/runtime/pack/dist/opt/matchit/doc/matchit.txt
+share/nvim/runtime/pack/dist/opt/matchit/doc/tags
+share/nvim/runtime/pack/dist/opt/matchit/plugin/
+share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim
 share/nvim/runtime/pack/dist/opt/shellmenu/
 share/nvim/runtime/pack/dist/opt/shellmenu/plugin/
 share/nvim/runtime/pack/dist/opt/shellmenu/plugin/shellmenu.vim
@@ -840,6 +858,7 @@ share/nvim/runtime/spell/en.utf-8.spl
 share/nvim/runtime/synmenu.vim
 share/nvim/runtime/syntax/
 share/nvim/runtime/syntax/2html.vim
+share/nvim/runtime/syntax/8th.vim
 share/nvim/runtime/syntax/a2ps.vim
 share/nvim/runtime/syntax/a65.vim
 share/nvim/runtime/syntax/aap.vim
@@ -980,6 +999,7 @@ share/nvim/runtime/syntax/dtd.vim
 share/nvim/runtime/syntax/dtml.vim
 share/nvim/runtime/syntax/dtrace.vim
 share/nvim/runtime/syntax/dts.vim
+share/nvim/runtime/syntax/dune.vim
 share/nvim/runtime/syntax/dylan.vim
 share/nvim/runtime/syntax/dylanintr.vim
 share/nvim/runtime/syntax/dylanlid.vim
@@ -1055,6 +1075,7 @@ share/nvim/runtime/syntax/hex.vim
 share/nvim/runtime/syntax/hgcommit.vim
 share/nvim/runtime/syntax/hitest.vim
 share/nvim/runtime/syntax/hog.vim
+share/nvim/runtime/syntax/hollywood.vim
 share/nvim/runtime/syntax/hostconf.vim
 share/nvim/runtime/syntax/hostsaccess.vim
 share/nvim/runtime/syntax/html.vim
@@ -1084,6 +1105,7 @@ share/nvim/runtime/syntax/jargon.vim
 share/nvim/runtime/syntax/java.vim
 share/nvim/runtime/syntax/javacc.vim
 share/nvim/runtime/syntax/javascript.vim
+share/nvim/runtime/syntax/javascriptreact.vim
 share/nvim/runtime/syntax/jess.vim
 share/nvim/runtime/syntax/jgraph.vim
 share/nvim/runtime/syntax/jovial.vim
@@ -1240,6 +1262,7 @@ share/nvim/runtime/syntax/quake.vim
 share/nvim/runtime/syntax/r.vim
 share/nvim/runtime/syntax/racc.vim
 share/nvim/runtime/syntax/radiance.vim
+share/nvim/runtime/syntax/raml.vim
 share/nvim/runtime/syntax/ratpoison.vim
 share/nvim/runtime/syntax/rc.vim
 share/nvim/runtime/syntax/rcs.vim
@@ -1358,6 +1381,7 @@ share/nvim/runtime/syntax/taskedit.vim
 share/nvim/runtime/syntax/tasm.vim
 share/nvim/runtime/syntax/tcl.vim
 share/nvim/runtime/syntax/tcsh.vim
+share/nvim/runtime/syntax/template.vim
 share/nvim/runtime/syntax/teraterm.vim
 share/nvim/runtime/syntax/terminfo.vim
 share/nvim/runtime/syntax/tex.vim
@@ -1380,6 +1404,7 @@ share/nvim/runtime/syntax/tt2.vim
 share/nvim/runtime/syntax/tt2html.vim
 share/nvim/runtime/syntax/tt2js.vim
 share/nvim/runtime/syntax/tutor.vim
+share/nvim/runtime/syntax/typescript.vim
 share/nvim/runtime/syntax/uc.vim
 share/nvim/runtime/syntax/udevconf.vim
 share/nvim/runtime/syntax/udevperm.vim
@@ -1411,6 +1436,7 @@ share/nvim/runtime/syntax/voscm.vim
 share/nvim/runtime/syntax/vrml.vim
 share/nvim/runtime/syntax/vroom.vim
 share/nvim/runtime/syntax/vsejcl.vim
+share/nvim/runtime/syntax/vue.vim
 share/nvim/runtime/syntax/wast.vim
 share/nvim/runtime/syntax/wdiff.vim
 share/nvim/runtime/syntax/web.vim

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk

Reply via email to