From: Thomas Frohwein Subject: Re: update editors/kakoune To: Solene Rapenne Cc: ports@openbsd.org Date: Tue, 14 May 2024 04:43:39 -0400 On Sun, May 12, 2024 at 12:02:50PM +0200, Solene Rapenne wrote: > New version of kakoune available: > > - gzip_man=no in MAKE_ENV didn't work anymore, I patched Makefile > - tests were not working, I reported it upstream who made a fix > - compilation didn't work due to quotes being lost, upstream made fix > > I plan to commit it soon, but I'd like some feedback if possible Built it and running it, looks good. The solutions are reasonable. There is a file from openrct2 included, apparently by accident. Just make sure that's removed from the diff that gets committed. > > diff --git a/editors/kakoune/Makefile b/editors/kakoune/Makefile > index 218164067da..17480e4ccb7 100644 > --- a/editors/kakoune/Makefile > +++ b/editors/kakoune/Makefile > @@ -1,6 +1,6 @@ > COMMENT = modal code editor with a focus on interactivity > > -V = 2023.08.05 > +V = 2024.05.09 > DISTNAME = kakoune-${V} > > CATEGORIES = editors > @@ -18,7 +18,7 @@ PERMIT_PACKAGE = Yes > > # -std=c++2a > COMPILER = base-clang > -MAKE_ENV = CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" gzip_man=no > +MAKE_ENV = CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" > FAKE_FLAGS = PREFIX="${TRUEPREFIX}" > # some tests fail without en_US.UTF-8 > TEST_ENV = LC_CTYPE="en_US.UTF-8" > diff --git a/editors/kakoune/distinfo b/editors/kakoune/distinfo > index 42f8dafa9a2..079e7825106 100644 > --- a/editors/kakoune/distinfo > +++ b/editors/kakoune/distinfo > @@ -1,2 +1,2 @@ > -SHA256 (kakoune-2023.08.05.tar.bz2) = PkUVHgrd01AN4taim1qs8iZ8QrslbUSnguc977Kc2lw= > -SIZE (kakoune-2023.08.05.tar.bz2) = 568612 > +SHA256 (kakoune-2024.05.09.tar.bz2) = IZC939OvWQwFk8OFNwiJdlR1BvR71utsDiI1Db0Woik= > +SIZE (kakoune-2024.05.09.tar.bz2) = 588121 > diff --git a/editors/kakoune/patches/patch-Makefile b/editors/kakoune/patches/patch-Makefile > new file mode 100644 > index 00000000000..013516f9446 > --- /dev/null > +++ b/editors/kakoune/patches/patch-Makefile > @@ -0,0 +1,56 @@ > +Partial changes from 7be22f1ec28677ca0bb30316c6893ab4436734b1 > + > +- escape KAK_BIN_PATH > +- test target > + > +Index: Makefile > +--- Makefile.orig > ++++ Makefile > +@@ -5,7 +5,7 @@ CXX = c++ > + > + debug = no > + static = no > +-gzip_man = yes > ++gzip_man = no > + # to get format compatible with GitHub archive use "gzip -S .gz" here > + compress_bin = bzip2 > + > +@@ -13,10 +13,8 @@ compress-suffix-bzip2 = bz2 > + compress-suffix-zstd = zst > + > + CPPFLAGS-debug-yes = -DKAK_DEBUG > +-CXXFLAGS-debug-yes = -O0 -g3 > + tag-debug-yes = .debug > + > +-CXXFLAGS-debug-no = -O3 -g3 > + tag-debug-no = .opt > + > + CXXFLAGS-sanitize-address = -fsanitize=address > +@@ -40,7 +38,7 @@ bindir = $(DESTDIR)$(PREFIX)/bin > + libexecdir = $(DESTDIR)$(PREFIX)/libexec/kak > + sharedir = $(DESTDIR)$(PREFIX)/share/kak > + docdir = $(DESTDIR)$(PREFIX)/share/doc/kak > +-mandir = $(DESTDIR)$(PREFIX)/share/man/man1 > ++mandir = $(DESTDIR)$(PREFIX)/man/man1 > + > + # Both Cygwin and MSYS2 have "_NT" in their uname. > + os = $(shell uname | sed 's/.*_NT.*/Windows/') > +@@ -54,7 +52,7 @@ LDFLAGS-os-FreeBSD = -L/usr/local/lib > + > + LIBS-os-Haiku = -lnetwork -lbe > + > +-CPPFLAGS-os-OpenBSD = -DKAK_BIN_PATH="$(bindir)/kak" -I/usr/local/include > ++CPPFLAGS-os-OpenBSD = -DKAK_BIN_PATH=\"$(bindir)/kak\" -I/usr/local/include > + LDFLAGS-os-OpenBSD = -L/usr/local/lib > + mandir-os-OpenBSD = $(DESTDIR)$(PREFIX)/man/man1 > + > +@@ -136,6 +134,9 @@ doc/kak.1.gz: doc/kak.1 > + > + check: test > + test: src/kak > ++ if [ $(os) = OpenBSD ]; then \ > ++ export KAKOUNE_RUNTIME=$$PWD/share/kak; \ > ++ fi && \ > + cd test && ./run > + > + TAGS: tags > diff --git a/editors/kakoune/patches/patch-src_Makefile b/editors/kakoune/patches/patch-src_Makefile > deleted file mode 100644 > index 84c865e9398..00000000000 > --- a/editors/kakoune/patches/patch-src_Makefile > +++ /dev/null > @@ -1,17 +0,0 @@ > -Remove optimization flags for debug or release builds > - > -Index: src/Makefile > ---- src/Makefile.orig > -+++ src/Makefile > -@@ -12,11 +12,9 @@ endif > - > - ifeq ($(debug),yes) > - CPPFLAGS += -DKAK_DEBUG > -- CXXFLAGS += -O0 > - suffix := .debug > - else > - ifeq ($(debug),no) > -- CXXFLAGS += -O3 > - suffix := .opt > - else > - $(error debug should be either yes or no) > diff --git a/editors/kakoune/patches/patch-src_ranges_hh b/editors/kakoune/patches/patch-src_ranges_hh > deleted file mode 100644 > index 5145755cd7e..00000000000 > --- a/editors/kakoune/patches/patch-src_ranges_hh > +++ /dev/null > @@ -1,66 +0,0 @@ > -From 344d31f42b8ced12626d4f87a22ffa5a671668fd Mon Sep 17 00:00:00 2001 > -From: Johannes Altmanninger > -Date: Tue, 9 May 2023 10:44:08 +0200 > -Subject: [PATCH] Work around clang not inferring default args of template > - template args > - > -Index: src/ranges.hh > ---- src/ranges.hh.orig > -+++ src/ranges.hh > -@@ -8,6 +8,11 @@ > - #include > - > - #include "constexpr_utils.hh" > -+#if __clang_major__ >= 16 > -+#include "memory.hh" > -+#include "meta.hh" > -+#include "vector.hh" > -+#endif > - > - namespace Kakoune > - { > -@@ -638,6 +643,35 @@ auto gather() > - }}; > - } > - > -+#if __clang_major__ >= 16 > -+ > -+template