summaryrefslogtreecommitdiff
path: root/sys-libs
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-08-12 06:34:08 -0400
committerMike Frysinger <vapier@gentoo.org>2015-08-12 06:38:11 -0400
commit5afe80ab951f4c7bf76ca48f4432dcbcec1f791f (patch)
treec84b7639f4e16e32d0c2a5ac84e2f2e73f8bc8f3 /sys-libs
parent0671fd8b94d3ee9eb164bae47d2ad0871d5632ae (diff)
downloadgentoo-5afe80ab951f4c7bf76ca48f4432dcbcec1f791f.tar.gz
gentoo-5afe80ab951f4c7bf76ca48f4432dcbcec1f791f.tar.xz
sys-libs/ncurses: rework use of BUILD_DIR
Rather than maintain parallel dirs, create subdirs of the main BUILD_DIR. This makes the overall flow a bit simpler as we can also stick the cross logic in there too.
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/ncurses/ncurses-6.0.ebuild21
1 files changed, 12 insertions, 9 deletions
diff --git a/sys-libs/ncurses/ncurses-6.0.ebuild b/sys-libs/ncurses/ncurses-6.0.ebuild
index 0a44ca69bb8..b0bd0f9f02f 100644
--- a/sys-libs/ncurses/ncurses-6.0.ebuild
+++ b/sys-libs/ncurses/ncurses-6.0.ebuild
@@ -27,7 +27,6 @@ RDEPEND="${DEPEND}
!app-emulation/emul-linux-x86-baselibs"
S=${WORKDIR}/${MY_P}
-HOSTTIC_DIR=${WORKDIR}/${P}-host
PATCHES=(
"${FILESDIR}/${PN}-6.0-gfbsd.patch"
@@ -56,7 +55,7 @@ src_configure() {
CXXFLAGS=${BUILD_CXXFLAGS} \
CPPFLAGS=${BUILD_CPPFLAGS} \
LDFLAGS="${BUILD_LDFLAGS} -static" \
- BUILD_DIR="${HOSTTIC_DIR}" do_configure cross --without-shared --with-normal
+ do_configure cross --without-shared --with-normal
fi
multilib-minimal_src_configure
}
@@ -71,10 +70,12 @@ multilib_src_configure() {
do_configure() {
ECONF_SOURCE=${S}
- mkdir "${BUILD_DIR}"-$1
- cd "${BUILD_DIR}"-$1 || die
+ local target=$1
shift
+ mkdir "${BUILD_DIR}/${target}"
+ cd "${BUILD_DIR}/${target}" || die
+
local conf=(
# We need the basic terminfo files in /etc, bug #37026. We will
# add '--with-terminfo-dirs' and then populate /etc/terminfo in
@@ -133,7 +134,7 @@ src_compile() {
# because people often don't keep matching host/target
# ncurses versions #249363
if tc-is-cross-compiler && ! ROOT=/ has_version ~sys-libs/${P} ; then
- BUILD_DIR="${HOSTTIC_DIR}" do_compile cross -C progs tic
+ do_compile cross -C progs tic
fi
multilib-minimal_src_compile
@@ -145,9 +146,11 @@ multilib_src_compile() {
}
do_compile() {
- cd "${BUILD_DIR}"-$1 || die
+ local target=$1
shift
+ cd "${BUILD_DIR}/${target}" || die
+
# A little hack to fix parallel builds ... they break when
# generating sources so if we generate the sources first (in
# non-parallel), we can then build the rest of the package
@@ -164,14 +167,14 @@ do_compile() {
multilib_src_install() {
# use the cross-compiled tic (if need be) #249363
- export PATH="${HOSTTIC_DIR}-cross/progs:${PATH}"
+ export PATH="${BUILD_DIR}/cross/progs:${PATH}"
# install unicode version second so that the binaries in /usr/bin
# support both wide and narrow
- cd "${BUILD_DIR}"-narrowc || die
+ cd "${BUILD_DIR}"/narrowc || die
emake DESTDIR="${D}" install
if use unicode ; then
- cd "${BUILD_DIR}"-widec || die
+ cd "${BUILD_DIR}"/widec || die
emake DESTDIR="${D}" install
fi