From owner-svn-ports-all@freebsd.org Thu Sep 8 14:12:57 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04029BD0B1C; Thu, 8 Sep 2016 14:12:57 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8A61B3E; Thu, 8 Sep 2016 14:12:56 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u88ECuOl067534; Thu, 8 Sep 2016 14:12:56 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u88ECuqA067533; Thu, 8 Sep 2016 14:12:56 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201609081412.u88ECuqA067533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Thu, 8 Sep 2016 14:12:56 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r421554 - head/Mk/Uses X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 14:12:57 -0000 Author: mat Date: Thu Sep 8 14:12:55 2016 New Revision: 421554 URL: https://svnweb.freebsd.org/changeset/ports/421554 Log: 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 Modified: head/Mk/Uses/ncurses.mk Modified: head/Mk/Uses/ncurses.mk ============================================================================== --- head/Mk/Uses/ncurses.mk Thu Sep 8 14:12:41 2016 (r421553) +++ head/Mk/Uses/ncurses.mk Thu Sep 8 14:12:55 2016 (r421554) @@ -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/libncu 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