pkgsrc-Changes archive

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

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Fri Jan 24 12:45:54 UTC 2025

Modified Files:
        pkgsrc/editors/neovim: Makefile
Added Files:
        pkgsrc/devel/lua-lpeg: buildlink3.mk

Log Message:
editors/neovim: Use buildlink3, not DEPENDS, for lua-lpeg.

Will be needed when we hide PREFIX from cmake.  Will resolve:

CMake Error at /pkg/2024Q4/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find Lpeg (missing: LPEG_LIBRARY)
Call Stack (most recent call first):
  /pkg/2024Q4/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindLpeg.cmake:3 (find_package_handle_standard_args)
  src/nvim/CMakeLists.txt:34 (find_package)

-- Configuring incomplete, errors occurred!
*** Error code 1

While here, use COMPILER_RPATH_FLAG instead of editing the rpath in ex
post facto -- resolves:

-- Install configuration: "Release"
/home/riastradh/pkgsrc/current/pkg/bin/patchelf /home/riastradh/pkgsrc/current/work/editors/neovim/work/.destdir/home/riastradh/pkgsrc/current/pkg/bin/nvim  --replace-needed 
/home/riastradh/pkgsrc/current/pkg/lib/lua/5.1/lpeg.so lpeg.so
/home/riastradh/pkgsrc/current/pkg/bin/patchelf /home/riastradh/pkgsrc/current/work/editors/neovim/work/.destdir/home/riastradh/pkgsrc/current/pkg/bin/nvim  --add-rpath 
/home/riastradh/pkgsrc/current/pkg/lib/lua/5.1
patchelf: getting info about '--add-rpath': No such file or directory

Verified that the NEEDED and RPATH entries look reasonable:

$ readelf -d ~/pkgsrc/current/work/editors/neovim/work/.destdir/home/riastradh/pkgsrc/current/pkg/bin/nvim | grep -e lpeg.so -e RPATH
 0x0000000000000001 (NEEDED)             Shared library: [lpeg.so]
 0x000000000000000f (RPATH)              Library rpath: 
[/home/riastradh/pkgsrc/current/pkg/gcc10/x86_64--netbsd/lib/.:/home/riastradh/pkgsrc/current/pkg/lib/lua/5.1:/home/riastradh/pkgsrc/current/pkg/gcc10/lib/gcc/x86_64--netbsd/10.5.0:/home/riastradh/pkgsrc/current/pkg/lib:/home/riastradh/pkgsrc/current/pkg/lib/libvterm03

XXX Would be nice to hard-code the Lua version a little less here.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/lua-lpeg/buildlink3.mk
cvs rdiff -u -r1.11 -r1.12 pkgsrc/editors/neovim/Makefile

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

Modified files:

Index: pkgsrc/editors/neovim/Makefile
diff -u pkgsrc/editors/neovim/Makefile:1.11 pkgsrc/editors/neovim/Makefile:1.12
--- pkgsrc/editors/neovim/Makefile:1.11 Wed Jan 22 18:18:32 2025
+++ pkgsrc/editors/neovim/Makefile      Fri Jan 24 12:45:54 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2025/01/22 18:18:32 adam Exp $
+# $NetBSD: Makefile,v 1.12 2025/01/24 12:45:54 riastradh Exp $
 
 DISTNAME=      neovim-0.10.3
 CATEGORIES=    editors
@@ -42,17 +42,16 @@ FORTIFY_SUPPORTED=  no
 DEPENDS+=      ${LUA_PKGPREFIX}-BitOp-[0-9]*:../../devel/lua-BitOp
 DEPENDS+=      ${LUA_PKGPREFIX}-filesystem-[0-9]*:../../devel/lua-filesystem
 DEPENDS+=      ${LUA_PKGPREFIX}-inspect-[0-9]*:../../devel/lua-inspect
-DEPENDS+=      ${LUA_PKGPREFIX}-lpeg>=1.1.0nb1:../../devel/lua-lpeg
 DEPENDS+=      ${LUA_PKGPREFIX}-mpack-[0-9]*:../../devel/lua-mpack
 
 .if ${SHLIB_TYPE} == "ELF"
+CFLAGS+=       ${COMPILER_RPATH_FLAG}${PREFIX}/lib/lua/5.1
+
 TOOL_DEPENDS+= patchelf-[0-9]*:../../devel/patchelf
 
 post-install:
-       ${PREFIX}/bin/patchelf ${DESTDIR}${PREFIX}/bin/nvim \
-               --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
+       ${TOOLBASE}/bin/patchelf ${DESTDIR}${PREFIX}/bin/nvim \
+               --replace-needed ${BUILDLINK_DIR.lua-lpeg}/lib/lua/5.1/lpeg.so lpeg.so
 .endif
 
 .include "../../converters/libiconv/buildlink3.mk"
@@ -64,6 +63,7 @@ post-install:
 .include "../../devel/libuv/buildlink3.mk"
 BUILDLINK_API_DEPENDS.libvterm03+=     libvterm03>=0.3.3
 .include "../../devel/libvterm03/buildlink3.mk"
+.include "../../devel/lua-lpeg/buildlink3.mk"
 .include "../../devel/lua-luv/buildlink3.mk"
 .include "../../devel/msgpack/buildlink3.mk"
 .include "../../devel/unibilium/buildlink3.mk"

Added files:

Index: pkgsrc/devel/lua-lpeg/buildlink3.mk
diff -u /dev/null pkgsrc/devel/lua-lpeg/buildlink3.mk:1.1
--- /dev/null   Fri Jan 24 12:45:54 2025
+++ pkgsrc/devel/lua-lpeg/buildlink3.mk Fri Jan 24 12:45:54 2025
@@ -0,0 +1,15 @@
+#      $NetBSD: buildlink3.mk,v 1.1 2025/01/24 12:45:54 riastradh Exp $
+
+BUILDLINK_TREE+=       lua-lpeg
+
+.if !defined(LUA_LPEG_BUILDLINK3_MK)
+LUA_LPEG_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.lua-lpeg+=       ${LUA_PKGPREFIX}-lpeg>=1.1.0nb1
+BUILDLINK_ABI_DEPENDS.lua-lpeg+=       ${LUA_PKGPREFIX}-lpeg>=1.1.0nb1
+BUILDLINK_PKGSRCDIR.lua-lpeg=          ../../devel/lua-lpeg
+
+BUILDLINK_FILES.lua-lpeg+=             lib/lua/*/lpeg.so
+.endif
+
+BUILDLINK_TREE+=       -lua-lpeg



Home | Main Index | Thread Index | Old Index