From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 17AF41384C1 for ; Mon, 31 Aug 2015 18:44:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 53F94E07FC; Mon, 31 Aug 2015 18:44:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E3636E07FC for ; Mon, 31 Aug 2015 18:44:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1E4A33406A6 for ; Mon, 31 Aug 2015 18:44:43 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8272317E for ; Mon, 31 Aug 2015 18:44:39 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1441046599.9c928e3de99c4b2f01f8dfd1b4cc97ae8cd181e5.grobian@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/ncurses/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/ncurses/ncurses-6.0-r1.ebuild X-VCS-Directories: sys-libs/ncurses/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 9c928e3de99c4b2f01f8dfd1b4cc97ae8cd181e5 X-VCS-Branch: master Date: Mon, 31 Aug 2015 18:44:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 52d48398-ed07-40e5-bec2-2864751ad95c X-Archives-Hash: 9db096904e40fd27f7cd364944e857cd commit: 9c928e3de99c4b2f01f8dfd1b4cc97ae8cd181e5 Author: Fabian Groffen gentoo org> AuthorDate: Mon Aug 31 18:36:02 2015 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Mon Aug 31 18:43:19 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c928e3d sys-libs/ncurses: fix build on platforms that don't support static linking Package-Manager: portage-2.2.20-prefix sys-libs/ncurses/ncurses-6.0-r1.ebuild | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys-libs/ncurses/ncurses-6.0-r1.ebuild b/sys-libs/ncurses/ncurses-6.0-r1.ebuild index 245d977..c41219b 100644 --- a/sys-libs/ncurses/ncurses-6.0-r1.ebuild +++ b/sys-libs/ncurses/ncurses-6.0-r1.ebuild @@ -68,13 +68,24 @@ src_configure() { # or installing for the first time. Build a local copy of tic whenever # the host version isn't available. #249363 #557598 if ! ROOT=/ has_version "~sys-libs/${P}:0" ; then + local lbuildflags="-static" + + # some toolchains don't quite support static linking + local dbuildflags="-Wl,-rpath,${WORKDIR}/lib" + case ${CHOST} in + *-darwin*) dbuildflags= ;; + esac + echo "int main() {}" | \ + $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \ + || lbuildflags="${dbuildflags}" + # We can't re-use the multilib BUILD_DIR because we run outside of it. BUILD_DIR="${WORKDIR}" \ CHOST=${CBUILD} \ CFLAGS=${BUILD_CFLAGS} \ CXXFLAGS=${BUILD_CXXFLAGS} \ CPPFLAGS=${BUILD_CPPFLAGS} \ - LDFLAGS="${BUILD_LDFLAGS} -static" \ + LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \ multijob_child_init do_configure cross --without-shared --with-normal fi multilib-minimal_src_configure @@ -165,7 +176,7 @@ do_configure() { # Force bash until upstream rebuilds the configure script with a newer # version of autotools. #545532 - CONFIG_SHELL=/bin/bash \ + CONFIG_SHELL=${EPREFIX}/bin/bash \ ECONF_SOURCE=${S} \ econf "${conf[@]}" "$@" }