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 2F96F1397E6 for ; Mon, 17 Aug 2015 13:52:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B134E0833; Mon, 17 Aug 2015 13:52:48 +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 F3723E0825 for ; Mon, 17 Aug 2015 13:52:47 +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 B2C2C34094F for ; Mon, 17 Aug 2015 13:52:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3014A156 for ; Mon, 17 Aug 2015 13:52:41 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1439819449.badf9b730721ec3c0781588cb7614721db3a045a.vapier@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.ebuild X-VCS-Directories: sys-libs/ncurses/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: badf9b730721ec3c0781588cb7614721db3a045a X-VCS-Branch: master Date: Mon, 17 Aug 2015 13:52:41 +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: 6642495b-a2c1-4d15-8a65-eee9d93aed77 X-Archives-Hash: 569ae67aa5445d1618f24d5aaf482c22 commit: badf9b730721ec3c0781588cb7614721db3a045a Author: Mike Frysinger gentoo org> AuthorDate: Mon Aug 17 13:41:54 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Aug 17 13:50:49 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=badf9b73 sys-libs/ncurses: rework handling of build-time tic #557834 There are more cases where a version of tic is needed that matches the current version of source beyond cross-compiling. New installs, multilib, and upgrades also run into this case. Drop the cross-compile test and run the code whenever the host version isn't in sync. sys-libs/ncurses/ncurses-6.0.ebuild | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/sys-libs/ncurses/ncurses-6.0.ebuild b/sys-libs/ncurses/ncurses-6.0.ebuild index 81c87de..39ebaaf 100644 --- a/sys-libs/ncurses/ncurses-6.0.ebuild +++ b/sys-libs/ncurses/ncurses-6.0.ebuild @@ -60,27 +60,31 @@ src_configure() { $(use unicode && usex threads 'ncursestw' '') ) - # when cross-compiling, we need to build up our own tic - # because people often don't keep matching host/target - # ncurses versions #249363 - if tc-is-cross-compiler && ! ROOT=/ has_version ~sys-libs/${P} ; then + multijob_init + + # When installing ncurses, we have to use a compatible version of tic. + # This comes up when cross-compiling, doing multilib builds, upgrading, + # 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}" ; then + # 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" \ - do_configure cross --without-shared --with-normal + multijob_child_init do_configure cross --without-shared --with-normal fi multilib-minimal_src_configure + multijob_finish } multilib_src_configure() { local t - multijob_init for t in "${NCURSES_TARGETS[@]}" ; do multijob_child_init do_configure "${t}" done - multijob_finish } do_configure() { @@ -152,6 +156,11 @@ do_configure() { if [[ ${target} != "ncurses" ]] ; then conf+=( --includedir="${EPREFIX}"/usr/include/${target} ) fi + # See comments in src_configure. + if [[ ${target} != "cross" ]] ; then + local tic_path="${WORKDIR}/cross/progs/tic" + [[ -d ${tic_path} ]] && export TIC_PATH=${tic_path} + fi # Force bash until upstream rebuilds the configure script with a newer # version of autotools. #545532 @@ -161,10 +170,9 @@ do_configure() { } src_compile() { - # when cross-compiling, we need to build up our own tic - # because people often don't keep matching host/target - # ncurses versions #249363 - if tc-is-cross-compiler && ! ROOT=/ has_version ~sys-libs/${P} ; then + # See comments in src_configure. + if ! ROOT=/ has_version "~sys-libs/${P}" ; then + BUILD_DIR="${WORKDIR}" \ do_compile cross -C progs tic fi @@ -199,9 +207,6 @@ do_compile() { } multilib_src_install() { - # use the cross-compiled tic (if need be) #249363 - export PATH="${BUILD_DIR}/cross/progs:${PATH}" - local target for target in "${NCURSES_TARGETS[@]}" ; do emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install