From 49925c0dd0a4ab8599c955244cee2d0764cc08e9 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 10 Sep 2016 16:38:28 +0200 Subject: sys-devel/binutils-apple: bump to EAPI=5 and remove all conditional code from global scope, bug #593392 Package-Manager: portage-2.2.28 --- sys-devel/binutils-apple/binutils-apple-7.3.ebuild | 35 +++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'sys-devel/binutils-apple/binutils-apple-7.3.ebuild') diff --git a/sys-devel/binutils-apple/binutils-apple-7.3.ebuild b/sys-devel/binutils-apple/binutils-apple-7.3.ebuild index e177c38d3da4..db2756789691 100644 --- a/sys-devel/binutils-apple/binutils-apple-7.3.ebuild +++ b/sys-devel/binutils-apple/binutils-apple-7.3.ebuild @@ -41,27 +41,12 @@ RDEPEND="sys-devel/binutils-config DEPEND="${RDEPEND} test? ( >=dev-lang/perl-5.8.8 )" -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } - SLOT="7" -LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} -INCPATH=${LIBPATH}/include -DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} -if is_cross ; then - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} -else - BINPATH=/usr/${CTARGET}/binutils-bin/${PV} -fi - S=${WORKDIR} +is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } + src_prepare() { if use multitarget ; then ewarn "You have enabled support for non-standard target architectures" @@ -199,6 +184,22 @@ src_configure() { ENABLE_LTO=0 use lto && ENABLE_LTO=1 + export CTARGET=${CTARGET:-${CHOST}} + if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi + fi + + LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} + INCPATH=${LIBPATH}/include + DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} + if is_cross ; then + BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} + else + BINPATH=/usr/${CTARGET}/binutils-bin/${PV} + fi + # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is # what we want) append-cppflags -DNDEBUG -- cgit v1.2.3-65-gdbad