Created attachment 211427 [details] proposed patch
With this patch the executable still links to the port's libncursesw.so.6: > $ ldd work/stage/usr/local/bin/cfiles > work/stage/usr/local/bin/cfiles: > libncursesw.so.6 => /usr/local/lib/libncursesw.so.6 (0x800251000) > libtinfow.so.6 => /usr/local/lib/libtinfow.so.6 (0x800289000) > libc.so.7 => /lib/libc.so.7 (0x8002ca000) What is wrong with linking with the ncurses package? Yuri
(In reply to Yuri Victorovich from comment #1) > With this patch the executable still links to the port's libncursesw.so.6: That's fine, that's how USES=ncurses is meant to work. We can switch to USES=ncurses:base if you prefer. > What is wrong with linking with the ncurses package? It's unnecessary.
I tried USES=ncurses:base but it fails to build when the ncurses port is present. It seems to be broken by design. If you can update the patch such that it is free of such issues - please do so.
(In reply to Yuri Victorovich from comment #3) Sorry, I don't understand what you're saying. I don't think there's anything wrong with ncurses.mk though. What I'd like to change is to allow this port to use base ncurses if the ports one is not installed, or use the ports one if it is installed, instead of requiring the ports one be installed.
When I have the port's one installed it just links to it. This is a problem. It should build regardless what else is installed.
With USES=ncurses:base I get this failure: > $ make > Dependency error: this port wants the ncurses library from the FreeBSD > base system. You can't build against it, while a newer > version is installed by a port. > Please deinstall the port or undefine WITH_NCURSES_BASE. I have some dependencies of ncurses installed, so I don't want to deinstall it. Therefore, I can't build deskutils/cfiles in this situation. I consider the feature USES=ncurses:base broken because of this. It doesn't allow the port to build in the presence of the ncurses port.
Committed the patch that forces the base ncurses library. Thanks!
A commit references this bug: Author: yuri Date: Thu Feb 13 03:15:54 UTC 2020 New revision: 526002 URL: https://svnweb.freebsd.org/changeset/ports/526002 Log: deskutils/cfiles: Use base ncurses swills suggested to have USES=ncurses:base, but it turned out that USES=ncurses:base is broken - it asks to deinstall the devel/ncurses port which is an undesirable behavior and an unnecessary request. The committed patch forces base ncurses through the make arguments. PR: 243941 Suggested by: swills Changes: head/deskutils/cfiles/Makefile