aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2016-09-08 22:12:55 +0800
committermat <mat@FreeBSD.org>2016-09-08 22:12:55 +0800
commitb290bbd9ed4de7d873418bd8e01103170a97818c (patch)
tree06fd2b7e5751476edbecc25e504c479fdc8fe9e4 /Mk
parent172dd5fed650faffc6f5dc3c5f7e25f888bb4381 (diff)
downloadfreebsd-ports-gnome-b290bbd9ed4de7d873418bd8e01103170a97818c.tar.gz
freebsd-ports-gnome-b290bbd9ed4de7d873418bd8e01103170a97818c.tar.zst
freebsd-ports-gnome-b290bbd9ed4de7d873418bd8e01103170a97818c.zip
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
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/ncurses.mk12
1 files changed, 5 insertions, 7 deletions
diff --git a/Mk/Uses/ncurses.mk b/Mk/Uses/ncurses.mk
index 37d046d98dfc..f5e42e4baf97 100644
--- a/Mk/Uses/ncurses.mk
+++ b/Mk/Uses/ncurses.mk
@@ -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