From 49925c0dd0a4ab8599c955244cee2d0764cc08e9 Mon Sep 17 00:00:00 2001 From: Fabian Groffen <grobian@gentoo.org> 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 --- .../binutils-apple/binutils-apple-5.1-r1.ebuild | 37 +++++++++++----------- 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild') diff --git a/sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild index 58c2d4ef98a3..682f644fc851 100644 --- a/sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild +++ b/sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI="3" +EAPI="5" inherit eutils flag-o-matic toolchain-funcs @@ -33,27 +33,12 @@ DEPEND="${RDEPEND} || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm ) libcxx? ( sys-devel/llvm )" -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } - SLOT="5" -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" @@ -197,6 +182,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 + if [ "${CXX/*clang*/yes}" = "yes" ] ; then if use libcxx ; then append-cxxflags -stdlib=libc++ -- cgit v1.2.3-65-gdbad