Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] WIP neovim: update to 0.10.0
@ 2024-05-16 16:56 tranzystorekk
  2024-05-16 18:20 ` [PR PATCH] [Updated] " classabbyamp
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: tranzystorekk @ 2024-05-16 16:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]

There is a new pull request by tranzystorekk against master on the void-packages repository

https://github.com/tranzystorekk/void-packages neovim
https://github.com/void-linux/void-packages/pull/50372

WIP neovim: update to 0.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

Neovim now depends on lua-lpeg as a library and dynamically links to it, but we don't serve it as a shlib.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/50372.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-neovim-50372.patch --]
[-- Type: text/x-diff, Size: 4348 bytes --]

From 4415f96321b1b3f68457e3c115437477dfadbdb9 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 16 May 2024 18:51:14 +0200
Subject: [PATCH] neovim: update to 0.10.0

---
 .../patches/cmake-allow-build-type-none.patch | 39 +++++++++----------
 srcpkgs/neovim/template                       | 10 ++---
 2 files changed, 23 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
index 7654cc64a872e2..adffa83e6b2419 100644
--- a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
+++ b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
@@ -1,31 +1,28 @@
+Void uses the "None" build type to apply our chosen compile settings.
+
+diff --git a/cmake/Util.cmake b/cmake/Util.cmake
+index f09de78..f48f2d0 100644
 --- a/cmake/Util.cmake
 +++ b/cmake/Util.cmake
-@@ -162,7 +162,7 @@ endfunction()
- # Passing CMAKE_BUILD_TYPE for multi-config generators will now not only
- # not be used, but also generate a warning for the user.
- function(set_default_buildtype)
+@@ -193,7 +193,7 @@ endfunction()
+ # Passing CMAKE_BUILD_TYPE for multi-config generators will not only not be
+ # used, but also generate a warning for the user.
+ function(set_default_buildtype BUILD_TYPE)
 -  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo)
 +  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo None)
- 
-   get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
-   if(isMultiConfig)
-@@ -177,7 +177,7 @@ function(set_default_buildtype)
-       message(STATUS "CMAKE_BUILD_TYPE not specified, default is 'Debug'")
-       set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
-     elseif(NOT CMAKE_BUILD_TYPE IN_LIST allowableBuildTypes)
--      message(FATAL_ERROR "Invalid build type: ${CMAKE_BUILD_TYPE}")
-+      message(WARNING "Invalid build type: ${CMAKE_BUILD_TYPE}")
-     else()
-       message(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
-     endif()
+   if(NOT BUILD_TYPE IN_LIST allowableBuildTypes)
+     message(FATAL_ERROR "Invalid build type: ${BUILD_TYPE}")
+   endif()
+diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua
+index 5bc0319..40a72c1 100644
 --- a/runtime/lua/nvim/health.lua
 +++ b/runtime/lua/nvim/health.lua
-@@ -152,7 +152,7 @@
+@@ -153,7 +153,7 @@ local function check_performance()
    local buildtype = vim.fn.matchstr(vim.fn.execute('version'), [[\v\cbuild type:?\s*[^\n\r\t ]+]])
-   if empty(buildtype) then
-     health.report_error('failed to get build type from :version')
+   if buildtype == '' then
+     health.error('failed to get build type from :version')
 -  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo)]]):match_str(buildtype) then
 +  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo|None)]]):match_str(buildtype) then
-     health.report_ok(buildtype)
+     health.ok(buildtype)
    else
-     health.report_info(buildtype)
+     health.info(buildtype)
diff --git a/srcpkgs/neovim/template b/srcpkgs/neovim/template
index d710d54c06a110..ca4bfdb3597851 100644
--- a/srcpkgs/neovim/template
+++ b/srcpkgs/neovim/template
@@ -1,21 +1,21 @@
 # Template file for 'neovim'
 pkgname=neovim
-version=0.9.5
-revision=2
+version=0.10.0
+revision=1
 build_style=cmake
 build_helper="qemu"
 configure_args="-DCOMPILE_LUA=OFF -DPREFER_LUA=$(vopt_if luajit OFF ON)"
 hostmakedepends="gettext lua51-lpeg lua51-mpack lua51-BitOp
  $(vopt_if luajit LuaJIT lua51)"
-makedepends="libtermkey-devel libuv-devel libvterm-devel msgpack-devel
- libluv-devel tree-sitter-devel $(vopt_if luajit LuaJIT-devel lua51-devel)"
+makedepends="libuv-devel libvterm-devel msgpack-devel
+ libluv-devel tree-sitter-devel unibilium-devel $(vopt_if luajit LuaJIT-devel lua51-devel)"
 short_desc="Fork of Vim aiming to improve user experience, plugins and GUIs"
 maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
 license="Apache-2.0, Vim"
 homepage="https://neovim.io"
 changelog="https://github.com/neovim/neovim/releases"
 distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz"
-checksum=fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719
+checksum=372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828
 
 build_options=luajit
 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] WIP neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
@ 2024-05-16 18:20 ` classabbyamp
  2024-05-16 21:06 ` tranzystorekk
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: classabbyamp @ 2024-05-16 18:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/tranzystorekk/void-packages neovim
https://github.com/void-linux/void-packages/pull/50372

WIP neovim: update to 0.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

Neovim now depends on lua-lpeg as a library and dynamically links to it, but we don't serve it as a shlib.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/50372.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-neovim-50372.patch --]
[-- Type: text/x-diff, Size: 7306 bytes --]

From 4415f96321b1b3f68457e3c115437477dfadbdb9 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 16 May 2024 18:51:14 +0200
Subject: [PATCH 1/3] neovim: update to 0.10.0

---
 .../patches/cmake-allow-build-type-none.patch | 39 +++++++++----------
 srcpkgs/neovim/template                       | 10 ++---
 2 files changed, 23 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
index 7654cc64a872e2..adffa83e6b2419 100644
--- a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
+++ b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
@@ -1,31 +1,28 @@
+Void uses the "None" build type to apply our chosen compile settings.
+
+diff --git a/cmake/Util.cmake b/cmake/Util.cmake
+index f09de78..f48f2d0 100644
 --- a/cmake/Util.cmake
 +++ b/cmake/Util.cmake
-@@ -162,7 +162,7 @@ endfunction()
- # Passing CMAKE_BUILD_TYPE for multi-config generators will now not only
- # not be used, but also generate a warning for the user.
- function(set_default_buildtype)
+@@ -193,7 +193,7 @@ endfunction()
+ # Passing CMAKE_BUILD_TYPE for multi-config generators will not only not be
+ # used, but also generate a warning for the user.
+ function(set_default_buildtype BUILD_TYPE)
 -  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo)
 +  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo None)
- 
-   get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
-   if(isMultiConfig)
-@@ -177,7 +177,7 @@ function(set_default_buildtype)
-       message(STATUS "CMAKE_BUILD_TYPE not specified, default is 'Debug'")
-       set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
-     elseif(NOT CMAKE_BUILD_TYPE IN_LIST allowableBuildTypes)
--      message(FATAL_ERROR "Invalid build type: ${CMAKE_BUILD_TYPE}")
-+      message(WARNING "Invalid build type: ${CMAKE_BUILD_TYPE}")
-     else()
-       message(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
-     endif()
+   if(NOT BUILD_TYPE IN_LIST allowableBuildTypes)
+     message(FATAL_ERROR "Invalid build type: ${BUILD_TYPE}")
+   endif()
+diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua
+index 5bc0319..40a72c1 100644
 --- a/runtime/lua/nvim/health.lua
 +++ b/runtime/lua/nvim/health.lua
-@@ -152,7 +152,7 @@
+@@ -153,7 +153,7 @@ local function check_performance()
    local buildtype = vim.fn.matchstr(vim.fn.execute('version'), [[\v\cbuild type:?\s*[^\n\r\t ]+]])
-   if empty(buildtype) then
-     health.report_error('failed to get build type from :version')
+   if buildtype == '' then
+     health.error('failed to get build type from :version')
 -  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo)]]):match_str(buildtype) then
 +  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo|None)]]):match_str(buildtype) then
-     health.report_ok(buildtype)
+     health.ok(buildtype)
    else
-     health.report_info(buildtype)
+     health.info(buildtype)
diff --git a/srcpkgs/neovim/template b/srcpkgs/neovim/template
index d710d54c06a110..ca4bfdb3597851 100644
--- a/srcpkgs/neovim/template
+++ b/srcpkgs/neovim/template
@@ -1,21 +1,21 @@
 # Template file for 'neovim'
 pkgname=neovim
-version=0.9.5
-revision=2
+version=0.10.0
+revision=1
 build_style=cmake
 build_helper="qemu"
 configure_args="-DCOMPILE_LUA=OFF -DPREFER_LUA=$(vopt_if luajit OFF ON)"
 hostmakedepends="gettext lua51-lpeg lua51-mpack lua51-BitOp
  $(vopt_if luajit LuaJIT lua51)"
-makedepends="libtermkey-devel libuv-devel libvterm-devel msgpack-devel
- libluv-devel tree-sitter-devel $(vopt_if luajit LuaJIT-devel lua51-devel)"
+makedepends="libuv-devel libvterm-devel msgpack-devel
+ libluv-devel tree-sitter-devel unibilium-devel $(vopt_if luajit LuaJIT-devel lua51-devel)"
 short_desc="Fork of Vim aiming to improve user experience, plugins and GUIs"
 maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
 license="Apache-2.0, Vim"
 homepage="https://neovim.io"
 changelog="https://github.com/neovim/neovim/releases"
 distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz"
-checksum=fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719
+checksum=372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828
 
 build_options=luajit
 

From 3c9ee554eef8a4bf4f6149ee1e5d1e9894d093de Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 13:55:23 -0400
Subject: [PATCH 2/3] lua54-lpeg: shlib_provide lpeg.so for lua 5.1

needed for neovim
---
 common/shlibs               | 1 +
 srcpkgs/lua54-lpeg/template | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index a433865e964c0f..c5ee7ac98a9542 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4435,3 +4435,4 @@ libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
 libKPim6MimeTreeParserCore.so.6 mimetreeparser-24.02.0_1
 libKPim6MimeTreeParserWidgets.so.6 mimetreeparser-24.02.0_1
+/usr/lib/lua/5.1/lpeg.so lua51-lpeg-1.1.0_2
diff --git a/srcpkgs/lua54-lpeg/template b/srcpkgs/lua54-lpeg/template
index 67be551249f4bb..222a0517f030a0 100644
--- a/srcpkgs/lua54-lpeg/template
+++ b/srcpkgs/lua54-lpeg/template
@@ -1,7 +1,7 @@
 # Template file for 'lua54-lpeg'
 pkgname=lua54-lpeg
 version=1.1.0
-revision=1
+revision=2
 hostmakedepends="lua51 lua52 lua53 lua54"
 makedepends="lua51-devel lua52-devel lua53-devel lua54-devel"
 depends="lua54"
@@ -61,6 +61,7 @@ do_install() {
 lua51-lpeg_package() {
 	depends="lua51"
 	short_desc="${_desc} (5.1.x)"
+	shlib_provides="/usr/lib/lua/5.1/lpeg.so"
 	pkg_install() {
 		vmove usr/lib/lua/5.1
 		vmove usr/share/lua/5.1

From a5c61d34a346b84ceaed58f1f2805865beff6f5c Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 14:01:59 -0400
Subject: [PATCH 3/3] common/hooks/pre-pkg/04-generate-runtime-deps: support
 SONAME as path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

neovim looks for a SONAME that is a whole path

find: warning: ‘-name’ matches against basenames only, but the given pattern
  contains a directory separator (‘/’), thus the expression will evaluate to
  false all the time.  Did you mean ‘-wholename’?
    SONAME: /usr/lib/lua/5.1/lpeg.so <-> lua51-lpeg>=1.1.0_2
---
 common/hooks/pre-pkg/04-generate-runtime-deps.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
index 488c8fc14ea3b2..78c4be2e63d51b 100644
--- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh
+++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
@@ -98,7 +98,12 @@ hook() {
     for f in ${verify_deps}; do
         unset _rdep _pkgname _rdepver
 
-        if [ "$(find ${PKGDESTDIR} -name "$f")" ]; then
+        local _findargs="-name"
+        # if SONAME is a path, find should use -wholename
+        if [[ "$f" = */* ]]; then
+            _findargs="-wholename"
+        fi
+        if [ "$(find "${PKGDESTDIR}" $_findargs "$f")" ]; then
             # Ignore libs by current pkg
             echo "   SONAME: $f <-> $pkgname (ignored)"
             continue

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] WIP neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
  2024-05-16 18:20 ` [PR PATCH] [Updated] " classabbyamp
@ 2024-05-16 21:06 ` tranzystorekk
  2024-05-16 21:39 ` tranzystorekk
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: tranzystorekk @ 2024-05-16 21:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is an updated pull request by tranzystorekk against master on the void-packages repository

https://github.com/tranzystorekk/void-packages neovim
https://github.com/void-linux/void-packages/pull/50372

WIP neovim: update to 0.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

Neovim now depends on lua-lpeg as a library and dynamically links to it, but we don't serve it as a shlib.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/50372.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-neovim-50372.patch --]
[-- Type: text/x-diff, Size: 15480 bytes --]

From 3409493be2f2928ab49cd927485dfdd5ccf44cd8 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 16 May 2024 18:51:14 +0200
Subject: [PATCH 1/3] neovim: update to 0.10.0

---
 .../patches/cmake-allow-build-type-none.patch |  39 +++--
 srcpkgs/neovim/patches/cross-build.patch      | 135 ++++++++++++++++++
 srcpkgs/neovim/template                       |  21 +--
 3 files changed, 160 insertions(+), 35 deletions(-)
 create mode 100644 srcpkgs/neovim/patches/cross-build.patch

diff --git a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
index 7654cc64a872e2..adffa83e6b2419 100644
--- a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
+++ b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
@@ -1,31 +1,28 @@
+Void uses the "None" build type to apply our chosen compile settings.
+
+diff --git a/cmake/Util.cmake b/cmake/Util.cmake
+index f09de78..f48f2d0 100644
 --- a/cmake/Util.cmake
 +++ b/cmake/Util.cmake
-@@ -162,7 +162,7 @@ endfunction()
- # Passing CMAKE_BUILD_TYPE for multi-config generators will now not only
- # not be used, but also generate a warning for the user.
- function(set_default_buildtype)
+@@ -193,7 +193,7 @@ endfunction()
+ # Passing CMAKE_BUILD_TYPE for multi-config generators will not only not be
+ # used, but also generate a warning for the user.
+ function(set_default_buildtype BUILD_TYPE)
 -  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo)
 +  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo None)
- 
-   get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
-   if(isMultiConfig)
-@@ -177,7 +177,7 @@ function(set_default_buildtype)
-       message(STATUS "CMAKE_BUILD_TYPE not specified, default is 'Debug'")
-       set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
-     elseif(NOT CMAKE_BUILD_TYPE IN_LIST allowableBuildTypes)
--      message(FATAL_ERROR "Invalid build type: ${CMAKE_BUILD_TYPE}")
-+      message(WARNING "Invalid build type: ${CMAKE_BUILD_TYPE}")
-     else()
-       message(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
-     endif()
+   if(NOT BUILD_TYPE IN_LIST allowableBuildTypes)
+     message(FATAL_ERROR "Invalid build type: ${BUILD_TYPE}")
+   endif()
+diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua
+index 5bc0319..40a72c1 100644
 --- a/runtime/lua/nvim/health.lua
 +++ b/runtime/lua/nvim/health.lua
-@@ -152,7 +152,7 @@
+@@ -153,7 +153,7 @@ local function check_performance()
    local buildtype = vim.fn.matchstr(vim.fn.execute('version'), [[\v\cbuild type:?\s*[^\n\r\t ]+]])
-   if empty(buildtype) then
-     health.report_error('failed to get build type from :version')
+   if buildtype == '' then
+     health.error('failed to get build type from :version')
 -  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo)]]):match_str(buildtype) then
 +  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo|None)]]):match_str(buildtype) then
-     health.report_ok(buildtype)
+     health.ok(buildtype)
    else
