getsolus / packages

Solus Package Monorepo & Issue Tracker
66 stars 86 forks source link

ncurses: enable `--with-termlib` #4480

Open Staudey opened 2 days ago

Staudey commented 2 days ago

Please confirm there isn't an open report for this package

Name

ncurses

Version

6.5.20241006

Summary of the problem

A user tried creating a package for snapper which ultimately failed in the linking stage with the following error: /usr/bin/ld: cannot find -ltinfo: No such file or directory

After some googling and testing it was discovered that enabling the --with-termlib option for ncurses, which creates the libtinfo libraries, solves this problem. In the current recipe there is only a symlink creation between libncurses and libtinfo instead: ln -sv libncurses.so.6 $installdir/%libdir%/libtinfo.so.6

I don't know what the exact ramifications of changing this are, but it fixes the snapper build at least (though one might be able to accomplish that in a different way).

More information

Temporary snapper build script this was tested with:

name       : snapper
version    : "0.12.0"
release    : 1
source     :
    - https://github.com/openSUSE/snapper/archive/refs/tags/v0.12.0.tar.gz : 057230965c8135ed78038dab8045444e7b40d7f5c1ca8aa80ecb3ef90c70c5ac
homepage   : PLEASE FILL ME IN
license    : GPL-2.0-or-later # CHECK ME
component  : PLEASE FILL ME IN
summary    : PLEASE FILL ME IN
description: |
    PLEASE FILL ME IN
builddeps  :
    - pkgconfig(dbus-1)
    - pkgconfig(libxml-2.0)
    - pkgconfig(json-c)
    - pkgconfig(zlib)
    - pkgconfig(libbtrfsutil)
    - acl-devel
    - libselinux-devel
    - libboost-devel
    - ncurses-devel
    - e2fsprogs-devel
    - docbook-xml
setup      : |
    %make -f Makefile.repo
build      : |
    %make
install    : |
    %make_install
ermo commented 2 days ago

From https://www.man7.org/linux/man-pages/man3/ncurses.3x.html (just to give some context for what the buildflag flag does):

--with-termlib
    Low-level functions which do not depend upon whether the
    library supports wide-characters, are provided in the tinfo
    library.

    By doing this, it is possible to share the tinfo library
    between wide/normal configurations as well as reduce the
    size of the library when only low-level functions are
    needed.