Fix ncurses to not add /usr/lib to rpath.
There are three cases here: 1) USES=ncurses or USES=ncurses:base and devel/ncurses is not present: use base, no need to add rpath as there is only one libncurses.so present, in /usr/lib 2) USES=ncurses and devel/ncurses is present or USES=ncurses:port: use ports, and add rpath to LOCALBASE/lib so that the right one is picked 3) USES=ncurses:base and devel/ncurses is present fail (it would warrant using -rpath /usr/lib, but it error's out during the sanity stage) PR: 211592 Reported by: koobs (and many others) Reviewed by: bapt Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D7459
This commit is contained in:
parent
63598e1919
commit
400866262b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=421554
@ -48,8 +48,6 @@ check-depends-ncurses:
|
||||
@${FALSE}
|
||||
. endif
|
||||
|
||||
NCURSESRPATH= /usr/lib:${LOCALBASE}/lib
|
||||
|
||||
.elif ${ncurses_ARGS} == port
|
||||
NCURSESBASE= ${LOCALBASE}
|
||||
NCURSESINC= ${LOCALBASE}/include/ncurses
|
||||
@ -77,15 +75,15 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libncurses.so.${NCURSES_SHLIBVER}:${NCURSES_PO
|
||||
RUN_DEPENDS+= ${LOCALBASE}/lib/libncurses.so.${NCURSES_SHLIBVER}:${NCURSES_PORT}
|
||||
NCURSESRPATH= ${NCURSESBASE}/lib
|
||||
|
||||
.if defined(NCURSES_RPATH)
|
||||
CFLAGS+= -Wl,-rpath,${NCURSESRPATH}
|
||||
.endif
|
||||
LDFLAGS+= -Wl,-rpath=${NCURSESRPATH}
|
||||
|
||||
.else
|
||||
.error USES=ncurses only accept 'port' and 'base' as arguments, got ${ncurses_ARGS}
|
||||
.endif
|
||||
|
||||
NCURSESLIB= ${NCURSESBASE}/lib
|
||||
|
||||
.if defined(NCURSES_RPATH)
|
||||
CFLAGS+= -Wl,-rpath,${NCURSESRPATH}
|
||||
.endif
|
||||
LDFLAGS+= -Wl,-rpath=${NCURSESRPATH}
|
||||
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user