Sunday, April 30, 2023

update to Kakoune 2022.10.31

Hi,

Proposing update to latest release of Kakoune; builds and works as
expected on brief testing. I use it as my default editor, so will
report back if unexpected issues surface on more testing.

Changes: https://github.com/mawww/kakoune/releases/tag/v2022.10.31

`make test` results in partial failures:
Summary: 528 tests, 79 failures

If I try to run tests on the current version in ports, it doesn't even
complete, but hangs.

If anyone wants to look into the tests some more, the log from
`make test` (version 2022.10.31) is here:
https://thfr.info/tmp/kakoune-testlog-20230430.txt

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/editors/kakoune/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- Makefile 11 Mar 2022 18:58:30 -0000 1.6
+++ Makefile 30 Apr 2023 15:42:57 -0000
@@ -1,6 +1,6 @@
COMMENT = modal code editor with a focus on interactivity

-V = 2021.11.08
+V = 2022.10.31
DISTNAME = kakoune-${V}

CATEGORIES = editors
Index: distinfo
===================================================================
RCS file: /cvs/ports/editors/kakoune/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo 25 Nov 2021 17:13:27 -0000 1.5
+++ distinfo 30 Apr 2023 15:42:57 -0000
@@ -1,2 +1,2 @@
-SHA256 (kakoune-2021.11.08.tar.bz2) = qjCInZ2hEzGiQ6j0D+T2qGGTIbGSF966yPVl4G7dtfQ=
-SIZE (kakoune-2021.11.08.tar.bz2) = 538466
+SHA256 (kakoune-2022.10.31.tar.bz2) = +zF7YskEjdx1Z/6D38QJwlLvhXeLJL0oY74nYtTk5Ys=
+SIZE (kakoune-2022.10.31.tar.bz2) = 556473
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/editors/kakoune/pkg/PLIST,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST
--- pkg/PLIST 11 Mar 2022 18:58:30 -0000 1.5
+++ pkg/PLIST 30 Apr 2023 15:42:57 -0000
@@ -8,6 +8,7 @@ share/kak/
share/kak/autoload
share/kak/colors/
share/kak/colors/base16.kak
+share/kak/colors/black-on-white.kak
share/kak/colors/default.kak
share/kak/colors/desertex.kak
share/kak/colors/github.kak
@@ -61,6 +62,7 @@ share/kak/rc/filetype/cabal.kak
share/kak/rc/filetype/clojure.kak
share/kak/rc/filetype/cmake.kak
share/kak/rc/filetype/coffee.kak
+share/kak/rc/filetype/conf.kak
share/kak/rc/filetype/coq.kak
share/kak/rc/filetype/crystal.kak
share/kak/rc/filetype/css.kak
@@ -73,21 +75,25 @@ share/kak/rc/filetype/diff.kak
share/kak/rc/filetype/dockerfile.kak
share/kak/rc/filetype/elixir.kak
share/kak/rc/filetype/elm.kak
+share/kak/rc/filetype/elvish.kak
share/kak/rc/filetype/erlang.kak
share/kak/rc/filetype/eruby.kak
share/kak/rc/filetype/etc.kak
share/kak/rc/filetype/exherbo.kak
share/kak/rc/filetype/fennel.kak
+share/kak/rc/filetype/fidl.kak
share/kak/rc/filetype/fish.kak
share/kak/rc/filetype/fsharp.kak
share/kak/rc/filetype/gas.kak
share/kak/rc/filetype/gdscript.kak
share/kak/rc/filetype/gentoo-linux.kak
share/kak/rc/filetype/git.kak
+share/kak/rc/filetype/github.kak
share/kak/rc/filetype/gluon.kak
share/kak/rc/filetype/go.kak
share/kak/rc/filetype/graphql.kak
share/kak/rc/filetype/haml.kak
+share/kak/rc/filetype/hare.kak
share/kak/rc/filetype/haskell.kak
share/kak/rc/filetype/hbs.kak
share/kak/rc/filetype/html.kak
@@ -147,6 +153,7 @@ share/kak/rc/filetype/terraform.kak
share/kak/rc/filetype/toml.kak
share/kak/rc/filetype/troff.kak
share/kak/rc/filetype/tupfile.kak
+share/kak/rc/filetype/twig.kak
share/kak/rc/filetype/vhdl.kak
share/kak/rc/filetype/void-linux.kak
share/kak/rc/filetype/yaml.kak
@@ -185,6 +192,7 @@ share/kak/rc/windowing/repl/kitty.kak
share/kak/rc/windowing/repl/tmux.kak
share/kak/rc/windowing/repl/x11.kak
share/kak/rc/windowing/screen.kak
+share/kak/rc/windowing/sway.kak
share/kak/rc/windowing/tmux.kak
share/kak/rc/windowing/wayland.kak
share/kak/rc/windowing/x11.kak

Re: graphics/glslang build shared libs

On Sat, Apr 29, 2023 at 09:14:18PM -0700, Nam Nguyen wrote:
> > Thomas Frohwein writes:
> >
> >> On Tue, Apr 18, 2023 at 06:41:50PM -0700, Nam Nguyen wrote:
> >> Do you have some details on this? Is this an upstream error, that
> >> that --no-undefined is wrong when building the shared library? Or is
> >> there something that might not be compiling or linking correctly?
>
> Brad upstreamed a fix recently for removing --no-undefined, included in
> this new diff.
>
> see:
> https://github.com/KhronosGroup/glslang/commit/9c7fd1a33e5cecbe465e1cd70170167d5e40d398
>
> Here is a new inline diff that:
> - backports Brad's fix for removing --no-undefined when building shared libraries
> - builds shared libraries
>
> naddy uncovered a build failure with emulators/flycast. I will have
> details in the flycast email, but the proposed solution is to build
> shared libraries in graphics/glslang so that flycast can use libSPIRV.so
> and libglslang.so.0.0.
>
> >>> +@so lib/libHLSL.so
> >>> +@so lib/libSPIRV.so
> >>> +@so lib/libSPVRemapper.so
> >>> +@so lib/libglslang-default-resource-limits.so
> >>> +@lib lib/libglslang.so.${LIBglslang_VERSION}
>
> Having shared libraries without semantic versioning might be fine?
> Upstream seems to only want to add semantic versioning to the main
> library, libglslang.so.0.0.

