pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

neovim-git: Fix build



Module Name:	pkgsrc-wip
Committed By:	Malte Dehling <mdehling%gmail.com@localhost>
Pushed By:	mdehling
Date:		Fri May 24 11:58:55 2024 -0700
Changeset:	b84783b630de5c8f56813add2ccb1c437f792dd3

Added Files:
	neovim-git/distinfo
	neovim-git/patches/patch-src_nvim_api_vim.c
	neovim-git/patches/patch-src_nvim_math.c

Log Message:
neovim-git: Fix build

Neovim commit 037ea6e78 added function popcount() which breaks NetBSD
builds since our libc already has one (with a different signature.)
Workaround: Add patches to rename their function.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b84783b630de5c8f56813add2ccb1c437f792dd3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 neovim-git/distinfo                         |  4 ++++
 neovim-git/patches/patch-src_nvim_api_vim.c | 15 +++++++++++++++
 neovim-git/patches/patch-src_nvim_math.c    | 15 +++++++++++++++
 3 files changed, 34 insertions(+)

diffs:
diff --git a/neovim-git/distinfo b/neovim-git/distinfo
new file mode 100644
index 0000000000..10e8937ee1
--- /dev/null
+++ b/neovim-git/distinfo
@@ -0,0 +1,4 @@
+$NetBSD$
+
+SHA1 (patch-src_nvim_api_vim.c) = 1639756cb7d3831af4c049060fd9e9d5f033a12c
+SHA1 (patch-src_nvim_math.c) = 6dc85846a11156e6df419ffe45f7e6356a990712
diff --git a/neovim-git/patches/patch-src_nvim_api_vim.c b/neovim-git/patches/patch-src_nvim_api_vim.c
new file mode 100644
index 0000000000..a09617c8cd
--- /dev/null
+++ b/neovim-git/patches/patch-src_nvim_api_vim.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+- avoid conflict with NetBSD's popcount(3)
+
+--- src/nvim/api/vim.c.orig	2024-05-23 22:45:05.813497933 +0000
++++ src/nvim/api/vim.c
+@@ -2385,7 +2385,7 @@ void nvim__redraw(Dict(redraw) *opts, Er
+   }
+ 
+   int count = (win != NULL) + (buf != NULL);
+-  VALIDATE(popcount(opts->is_set__redraw_) > count, "%s", "at least one action required", {
++  VALIDATE(spopcount64(opts->is_set__redraw_) > count, "%s", "at least one action required", {
+     return;
+   });
+ 
diff --git a/neovim-git/patches/patch-src_nvim_math.c b/neovim-git/patches/patch-src_nvim_math.c
new file mode 100644
index 0000000000..ae5fa5f110
--- /dev/null
+++ b/neovim-git/patches/patch-src_nvim_math.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+- avoid conflict with NetBSD's popcount(3)
+
+--- src/nvim/math.c.orig	2024-05-23 22:42:40.233527563 +0000
++++ src/nvim/math.c
+@@ -78,7 +78,7 @@ int xctz(uint64_t x)
+ }
+ 
+ /// Count number of set bits in bit field.
+-int popcount(uint64_t x)
++int spopcount64(uint64_t x)
+ {
+   // Use compiler builtin if possible.
+ #if defined(__clang__) || defined(__GNUC__)


Home | Main Index | Thread Index | Old Index