pkgsrc-Bugs archive

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

pkg/59013: editors/neovim does not build on macOS



>Number:         59013
>Category:       pkg
>Synopsis:       editors/neovim does not build on macOS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 20 05:05:00 +0000 2025
>Originator:     jonathan buschmann
>Release:        trunk
>Organization:
>Environment:
>Description:
the package editors/neovim does not build on macOS/Darwin :

1. It uses some specific steps for ELF based system (Darwin being Mach-O)
2. It has some trouble to find Lpeg library

Below/attached is the current patch being applied to make it work on my system.
>How-To-Repeat:

>Fix:
commit 26d74e34bcb67581bf1d5193743801bb31b29ee6
Author: jonathan 'jonthn' buschmann <jonthn++pkgsrc%pinacea.com@localhost>
Date:   Sun Jul 14 15:01:58 2024 +0800

diff --git a/editors/neovim/Makefile b/editors/neovim/Makefile
index eacac53addc5..48d88f98f8ce 100644
--- a/editors/neovim/Makefile
+++ b/editors/neovim/Makefile
@@ -45,6 +45,8 @@ DEPENDS+=	${LUA_PKGPREFIX}-inspect-[0-9]*:../../devel/lua-inspect
 DEPENDS+=	${LUA_PKGPREFIX}-lpeg-[0-9]*:../../devel/lua-lpeg
 DEPENDS+=	${LUA_PKGPREFIX}-mpack-[0-9]*:../../devel/lua-mpack
 
+
+.if ${SHLIB_TYPE} == "ELF"
 TOOL_DEPENDS+=	patchelf-[0-9]*:../../devel/patchelf
 
 post-install:
@@ -52,6 +54,7 @@ post-install:
 		--replace-needed ${PREFIX}/lib/lua/5.1/lpeg.so lpeg.so
 	${PREFIX}/bin/patchelf ${DESTDIR}${PREFIX}/bin/nvim \
 		--add-rpath ${PREFIX}/lib/lua/5.1
+.endif
 
 .include "../../converters/libiconv/buildlink3.mk"
 .include "../../devel/cmake/build.mk"
diff --git a/editors/neovim/PLIST b/editors/neovim/PLIST
index e94d7cdcecd2..e7b907ecdacb 100644
--- a/editors/neovim/PLIST
+++ b/editors/neovim/PLIST
@@ -1,7 +1,7 @@
 @comment $NetBSD: PLIST,v 1.6 2024/08/17 15:42:32 bsiegert Exp $
 bin/nvim
 man/man1/nvim.1
-share/applications/nvim.desktop
+${PLIST.notdarwin}share/applications/nvim.desktop
 share/icons/hicolor/128x128/apps/nvim.png
 share/locale/af/LC_MESSAGES/nvim.mo
 share/locale/ca/LC_MESSAGES/nvim.mo
diff --git a/editors/neovim/distinfo b/editors/neovim/distinfo
index da0dba16b5bf..b874b8a91cd5 100644
--- a/editors/neovim/distinfo
+++ b/editors/neovim/distinfo
@@ -5,3 +5,4 @@ SHA512 (neovim-0.10.0.tar.gz) = 878cb58729a18179b38303bd9cf79e38997c87946665ac4e
 Size (neovim-0.10.0.tar.gz) = 12792034 bytes
 SHA1 (patch-src_nvim_api_vim.c) = aa2bc8a36c657e56ce7d61bf96dfa33953b4232d
 SHA1 (patch-src_nvim_math.c) = 825805c95293ba0e7e65be76dbd46c1f5bb21fc9
+SHA1 (patch-cmake_FindLpeg.cmake) = b1995a3fe38ed5c571f1ad60bd93186c2a22802a
diff --git a/editors/neovim/patches/patch-cmake_FindLpeg.cmake b/editors/neovim/patches/patch-cmake_FindLpeg.cmake
new file mode 100644
index 000000000000..3c63cb79dbad
--- /dev/null
+++ b/editors/neovim/patches/patch-cmake_FindLpeg.cmake
@@ -0,0 +1,8 @@
+--- cmake/FindLpeg.cmake	2024-07-14 09:48:49
++++ cmake/FindLpeg.cmake	2024-07-14 09:49:08
+@@ -1,4 +1,4 @@
+-find_library2(LPEG_LIBRARY NAMES lpeg_a lpeg liblpeg_a lpeg${CMAKE_SHARED_LIBRARY_SUFFIX} PATH_SUFFIXES lua/5.1)
++find_library2(LPEG_LIBRARY NAMES lpeg_a lpeg liblpeg_a lpeg${CMAKE_SHARED_LIBRARY_SUFFIX} lpeg.so PATH_SUFFIXES lua/5.1)
+ 
+ find_package_handle_standard_args(Lpeg DEFAULT_MSG LPEG_LIBRARY)
+ mark_as_advanced(LPEG_LIBRARY)


Home | Main Index | Thread Index | Old Index