We have other ports that have shared libraries without version suffix;
games/lwjgl comes to mind for me. There are probably others, too.

> see:
> https://github.com/KhronosGroup/glslang/commit/fbe9a23baf2cb020fe3f80d68d972e2a97d9b954
>
> I successfully tested all consumers (vulkan-tools, vkquake and piglit)
> again.
>
> OK?

ok thfr@

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/glslang/Makefile,v
> retrieving revision 1.16
> diff -u -p -u -p -r1.16 Makefile
> --- Makefile 10 Mar 2023 22:28:49 -0000 1.16
> +++ Makefile 30 Apr 2023 03:18:50 -0000
> @@ -5,7 +5,9 @@ COMMENT = reference front-end for GLSL a
> GH_TAGNAME = 12.0.0
> GH_ACCOUNT = KhronosGroup
> GH_PROJECT = glslang
> -REVISION = 0
> +REVISION = 1
> +
> +SHARED_LIBS += glslang 0.0 # 12.0
>
> CATEGORIES = devel graphics
>
> @@ -24,6 +26,8 @@ MODULES = devel/cmake \
> lang/python
> TEST_DEPENDS = graphics/spirv-tools \
> shells/bash
> +
> +CONFIGURE_ARGS += -DBUILD_SHARED_LIBS=ON
>
> do-test:
> cd ${WRKSRC}/Test; exec ./runtests localResults \
> Index: patches/patch-CMakeLists_txt
> ===================================================================
> RCS file: patches/patch-CMakeLists_txt
> diff -N patches/patch-CMakeLists_txt
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-CMakeLists_txt 30 Apr 2023 03:18:50 -0000
> @@ -0,0 +1,38 @@
> +Fix building on OpenBSD when building shared libs
> +
> +OpenBSD does not link shared libs against libc so it is expected
> +that the use of --no-undefined when linking will fail.
> +
> +Also garbage collect CMAKE_VERSION check while here, as requested, since
> +the minimum version is already 3.14.
> +
> +see:
> +https://github.com/KhronosGroup/glslang/commit/9c7fd1a33e5cecbe465e1cd70170167d5e40d398
> +
> +Index: CMakeLists.txt
> +--- CMakeLists.txt.orig
> ++++ CMakeLists.txt
> +@@ -171,10 +171,8 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
> + add_compile_options(-Werror=deprecated-copy)
> + endif()
> +
> +- if(NOT CMAKE_VERSION VERSION_LESS "3.13" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
> ++ if(NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
> + # Error if there's symbols that are not found at link time.
> +- # add_link_options() was added in CMake 3.13 - if using an earlier
> +- # version don't set this - it should be caught by presubmits anyway.
> + add_link_options("-Wl,--no-undefined")
> + endif()
> + elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
> +@@ -188,10 +186,8 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NO
> + add_compile_options(-fno-exceptions)
> + endif()
> +
> +- if(NOT CMAKE_VERSION VERSION_LESS "3.13")
> ++ if(NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
> + # Error if there's symbols that are not found at link time.
> +- # add_link_options() was added in CMake 3.13 - if using an earlier
> +- # version don't set this - it should be caught by presubmits anyway.
> + if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
> + add_link_options("-Wl,-undefined,error")
> + else()
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/graphics/glslang/pkg/PLIST,v
> retrieving revision 1.6
> diff -u -p -u -p -r1.6 PLIST
> --- pkg/PLIST 3 Mar 2023 02:38:37 -0000 1.6
> +++ pkg/PLIST 30 Apr 2023 03:18:50 -0000
> @@ -72,8 +72,6 @@ include/glslang/SPIRV/spvIR.h
> include/glslang/build_info.h
> lib/cmake/
> lib/cmake/HLSLTargets.cmake
> -lib/cmake/OGLCompilerTargets.cmake
> -lib/cmake/OSDependentTargets.cmake
> lib/cmake/SPIRVTargets.cmake
> lib/cmake/SPVRemapperTargets.cmake
> lib/cmake/glslang/
> @@ -82,15 +80,10 @@ lib/cmake/glslang/glslang-config-version
> lib/cmake/glslang/glslang-config.cmake
> lib/cmake/glslang/glslang-targets${MODCMAKE_BUILD_SUFFIX}
> lib/cmake/glslang/glslang-targets.cmake
> -lib/cmake/glslangTargets.cmake
> lib/cmake/glslangValidatorTargets.cmake
> lib/cmake/spirv-remapTargets.cmake
> -@static-lib lib/libGenericCodeGen.a
> -@static-lib lib/libHLSL.a
> -@static-lib lib/libMachineIndependent.a
> -@static-lib lib/libOGLCompiler.a
> -@static-lib lib/libOSDependent.a
> -@static-lib lib/libSPIRV.a
> -@static-lib lib/libSPVRemapper.a
> -@static-lib lib/libglslang-default-resource-limits.a
> -@static-lib lib/libglslang.a
> +@so lib/libHLSL.so
> +@so lib/libSPIRV.so
> +@so lib/libSPVRemapper.so
> +@so lib/libglslang-default-resource-limits.so
> +@lib lib/libglslang.so.${LIBglslang_VERSION}