diff options
author | Fabian Groffen <grobian@gentoo.org> | 2016-09-10 16:38:28 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2016-09-10 16:40:27 +0200 |
commit | 49925c0dd0a4ab8599c955244cee2d0764cc08e9 (patch) | |
tree | 212726b265d87b1ef67ecc7236a091efdbf6910c /sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild | |
parent | sys-devel/gcc-apple: bump to EAPI=5 and remove all conditional code from glob... (diff) | |
download | gentoo-49925c0dd0a4ab8599c955244cee2d0764cc08e9.tar.gz gentoo-49925c0dd0a4ab8599c955244cee2d0764cc08e9.tar.bz2 gentoo-49925c0dd0a4ab8599c955244cee2d0764cc08e9.zip |
sys-devel/binutils-apple: bump to EAPI=5 and remove all conditional code from global scope, bug #593392
Package-Manager: portage-2.2.28
Diffstat (limited to 'sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild')
-rw-r--r-- | sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild b/sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild index 7fc30131f784..a03dbc3f0644 100644 --- a/sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild +++ b/sys-devel/binutils-apple/binutils-apple-4.3-r2.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 @@ -32,27 +32,12 @@ DEPEND="${RDEPEND} test? ( >=dev-lang/perl-5.8.8 ) || ( >=sys-devel/gcc-apple-4.2.1 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="4" -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" @@ -185,6 +170,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 |