Bug 243941 - deskutils/cfiles: allow using base ncurses
Summary: deskutils/cfiles: allow using base ncurses
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-06 20:32 UTC by Steve Wills
Modified: 2020-02-13 03:16 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
proposed patch (610 bytes, patch)
2020-02-06 20:32 UTC, Steve Wills
swills: maintainer-approval? (yuri)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Wills freebsd_committer freebsd_triage 2020-02-06 20:32:48 UTC
Created attachment 211427 [details]
proposed patch
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2020-02-07 06:03:05 UTC
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
Comment 2 Steve Wills freebsd_committer freebsd_triage 2020-02-07 13:06:44 UTC
(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.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2020-02-08 18:08:49 UTC
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.
Comment 4 Steve Wills freebsd_committer freebsd_triage 2020-02-12 21:34:21 UTC
(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.
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2020-02-13 02:55:52 UTC
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.
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2020-02-13 03:03:02 UTC
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.
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2020-02-13 03:16:03 UTC
Committed the patch that forces the base ncurses library.

Thanks!
Comment 8 commit-hook freebsd_committer freebsd_triage 2020-02-13 03:16:15 UTC
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