Hey Edd, Thanks for another review!
On Thu, Nov 7, 2019, at 04:13, Edd Barrett wrote: > Hi Travis, > > Thanks for the revised diffs. > > unibilium now looks fine. Great! that's progress. :) > libvterm: > > On Mon, Nov 04, 2019 at 08:40:19PM -0800, Travis Cole wrote: > > > SHARED_LIBS += vterm 1.0 # 0.0 > > > > I've bumped the version > > Cool. I suppose we should probably add a comment warning other porters > that they don't properly version their shared libs. > > Something like: > ---8<--- > # Note: Upstream doesn't bump the library version properly. > # Diff the headers and check for bump-worthy cnahges." > --->8--- I've included a new diff with the comment. > third-party/CMakelists seems to use Lua-5.1. > > Confused? I was too. But here's what I think the problem is. When building > luv: > ---8<--- > ... > -- Found LIBUV: /usr/local/lib/libuv.so.2.1 > -- Found Lua: /usr/local/lib/liblua5.3.so.5.3;/usr/lib/libm.so.10.1 (found > version "5.3.5") > --->8--- > > luv is picking up Lua-5.3. I guess you don't see the symbol errors as you only > have Lua-5.1 installed? You need to patch the build to pick up the > MODLUA_VERSION one. Hopefully that will fix it. Thanks for all the detective work. I'll give this a try. And yep, you're right, I only have Lua-5.1 installed. > I also notice: > ---8<--- > -- downloading... > src='https://github.com/keplerproject/lua-compat-5.3/archive/v0.7.tar.gz' > --->8--- > > We can't have the build download stuff. I think you can have a play with > MASTER_SITES1 and a DISTFILE with a :1 suffix to fetch that tarball, then use > a > post-fetch target to put it wherever it needs to go. I'm hand-waving a bit, > but > you get the gist of it. Grep the tree for examples. Thanks, I'll fix this too. > I'd fix the symbol problems first. > > > Isn't porting FUN! It is indeed! Thanks a lot for your patience and guidance on this. I likely won't have much time to dig into this again until mid-next week. But here is the updated libvterm diff. diff --git Makefile Makefile index 0063676..3e8d729 100644 --- Makefile +++ Makefile @@ -1,16 +1,21 @@ -# $OpenBSD: +# $OpenBSD$ COMMENT = VT220/xterm/ECMA-48 terminal emulator library # No releases, so use date and a git hash. # Note that the github repo is a mirror of a bzr repo. -VERSION = 20170211 +VERSION = 20191009 DISTNAME = libvterm-${VERSION} GH_ACCOUNT = neovim GH_PROJECT = libvterm -GH_COMMIT = 224b8dcde1c9640c29a34aa60c0f0d56ad298449 - -SHARED_LIBS += vterm 0.0 # 0.0 +# Note this git sha is from the nvim branch because +# Neovim requires patches from this branch to build. +# see https://github.com/neovim/neovim/wiki/Deps +GH_COMMIT = 7c72294d84ce20da4c27362dbd7fa4b08cfc91da + +# Note upstream doesn't bump the library version properly. +# Diff the headers and check for bump-worthy changes. +SHARED_LIBS += vterm 1.0 # 0.0 CATEGORIES = devel diff --git distinfo distinfo index 63c4d8e..4c90892 100644 --- distinfo +++ distinfo @@ -1,2 +1,2 @@ -SHA256 (libvterm-20170211-224b8dcd.tar.gz) = W8Dol01zXaTVrjOGrEEiylL+gPHFMveyO3nGPsXYzs0= -SIZE (libvterm-20170211-224b8dcd.tar.gz) = 67291 +SHA256 (libvterm-20191009-7c72294d.tar.gz) = 8wxNQ+DG2z4JEtr3GI2Y+/buiPl1idcvbzBOXbSIJqg= +SIZE (libvterm-20191009-7c72294d.tar.gz) = 73002 diff --git patches/patch-bin_vterm-ctrl_c patches/patch-bin_vterm-ctrl_c index 529b571..a3f5e1a 100644 --- patches/patch-bin_vterm-ctrl_c +++ patches/patch-bin_vterm-ctrl_c @@ -1,16 +1,42 @@ -$OpenBSD: patch-bin_vterm-ctrl_c,v 1.1.1.1 2017/02/28 22:40:11 edd Exp $ +$OpenBSD$ Fix signed versus unsigned comparison. https://bugs.launchpad.net/libvterm/+bug/1668780 ---- bin/vterm-ctrl.c.orig Sun Dec 18 21:03:40 2016 -+++ bin/vterm-ctrl.c Sat Feb 25 16:29:14 2017 -@@ -81,7 +81,7 @@ static char *read_csi() +Patch updated to apply on: +https://github.com/neovim/libvterm/tree/nvim + +diff --git bin/vterm-ctrl.c bin/vterm-ctrl.c +index ba0d61e..92a365f 100644 +--- bin/vterm-ctrl.c ++++ bin/vterm-ctrl.c +@@ -79,9 +79,9 @@ static bool seticanon(bool icanon, bool echo) + return ret; + } + +-static void await_c1(unsigned char c1) ++static void await_c1(int c1) { - /* TODO: This really should be a more robust CSI parser - */ -- char c; +- unsigned char c; + int c; /* await CSI - 8bit or 2byte 7bit form */ bool in_esc = false; +@@ -106,7 +106,7 @@ static char *read_csi() + char csi[32]; + int i = 0; + for(; i < sizeof(csi)-1; i++) { +- char c = csi[i] = getchar(); ++ int c = csi[i] = getchar(); + if(c >= 0x40 && c <= 0x7e) + break; + } +@@ -125,7 +125,7 @@ static char *read_dcs() + bool in_esc = false; + int i = 0; + for(; i < sizeof(dcs)-1; ) { +- char c = getchar(); ++ int c = getchar(); + if(c == 0x9c) // ST + break; + if(in_esc && c == 0x5c)