git: 3556bb222640 - main - USES=ncurses: expose variable with the name of the lib to link against

Baptiste Daroussin bapt at FreeBSD.org
Thu Sep 23 16:22:56 UTC 2021


The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3556bb222640f4cf6dd22a59542fafdf5ffbd934

commit 3556bb222640f4cf6dd22a59542fafdf5ffbd934
Author:     Baptiste Daroussin <bapt at FreeBSD.org>
AuthorDate: 2021-09-23 16:05:28 +0000
Commit:     Baptiste Daroussin <bapt at FreeBSD.org>
CommitDate: 2021-09-23 16:22:53 +0000

    USES=ncurses: expose variable with the name of the lib to link against
    
    ncurses from ports and futur ncurses in base differs from current
    ncurses in base by the fact it is not providing a giant libncurses.so
    but 2 libraries: libtinfo and libncurses, those information often needs
    to be reported to the consumer port.
    
    while here remove a now useless test for support of widechar ncurses in
    base, all supported version of freebsd have it now.
---
 Mk/Uses/ncurses.mk | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Mk/Uses/ncurses.mk b/Mk/Uses/ncurses.mk
index 3a6a30e78476..6fad636a5ab4 100644
--- a/Mk/Uses/ncurses.mk
+++ b/Mk/Uses/ncurses.mk
@@ -35,9 +35,6 @@ ncurses_ARGS=	port
 .if ${ncurses_ARGS} == base
 NCURSESBASE=	/usr
 NCURSESINC=	${NCURSESBASE}/include
-.if !exists(/usr/lib/libncursesw.so)
-NCURSES_IMPL=	ncurses
-.endif
 
 .  if exists(${LOCALBASE}/lib/libncurses.so)
 _USES_sanity+=	400:check-depends-ncurses
@@ -75,6 +72,8 @@ NCURSES_SHLIBVER?=	6
 BUILD_DEPENDS+=		${LOCALBASE}/lib/libncurses.so.${NCURSES_SHLIBVER}:${NCURSES_PORT}
 RUN_DEPENDS+=		${LOCALBASE}/lib/libncurses.so.${NCURSES_SHLIBVER}:${NCURSES_PORT}
 NCURSESRPATH=		${NCURSESBASE}/lib
+TINFO_LIB=		-ltinfo
+NCURSES_LIB=		-lncurses
 
 .if defined(NCURSES_RPATH)
 CFLAGS+=	-Wl,-rpath,${NCURSESRPATH}
@@ -87,5 +86,8 @@ LDFLAGS+=	-Wl,-rpath=${NCURSESRPATH}
 
 NCURSESLIB=	${NCURSESBASE}/lib
 NCURSES_IMPL?=	ncursesw
+TINFO_LIB?=	-ltinfow
+NCURSES_LIB?=	-lncursesw
+NCURSESLIBS=		${NCURSES_LIB} ${TINFO_LIB}
 
 .endif


More information about the dev-commits-ports-main mailing list