Bug 217421

Summary: shells/zsh: devel/ncurses detection with poudriere
Product: Ports & Packages Reporter: Kamigishi Rei <spambox>
Component: Individual Port(s)Assignee: Baptiste Daroussin <bapt>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: bapt, bdrewery, miwi, swills
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Making zsh link against ncurses from ports; not quite nice because of direct .so version specification none

Description Kamigishi Rei 2017-02-28 16:51:48 UTC
The shells/zsh port is designed to detect whether devel/ncurses is installed in the build environment, and links against it if it is. When building using poudriere with devel/ncurses at the top of the ports listing the resulting shells/zsh package is still linked against base system ncurses.

Poudriere-built package:

/usr/local/bin/zsh:
        libncursesw.so.8 => /lib/libncursesw.so.8 (0x8008cf000)
        libm.so.5 => /lib/libm.so.5 (0x800b2b000)
        libc.so.7 => /lib/libc.so.7 (0x800d56000)


Binary built using make build in /usr/ports/shells/zsh with the binary devel/ncurses package installed:

/var/ports/basejail/usr/ports/shells/zsh/work/zsh-5.3.1/Src/zsh:
        libtinfow.so.6 => /usr/local/lib/libtinfow.so.6 (0x8008cf000)
        libm.so.5 => /lib/libm.so.5 (0x800b08000)
        libc.so.7 => /lib/libc.so.7 (0x800d33000)

Would it be feasible to add a build option to force linking against devel/ncurses? Right now it appears impossible to get an automated build that depends on ncurses from ports.
Comment 1 Martin Wilke freebsd_committer freebsd_triage 2017-03-05 13:34:13 UTC
Adding poduriere maintainer.
Comment 2 Kamigishi Rei 2017-10-11 15:32:28 UTC
Is it safe to assume that this will not be resolved?
Comment 3 Baptiste Daroussin freebsd_committer freebsd_triage 2017-10-11 15:36:04 UTC
Sorry I missed it.

it is working as expected, poudriere is always building in a clean room. This order your specify the packages to build does not matter.

The reason why USES=ncurses prefers devel/ncurses from ports if installed is only because it is hard to prevent it when building in place from ports.

Why do you want zsh to be linked against the port version of ncurses?
Comment 4 Kamigishi Rei 2017-10-11 15:47:37 UTC
(In reply to Baptiste Daroussin from comment #3)
Partially because of 256 colours support included starting with 6.0. This might seem like bells and whistles, obviously.

However I would like to be able to reproduce the normal "make package" behaviour with poudriere. In my use case zsh is used on multiple machines and in quite a few jails (all using a central package repository) and a lot of users would like to have 256 colours support.
Comment 5 Kamigishi Rei 2018-08-18 19:32:05 UTC
Created attachment 196326 [details]
Making zsh link against ncurses from ports; not quite nice because of direct .so version specification

I tried adding a new option; had to specify libncurses.so.6 directly (with the .6) to make it install the port (otherwise it finds the library in /usr/lib). zsh compiles successfully and links against the ncurses port.

This most likely can be done in a better way.
Comment 6 Steve Wills freebsd_committer freebsd_triage 2021-01-05 16:13:43 UTC
(In reply to Kamigishi Rei from comment #5)
Since 13-CURRENT has the newer ncurses now, this option should only be present if building on older versions, IMHO.
Comment 7 Kamigishi Rei 2021-02-23 21:01:50 UTC
With 13 importing new ncurses, this can probably be closed.