-     health.report_info(buildtype)
+     health.info(buildtype)
diff --git a/srcpkgs/neovim/patches/cross-build.patch b/srcpkgs/neovim/patches/cross-build.patch
new file mode 100644
index 00000000000000..6e09f660f4ea8c
--- /dev/null
+++ b/srcpkgs/neovim/patches/cross-build.patch
@@ -0,0 +1,135 @@
+diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
+index c171fab..cb29798 100644
+--- a/runtime/CMakeLists.txt
++++ b/runtime/CMakeLists.txt
+@@ -11,7 +11,7 @@ get_directory_property(LUA_GEN DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITI
+ get_directory_property(LUA_GEN_DEPS DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITION LUA_GEN_DEPS)
+ 
+ add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
+-  COMMAND ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
+   DEPENDS
+     ${LUA_GEN_DEPS}
+     ${SYN_VIM_GENERATOR}
+@@ -33,7 +33,7 @@ foreach(PACKAGE ${PACKAGES})
+     add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
+       COMMAND ${CMAKE_COMMAND} -E copy_directory
+         ${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME}
+-      COMMAND $<TARGET_FILE:nvim_bin>
++      COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+         -u NONE -i NONE -e --headless -c "helptags doc" -c quit
+       DEPENDS
+         nvim_bin
+@@ -65,7 +65,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
+   COMMAND ${CMAKE_COMMAND} -E remove_directory doc
+   COMMAND ${CMAKE_COMMAND} -E copy_directory
+     ${PROJECT_SOURCE_DIR}/runtime/doc doc
+-  COMMAND $<TARGET_FILE:nvim_bin>
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+     -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
+   DEPENDS
+     nvim_bin
+diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
+index d9cc695..81e9b50 100644
+--- a/src/nvim/CMakeLists.txt
++++ b/src/nvim/CMakeLists.txt
+@@ -541,7 +541,7 @@ foreach(sfile ${NVIM_SOURCES}
+   add_custom_command(
+     OUTPUT "${gf_c_h}" "${gf_h_h}"
+     COMMAND ${CMAKE_C_COMPILER} ${sfile} ${PREPROC_OUTPUT} ${gen_cflags}
+-    COMMAND ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
+     DEPENDS ${depends})
+   list(APPEND NVIM_GENERATED_FOR_SOURCES "${gf_c_h}")
+   list(APPEND NVIM_GENERATED_FOR_HEADERS "${gf_h_h}")
+@@ -551,7 +551,7 @@ foreach(sfile ${NVIM_SOURCES}
+ endforeach()
+ 
+ add_custom_command(OUTPUT ${GENERATED_UNICODE_TABLES}
+-  COMMAND ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
+                      ${UNICODE_DIR}
+                      ${GENERATED_UNICODE_TABLES}
+   DEPENDS
+@@ -565,7 +565,7 @@ configure_file(${GENERATOR_DIR}/nvim_version.lua.in ${NVIM_VERSION_LUA})
+ add_custom_command(
+   OUTPUT ${GENERATED_API_DISPATCH} ${GENERATED_API_METADATA}
+   ${FUNCS_METADATA} ${LUA_API_C_BINDINGS} ${GENERATED_KEYSETS_DEFS}
+-         COMMAND ${LUA_GEN} ${API_DISPATCH_GENERATOR}
++         COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_DISPATCH_GENERATOR}
+                          ${GENERATED_API_DISPATCH}
+                          ${GENERATED_API_METADATA} ${FUNCS_METADATA}
+                          ${LUA_API_C_BINDINGS}
+@@ -589,7 +589,7 @@ add_custom_command(
+   OUTPUT ${VIM_MODULE_FILE}
+   COMMAND ${CMAKE_COMMAND} -E env
+       "LUAC_PRG=${LUAC_PRG}"
+-      ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
++      ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
+       # NB: vim._init_packages and vim.inspect must be be first and second ones
+       # respectively, otherwise --luamod-dev won't work properly.
+       ${LUA_INIT_PACKAGES_MODULE_SOURCE} "vim._init_packages"
+@@ -624,7 +624,7 @@ add_custom_command(
+          ${GENERATED_UI_EVENTS_REMOTE}
+          ${UI_METADATA}
+          ${GENERATED_UI_EVENTS_CLIENT}
+-  COMMAND ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
+                      ${CMAKE_CURRENT_LIST_DIR}/api/ui_events.in.h
+                      ${GENERATED_UI_EVENTS_CALL}
+                      ${GENERATED_UI_EVENTS_REMOTE}
+@@ -656,29 +656,29 @@ list(APPEND NVIM_GENERATED_FOR_SOURCES
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_EX_CMDS_ENUM} ${GENERATED_EX_CMDS_DEFS}
+-  COMMAND ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
+   DEPENDS ${LUA_GEN_DEPS} ${EX_CMDS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/ex_cmds.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_FUNCS} ${FUNCS_DATA}
+-  COMMAND ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
+   DEPENDS ${LUA_GEN_DEPS} ${FUNCS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/eval.lua ${FUNCS_METADATA}
+ )
+ list(APPEND NVIM_GENERATED_FOR_SOURCES
+   "${GENERATED_FUNCS}")
+ 
+ add_custom_command(OUTPUT ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+-  COMMAND ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${EVENTS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/auevents.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS}
+-  COMMAND ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+-  COMMAND ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_ENUM_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+diff --git a/src/nvim/po/CMakeLists.txt b/src/nvim/po/CMakeLists.txt
+index 6c20089..0e99128 100644
+--- a/src/nvim/po/CMakeLists.txt
++++ b/src/nvim/po/CMakeLists.txt
+@@ -53,13 +53,13 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
+   list(SORT NVIM_RELATIVE_SOURCES)
+   add_custom_command(
+     OUTPUT ${NVIM_POT}
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/tojavascript.vim ${NVIM_POT} ${PROJECT_SOURCE_DIR}/runtime/optwin.vim
+     COMMAND ${XGETTEXT_PRG} -o ${NVIM_POT} --default-domain=nvim
+       --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2
+       -D ${CMAKE_CURRENT_SOURCE_DIR} -D ${CMAKE_CURRENT_BINARY_DIR}
+       ${NVIM_RELATIVE_SOURCES} optwin.js
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/fixfilenames.vim ${NVIM_POT} ../../../runtime/optwin.vim
+     VERBATIM
+     DEPENDS ${NVIM_SOURCES} nvim_bin nvim_runtime_deps)
diff --git a/srcpkgs/neovim/template b/srcpkgs/neovim/template
index d710d54c06a110..34dc0098c3c6d2 100644
--- a/srcpkgs/neovim/template
+++ b/srcpkgs/neovim/template
@@ -1,21 +1,21 @@
 # Template file for 'neovim'
 pkgname=neovim
-version=0.9.5
-revision=2
+version=0.10.0
+revision=1
 build_style=cmake
 build_helper="qemu"
 configure_args="-DCOMPILE_LUA=OFF -DPREFER_LUA=$(vopt_if luajit OFF ON)"
-hostmakedepends="gettext lua51-lpeg lua51-mpack lua51-BitOp
- $(vopt_if luajit LuaJIT lua51)"
-makedepends="libtermkey-devel libuv-devel libvterm-devel msgpack-devel
- libluv-devel tree-sitter-devel $(vopt_if luajit LuaJIT-devel lua51-devel)"
+hostmakedepends="gettext"
+makedepends="libuv-devel libvterm-devel msgpack-devel
+ libluv-devel tree-sitter-devel unibilium-devel
+ lua51-lpeg $(vopt_if luajit LuaJIT-devel lua51-devel)"
 short_desc="Fork of Vim aiming to improve user experience, plugins and GUIs"
 maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
 license="Apache-2.0, Vim"
 homepage="https://neovim.io"
 changelog="https://github.com/neovim/neovim/releases"
 distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz"
-checksum=fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719
+checksum=372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828
 
 build_options=luajit
 
@@ -35,13 +35,6 @@ alternatives="
 # They want assertion
 CFLAGS=-UNDEBUG
 
-pre_configure() {
-	vsed -i runtime/CMakeLists.txt \
-		-e "s|\".*/bin/nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
-	vsed -i src/nvim/po/CMakeLists.txt \
-		-e "s|\$<TARGET_FILE:nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
-}
-
 post_install() {
 	vlicense LICENSE.txt
 }

From 80ee09d3338585a347f03f861142044c31f35e5a Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 13:55:23 -0400
Subject: [PATCH 2/3] lua54-lpeg: shlib_provide lpeg.so for lua 5.1

needed for neovim
---
 common/shlibs               | 1 +
 srcpkgs/lua54-lpeg/template | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index a433865e964c0f..c5ee7ac98a9542 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4435,3 +4435,4 @@ libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
 libKPim6MimeTreeParserCore.so.6 mimetreeparser-24.02.0_1
 libKPim6MimeTreeParserWidgets.so.6 mimetreeparser-24.02.0_1
+/usr/lib/lua/5.1/lpeg.so lua51-lpeg-1.1.0_2
diff --git a/srcpkgs/lua54-lpeg/template b/srcpkgs/lua54-lpeg/template
index 67be551249f4bb..222a0517f030a0 100644
--- a/srcpkgs/lua54-lpeg/template
+++ b/srcpkgs/lua54-lpeg/template
@@ -1,7 +1,7 @@
 # Template file for 'lua54-lpeg'
 pkgname=lua54-lpeg
 version=1.1.0
-revision=1
+revision=2
 hostmakedepends="lua51 lua52 lua53 lua54"
 makedepends="lua51-devel lua52-devel lua53-devel lua54-devel"
 depends="lua54"
@@ -61,6 +61,7 @@ do_install() {
 lua51-lpeg_package() {
 	depends="lua51"
 	short_desc="${_desc} (5.1.x)"
+	shlib_provides="/usr/lib/lua/5.1/lpeg.so"
 	pkg_install() {
 		vmove usr/lib/lua/5.1
 		vmove usr/share/lua/5.1

From 8b0f3b464ff285a5edb39b448e294060d3dadaa9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 14:01:59 -0400
Subject: [PATCH 3/3] common/hooks/pre-pkg/04-generate-runtime-deps: support
 SONAME as path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

neovim looks for a SONAME that is a whole path

find: warning: ‘-name’ matches against basenames only, but the given pattern
  contains a directory separator (‘/’), thus the expression will evaluate to
  false all the time.  Did you mean ‘-wholename’?
    SONAME: /usr/lib/lua/5.1/lpeg.so <-> lua51-lpeg>=1.1.0_2
---
 common/hooks/pre-pkg/04-generate-runtime-deps.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
index 488c8fc14ea3b2..78c4be2e63d51b 100644
--- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh
+++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
@@ -98,7 +98,12 @@ hook() {
     for f in ${verify_deps}; do
         unset _rdep _pkgname _rdepver
 
-        if [ "$(find ${PKGDESTDIR} -name "$f")" ]; then
+        local _findargs="-name"
+        # if SONAME is a path, find should use -wholename
+        if [[ "$f" = */* ]]; then
+            _findargs="-wholename"
+        fi
+        if [ "$(find "${PKGDESTDIR}" $_findargs "$f")" ]; then
             # Ignore libs by current pkg
             echo "   SONAME: $f <-> $pkgname (ignored)"
             continue

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] WIP neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
  2024-05-16 18:20 ` [PR PATCH] [Updated] " classabbyamp
  2024-05-16 21:06 ` tranzystorekk
@ 2024-05-16 21:39 ` tranzystorekk
  2024-05-16 22:54 ` classabbyamp
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: tranzystorekk @ 2024-05-16 21:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is an updated pull request by tranzystorekk against master on the void-packages repository

https://github.com/tranzystorekk/void-packages neovim
https://github.com/void-linux/void-packages/pull/50372

WIP neovim: update to 0.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

Neovim now depends on lua-lpeg as a library and dynamically links to it, but we don't serve it as a shlib.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/50372.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-neovim-50372.patch --]
[-- Type: text/x-diff, Size: 15663 bytes --]

From c71ebc3d883c642802123e482503aaae97647c6a Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 16 May 2024 18:51:14 +0200
Subject: [PATCH 1/3] neovim: update to 0.10.0

---
 .../patches/cmake-allow-build-type-none.patch |  39 +++--
 srcpkgs/neovim/patches/cross-build.patch      | 135 ++++++++++++++++++
 srcpkgs/neovim/template                       |  27 ++--
 3 files changed, 166 insertions(+), 35 deletions(-)
 create mode 100644 srcpkgs/neovim/patches/cross-build.patch

diff --git a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
index 7654cc64a872e2..adffa83e6b2419 100644
--- a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
+++ b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
@@ -1,31 +1,28 @@
+Void uses the "None" build type to apply our chosen compile settings.
+
+diff --git a/cmake/Util.cmake b/cmake/Util.cmake
+index f09de78..f48f2d0 100644
 --- a/cmake/Util.cmake
 +++ b/cmake/Util.cmake
-@@ -162,7 +162,7 @@ endfunction()
- # Passing CMAKE_BUILD_TYPE for multi-config generators will now not only
- # not be used, but also generate a warning for the user.
- function(set_default_buildtype)
+@@ -193,7 +193,7 @@ endfunction()
+ # Passing CMAKE_BUILD_TYPE for multi-config generators will not only not be
+ # used, but also generate a warning for the user.
+ function(set_default_buildtype BUILD_TYPE)
 -  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo)
 +  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo None)
- 
-   get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
-   if(isMultiConfig)
-@@ -177,7 +177,7 @@ function(set_default_buildtype)
-       message(STATUS "CMAKE_BUILD_TYPE not specified, default is 'Debug'")
-       set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
-     elseif(NOT CMAKE_BUILD_TYPE IN_LIST allowableBuildTypes)
--      message(FATAL_ERROR "Invalid build type: ${CMAKE_BUILD_TYPE}")
-+      message(WARNING "Invalid build type: ${CMAKE_BUILD_TYPE}")
-     else()
-       message(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
-     endif()
+   if(NOT BUILD_TYPE IN_LIST allowableBuildTypes)
+     message(FATAL_ERROR "Invalid build type: ${BUILD_TYPE}")
+   endif()
+diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua
+index 5bc0319..40a72c1 100644
 --- a/runtime/lua/nvim/health.lua
 +++ b/runtime/lua/nvim/health.lua
-@@ -152,7 +152,7 @@
+@@ -153,7 +153,7 @@ local function check_performance()
    local buildtype = vim.fn.matchstr(vim.fn.execute('version'), [[\v\cbuild type:?\s*[^\n\r\t ]+]])
-   if empty(buildtype) then
-     health.report_error('failed to get build type from :version')
+   if buildtype == '' then
+     health.error('failed to get build type from :version')
 -  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo)]]):match_str(buildtype) then
 +  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo|None)]]):match_str(buildtype) then
-     health.report_ok(buildtype)
+     health.ok(buildtype)
    else
-     health.report_info(buildtype)
+     health.info(buildtype)
diff --git a/srcpkgs/neovim/patches/cross-build.patch b/srcpkgs/neovim/patches/cross-build.patch
new file mode 100644
index 00000000000000..6e09f660f4ea8c
--- /dev/null
+++ b/srcpkgs/neovim/patches/cross-build.patch
@@ -0,0 +1,135 @@
+diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
+index c171fab..cb29798 100644
+--- a/runtime/CMakeLists.txt
++++ b/runtime/CMakeLists.txt
+@@ -11,7 +11,7 @@ get_directory_property(LUA_GEN DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITI
+ get_directory_property(LUA_GEN_DEPS DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITION LUA_GEN_DEPS)
+ 
+ add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
+-  COMMAND ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
+   DEPENDS
+     ${LUA_GEN_DEPS}
+     ${SYN_VIM_GENERATOR}
+@@ -33,7 +33,7 @@ foreach(PACKAGE ${PACKAGES})
+     add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
+       COMMAND ${CMAKE_COMMAND} -E copy_directory
+         ${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME}
+-      COMMAND $<TARGET_FILE:nvim_bin>
++      COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+         -u NONE -i NONE -e --headless -c "helptags doc" -c quit
+       DEPENDS
+         nvim_bin
+@@ -65,7 +65,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
+   COMMAND ${CMAKE_COMMAND} -E remove_directory doc
+   COMMAND ${CMAKE_COMMAND} -E copy_directory
+     ${PROJECT_SOURCE_DIR}/runtime/doc doc
+-  COMMAND $<TARGET_FILE:nvim_bin>
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+     -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
+   DEPENDS
+     nvim_bin
+diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
+index d9cc695..81e9b50 100644
+--- a/src/nvim/CMakeLists.txt
++++ b/src/nvim/CMakeLists.txt
+@@ -541,7 +541,7 @@ foreach(sfile ${NVIM_SOURCES}
+   add_custom_command(
+     OUTPUT "${gf_c_h}" "${gf_h_h}"
+     COMMAND ${CMAKE_C_COMPILER} ${sfile} ${PREPROC_OUTPUT} ${gen_cflags}
+-    COMMAND ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
+     DEPENDS ${depends})
+   list(APPEND NVIM_GENERATED_FOR_SOURCES "${gf_c_h}")
+   list(APPEND NVIM_GENERATED_FOR_HEADERS "${gf_h_h}")
+@@ -551,7 +551,7 @@ foreach(sfile ${NVIM_SOURCES}
+ endforeach()
+ 
+ add_custom_command(OUTPUT ${GENERATED_UNICODE_TABLES}
+-  COMMAND ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
+                      ${UNICODE_DIR}
+                      ${GENERATED_UNICODE_TABLES}
+   DEPENDS
+@@ -565,7 +565,7 @@ configure_file(${GENERATOR_DIR}/nvim_version.lua.in ${NVIM_VERSION_LUA})
+ add_custom_command(
+   OUTPUT ${GENERATED_API_DISPATCH} ${GENERATED_API_METADATA}
+   ${FUNCS_METADATA} ${LUA_API_C_BINDINGS} ${GENERATED_KEYSETS_DEFS}
+-         COMMAND ${LUA_GEN} ${API_DISPATCH_GENERATOR}
++         COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_DISPATCH_GENERATOR}
+                          ${GENERATED_API_DISPATCH}
+                          ${GENERATED_API_METADATA} ${FUNCS_METADATA}
+                          ${LUA_API_C_BINDINGS}
+@@ -589,7 +589,7 @@ add_custom_command(
+   OUTPUT ${VIM_MODULE_FILE}
+   COMMAND ${CMAKE_COMMAND} -E env
+       "LUAC_PRG=${LUAC_PRG}"
+-      ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
++      ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
+       # NB: vim._init_packages and vim.inspect must be be first and second ones
+       # respectively, otherwise --luamod-dev won't work properly.
+       ${LUA_INIT_PACKAGES_MODULE_SOURCE} "vim._init_packages"
+@@ -624,7 +624,7 @@ add_custom_command(
+          ${GENERATED_UI_EVENTS_REMOTE}
+          ${UI_METADATA}
+          ${GENERATED_UI_EVENTS_CLIENT}
+-  COMMAND ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
+                      ${CMAKE_CURRENT_LIST_DIR}/api/ui_events.in.h
+                      ${GENERATED_UI_EVENTS_CALL}
+                      ${GENERATED_UI_EVENTS_REMOTE}
+@@ -656,29 +656,29 @@ list(APPEND NVIM_GENERATED_FOR_SOURCES
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_EX_CMDS_ENUM} ${GENERATED_EX_CMDS_DEFS}
+-  COMMAND ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
+   DEPENDS ${LUA_GEN_DEPS} ${EX_CMDS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/ex_cmds.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_FUNCS} ${FUNCS_DATA}
+-  COMMAND ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
+   DEPENDS ${LUA_GEN_DEPS} ${FUNCS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/eval.lua ${FUNCS_METADATA}
+ )
+ list(APPEND NVIM_GENERATED_FOR_SOURCES
+   "${GENERATED_FUNCS}")
+ 
+ add_custom_command(OUTPUT ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+-  COMMAND ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${EVENTS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/auevents.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS}
+-  COMMAND ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+-  COMMAND ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_ENUM_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+diff --git a/src/nvim/po/CMakeLists.txt b/src/nvim/po/CMakeLists.txt
+index 6c20089..0e99128 100644
+--- a/src/nvim/po/CMakeLists.txt
++++ b/src/nvim/po/CMakeLists.txt
+@@ -53,13 +53,13 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
+   list(SORT NVIM_RELATIVE_SOURCES)
+   add_custom_command(
+     OUTPUT ${NVIM_POT}
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/tojavascript.vim ${NVIM_POT} ${PROJECT_SOURCE_DIR}/runtime/optwin.vim
+     COMMAND ${XGETTEXT_PRG} -o ${NVIM_POT} --default-domain=nvim
+       --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2
+       -D ${CMAKE_CURRENT_SOURCE_DIR} -D ${CMAKE_CURRENT_BINARY_DIR}
+       ${NVIM_RELATIVE_SOURCES} optwin.js
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/fixfilenames.vim ${NVIM_POT} ../../../runtime/optwin.vim
+     VERBATIM
+     DEPENDS ${NVIM_SOURCES} nvim_bin nvim_runtime_deps)
diff --git a/srcpkgs/neovim/template b/srcpkgs/neovim/template
index d710d54c06a110..7cea9a8625d007 100644
--- a/srcpkgs/neovim/template
+++ b/srcpkgs/neovim/template
@@ -1,21 +1,21 @@
 # Template file for 'neovim'
 pkgname=neovim
-version=0.9.5
-revision=2
+version=0.10.0
+revision=1
 build_style=cmake
 build_helper="qemu"
 configure_args="-DCOMPILE_LUA=OFF -DPREFER_LUA=$(vopt_if luajit OFF ON)"
-hostmakedepends="gettext lua51-lpeg lua51-mpack lua51-BitOp
- $(vopt_if luajit LuaJIT lua51)"
-makedepends="libtermkey-devel libuv-devel libvterm-devel msgpack-devel
- libluv-devel tree-sitter-devel $(vopt_if luajit LuaJIT-devel lua51-devel)"
+hostmakedepends="gettext patchelf"
+makedepends="libuv-devel libvterm-devel msgpack-devel
+ libluv-devel tree-sitter-devel unibilium-devel
+ lua51-lpeg $(vopt_if luajit LuaJIT-devel lua51-devel)"
 short_desc="Fork of Vim aiming to improve user experience, plugins and GUIs"
 maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
 license="Apache-2.0, Vim"
 homepage="https://neovim.io"
 changelog="https://github.com/neovim/neovim/releases"
 distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz"
-checksum=fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719
+checksum=372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828
 
 build_options=luajit
 
@@ -35,13 +35,12 @@ alternatives="
 # They want assertion
 CFLAGS=-UNDEBUG
 
-pre_configure() {
-	vsed -i runtime/CMakeLists.txt \
-		-e "s|\".*/bin/nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
-	vsed -i src/nvim/po/CMakeLists.txt \
-		-e "s|\$<TARGET_FILE:nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
-}
-
 post_install() {
 	vlicense LICENSE.txt
+
+	if [ "${CROSS_BUILD}" ]; then
+		patchelf --replace-needed \
+			${XBPS_CROSS_BASE}/usr/lib/lua/5.1/lpeg.so /usr/lib/lua/5.1/lpeg.so \
+			${DESTDIR}/usr/bin/nvim
+	fi
 }

From ea3f086468c05f68eb36d2f7ac2812f653b18540 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 13:55:23 -0400
Subject: [PATCH 2/3] lua54-lpeg: shlib_provide lpeg.so for lua 5.1

needed for neovim
---
 common/shlibs               | 1 +
 srcpkgs/lua54-lpeg/template | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index a433865e964c0f..c5ee7ac98a9542 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4435,3 +4435,4 @@ libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
 libKPim6MimeTreeParserCore.so.6 mimetreeparser-24.02.0_1
 libKPim6MimeTreeParserWidgets.so.6 mimetreeparser-24.02.0_1
+/usr/lib/lua/5.1/lpeg.so lua51-lpeg-1.1.0_2
diff --git a/srcpkgs/lua54-lpeg/template b/srcpkgs/lua54-lpeg/template
index 67be551249f4bb..222a0517f030a0 100644
--- a/srcpkgs/lua54-lpeg/template
+++ b/srcpkgs/lua54-lpeg/template
@@ -1,7 +1,7 @@
 # Template file for 'lua54-lpeg'
 pkgname=lua54-lpeg
 version=1.1.0
-revision=1
+revision=2
 hostmakedepends="lua51 lua52 lua53 lua54"
 makedepends="lua51-devel lua52-devel lua53-devel lua54-devel"
 depends="lua54"
@@ -61,6 +61,7 @@ do_install() {
 lua51-lpeg_package() {
 	depends="lua51"
 	short_desc="${_desc} (5.1.x)"
+	shlib_provides="/usr/lib/lua/5.1/lpeg.so"
 	pkg_install() {
 		vmove usr/lib/lua/5.1
 		vmove usr/share/lua/5.1

From 10ce7aeb0d63f06da20a501047519e5bcec8aebd Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 14:01:59 -0400
Subject: [PATCH 3/3] common/hooks/pre-pkg/04-generate-runtime-deps: support
 SONAME as path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

neovim looks for a SONAME that is a whole path

find: warning: ‘-name’ matches against basenames only, but the given pattern
  contains a directory separator (‘/’), thus the expression will evaluate to
  false all the time.  Did you mean ‘-wholename’?
    SONAME: /usr/lib/lua/5.1/lpeg.so <-> lua51-lpeg>=1.1.0_2
---
 common/hooks/pre-pkg/04-generate-runtime-deps.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
index 488c8fc14ea3b2..78c4be2e63d51b 100644
--- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh
+++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
@@ -98,7 +98,12 @@ hook() {
     for f in ${verify_deps}; do
         unset _rdep _pkgname _rdepver
 
-        if [ "$(find ${PKGDESTDIR} -name "$f")" ]; then
+        local _findargs="-name"
+        # if SONAME is a path, find should use -wholename
+        if [[ "$f" = */* ]]; then
+            _findargs="-wholename"
+        fi
+        if [ "$(find "${PKGDESTDIR}" $_findargs "$f")" ]; then
             # Ignore libs by current pkg
             echo "   SONAME: $f <-> $pkgname (ignored)"
             continue

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: WIP neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (2 preceding siblings ...)
  2024-05-16 21:39 ` tranzystorekk
@ 2024-05-16 22:54 ` classabbyamp
  2024-05-16 23:04 ` [PR PATCH] [Updated] " tranzystorekk
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: classabbyamp @ 2024-05-16 22:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2116329755

Comment:
workaround:
```diff
- riscv64*) build_options_default="" ;;
+ armv7l|riscv64*) build_options_default="" ;;
```

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] WIP neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (3 preceding siblings ...)
  2024-05-16 22:54 ` classabbyamp
@ 2024-05-16 23:04 ` tranzystorekk
  2024-05-18 16:00 ` AnInternetTroll
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: tranzystorekk @ 2024-05-16 23:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]

There is an updated pull request by tranzystorekk against master on the void-packages repository

https://github.com/tranzystorekk/void-packages neovim
https://github.com/void-linux/void-packages/pull/50372

WIP neovim: update to 0.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: YES

Neovim now depends on lua-lpeg as a library and dynamically links to it, but we don't serve it as a shlib.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/50372.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-neovim-50372.patch --]
[-- Type: text/x-diff, Size: 15829 bytes --]

From c0d96ad94fd6026bd016e969358c40a6af4bb0c3 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 16 May 2024 18:51:14 +0200
Subject: [PATCH 1/3] neovim: update to 0.10.0

---
 .../patches/cmake-allow-build-type-none.patch |  39 +++--
 srcpkgs/neovim/patches/cross-build.patch      | 135 ++++++++++++++++++
 srcpkgs/neovim/template                       |  29 ++--
 3 files changed, 167 insertions(+), 36 deletions(-)
 create mode 100644 srcpkgs/neovim/patches/cross-build.patch

diff --git a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
index 7654cc64a872e2..adffa83e6b2419 100644
--- a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
+++ b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
@@ -1,31 +1,28 @@
+Void uses the "None" build type to apply our chosen compile settings.
+
+diff --git a/cmake/Util.cmake b/cmake/Util.cmake
+index f09de78..f48f2d0 100644
 --- a/cmake/Util.cmake
 +++ b/cmake/Util.cmake
-@@ -162,7 +162,7 @@ endfunction()
- # Passing CMAKE_BUILD_TYPE for multi-config generators will now not only
- # not be used, but also generate a warning for the user.
- function(set_default_buildtype)
+@@ -193,7 +193,7 @@ endfunction()
+ # Passing CMAKE_BUILD_TYPE for multi-config generators will not only not be
+ # used, but also generate a warning for the user.
+ function(set_default_buildtype BUILD_TYPE)
 -  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo)
 +  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo None)
- 
-   get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
-   if(isMultiConfig)
-@@ -177,7 +177,7 @@ function(set_default_buildtype)
-       message(STATUS "CMAKE_BUILD_TYPE not specified, default is 'Debug'")
-       set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
-     elseif(NOT CMAKE_BUILD_TYPE IN_LIST allowableBuildTypes)
--      message(FATAL_ERROR "Invalid build type: ${CMAKE_BUILD_TYPE}")
-+      message(WARNING "Invalid build type: ${CMAKE_BUILD_TYPE}")
-     else()
-       message(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
-     endif()
+   if(NOT BUILD_TYPE IN_LIST allowableBuildTypes)
+     message(FATAL_ERROR "Invalid build type: ${BUILD_TYPE}")
+   endif()
+diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua
+index 5bc0319..40a72c1 100644
 --- a/runtime/lua/nvim/health.lua
 +++ b/runtime/lua/nvim/health.lua
-@@ -152,7 +152,7 @@
+@@ -153,7 +153,7 @@ local function check_performance()
    local buildtype = vim.fn.matchstr(vim.fn.execute('version'), [[\v\cbuild type:?\s*[^\n\r\t ]+]])
-   if empty(buildtype) then
-     health.report_error('failed to get build type from :version')
+   if buildtype == '' then
+     health.error('failed to get build type from :version')
 -  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo)]]):match_str(buildtype) then
 +  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo|None)]]):match_str(buildtype) then
-     health.report_ok(buildtype)
+     health.ok(buildtype)
    else
-     health.report_info(buildtype)
+     health.info(buildtype)
diff --git a/srcpkgs/neovim/patches/cross-build.patch b/srcpkgs/neovim/patches/cross-build.patch
new file mode 100644
index 00000000000000..6e09f660f4ea8c
--- /dev/null
+++ b/srcpkgs/neovim/patches/cross-build.patch
@@ -0,0 +1,135 @@
+diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
+index c171fab..cb29798 100644
+--- a/runtime/CMakeLists.txt
++++ b/runtime/CMakeLists.txt
+@@ -11,7 +11,7 @@ get_directory_property(LUA_GEN DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITI
+ get_directory_property(LUA_GEN_DEPS DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITION LUA_GEN_DEPS)
+ 
+ add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
+-  COMMAND ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
+   DEPENDS
+     ${LUA_GEN_DEPS}
+     ${SYN_VIM_GENERATOR}
+@@ -33,7 +33,7 @@ foreach(PACKAGE ${PACKAGES})
+     add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
+       COMMAND ${CMAKE_COMMAND} -E copy_directory
+         ${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME}
+-      COMMAND $<TARGET_FILE:nvim_bin>
++      COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+         -u NONE -i NONE -e --headless -c "helptags doc" -c quit
+       DEPENDS
+         nvim_bin
+@@ -65,7 +65,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
+   COMMAND ${CMAKE_COMMAND} -E remove_directory doc
+   COMMAND ${CMAKE_COMMAND} -E copy_directory
+     ${PROJECT_SOURCE_DIR}/runtime/doc doc
+-  COMMAND $<TARGET_FILE:nvim_bin>
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+     -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
+   DEPENDS
+     nvim_bin
+diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
+index d9cc695..81e9b50 100644
+--- a/src/nvim/CMakeLists.txt
++++ b/src/nvim/CMakeLists.txt
+@@ -541,7 +541,7 @@ foreach(sfile ${NVIM_SOURCES}
+   add_custom_command(
+     OUTPUT "${gf_c_h}" "${gf_h_h}"
+     COMMAND ${CMAKE_C_COMPILER} ${sfile} ${PREPROC_OUTPUT} ${gen_cflags}
+-    COMMAND ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
+     DEPENDS ${depends})
+   list(APPEND NVIM_GENERATED_FOR_SOURCES "${gf_c_h}")
+   list(APPEND NVIM_GENERATED_FOR_HEADERS "${gf_h_h}")
+@@ -551,7 +551,7 @@ foreach(sfile ${NVIM_SOURCES}
+ endforeach()
+ 
+ add_custom_command(OUTPUT ${GENERATED_UNICODE_TABLES}
+-  COMMAND ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
+                      ${UNICODE_DIR}
+                      ${GENERATED_UNICODE_TABLES}
+   DEPENDS
+@@ -565,7 +565,7 @@ configure_file(${GENERATOR_DIR}/nvim_version.lua.in ${NVIM_VERSION_LUA})
+ add_custom_command(
+   OUTPUT ${GENERATED_API_DISPATCH} ${GENERATED_API_METADATA}
+   ${FUNCS_METADATA} ${LUA_API_C_BINDINGS} ${GENERATED_KEYSETS_DEFS}
+-         COMMAND ${LUA_GEN} ${API_DISPATCH_GENERATOR}
++         COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_DISPATCH_GENERATOR}
+                          ${GENERATED_API_DISPATCH}
+                          ${GENERATED_API_METADATA} ${FUNCS_METADATA}
+                          ${LUA_API_C_BINDINGS}
+@@ -589,7 +589,7 @@ add_custom_command(
+   OUTPUT ${VIM_MODULE_FILE}
+   COMMAND ${CMAKE_COMMAND} -E env
+       "LUAC_PRG=${LUAC_PRG}"
+-      ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
++      ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
+       # NB: vim._init_packages and vim.inspect must be be first and second ones
+       # respectively, otherwise --luamod-dev won't work properly.
+       ${LUA_INIT_PACKAGES_MODULE_SOURCE} "vim._init_packages"
+@@ -624,7 +624,7 @@ add_custom_command(
+          ${GENERATED_UI_EVENTS_REMOTE}
+          ${UI_METADATA}
+          ${GENERATED_UI_EVENTS_CLIENT}
+-  COMMAND ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
+                      ${CMAKE_CURRENT_LIST_DIR}/api/ui_events.in.h
+                      ${GENERATED_UI_EVENTS_CALL}
+                      ${GENERATED_UI_EVENTS_REMOTE}
+@@ -656,29 +656,29 @@ list(APPEND NVIM_GENERATED_FOR_SOURCES
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_EX_CMDS_ENUM} ${GENERATED_EX_CMDS_DEFS}
+-  COMMAND ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
+   DEPENDS ${LUA_GEN_DEPS} ${EX_CMDS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/ex_cmds.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_FUNCS} ${FUNCS_DATA}
+-  COMMAND ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
+   DEPENDS ${LUA_GEN_DEPS} ${FUNCS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/eval.lua ${FUNCS_METADATA}
+ )
+ list(APPEND NVIM_GENERATED_FOR_SOURCES
+   "${GENERATED_FUNCS}")
+ 
+ add_custom_command(OUTPUT ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+-  COMMAND ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${EVENTS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/auevents.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS}
+-  COMMAND ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+-  COMMAND ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_ENUM_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+diff --git a/src/nvim/po/CMakeLists.txt b/src/nvim/po/CMakeLists.txt
+index 6c20089..0e99128 100644
+--- a/src/nvim/po/CMakeLists.txt
++++ b/src/nvim/po/CMakeLists.txt
+@@ -53,13 +53,13 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
+   list(SORT NVIM_RELATIVE_SOURCES)
+   add_custom_command(
+     OUTPUT ${NVIM_POT}
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/tojavascript.vim ${NVIM_POT} ${PROJECT_SOURCE_DIR}/runtime/optwin.vim
+     COMMAND ${XGETTEXT_PRG} -o ${NVIM_POT} --default-domain=nvim
+       --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2
+       -D ${CMAKE_CURRENT_SOURCE_DIR} -D ${CMAKE_CURRENT_BINARY_DIR}
+       ${NVIM_RELATIVE_SOURCES} optwin.js
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/fixfilenames.vim ${NVIM_POT} ../../../runtime/optwin.vim
+     VERBATIM
+     DEPENDS ${NVIM_SOURCES} nvim_bin nvim_runtime_deps)
diff --git a/srcpkgs/neovim/template b/srcpkgs/neovim/template
index d710d54c06a110..792b105bc34f21 100644
--- a/srcpkgs/neovim/template
+++ b/srcpkgs/neovim/template
@@ -1,26 +1,26 @@
 # Template file for 'neovim'
 pkgname=neovim
-version=0.9.5
-revision=2
+version=0.10.0
+revision=1
 build_style=cmake
 build_helper="qemu"
 configure_args="-DCOMPILE_LUA=OFF -DPREFER_LUA=$(vopt_if luajit OFF ON)"
-hostmakedepends="gettext lua51-lpeg lua51-mpack lua51-BitOp
- $(vopt_if luajit LuaJIT lua51)"
-makedepends="libtermkey-devel libuv-devel libvterm-devel msgpack-devel
- libluv-devel tree-sitter-devel $(vopt_if luajit LuaJIT-devel lua51-devel)"
+hostmakedepends="gettext patchelf"
+makedepends="libuv-devel libvterm-devel msgpack-devel
+ libluv-devel tree-sitter-devel unibilium-devel
+ lua51-lpeg $(vopt_if luajit LuaJIT-devel lua51-devel)"
 short_desc="Fork of Vim aiming to improve user experience, plugins and GUIs"
 maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
 license="Apache-2.0, Vim"
 homepage="https://neovim.io"
 changelog="https://github.com/neovim/neovim/releases"
 distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz"
-checksum=fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719
+checksum=372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828
 
 build_options=luajit
 
 case "$XBPS_TARGET_MACHINE" in
-	riscv64*) build_options_default="" ;;
+	armv7l|riscv64*) build_options_default="" ;;
 	*) build_options_default="luajit" ;;
 esac
 
@@ -35,13 +35,12 @@ alternatives="
 # They want assertion
 CFLAGS=-UNDEBUG
 
-pre_configure() {
-	vsed -i runtime/CMakeLists.txt \
-		-e "s|\".*/bin/nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
-	vsed -i src/nvim/po/CMakeLists.txt \
-		-e "s|\$<TARGET_FILE:nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
-}
-
 post_install() {
 	vlicense LICENSE.txt
+
+	if [ "${CROSS_BUILD}" ]; then
+		patchelf --replace-needed \
+			${XBPS_CROSS_BASE}/usr/lib/lua/5.1/lpeg.so /usr/lib/lua/5.1/lpeg.so \
+			${DESTDIR}/usr/bin/nvim
+	fi
 }

From 8f3dfe306e342ba6e1df3ccf15b3c76f727d455c Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 13:55:23 -0400
Subject: [PATCH 2/3] lua54-lpeg: shlib_provide lpeg.so for lua 5.1

needed for neovim
---
 common/shlibs               | 1 +
 srcpkgs/lua54-lpeg/template | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index a433865e964c0f..c5ee7ac98a9542 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4435,3 +4435,4 @@ libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
 libKPim6MimeTreeParserCore.so.6 mimetreeparser-24.02.0_1
 libKPim6MimeTreeParserWidgets.so.6 mimetreeparser-24.02.0_1
+/usr/lib/lua/5.1/lpeg.so lua51-lpeg-1.1.0_2
diff --git a/srcpkgs/lua54-lpeg/template b/srcpkgs/lua54-lpeg/template
index 67be551249f4bb..222a0517f030a0 100644
--- a/srcpkgs/lua54-lpeg/template
+++ b/srcpkgs/lua54-lpeg/template
@@ -1,7 +1,7 @@
 # Template file for 'lua54-lpeg'
 pkgname=lua54-lpeg
 version=1.1.0
-revision=1
+revision=2
 hostmakedepends="lua51 lua52 lua53 lua54"
 makedepends="lua51-devel lua52-devel lua53-devel lua54-devel"
 depends="lua54"
@@ -61,6 +61,7 @@ do_install() {
 lua51-lpeg_package() {
 	depends="lua51"
 	short_desc="${_desc} (5.1.x)"
+	shlib_provides="/usr/lib/lua/5.1/lpeg.so"
 	pkg_install() {
 		vmove usr/lib/lua/5.1
 		vmove usr/share/lua/5.1

From 4b2ccc4af6e177563176ff1bff6f6287979235d1 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 14:01:59 -0400
Subject: [PATCH 3/3] common/hooks/pre-pkg/04-generate-runtime-deps: support
 SONAME as path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

neovim looks for a SONAME that is a whole path

find: warning: ‘-name’ matches against basenames only, but the given pattern
  contains a directory separator (‘/’), thus the expression will evaluate to
  false all the time.  Did you mean ‘-wholename’?
    SONAME: /usr/lib/lua/5.1/lpeg.so <-> lua51-lpeg>=1.1.0_2
---
 common/hooks/pre-pkg/04-generate-runtime-deps.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
index 488c8fc14ea3b2..78c4be2e63d51b 100644
--- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh
+++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
@@ -98,7 +98,12 @@ hook() {
     for f in ${verify_deps}; do
         unset _rdep _pkgname _rdepver
 
-        if [ "$(find ${PKGDESTDIR} -name "$f")" ]; then
+        local _findargs="-name"
+        # if SONAME is a path, find should use -wholename
+        if [[ "$f" = */* ]]; then
+            _findargs="-wholename"
+        fi
+        if [ "$(find "${PKGDESTDIR}" $_findargs "$f")" ]; then
             # Ignore libs by current pkg
             echo "   SONAME: $f <-> $pkgname (ignored)"
             continue

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (4 preceding siblings ...)
  2024-05-16 23:04 ` [PR PATCH] [Updated] " tranzystorekk
@ 2024-05-18 16:00 ` AnInternetTroll
  2024-05-18 16:08 ` classabbyamp
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: AnInternetTroll @ 2024-05-18 16:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

New comment by AnInternetTroll on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2118866221

Comment:
Tested on x86\_64-glibc with some LSPs. Works as expected, though I had
to :TSInstall some parsers again. Anyway, great work!


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (5 preceding siblings ...)
  2024-05-18 16:00 ` AnInternetTroll
@ 2024-05-18 16:08 ` classabbyamp
  2024-05-19 17:33 ` ibhagwan
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: classabbyamp @ 2024-05-18 16:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2118868592

Comment:
> though I had to :TSInstall some parsers again

probably more related to the ABI break in treesitter

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (6 preceding siblings ...)
  2024-05-18 16:08 ` classabbyamp
@ 2024-05-19 17:33 ` ibhagwan
  2024-05-19 18:19 ` tranzystorekk
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ibhagwan @ 2024-05-19 17:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 716 bytes --]

New comment by ibhagwan on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2119308788

Comment:
@tranzystorekk, ty for your work on this.

This build however is incomplete, it is missing lua the default treesitter parsers:
```
/lib/nvim/parser/bash.so
/lib/nvim/parser/c.so
/lib/nvim/parser/lua.so
/lib/nvim/parser/markdown.so
/lib/nvim/parser/markdown_inline.so
/lib/nvim/parser/python.so
/lib/nvim/parser/query.so
/lib/nvim/parser/vim.so
/lib/nvim/parser/vimdoc.so
```

This can result in https://github.com/neovim/neovim/issues/27951,  which you may not experience if you have `nvim-treesitter` plugin installed as it will compile the missing parsers.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (7 preceding siblings ...)
  2024-05-19 17:33 ` ibhagwan
@ 2024-05-19 18:19 ` tranzystorekk
  2024-05-19 18:25 ` ibhagwan
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: tranzystorekk @ 2024-05-19 18:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

New comment by tranzystorekk on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2119320257

Comment:
That would require packaging these parsers separately, and I don't have the bandwidth for that.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (8 preceding siblings ...)
  2024-05-19 18:19 ` tranzystorekk
@ 2024-05-19 18:25 ` ibhagwan
  2024-05-19 18:28 ` tranzystorekk
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ibhagwan @ 2024-05-19 18:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 625 bytes --]

New comment by ibhagwan on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2119321789

Comment:
> That would require packaging these parsers separately, and I don't have the bandwidth for that.

Why separately? When I build neovim locally and these are built inside the neovim build folder, isn’t this as simple as adding these files to the package?

Without these files the package is incomplete and will generate an error for example when opening lua files:
![IMG_2104](https://github.com/void-linux/void-packages/assets/59988195/107b4bc8-4eca-434f-97fb-2c0b2dda72d5)


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (9 preceding siblings ...)
  2024-05-19 18:25 ` ibhagwan
@ 2024-05-19 18:28 ` tranzystorekk
  2024-05-19 18:31 ` tranzystorekk
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: tranzystorekk @ 2024-05-19 18:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

New comment by tranzystorekk on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2119322498

Comment:
> Why separately? When I build neovim locally and these are built inside the neovim build folder, isn’t this as simple as adding these files to the package?

we specifically don't invoke the `cmake.deps` step, and furthermore bundled deps need to be downloaded and our build_style cmake **specifically** disables network access so that doesn't happen.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (10 preceding siblings ...)
  2024-05-19 18:28 ` tranzystorekk
@ 2024-05-19 18:31 ` tranzystorekk
  2024-05-19 18:37 ` ibhagwan
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: tranzystorekk @ 2024-05-19 18:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 501 bytes --]

New comment by tranzystorekk on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2119322498

Comment:
> Why separately? When I build neovim locally and these are built inside the neovim build folder, isn’t this as simple as adding these files to the package?

we explicitly don't invoke the `cmake.deps` step, and furthermore bundled deps need to be downloaded and our build_style cmake **specifically** disables network access so that doesn't happen.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (11 preceding siblings ...)
  2024-05-19 18:31 ` tranzystorekk
@ 2024-05-19 18:37 ` ibhagwan
  2024-05-19 19:02 ` tranzystorekk
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ibhagwan @ 2024-05-19 18:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

New comment by ibhagwan on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2119324597

Comment:
> > Why separately? When I build neovim locally and these are built inside the neovim build folder, isn’t this as simple as adding these files to the package?
> 
> we explicitly don't invoke the `cmake.deps` step, and furthermore bundled deps need to be downloaded and our build_style cmake **specifically** disables network access so that doesn't happen.

So do you think this can be released as is without the libs or should we block merging of this package for a while?

Having an error and no highlights when opening a lua/markdown/etc file isn’t really acceptable IMHO. 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (12 preceding siblings ...)
  2024-05-19 18:37 ` ibhagwan
@ 2024-05-19 19:02 ` tranzystorekk
  2024-05-19 20:55 ` [PR PATCH] [Updated] " tranzystorekk
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: tranzystorekk @ 2024-05-19 19:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

New comment by tranzystorekk on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2119330400

Comment:
> So do you think this can be released as is without the libs or should we block merging of this package for a while?

Now that I agree shouldn't happen.
I'll experiment with manually downloading the needed parser distfiles and invoking additional build steps to get them into neovim.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (13 preceding siblings ...)
  2024-05-19 19:02 ` tranzystorekk
@ 2024-05-19 20:55 ` tranzystorekk
  2024-05-19 21:09 ` ibhagwan
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: tranzystorekk @ 2024-05-19 20:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1358 bytes --]

There is an updated pull request by tranzystorekk against master on the void-packages repository

https://github.com/tranzystorekk/void-packages neovim
https://github.com/void-linux/void-packages/pull/50372

neovim: update to 0.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: YES

Neovim now depends on lua-lpeg as a library and dynamically links to it, but we don't serve it as a shlib.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/50372.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-neovim-50372.patch --]
[-- Type: text/x-diff, Size: 19519 bytes --]

From d34567a90d27887c688abaaab42dd2fd6d751649 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 16 May 2024 18:51:14 +0200
Subject: [PATCH 1/3] neovim: update to 0.10.0

---
 .../patches/cmake-allow-build-type-none.patch |  39 +++--
 srcpkgs/neovim/patches/cross-build.patch      | 135 ++++++++++++++++++
 .../patches/disable-parser-download.patch     |  20 +++
 srcpkgs/neovim/template                       |  73 ++++++++--
 4 files changed, 233 insertions(+), 34 deletions(-)
 create mode 100644 srcpkgs/neovim/patches/cross-build.patch
 create mode 100644 srcpkgs/neovim/patches/disable-parser-download.patch

diff --git a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
index 7654cc64a872e2..adffa83e6b2419 100644
--- a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
+++ b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
@@ -1,31 +1,28 @@
+Void uses the "None" build type to apply our chosen compile settings.
+
+diff --git a/cmake/Util.cmake b/cmake/Util.cmake
+index f09de78..f48f2d0 100644
 --- a/cmake/Util.cmake
 +++ b/cmake/Util.cmake
-@@ -162,7 +162,7 @@ endfunction()
- # Passing CMAKE_BUILD_TYPE for multi-config generators will now not only
- # not be used, but also generate a warning for the user.
- function(set_default_buildtype)
+@@ -193,7 +193,7 @@ endfunction()
+ # Passing CMAKE_BUILD_TYPE for multi-config generators will not only not be
+ # used, but also generate a warning for the user.
+ function(set_default_buildtype BUILD_TYPE)
 -  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo)
 +  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo None)
- 
-   get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
-   if(isMultiConfig)
-@@ -177,7 +177,7 @@ function(set_default_buildtype)
-       message(STATUS "CMAKE_BUILD_TYPE not specified, default is 'Debug'")
-       set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
-     elseif(NOT CMAKE_BUILD_TYPE IN_LIST allowableBuildTypes)
--      message(FATAL_ERROR "Invalid build type: ${CMAKE_BUILD_TYPE}")
-+      message(WARNING "Invalid build type: ${CMAKE_BUILD_TYPE}")
-     else()
-       message(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
-     endif()
+   if(NOT BUILD_TYPE IN_LIST allowableBuildTypes)
+     message(FATAL_ERROR "Invalid build type: ${BUILD_TYPE}")
+   endif()
+diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua
+index 5bc0319..40a72c1 100644
 --- a/runtime/lua/nvim/health.lua
 +++ b/runtime/lua/nvim/health.lua
-@@ -152,7 +152,7 @@
+@@ -153,7 +153,7 @@ local function check_performance()
    local buildtype = vim.fn.matchstr(vim.fn.execute('version'), [[\v\cbuild type:?\s*[^\n\r\t ]+]])
-   if empty(buildtype) then
-     health.report_error('failed to get build type from :version')
+   if buildtype == '' then
+     health.error('failed to get build type from :version')
 -  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo)]]):match_str(buildtype) then
 +  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo|None)]]):match_str(buildtype) then
-     health.report_ok(buildtype)
+     health.ok(buildtype)
    else
-     health.report_info(buildtype)
+     health.info(buildtype)
diff --git a/srcpkgs/neovim/patches/cross-build.patch b/srcpkgs/neovim/patches/cross-build.patch
new file mode 100644
index 00000000000000..6e09f660f4ea8c
--- /dev/null
+++ b/srcpkgs/neovim/patches/cross-build.patch
@@ -0,0 +1,135 @@
+diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
+index c171fab..cb29798 100644
+--- a/runtime/CMakeLists.txt
++++ b/runtime/CMakeLists.txt
+@@ -11,7 +11,7 @@ get_directory_property(LUA_GEN DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITI
+ get_directory_property(LUA_GEN_DEPS DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITION LUA_GEN_DEPS)
+ 
+ add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
+-  COMMAND ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
+   DEPENDS
+     ${LUA_GEN_DEPS}
+     ${SYN_VIM_GENERATOR}
+@@ -33,7 +33,7 @@ foreach(PACKAGE ${PACKAGES})
+     add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
+       COMMAND ${CMAKE_COMMAND} -E copy_directory
+         ${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME}
+-      COMMAND $<TARGET_FILE:nvim_bin>
++      COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+         -u NONE -i NONE -e --headless -c "helptags doc" -c quit
+       DEPENDS
+         nvim_bin
+@@ -65,7 +65,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
+   COMMAND ${CMAKE_COMMAND} -E remove_directory doc
+   COMMAND ${CMAKE_COMMAND} -E copy_directory
+     ${PROJECT_SOURCE_DIR}/runtime/doc doc
+-  COMMAND $<TARGET_FILE:nvim_bin>
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+     -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
+   DEPENDS
+     nvim_bin
+diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
+index d9cc695..81e9b50 100644
+--- a/src/nvim/CMakeLists.txt
++++ b/src/nvim/CMakeLists.txt
+@@ -541,7 +541,7 @@ foreach(sfile ${NVIM_SOURCES}
+   add_custom_command(
+     OUTPUT "${gf_c_h}" "${gf_h_h}"
+     COMMAND ${CMAKE_C_COMPILER} ${sfile} ${PREPROC_OUTPUT} ${gen_cflags}
+-    COMMAND ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
+     DEPENDS ${depends})
+   list(APPEND NVIM_GENERATED_FOR_SOURCES "${gf_c_h}")
+   list(APPEND NVIM_GENERATED_FOR_HEADERS "${gf_h_h}")
+@@ -551,7 +551,7 @@ foreach(sfile ${NVIM_SOURCES}
+ endforeach()
+ 
+ add_custom_command(OUTPUT ${GENERATED_UNICODE_TABLES}
+-  COMMAND ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
+                      ${UNICODE_DIR}
+                      ${GENERATED_UNICODE_TABLES}
+   DEPENDS
+@@ -565,7 +565,7 @@ configure_file(${GENERATOR_DIR}/nvim_version.lua.in ${NVIM_VERSION_LUA})
+ add_custom_command(
+   OUTPUT ${GENERATED_API_DISPATCH} ${GENERATED_API_METADATA}
+   ${FUNCS_METADATA} ${LUA_API_C_BINDINGS} ${GENERATED_KEYSETS_DEFS}
+-         COMMAND ${LUA_GEN} ${API_DISPATCH_GENERATOR}
++         COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_DISPATCH_GENERATOR}
+                          ${GENERATED_API_DISPATCH}
+                          ${GENERATED_API_METADATA} ${FUNCS_METADATA}
+                          ${LUA_API_C_BINDINGS}
+@@ -589,7 +589,7 @@ add_custom_command(
+   OUTPUT ${VIM_MODULE_FILE}
+   COMMAND ${CMAKE_COMMAND} -E env
+       "LUAC_PRG=${LUAC_PRG}"
+-      ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
++      ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
+       # NB: vim._init_packages and vim.inspect must be be first and second ones
+       # respectively, otherwise --luamod-dev won't work properly.
+       ${LUA_INIT_PACKAGES_MODULE_SOURCE} "vim._init_packages"
+@@ -624,7 +624,7 @@ add_custom_command(
+          ${GENERATED_UI_EVENTS_REMOTE}
+          ${UI_METADATA}
+          ${GENERATED_UI_EVENTS_CLIENT}
+-  COMMAND ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
+                      ${CMAKE_CURRENT_LIST_DIR}/api/ui_events.in.h
+                      ${GENERATED_UI_EVENTS_CALL}
+                      ${GENERATED_UI_EVENTS_REMOTE}
+@@ -656,29 +656,29 @@ list(APPEND NVIM_GENERATED_FOR_SOURCES
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_EX_CMDS_ENUM} ${GENERATED_EX_CMDS_DEFS}
+-  COMMAND ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
+   DEPENDS ${LUA_GEN_DEPS} ${EX_CMDS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/ex_cmds.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_FUNCS} ${FUNCS_DATA}
+-  COMMAND ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
+   DEPENDS ${LUA_GEN_DEPS} ${FUNCS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/eval.lua ${FUNCS_METADATA}
+ )
+ list(APPEND NVIM_GENERATED_FOR_SOURCES
+   "${GENERATED_FUNCS}")
+ 
+ add_custom_command(OUTPUT ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+-  COMMAND ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${EVENTS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/auevents.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS}
+-  COMMAND ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+-  COMMAND ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_ENUM_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+diff --git a/src/nvim/po/CMakeLists.txt b/src/nvim/po/CMakeLists.txt
+index 6c20089..0e99128 100644
+--- a/src/nvim/po/CMakeLists.txt
++++ b/src/nvim/po/CMakeLists.txt
+@@ -53,13 +53,13 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
+   list(SORT NVIM_RELATIVE_SOURCES)
+   add_custom_command(
+     OUTPUT ${NVIM_POT}
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/tojavascript.vim ${NVIM_POT} ${PROJECT_SOURCE_DIR}/runtime/optwin.vim
+     COMMAND ${XGETTEXT_PRG} -o ${NVIM_POT} --default-domain=nvim
+       --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2
+       -D ${CMAKE_CURRENT_SOURCE_DIR} -D ${CMAKE_CURRENT_BINARY_DIR}
+       ${NVIM_RELATIVE_SOURCES} optwin.js
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/fixfilenames.vim ${NVIM_POT} ../../../runtime/optwin.vim
+     VERBATIM
+     DEPENDS ${NVIM_SOURCES} nvim_bin nvim_runtime_deps)
diff --git a/srcpkgs/neovim/patches/disable-parser-download.patch b/srcpkgs/neovim/patches/disable-parser-download.patch
new file mode 100644
index 00000000000000..eba0eb05c335cc
--- /dev/null
+++ b/srcpkgs/neovim/patches/disable-parser-download.patch
@@ -0,0 +1,20 @@
+diff --git a/cmake.deps/cmake/BuildTreesitterParsers.cmake b/cmake.deps/cmake/BuildTreesitterParsers.cmake
+index 837d075..6c3fccb 100644
+--- a/cmake.deps/cmake/BuildTreesitterParsers.cmake
++++ b/cmake.deps/cmake/BuildTreesitterParsers.cmake
+@@ -19,13 +19,12 @@ function(BuildTSParser)
+ 
+   get_externalproject_options(${NAME} ${DEPS_IGNORE_SHA})
+   ExternalProject_Add(${NAME}
+-    DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/${NAME}
++    SOURCE_DIR ${DEPS_BUILD_DIR}/src/${NAME}
+     PATCH_COMMAND ${CMAKE_COMMAND} -E copy
+       ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${TS_CMAKE_FILE}
+       ${DEPS_BUILD_DIR}/src/${NAME}/CMakeLists.txt
+     CMAKE_ARGS ${DEPS_CMAKE_ARGS}
+-      -D PARSERLANG=${TS_LANG}
+-    ${EXTERNALPROJECT_OPTIONS})
++      -D PARSERLANG=${TS_LANG})
+ endfunction()
+ 
+ foreach(lang c lua vim vimdoc query python bash)
diff --git a/srcpkgs/neovim/template b/srcpkgs/neovim/template
index d710d54c06a110..175472c0a06ca7 100644
--- a/srcpkgs/neovim/template
+++ b/srcpkgs/neovim/template
@@ -1,26 +1,61 @@
 # Template file for 'neovim'
 pkgname=neovim
-version=0.9.5
-revision=2
+version=0.10.0
+revision=1
+# as per https://github.com/neovim/neovim/blob/master/cmake.deps/deps.txt
+_treesitter_c_version=0.21.0
+_treesitter_lua_version=0.1.0
+_treesitter_vim_version=0.4.0
+_treesitter_vimdoc_version=2.5.1
+_treesitter_query_version=0.3.0
+_treesitter_python_version=0.21.0
+_treesitter_bash_version=0.21.0
+_treesitter_markdown_version=0.2.3
 build_style=cmake
 build_helper="qemu"
 configure_args="-DCOMPILE_LUA=OFF -DPREFER_LUA=$(vopt_if luajit OFF ON)"
-hostmakedepends="gettext lua51-lpeg lua51-mpack lua51-BitOp
- $(vopt_if luajit LuaJIT lua51)"
-makedepends="libtermkey-devel libuv-devel libvterm-devel msgpack-devel
- libluv-devel tree-sitter-devel $(vopt_if luajit LuaJIT-devel lua51-devel)"
+hostmakedepends="gettext patchelf"
+makedepends="libuv-devel libvterm-devel msgpack-devel
+ libluv-devel tree-sitter-devel unibilium-devel
+ lua51-lpeg $(vopt_if luajit LuaJIT-devel lua51-devel)"
 short_desc="Fork of Vim aiming to improve user experience, plugins and GUIs"
 maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
 license="Apache-2.0, Vim"
 homepage="https://neovim.io"
 changelog="https://github.com/neovim/neovim/releases"
-distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz"
-checksum=fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719
+distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz
+ https://github.com/tree-sitter/tree-sitter-c/archive/refs/tags/v${_treesitter_c_version}.tar.gz>ts_c.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-lua/archive/refs/tags/v${_treesitter_lua_version}.tar.gz>ts_lua.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-vim/archive/refs/tags/v${_treesitter_vim_version}.tar.gz>ts_vim.tar.gz
+ https://github.com/neovim/tree-sitter-vimdoc/archive/refs/tags/v${_treesitter_vimdoc_version}.tar.gz>ts_vimdoc.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-query/archive/refs/tags/v${_treesitter_query_version}.tar.gz>ts_query.tar.gz
+ https://github.com/tree-sitter/tree-sitter-python/archive/refs/tags/v${_treesitter_python_version}.tar.gz>ts_python.tar.gz
+ https://github.com/tree-sitter/tree-sitter-bash/archive/refs/tags/v${_treesitter_bash_version}.tar.gz>ts_bash.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-markdown/archive/refs/tags/v${_treesitter_markdown_version}.tar.gz>ts_markdown.tar.gz"
+checksum="372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828
+ 6f0f5d1b71cf8ffd8a37fb638c6022fa1245bd630150b538547d52128ce0ea7e
+ 230cfcbfa74ed1f7b8149e9a1f34c2efc4c589a71fe0f5dc8560622f8020d722
+ 9f856f8b4a10ab43348550fa2d3cb2846ae3d8e60f45887200549c051c66f9d5
+ 063645096504b21603585507c41c6d8718ff3c11b2150c5bfc31e8f3ee9afea3
+ f878ff37abcb83250e31a6569e997546f3dbab74dcb26683cb2d613f7568cfc0
+ 720304a603271fa89e4430a14d6a81a023d6d7d1171b1533e49c0ab44f1e1c13
+ f0515efda839cfede851adb24ac154227fbc0dfb60c6c11595ecfa9087d43ceb
+ 4909d6023643f1afc3ab219585d4035b7403f3a17849782ab803c5f73c8a31d5"
+
+skip_extraction="
+ ts_c.tar.gz
+ ts_lua.tar.gz
+ ts_vim.tar.gz
+ ts_vimdoc.tar.gz
+ ts_query.tar.gz
+ ts_python.tar.gz
+ ts_bash.tar.gz
+ ts_markdown.tar.gz"
 
 build_options=luajit
 
 case "$XBPS_TARGET_MACHINE" in
-	riscv64*) build_options_default="" ;;
+	armv7l|riscv64*) build_options_default="" ;;
 	*) build_options_default="luajit" ;;
 esac
 
@@ -35,13 +70,25 @@ alternatives="
 # They want assertion
 CFLAGS=-UNDEBUG
 
+post_extract() {
+	local _lang
+	for _lang in c lua vim vimdoc query python bash markdown; do
+		vsrcextract -C .deps/build/src/treesitter_${_lang} ts_${_lang}.tar.gz
+	done
+}
+
 pre_configure() {
-	vsed -i runtime/CMakeLists.txt \
-		-e "s|\".*/bin/nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
-	vsed -i src/nvim/po/CMakeLists.txt \
-		-e "s|\$<TARGET_FILE:nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
+	# build bundled treesitter parsers
+	cmake -S cmake.deps -B .deps -G Ninja -DUSE_BUNDLED=OFF -DUSE_BUNDLED_TS_PARSERS=ON
+	cmake --build .deps
 }
 
 post_install() {
 	vlicense LICENSE.txt
+
+	if [ "${CROSS_BUILD}" ]; then
+		patchelf --replace-needed \
+			${XBPS_CROSS_BASE}/usr/lib/lua/5.1/lpeg.so /usr/lib/lua/5.1/lpeg.so \
+			${DESTDIR}/usr/bin/nvim
+	fi
 }

From ee34aa8708759c7e0b7ce80aeece01cc3159e93e Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 13:55:23 -0400
Subject: [PATCH 2/3] lua54-lpeg: shlib_provide lpeg.so for lua 5.1

needed for neovim
---
 common/shlibs               | 1 +
 srcpkgs/lua54-lpeg/template | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index d6bb69c39e269a..ded6df935bee8d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4438,3 +4438,4 @@ libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
 libKPim6MimeTreeParserCore.so.6 mimetreeparser-24.02.0_1
 libKPim6MimeTreeParserWidgets.so.6 mimetreeparser-24.02.0_1
+/usr/lib/lua/5.1/lpeg.so lua51-lpeg-1.1.0_2
diff --git a/srcpkgs/lua54-lpeg/template b/srcpkgs/lua54-lpeg/template
index 67be551249f4bb..222a0517f030a0 100644
--- a/srcpkgs/lua54-lpeg/template
+++ b/srcpkgs/lua54-lpeg/template
@@ -1,7 +1,7 @@
 # Template file for 'lua54-lpeg'
 pkgname=lua54-lpeg
 version=1.1.0
-revision=1
+revision=2
 hostmakedepends="lua51 lua52 lua53 lua54"
 makedepends="lua51-devel lua52-devel lua53-devel lua54-devel"
 depends="lua54"
@@ -61,6 +61,7 @@ do_install() {
 lua51-lpeg_package() {
 	depends="lua51"
 	short_desc="${_desc} (5.1.x)"
+	shlib_provides="/usr/lib/lua/5.1/lpeg.so"
 	pkg_install() {
 		vmove usr/lib/lua/5.1
 		vmove usr/share/lua/5.1

From 80f2412de103fdc6c456ee8e5ed24d7fda30f145 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 14:01:59 -0400
Subject: [PATCH 3/3] common/hooks/pre-pkg/04-generate-runtime-deps: support
 SONAME as path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

neovim looks for a SONAME that is a whole path

find: warning: ‘-name’ matches against basenames only, but the given pattern
  contains a directory separator (‘/’), thus the expression will evaluate to
  false all the time.  Did you mean ‘-wholename’?
    SONAME: /usr/lib/lua/5.1/lpeg.so <-> lua51-lpeg>=1.1.0_2
---
 common/hooks/pre-pkg/04-generate-runtime-deps.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
index 488c8fc14ea3b2..78c4be2e63d51b 100644
--- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh
+++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
@@ -98,7 +98,12 @@ hook() {
     for f in ${verify_deps}; do
         unset _rdep _pkgname _rdepver
 
-        if [ "$(find ${PKGDESTDIR} -name "$f")" ]; then
+        local _findargs="-name"
+        # if SONAME is a path, find should use -wholename
+        if [[ "$f" = */* ]]; then
+            _findargs="-wholename"
+        fi
+        if [ "$(find "${PKGDESTDIR}" $_findargs "$f")" ]; then
             # Ignore libs by current pkg
             echo "   SONAME: $f <-> $pkgname (ignored)"
             continue

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (14 preceding siblings ...)
  2024-05-19 20:55 ` [PR PATCH] [Updated] " tranzystorekk
@ 2024-05-19 21:09 ` ibhagwan
  2024-05-19 21:15 ` ibhagwan
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ibhagwan @ 2024-05-19 21:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

New comment by ibhagwan on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2119361176

Comment:
Ty @tranzystorekk for the latest pushes, work perfectly on glibc x86_64.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (15 preceding siblings ...)
  2024-05-19 21:09 ` ibhagwan
@ 2024-05-19 21:15 ` ibhagwan
  2024-05-19 21:26 ` [PR PATCH] [Updated] " tranzystorekk
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ibhagwan @ 2024-05-19 21:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New comment by ibhagwan on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2119361176

Comment:
Ty @tranzystorekk for the latest pushes, works perfectly on glibc x86_64.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (16 preceding siblings ...)
  2024-05-19 21:15 ` ibhagwan
@ 2024-05-19 21:26 ` tranzystorekk
  2024-05-19 21:30 ` [PR REVIEW] " classabbyamp
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: tranzystorekk @ 2024-05-19 21:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1358 bytes --]

There is an updated pull request by tranzystorekk against master on the void-packages repository

https://github.com/tranzystorekk/void-packages neovim
https://github.com/void-linux/void-packages/pull/50372

neovim: update to 0.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: YES

Neovim now depends on lua-lpeg as a library and dynamically links to it, but we don't serve it as a shlib.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/50372.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-neovim-50372.patch --]
[-- Type: text/x-diff, Size: 20069 bytes --]

From 379a4800e6bf01de378aa5f9cd0bfe08ad1818d9 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 16 May 2024 18:51:14 +0200
Subject: [PATCH 1/3] neovim: update to 0.10.0

---
 .../patches/cmake-allow-build-type-none.patch |  39 +++--
 srcpkgs/neovim/patches/cross-build.patch      | 135 ++++++++++++++++++
 .../patches/disable-parser-download.patch     |  20 +++
 srcpkgs/neovim/template                       |  75 ++++++++--
 4 files changed, 235 insertions(+), 34 deletions(-)
 create mode 100644 srcpkgs/neovim/patches/cross-build.patch
 create mode 100644 srcpkgs/neovim/patches/disable-parser-download.patch

diff --git a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
index 7654cc64a872e2..adffa83e6b2419 100644
--- a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
+++ b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
@@ -1,31 +1,28 @@
+Void uses the "None" build type to apply our chosen compile settings.
+
+diff --git a/cmake/Util.cmake b/cmake/Util.cmake
+index f09de78..f48f2d0 100644
 --- a/cmake/Util.cmake
 +++ b/cmake/Util.cmake
-@@ -162,7 +162,7 @@ endfunction()
- # Passing CMAKE_BUILD_TYPE for multi-config generators will now not only
- # not be used, but also generate a warning for the user.
- function(set_default_buildtype)
+@@ -193,7 +193,7 @@ endfunction()
+ # Passing CMAKE_BUILD_TYPE for multi-config generators will not only not be
+ # used, but also generate a warning for the user.
+ function(set_default_buildtype BUILD_TYPE)
 -  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo)
 +  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo None)
- 
-   get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
-   if(isMultiConfig)
-@@ -177,7 +177,7 @@ function(set_default_buildtype)
-       message(STATUS "CMAKE_BUILD_TYPE not specified, default is 'Debug'")
-       set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
-     elseif(NOT CMAKE_BUILD_TYPE IN_LIST allowableBuildTypes)
--      message(FATAL_ERROR "Invalid build type: ${CMAKE_BUILD_TYPE}")
-+      message(WARNING "Invalid build type: ${CMAKE_BUILD_TYPE}")
-     else()
-       message(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
-     endif()
+   if(NOT BUILD_TYPE IN_LIST allowableBuildTypes)
+     message(FATAL_ERROR "Invalid build type: ${BUILD_TYPE}")
+   endif()
+diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua
+index 5bc0319..40a72c1 100644
 --- a/runtime/lua/nvim/health.lua
 +++ b/runtime/lua/nvim/health.lua
-@@ -152,7 +152,7 @@
+@@ -153,7 +153,7 @@ local function check_performance()
    local buildtype = vim.fn.matchstr(vim.fn.execute('version'), [[\v\cbuild type:?\s*[^\n\r\t ]+]])
-   if empty(buildtype) then
-     health.report_error('failed to get build type from :version')
+   if buildtype == '' then
+     health.error('failed to get build type from :version')
 -  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo)]]):match_str(buildtype) then
 +  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo|None)]]):match_str(buildtype) then
-     health.report_ok(buildtype)
+     health.ok(buildtype)
    else
-     health.report_info(buildtype)
+     health.info(buildtype)
diff --git a/srcpkgs/neovim/patches/cross-build.patch b/srcpkgs/neovim/patches/cross-build.patch
new file mode 100644
index 00000000000000..6e09f660f4ea8c
--- /dev/null
+++ b/srcpkgs/neovim/patches/cross-build.patch
@@ -0,0 +1,135 @@
+diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
+index c171fab..cb29798 100644
+--- a/runtime/CMakeLists.txt
++++ b/runtime/CMakeLists.txt
+@@ -11,7 +11,7 @@ get_directory_property(LUA_GEN DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITI
+ get_directory_property(LUA_GEN_DEPS DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITION LUA_GEN_DEPS)
+ 
+ add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
+-  COMMAND ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
+   DEPENDS
+     ${LUA_GEN_DEPS}
+     ${SYN_VIM_GENERATOR}
+@@ -33,7 +33,7 @@ foreach(PACKAGE ${PACKAGES})
+     add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
+       COMMAND ${CMAKE_COMMAND} -E copy_directory
+         ${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME}
+-      COMMAND $<TARGET_FILE:nvim_bin>
++      COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+         -u NONE -i NONE -e --headless -c "helptags doc" -c quit
+       DEPENDS
+         nvim_bin
+@@ -65,7 +65,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
+   COMMAND ${CMAKE_COMMAND} -E remove_directory doc
+   COMMAND ${CMAKE_COMMAND} -E copy_directory
+     ${PROJECT_SOURCE_DIR}/runtime/doc doc
+-  COMMAND $<TARGET_FILE:nvim_bin>
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+     -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
+   DEPENDS
+     nvim_bin
+diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
+index d9cc695..81e9b50 100644
+--- a/src/nvim/CMakeLists.txt
++++ b/src/nvim/CMakeLists.txt
+@@ -541,7 +541,7 @@ foreach(sfile ${NVIM_SOURCES}
+   add_custom_command(
+     OUTPUT "${gf_c_h}" "${gf_h_h}"
+     COMMAND ${CMAKE_C_COMPILER} ${sfile} ${PREPROC_OUTPUT} ${gen_cflags}
+-    COMMAND ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
+     DEPENDS ${depends})
+   list(APPEND NVIM_GENERATED_FOR_SOURCES "${gf_c_h}")
+   list(APPEND NVIM_GENERATED_FOR_HEADERS "${gf_h_h}")
+@@ -551,7 +551,7 @@ foreach(sfile ${NVIM_SOURCES}
+ endforeach()
+ 
+ add_custom_command(OUTPUT ${GENERATED_UNICODE_TABLES}
+-  COMMAND ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
+                      ${UNICODE_DIR}
+                      ${GENERATED_UNICODE_TABLES}
+   DEPENDS
+@@ -565,7 +565,7 @@ configure_file(${GENERATOR_DIR}/nvim_version.lua.in ${NVIM_VERSION_LUA})
+ add_custom_command(
+   OUTPUT ${GENERATED_API_DISPATCH} ${GENERATED_API_METADATA}
+   ${FUNCS_METADATA} ${LUA_API_C_BINDINGS} ${GENERATED_KEYSETS_DEFS}
+-         COMMAND ${LUA_GEN} ${API_DISPATCH_GENERATOR}
++         COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_DISPATCH_GENERATOR}
+                          ${GENERATED_API_DISPATCH}
+                          ${GENERATED_API_METADATA} ${FUNCS_METADATA}
+                          ${LUA_API_C_BINDINGS}
+@@ -589,7 +589,7 @@ add_custom_command(
+   OUTPUT ${VIM_MODULE_FILE}
+   COMMAND ${CMAKE_COMMAND} -E env
+       "LUAC_PRG=${LUAC_PRG}"
+-      ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
++      ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
+       # NB: vim._init_packages and vim.inspect must be be first and second ones
+       # respectively, otherwise --luamod-dev won't work properly.
+       ${LUA_INIT_PACKAGES_MODULE_SOURCE} "vim._init_packages"
+@@ -624,7 +624,7 @@ add_custom_command(
+          ${GENERATED_UI_EVENTS_REMOTE}
+          ${UI_METADATA}
+          ${GENERATED_UI_EVENTS_CLIENT}
+-  COMMAND ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
+                      ${CMAKE_CURRENT_LIST_DIR}/api/ui_events.in.h
+                      ${GENERATED_UI_EVENTS_CALL}
+                      ${GENERATED_UI_EVENTS_REMOTE}
+@@ -656,29 +656,29 @@ list(APPEND NVIM_GENERATED_FOR_SOURCES
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_EX_CMDS_ENUM} ${GENERATED_EX_CMDS_DEFS}
+-  COMMAND ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
+   DEPENDS ${LUA_GEN_DEPS} ${EX_CMDS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/ex_cmds.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_FUNCS} ${FUNCS_DATA}
+-  COMMAND ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
+   DEPENDS ${LUA_GEN_DEPS} ${FUNCS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/eval.lua ${FUNCS_METADATA}
+ )
+ list(APPEND NVIM_GENERATED_FOR_SOURCES
+   "${GENERATED_FUNCS}")
+ 
+ add_custom_command(OUTPUT ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+-  COMMAND ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${EVENTS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/auevents.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS}
+-  COMMAND ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+-  COMMAND ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_ENUM_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+diff --git a/src/nvim/po/CMakeLists.txt b/src/nvim/po/CMakeLists.txt
+index 6c20089..0e99128 100644
+--- a/src/nvim/po/CMakeLists.txt
++++ b/src/nvim/po/CMakeLists.txt
+@@ -53,13 +53,13 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
+   list(SORT NVIM_RELATIVE_SOURCES)
+   add_custom_command(
+     OUTPUT ${NVIM_POT}
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/tojavascript.vim ${NVIM_POT} ${PROJECT_SOURCE_DIR}/runtime/optwin.vim
+     COMMAND ${XGETTEXT_PRG} -o ${NVIM_POT} --default-domain=nvim
+       --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2
+       -D ${CMAKE_CURRENT_SOURCE_DIR} -D ${CMAKE_CURRENT_BINARY_DIR}
+       ${NVIM_RELATIVE_SOURCES} optwin.js
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/fixfilenames.vim ${NVIM_POT} ../../../runtime/optwin.vim
+     VERBATIM
+     DEPENDS ${NVIM_SOURCES} nvim_bin nvim_runtime_deps)
diff --git a/srcpkgs/neovim/patches/disable-parser-download.patch b/srcpkgs/neovim/patches/disable-parser-download.patch
new file mode 100644
index 00000000000000..eba0eb05c335cc
--- /dev/null
+++ b/srcpkgs/neovim/patches/disable-parser-download.patch
@@ -0,0 +1,20 @@
+diff --git a/cmake.deps/cmake/BuildTreesitterParsers.cmake b/cmake.deps/cmake/BuildTreesitterParsers.cmake
+index 837d075..6c3fccb 100644
+--- a/cmake.deps/cmake/BuildTreesitterParsers.cmake
++++ b/cmake.deps/cmake/BuildTreesitterParsers.cmake
+@@ -19,13 +19,12 @@ function(BuildTSParser)
+ 
+   get_externalproject_options(${NAME} ${DEPS_IGNORE_SHA})
+   ExternalProject_Add(${NAME}
+-    DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/${NAME}
++    SOURCE_DIR ${DEPS_BUILD_DIR}/src/${NAME}
+     PATCH_COMMAND ${CMAKE_COMMAND} -E copy
+       ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${TS_CMAKE_FILE}
+       ${DEPS_BUILD_DIR}/src/${NAME}/CMakeLists.txt
+     CMAKE_ARGS ${DEPS_CMAKE_ARGS}
+-      -D PARSERLANG=${TS_LANG}
+-    ${EXTERNALPROJECT_OPTIONS})
++      -D PARSERLANG=${TS_LANG})
+ endfunction()
+ 
+ foreach(lang c lua vim vimdoc query python bash)
diff --git a/srcpkgs/neovim/template b/srcpkgs/neovim/template
index d710d54c06a110..3bbb1998803348 100644
--- a/srcpkgs/neovim/template
+++ b/srcpkgs/neovim/template
@@ -1,26 +1,61 @@
 # Template file for 'neovim'
 pkgname=neovim
-version=0.9.5
-revision=2
+version=0.10.0
+revision=1
+# as per https://github.com/neovim/neovim/blob/master/cmake.deps/deps.txt
+_treesitter_c_version=0.21.0
+_treesitter_lua_version=0.1.0
+_treesitter_vim_version=0.4.0
+_treesitter_vimdoc_version=2.5.1
+_treesitter_query_version=0.3.0
+_treesitter_python_version=0.21.0
+_treesitter_bash_version=0.21.0
+_treesitter_markdown_version=0.2.3
 build_style=cmake
 build_helper="qemu"
 configure_args="-DCOMPILE_LUA=OFF -DPREFER_LUA=$(vopt_if luajit OFF ON)"
-hostmakedepends="gettext lua51-lpeg lua51-mpack lua51-BitOp
- $(vopt_if luajit LuaJIT lua51)"
-makedepends="libtermkey-devel libuv-devel libvterm-devel msgpack-devel
- libluv-devel tree-sitter-devel $(vopt_if luajit LuaJIT-devel lua51-devel)"
+hostmakedepends="gettext patchelf"
+makedepends="libuv-devel libvterm-devel msgpack-devel
+ libluv-devel tree-sitter-devel unibilium-devel
+ lua51-lpeg $(vopt_if luajit LuaJIT-devel lua51-devel)"
 short_desc="Fork of Vim aiming to improve user experience, plugins and GUIs"
 maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
 license="Apache-2.0, Vim"
 homepage="https://neovim.io"
 changelog="https://github.com/neovim/neovim/releases"
-distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz"
-checksum=fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719
+distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz
+ https://github.com/tree-sitter/tree-sitter-c/archive/refs/tags/v${_treesitter_c_version}.tar.gz>ts_c_${_treesitter_c_version}.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-lua/archive/refs/tags/v${_treesitter_lua_version}.tar.gz>ts_lua_${_treesitter_lua_version}.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-vim/archive/refs/tags/v${_treesitter_vim_version}.tar.gz>ts_vim_${_treesitter_vim_version}.tar.gz
+ https://github.com/neovim/tree-sitter-vimdoc/archive/refs/tags/v${_treesitter_vimdoc_version}.tar.gz>ts_vimdoc_${_treesitter_vimdoc_version}.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-query/archive/refs/tags/v${_treesitter_query_version}.tar.gz>ts_query_${_treesitter_query_version}.tar.gz
+ https://github.com/tree-sitter/tree-sitter-python/archive/refs/tags/v${_treesitter_python_version}.tar.gz>ts_python_${_treesitter_python_version}.tar.gz
+ https://github.com/tree-sitter/tree-sitter-bash/archive/refs/tags/v${_treesitter_bash_version}.tar.gz>ts_bash_${_treesitter_bash_version}.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-markdown/archive/refs/tags/v${_treesitter_markdown_version}.tar.gz>ts_markdown_${_treesitter_markdown_version}.tar.gz"
+checksum="372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828
+ 6f0f5d1b71cf8ffd8a37fb638c6022fa1245bd630150b538547d52128ce0ea7e
+ 230cfcbfa74ed1f7b8149e9a1f34c2efc4c589a71fe0f5dc8560622f8020d722
+ 9f856f8b4a10ab43348550fa2d3cb2846ae3d8e60f45887200549c051c66f9d5
+ 063645096504b21603585507c41c6d8718ff3c11b2150c5bfc31e8f3ee9afea3
+ f878ff37abcb83250e31a6569e997546f3dbab74dcb26683cb2d613f7568cfc0
+ 720304a603271fa89e4430a14d6a81a023d6d7d1171b1533e49c0ab44f1e1c13
+ f0515efda839cfede851adb24ac154227fbc0dfb60c6c11595ecfa9087d43ceb
+ 4909d6023643f1afc3ab219585d4035b7403f3a17849782ab803c5f73c8a31d5"
+
+skip_extraction="
+ ts_c_${_treesitter_c_version}.tar.gz
+ ts_lua_${_treesitter_lua_version}.tar.gz
+ ts_vim_${_treesitter_vim_version}.tar.gz
+ ts_vimdoc_${_treesitter_vimdoc_version}.tar.gz
+ ts_query_${_treesitter_query_version}.tar.gz
+ ts_python_${_treesitter_python_version}.tar.gz
+ ts_bash_${_treesitter_bash_version}.tar.gz
+ ts_markdown_${_treesitter_markdown_version}.tar.gz"
 
 build_options=luajit
 
 case "$XBPS_TARGET_MACHINE" in
-	riscv64*) build_options_default="" ;;
+	armv7l|riscv64*) build_options_default="" ;;
 	*) build_options_default="luajit" ;;
 esac
 
@@ -35,13 +70,27 @@ alternatives="
 # They want assertion
 CFLAGS=-UNDEBUG
 
+post_extract() {
+	local _lang
+	for _lang in c lua vim vimdoc query python bash markdown; do
+		local _varname="_treesitter_${_lang}_version"
+		local _version="${!_varname}"
+		vsrcextract -C .deps/build/src/treesitter_${_lang} ts_${_lang}_${_version}.tar.gz
+	done
+}
+
 pre_configure() {
-	vsed -i runtime/CMakeLists.txt \
-		-e "s|\".*/bin/nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
-	vsed -i src/nvim/po/CMakeLists.txt \
-		-e "s|\$<TARGET_FILE:nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
+	# build bundled treesitter parsers
+	cmake -S cmake.deps -B .deps -G Ninja -DUSE_BUNDLED=OFF -DUSE_BUNDLED_TS_PARSERS=ON
+	cmake --build .deps
 }
 
 post_install() {
 	vlicense LICENSE.txt
+
+	if [ "${CROSS_BUILD}" ]; then
+		patchelf --replace-needed \
+			${XBPS_CROSS_BASE}/usr/lib/lua/5.1/lpeg.so /usr/lib/lua/5.1/lpeg.so \
+			${DESTDIR}/usr/bin/nvim
+	fi
 }

From 2e1213808c62d68f36aaa61acca1d1467c868080 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 13:55:23 -0400
Subject: [PATCH 2/3] lua54-lpeg: shlib_provide lpeg.so for lua 5.1

needed for neovim
---
 common/shlibs               | 1 +
 srcpkgs/lua54-lpeg/template | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index d6bb69c39e269a..ded6df935bee8d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4438,3 +4438,4 @@ libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
 libKPim6MimeTreeParserCore.so.6 mimetreeparser-24.02.0_1
 libKPim6MimeTreeParserWidgets.so.6 mimetreeparser-24.02.0_1
+/usr/lib/lua/5.1/lpeg.so lua51-lpeg-1.1.0_2
diff --git a/srcpkgs/lua54-lpeg/template b/srcpkgs/lua54-lpeg/template
index 67be551249f4bb..222a0517f030a0 100644
--- a/srcpkgs/lua54-lpeg/template
+++ b/srcpkgs/lua54-lpeg/template
@@ -1,7 +1,7 @@
 # Template file for 'lua54-lpeg'
 pkgname=lua54-lpeg
 version=1.1.0
-revision=1
+revision=2
 hostmakedepends="lua51 lua52 lua53 lua54"
 makedepends="lua51-devel lua52-devel lua53-devel lua54-devel"
 depends="lua54"
@@ -61,6 +61,7 @@ do_install() {
 lua51-lpeg_package() {
 	depends="lua51"
 	short_desc="${_desc} (5.1.x)"
+	shlib_provides="/usr/lib/lua/5.1/lpeg.so"
 	pkg_install() {
 		vmove usr/lib/lua/5.1
 		vmove usr/share/lua/5.1

From 9382343fafc15266189b5fe1c39b6d3a2b3ce9e3 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 14:01:59 -0400
Subject: [PATCH 3/3] common/hooks/pre-pkg/04-generate-runtime-deps: support
 SONAME as path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

neovim looks for a SONAME that is a whole path

find: warning: ‘-name’ matches against basenames only, but the given pattern
  contains a directory separator (‘/’), thus the expression will evaluate to
  false all the time.  Did you mean ‘-wholename’?
    SONAME: /usr/lib/lua/5.1/lpeg.so <-> lua51-lpeg>=1.1.0_2
---
 common/hooks/pre-pkg/04-generate-runtime-deps.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
index 488c8fc14ea3b2..78c4be2e63d51b 100644
--- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh
+++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
@@ -98,7 +98,12 @@ hook() {
     for f in ${verify_deps}; do
         unset _rdep _pkgname _rdepver
 
-        if [ "$(find ${PKGDESTDIR} -name "$f")" ]; then
+        local _findargs="-name"
+        # if SONAME is a path, find should use -wholename
+        if [[ "$f" = */* ]]; then
+            _findargs="-wholename"
+        fi
+        if [ "$(find "${PKGDESTDIR}" $_findargs "$f")" ]; then
             # Ignore libs by current pkg
             echo "   SONAME: $f <-> $pkgname (ignored)"
             continue

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR REVIEW] neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (17 preceding siblings ...)
  2024-05-19 21:26 ` [PR PATCH] [Updated] " tranzystorekk
@ 2024-05-19 21:30 ` classabbyamp
  2024-05-19 22:07 ` [PR PATCH] [Updated] " tranzystorekk
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: classabbyamp @ 2024-05-19 21:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#discussion_r1606105746

Comment:
```suggestion
	for _lang in $skip_extraction; do
		vsrcextract -C ".deps/build/src/${_lang##*_}" "${_lang}"
	done
```
maybe something like this? (and i believe for loops make implicit locals)

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (18 preceding siblings ...)
  2024-05-19 21:30 ` [PR REVIEW] " classabbyamp
@ 2024-05-19 22:07 ` tranzystorekk
  2024-05-20  7:23 ` vazw
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: tranzystorekk @ 2024-05-19 22:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1358 bytes --]

There is an updated pull request by tranzystorekk against master on the void-packages repository

https://github.com/tranzystorekk/void-packages neovim
https://github.com/void-linux/void-packages/pull/50372

neovim: update to 0.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: YES

Neovim now depends on lua-lpeg as a library and dynamically links to it, but we don't serve it as a shlib.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/50372.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-neovim-50372.patch --]
[-- Type: text/x-diff, Size: 20058 bytes --]

From 4f8c3821dbca72cf46ea51edbb96cc0ef31d3180 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 16 May 2024 18:51:14 +0200
Subject: [PATCH 1/3] neovim: update to 0.10.0

---
 .../patches/cmake-allow-build-type-none.patch |  39 +++--
 srcpkgs/neovim/patches/cross-build.patch      | 135 ++++++++++++++++++
 .../patches/disable-parser-download.patch     |  20 +++
 srcpkgs/neovim/template                       |  72 ++++++++--
 4 files changed, 232 insertions(+), 34 deletions(-)
 create mode 100644 srcpkgs/neovim/patches/cross-build.patch
 create mode 100644 srcpkgs/neovim/patches/disable-parser-download.patch

diff --git a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
index 7654cc64a872e2..adffa83e6b2419 100644
--- a/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
+++ b/srcpkgs/neovim/patches/cmake-allow-build-type-none.patch
@@ -1,31 +1,28 @@
+Void uses the "None" build type to apply our chosen compile settings.
+
+diff --git a/cmake/Util.cmake b/cmake/Util.cmake
+index f09de78..f48f2d0 100644
 --- a/cmake/Util.cmake
 +++ b/cmake/Util.cmake
-@@ -162,7 +162,7 @@ endfunction()
- # Passing CMAKE_BUILD_TYPE for multi-config generators will now not only
- # not be used, but also generate a warning for the user.
- function(set_default_buildtype)
+@@ -193,7 +193,7 @@ endfunction()
+ # Passing CMAKE_BUILD_TYPE for multi-config generators will not only not be
+ # used, but also generate a warning for the user.
+ function(set_default_buildtype BUILD_TYPE)
 -  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo)
 +  set(allowableBuildTypes Debug Release MinSizeRel RelWithDebInfo None)
- 
-   get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
-   if(isMultiConfig)
-@@ -177,7 +177,7 @@ function(set_default_buildtype)
-       message(STATUS "CMAKE_BUILD_TYPE not specified, default is 'Debug'")
-       set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
-     elseif(NOT CMAKE_BUILD_TYPE IN_LIST allowableBuildTypes)
--      message(FATAL_ERROR "Invalid build type: ${CMAKE_BUILD_TYPE}")
-+      message(WARNING "Invalid build type: ${CMAKE_BUILD_TYPE}")
-     else()
-       message(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
-     endif()
+   if(NOT BUILD_TYPE IN_LIST allowableBuildTypes)
+     message(FATAL_ERROR "Invalid build type: ${BUILD_TYPE}")
+   endif()
+diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua
+index 5bc0319..40a72c1 100644
 --- a/runtime/lua/nvim/health.lua
 +++ b/runtime/lua/nvim/health.lua
-@@ -152,7 +152,7 @@
+@@ -153,7 +153,7 @@ local function check_performance()
    local buildtype = vim.fn.matchstr(vim.fn.execute('version'), [[\v\cbuild type:?\s*[^\n\r\t ]+]])
-   if empty(buildtype) then
-     health.report_error('failed to get build type from :version')
+   if buildtype == '' then
+     health.error('failed to get build type from :version')
 -  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo)]]):match_str(buildtype) then
 +  elseif vim.regex([[\v(MinSizeRel|Release|RelWithDebInfo|None)]]):match_str(buildtype) then
-     health.report_ok(buildtype)
+     health.ok(buildtype)
    else
-     health.report_info(buildtype)
+     health.info(buildtype)
diff --git a/srcpkgs/neovim/patches/cross-build.patch b/srcpkgs/neovim/patches/cross-build.patch
new file mode 100644
index 00000000000000..6e09f660f4ea8c
--- /dev/null
+++ b/srcpkgs/neovim/patches/cross-build.patch
@@ -0,0 +1,135 @@
+diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
+index c171fab..cb29798 100644
+--- a/runtime/CMakeLists.txt
++++ b/runtime/CMakeLists.txt
+@@ -11,7 +11,7 @@ get_directory_property(LUA_GEN DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITI
+ get_directory_property(LUA_GEN_DEPS DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITION LUA_GEN_DEPS)
+ 
+ add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
+-  COMMAND ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
+   DEPENDS
+     ${LUA_GEN_DEPS}
+     ${SYN_VIM_GENERATOR}
+@@ -33,7 +33,7 @@ foreach(PACKAGE ${PACKAGES})
+     add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
+       COMMAND ${CMAKE_COMMAND} -E copy_directory
+         ${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME}
+-      COMMAND $<TARGET_FILE:nvim_bin>
++      COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+         -u NONE -i NONE -e --headless -c "helptags doc" -c quit
+       DEPENDS
+         nvim_bin
+@@ -65,7 +65,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
+   COMMAND ${CMAKE_COMMAND} -E remove_directory doc
+   COMMAND ${CMAKE_COMMAND} -E copy_directory
+     ${PROJECT_SOURCE_DIR}/runtime/doc doc
+-  COMMAND $<TARGET_FILE:nvim_bin>
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin>
+     -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
+   DEPENDS
+     nvim_bin
+diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
+index d9cc695..81e9b50 100644
+--- a/src/nvim/CMakeLists.txt
++++ b/src/nvim/CMakeLists.txt
+@@ -541,7 +541,7 @@ foreach(sfile ${NVIM_SOURCES}
+   add_custom_command(
+     OUTPUT "${gf_c_h}" "${gf_h_h}"
+     COMMAND ${CMAKE_C_COMPILER} ${sfile} ${PREPROC_OUTPUT} ${gen_cflags}
+-    COMMAND ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}"
+     DEPENDS ${depends})
+   list(APPEND NVIM_GENERATED_FOR_SOURCES "${gf_c_h}")
+   list(APPEND NVIM_GENERATED_FOR_HEADERS "${gf_h_h}")
+@@ -551,7 +551,7 @@ foreach(sfile ${NVIM_SOURCES}
+ endforeach()
+ 
+ add_custom_command(OUTPUT ${GENERATED_UNICODE_TABLES}
+-  COMMAND ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${UNICODE_TABLES_GENERATOR}
+                      ${UNICODE_DIR}
+                      ${GENERATED_UNICODE_TABLES}
+   DEPENDS
+@@ -565,7 +565,7 @@ configure_file(${GENERATOR_DIR}/nvim_version.lua.in ${NVIM_VERSION_LUA})
+ add_custom_command(
+   OUTPUT ${GENERATED_API_DISPATCH} ${GENERATED_API_METADATA}
+   ${FUNCS_METADATA} ${LUA_API_C_BINDINGS} ${GENERATED_KEYSETS_DEFS}
+-         COMMAND ${LUA_GEN} ${API_DISPATCH_GENERATOR}
++         COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_DISPATCH_GENERATOR}
+                          ${GENERATED_API_DISPATCH}
+                          ${GENERATED_API_METADATA} ${FUNCS_METADATA}
+                          ${LUA_API_C_BINDINGS}
+@@ -589,7 +589,7 @@ add_custom_command(
+   OUTPUT ${VIM_MODULE_FILE}
+   COMMAND ${CMAKE_COMMAND} -E env
+       "LUAC_PRG=${LUAC_PRG}"
+-      ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
++      ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_PRG} ${CHAR_BLOB_GENERATOR} -c ${VIM_MODULE_FILE}
+       # NB: vim._init_packages and vim.inspect must be be first and second ones
+       # respectively, otherwise --luamod-dev won't work properly.
+       ${LUA_INIT_PACKAGES_MODULE_SOURCE} "vim._init_packages"
+@@ -624,7 +624,7 @@ add_custom_command(
+          ${GENERATED_UI_EVENTS_REMOTE}
+          ${UI_METADATA}
+          ${GENERATED_UI_EVENTS_CLIENT}
+-  COMMAND ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${API_UI_EVENTS_GENERATOR}
+                      ${CMAKE_CURRENT_LIST_DIR}/api/ui_events.in.h
+                      ${GENERATED_UI_EVENTS_CALL}
+                      ${GENERATED_UI_EVENTS_REMOTE}
+@@ -656,29 +656,29 @@ list(APPEND NVIM_GENERATED_FOR_SOURCES
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_EX_CMDS_ENUM} ${GENERATED_EX_CMDS_DEFS}
+-  COMMAND ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EX_CMDS_GENERATOR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR}
+   DEPENDS ${LUA_GEN_DEPS} ${EX_CMDS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/ex_cmds.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_FUNCS} ${FUNCS_DATA}
+-  COMMAND ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${FUNCS_GENERATOR} ${GENERATED_DIR} ${FUNCS_METADATA} ${FUNCS_DATA}
+   DEPENDS ${LUA_GEN_DEPS} ${FUNCS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/eval.lua ${FUNCS_METADATA}
+ )
+ list(APPEND NVIM_GENERATED_FOR_SOURCES
+   "${GENERATED_FUNCS}")
+ 
+ add_custom_command(OUTPUT ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+-  COMMAND ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${EVENTS_GENERATOR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${EVENTS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/auevents.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS}
+-  COMMAND ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+ add_custom_command(OUTPUT ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+-  COMMAND ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
++  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${LUA_GEN} ${OPTIONS_ENUM_GENERATOR} ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
+   DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_ENUM_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
+ )
+ 
+diff --git a/src/nvim/po/CMakeLists.txt b/src/nvim/po/CMakeLists.txt
+index 6c20089..0e99128 100644
+--- a/src/nvim/po/CMakeLists.txt
++++ b/src/nvim/po/CMakeLists.txt
+@@ -53,13 +53,13 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
+   list(SORT NVIM_RELATIVE_SOURCES)
+   add_custom_command(
+     OUTPUT ${NVIM_POT}
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/tojavascript.vim ${NVIM_POT} ${PROJECT_SOURCE_DIR}/runtime/optwin.vim
+     COMMAND ${XGETTEXT_PRG} -o ${NVIM_POT} --default-domain=nvim
+       --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2
+       -D ${CMAKE_CURRENT_SOURCE_DIR} -D ${CMAKE_CURRENT_BINARY_DIR}
+       ${NVIM_RELATIVE_SOURCES} optwin.js
+-    COMMAND $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
++    COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:nvim_bin> -u NONE -i NONE -n --headless --cmd "set cpo+=+"
+       -S ${CMAKE_CURRENT_SOURCE_DIR}/fixfilenames.vim ${NVIM_POT} ../../../runtime/optwin.vim
+     VERBATIM
+     DEPENDS ${NVIM_SOURCES} nvim_bin nvim_runtime_deps)
diff --git a/srcpkgs/neovim/patches/disable-parser-download.patch b/srcpkgs/neovim/patches/disable-parser-download.patch
new file mode 100644
index 00000000000000..eba0eb05c335cc
--- /dev/null
+++ b/srcpkgs/neovim/patches/disable-parser-download.patch
@@ -0,0 +1,20 @@
+diff --git a/cmake.deps/cmake/BuildTreesitterParsers.cmake b/cmake.deps/cmake/BuildTreesitterParsers.cmake
+index 837d075..6c3fccb 100644
+--- a/cmake.deps/cmake/BuildTreesitterParsers.cmake
++++ b/cmake.deps/cmake/BuildTreesitterParsers.cmake
+@@ -19,13 +19,12 @@ function(BuildTSParser)
+ 
+   get_externalproject_options(${NAME} ${DEPS_IGNORE_SHA})
+   ExternalProject_Add(${NAME}
+-    DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/${NAME}
++    SOURCE_DIR ${DEPS_BUILD_DIR}/src/${NAME}
+     PATCH_COMMAND ${CMAKE_COMMAND} -E copy
+       ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${TS_CMAKE_FILE}
+       ${DEPS_BUILD_DIR}/src/${NAME}/CMakeLists.txt
+     CMAKE_ARGS ${DEPS_CMAKE_ARGS}
+-      -D PARSERLANG=${TS_LANG}
+-    ${EXTERNALPROJECT_OPTIONS})
++      -D PARSERLANG=${TS_LANG})
+ endfunction()
+ 
+ foreach(lang c lua vim vimdoc query python bash)
diff --git a/srcpkgs/neovim/template b/srcpkgs/neovim/template
index d710d54c06a110..7d81df0c9919f4 100644
--- a/srcpkgs/neovim/template
+++ b/srcpkgs/neovim/template
@@ -1,26 +1,61 @@
 # Template file for 'neovim'
 pkgname=neovim
-version=0.9.5
-revision=2
+version=0.10.0
+revision=1
+# as per https://github.com/neovim/neovim/blob/master/cmake.deps/deps.txt
+_treesitter_c_version=0.21.0
+_treesitter_lua_version=0.1.0
+_treesitter_vim_version=0.4.0
+_treesitter_vimdoc_version=2.5.1
+_treesitter_query_version=0.3.0
+_treesitter_python_version=0.21.0
+_treesitter_bash_version=0.21.0
+_treesitter_markdown_version=0.2.3
 build_style=cmake
 build_helper="qemu"
 configure_args="-DCOMPILE_LUA=OFF -DPREFER_LUA=$(vopt_if luajit OFF ON)"
-hostmakedepends="gettext lua51-lpeg lua51-mpack lua51-BitOp
- $(vopt_if luajit LuaJIT lua51)"
-makedepends="libtermkey-devel libuv-devel libvterm-devel msgpack-devel
- libluv-devel tree-sitter-devel $(vopt_if luajit LuaJIT-devel lua51-devel)"
+hostmakedepends="gettext patchelf"
+makedepends="libuv-devel libvterm-devel msgpack-devel
+ libluv-devel tree-sitter-devel unibilium-devel
+ lua51-lpeg $(vopt_if luajit LuaJIT-devel lua51-devel)"
 short_desc="Fork of Vim aiming to improve user experience, plugins and GUIs"
 maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
 license="Apache-2.0, Vim"
 homepage="https://neovim.io"
 changelog="https://github.com/neovim/neovim/releases"
-distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz"
-checksum=fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719
+distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz
+ https://github.com/tree-sitter/tree-sitter-c/archive/refs/tags/v${_treesitter_c_version}.tar.gz>treesitter_c_${_treesitter_c_version}.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-lua/archive/refs/tags/v${_treesitter_lua_version}.tar.gz>treesitter_lua_${_treesitter_lua_version}.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-vim/archive/refs/tags/v${_treesitter_vim_version}.tar.gz>treesitter_vim_${_treesitter_vim_version}.tar.gz
+ https://github.com/neovim/tree-sitter-vimdoc/archive/refs/tags/v${_treesitter_vimdoc_version}.tar.gz>treesitter_vimdoc_${_treesitter_vimdoc_version}.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-query/archive/refs/tags/v${_treesitter_query_version}.tar.gz>treesitter_query_${_treesitter_query_version}.tar.gz
+ https://github.com/tree-sitter/tree-sitter-python/archive/refs/tags/v${_treesitter_python_version}.tar.gz>treesitter_python_${_treesitter_python_version}.tar.gz
+ https://github.com/tree-sitter/tree-sitter-bash/archive/refs/tags/v${_treesitter_bash_version}.tar.gz>treesitter_bash_${_treesitter_bash_version}.tar.gz
+ https://github.com/tree-sitter-grammars/tree-sitter-markdown/archive/refs/tags/v${_treesitter_markdown_version}.tar.gz>treesitter_markdown_${_treesitter_markdown_version}.tar.gz"
+checksum="372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828
+ 6f0f5d1b71cf8ffd8a37fb638c6022fa1245bd630150b538547d52128ce0ea7e
+ 230cfcbfa74ed1f7b8149e9a1f34c2efc4c589a71fe0f5dc8560622f8020d722
+ 9f856f8b4a10ab43348550fa2d3cb2846ae3d8e60f45887200549c051c66f9d5
+ 063645096504b21603585507c41c6d8718ff3c11b2150c5bfc31e8f3ee9afea3
+ f878ff37abcb83250e31a6569e997546f3dbab74dcb26683cb2d613f7568cfc0
+ 720304a603271fa89e4430a14d6a81a023d6d7d1171b1533e49c0ab44f1e1c13
+ f0515efda839cfede851adb24ac154227fbc0dfb60c6c11595ecfa9087d43ceb
+ 4909d6023643f1afc3ab219585d4035b7403f3a17849782ab803c5f73c8a31d5"
+
+skip_extraction="
+ treesitter_c_${_treesitter_c_version}.tar.gz
+ treesitter_lua_${_treesitter_lua_version}.tar.gz
+ treesitter_vim_${_treesitter_vim_version}.tar.gz
+ treesitter_vimdoc_${_treesitter_vimdoc_version}.tar.gz
+ treesitter_query_${_treesitter_query_version}.tar.gz
+ treesitter_python_${_treesitter_python_version}.tar.gz
+ treesitter_bash_${_treesitter_bash_version}.tar.gz
+ treesitter_markdown_${_treesitter_markdown_version}.tar.gz"
 
 build_options=luajit
 
 case "$XBPS_TARGET_MACHINE" in
-	riscv64*) build_options_default="" ;;
+	armv7l|riscv64*) build_options_default="" ;;
 	*) build_options_default="luajit" ;;
 esac
 
@@ -35,13 +70,24 @@ alternatives="
 # They want assertion
 CFLAGS=-UNDEBUG
 
+post_extract() {
+	for _distfile in ${skip_extraction}; do
+		vsrcextract -C .deps/build/src/${_distfile%_*} ${_distfile}
+	done
+}
+
 pre_configure() {
-	vsed -i runtime/CMakeLists.txt \
-		-e "s|\".*/bin/nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
-	vsed -i src/nvim/po/CMakeLists.txt \
-		-e "s|\$<TARGET_FILE:nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
+	# build bundled treesitter parsers
+	cmake -S cmake.deps -B .deps -G Ninja -DUSE_BUNDLED=OFF -DUSE_BUNDLED_TS_PARSERS=ON
+	cmake --build .deps
 }
 
 post_install() {
 	vlicense LICENSE.txt
+
+	if [ "${CROSS_BUILD}" ]; then
+		patchelf --replace-needed \
+			${XBPS_CROSS_BASE}/usr/lib/lua/5.1/lpeg.so /usr/lib/lua/5.1/lpeg.so \
+			${DESTDIR}/usr/bin/nvim
+	fi
 }

From d8440f56f1d897e04aa7cb6edcab090ea7f54d47 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 13:55:23 -0400
Subject: [PATCH 2/3] lua54-lpeg: shlib_provide lpeg.so for lua 5.1

needed for neovim
---
 common/shlibs               | 1 +
 srcpkgs/lua54-lpeg/template | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index d6bb69c39e269a..ded6df935bee8d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4438,3 +4438,4 @@ libcamera.so.0.2 libcamera-0.2.0_1
 libcamera-base.so.0.2 libcamera-0.2.0_1
 libKPim6MimeTreeParserCore.so.6 mimetreeparser-24.02.0_1
 libKPim6MimeTreeParserWidgets.so.6 mimetreeparser-24.02.0_1
+/usr/lib/lua/5.1/lpeg.so lua51-lpeg-1.1.0_2
diff --git a/srcpkgs/lua54-lpeg/template b/srcpkgs/lua54-lpeg/template
index 67be551249f4bb..222a0517f030a0 100644
--- a/srcpkgs/lua54-lpeg/template
+++ b/srcpkgs/lua54-lpeg/template
@@ -1,7 +1,7 @@
 # Template file for 'lua54-lpeg'
 pkgname=lua54-lpeg
 version=1.1.0
-revision=1
+revision=2
 hostmakedepends="lua51 lua52 lua53 lua54"
 makedepends="lua51-devel lua52-devel lua53-devel lua54-devel"
 depends="lua54"
@@ -61,6 +61,7 @@ do_install() {
 lua51-lpeg_package() {
 	depends="lua51"
 	short_desc="${_desc} (5.1.x)"
+	shlib_provides="/usr/lib/lua/5.1/lpeg.so"
 	pkg_install() {
 		vmove usr/lib/lua/5.1
 		vmove usr/share/lua/5.1

From bddcf7800abf31fcd1baa5b24b25363f27bc01b8 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 16 May 2024 14:01:59 -0400
Subject: [PATCH 3/3] common/hooks/pre-pkg/04-generate-runtime-deps: support
 SONAME as path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

neovim looks for a SONAME that is a whole path

find: warning: ‘-name’ matches against basenames only, but the given pattern
  contains a directory separator (‘/’), thus the expression will evaluate to
  false all the time.  Did you mean ‘-wholename’?
    SONAME: /usr/lib/lua/5.1/lpeg.so <-> lua51-lpeg>=1.1.0_2
---
 common/hooks/pre-pkg/04-generate-runtime-deps.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
index 488c8fc14ea3b2..78c4be2e63d51b 100644
--- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh
+++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
@@ -98,7 +98,12 @@ hook() {
     for f in ${verify_deps}; do
         unset _rdep _pkgname _rdepver
 
-        if [ "$(find ${PKGDESTDIR} -name "$f")" ]; then
+        local _findargs="-name"
+        # if SONAME is a path, find should use -wholename
+        if [[ "$f" = */* ]]; then
+            _findargs="-wholename"
+        fi
+        if [ "$(find "${PKGDESTDIR}" $_findargs "$f")" ]; then
             # Ignore libs by current pkg
             echo "   SONAME: $f <-> $pkgname (ignored)"
             continue

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (19 preceding siblings ...)
  2024-05-19 22:07 ` [PR PATCH] [Updated] " tranzystorekk
@ 2024-05-20  7:23 ` vazw
  2024-05-20  8:37 ` vazw
  2024-05-21 22:23 ` [PR PATCH] [Merged]: " classabbyamp
  22 siblings, 0 replies; 24+ messages in thread
From: vazw @ 2024-05-20  7:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

New comment by vazw on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2119834682

Comment:
I got these error while installing

```sh
-- Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is exact version "5.1")
CMake Error at /usr/libexec/xbps-src/share/cmake-3.27/Modules/ExternalProject.cmake:3176 (message):
  No download info given for 'treesitter_c' and its source directory:

   /builddir/neovim-0.10.0/.deps/build/src/treesitter_c

  is not an existing non-empty directory.  Please specify one of:

   * SOURCE_DIR with an existing non-empty directory
   * DOWNLOAD_COMMAND
   * URL
   * GIT_REPOSITORY
   * SVN_REPOSITORY
   * HG_REPOSITORY
   * CVS_REPOSITORY and CVS_MODULE
Call Stack (most recent call first):
  /usr/libexec/xbps-src/share/cmake-3.27/Modules/ExternalProject.cmake:4345 (_ep_add_download_command)
  cmake/BuildTreesitterParsers.cmake:21 (ExternalProject_Add)
  cmake/BuildTreesitterParsers.cmake:31 (BuildTSParser)
  CMakeLists.txt:155 (include)


-- Configuring incomplete, errors occurred!
=> ERROR: neovim-0.10.0_1: pre_configure: 'cmake -S cmake.deps -B .deps -G Ninja -DUSE_BUNDLED=OFF -DUSE_BUNDLED_TS_PARSERS=ON' exited with 1
=> ERROR:   in pre_configure() at srcpkgs/neovim/template:81
```

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (20 preceding siblings ...)
  2024-05-20  7:23 ` vazw
@ 2024-05-20  8:37 ` vazw
  2024-05-21 22:23 ` [PR PATCH] [Merged]: " classabbyamp
  22 siblings, 0 replies; 24+ messages in thread
From: vazw @ 2024-05-20  8:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

New comment by vazw on void-packages repository

https://github.com/void-linux/void-packages/pull/50372#issuecomment-2119834682

Comment:
I got these error while installing

```sh
-- Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is exact version "5.1")
CMake Error at /usr/libexec/xbps-src/share/cmake-3.27/Modules/ExternalProject.cmake:3176 (message):
  No download info given for 'treesitter_c' and its source directory:

   /builddir/neovim-0.10.0/.deps/build/src/treesitter_c

  is not an existing non-empty directory.  Please specify one of:

   * SOURCE_DIR with an existing non-empty directory
   * DOWNLOAD_COMMAND
   * URL
   * GIT_REPOSITORY
   * SVN_REPOSITORY
   * HG_REPOSITORY
   * CVS_REPOSITORY and CVS_MODULE
Call Stack (most recent call first):
  /usr/libexec/xbps-src/share/cmake-3.27/Modules/ExternalProject.cmake:4345 (_ep_add_download_command)
  cmake/BuildTreesitterParsers.cmake:21 (ExternalProject_Add)
  cmake/BuildTreesitterParsers.cmake:31 (BuildTSParser)
  CMakeLists.txt:155 (include)


-- Configuring incomplete, errors occurred!
=> ERROR: neovim-0.10.0_1: pre_configure: 'cmake -S cmake.deps -B .deps -G Ninja -DUSE_BUNDLED=OFF -DUSE_BUNDLED_TS_PARSERS=ON' exited with 1
=> ERROR:   in pre_configure() at srcpkgs/neovim/template:81
```

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Merged]: neovim: update to 0.10.0
  2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
                   ` (21 preceding siblings ...)
  2024-05-20  8:37 ` vazw
@ 2024-05-21 22:23 ` classabbyamp
  22 siblings, 0 replies; 24+ messages in thread
From: classabbyamp @ 2024-05-21 22:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

There's a merged pull request on the void-packages repository

neovim: update to 0.10.0
https://github.com/void-linux/void-packages/pull/50372

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: YES

Neovim now depends on lua-lpeg as a library and dynamically links to it, but we don't serve it as a shlib.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2024-05-21 22:23 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-16 16:56 [PR PATCH] WIP neovim: update to 0.10.0 tranzystorekk
2024-05-16 18:20 ` [PR PATCH] [Updated] " classabbyamp
2024-05-16 21:06 ` tranzystorekk
2024-05-16 21:39 ` tranzystorekk
2024-05-16 22:54 ` classabbyamp
2024-05-16 23:04 ` [PR PATCH] [Updated] " tranzystorekk
2024-05-18 16:00 ` AnInternetTroll
2024-05-18 16:08 ` classabbyamp
2024-05-19 17:33 ` ibhagwan
2024-05-19 18:19 ` tranzystorekk
2024-05-19 18:25 ` ibhagwan
2024-05-19 18:28 ` tranzystorekk
2024-05-19 18:31 ` tranzystorekk
2024-05-19 18:37 ` ibhagwan
2024-05-19 19:02 ` tranzystorekk
2024-05-19 20:55 ` [PR PATCH] [Updated] " tranzystorekk
2024-05-19 21:09 ` ibhagwan
2024-05-19 21:15 ` ibhagwan
2024-05-19 21:26 ` [PR PATCH] [Updated] " tranzystorekk
2024-05-19 21:30 ` [PR REVIEW] " classabbyamp
2024-05-19 22:07 ` [PR PATCH] [Updated] " tranzystorekk
2024-05-20  7:23 ` vazw
2024-05-20  8:37 ` vazw
2024-05-21 22:23 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).