diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-05-28 12:19:18 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-05-28 12:19:18 +0000 |
commit | a151912edd8cfb757ff57fb3deb622eefdd0bf06 (patch) | |
tree | e3a35a9974bc85105f6e72c3da30a79bb4a9335e /sci-chemistry | |
parent | Marking fetchmail-6.3.19 ppc for bug 364849 (diff) | |
download | gentoo-2-a151912edd8cfb757ff57fb3deb622eefdd0bf06.tar.gz gentoo-2-a151912edd8cfb757ff57fb3deb622eefdd0bf06.tar.bz2 gentoo-2-a151912edd8cfb757ff57fb3deb622eefdd0bf06.zip |
Steal bitness check from dev-libs/nss
(Portage version: 2.2.0_alpha37/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/cns/ChangeLog | 6 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.2.1-r5.ebuild | 29 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.2.1-r6.ebuild | 27 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.3_p5.ebuild | 24 |
4 files changed, 62 insertions, 24 deletions
diff --git a/sci-chemistry/cns/ChangeLog b/sci-chemistry/cns/ChangeLog index 94490d68d0d2..92f606bef454 100644 --- a/sci-chemistry/cns/ChangeLog +++ b/sci-chemistry/cns/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sci-chemistry/cns # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.37 2011/05/28 12:09:36 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.38 2011/05/28 12:19:18 jlec Exp $ + + 28 May 2011; Justin Lecher <jlec@gentoo.org> cns-1.2.1-r5.ebuild, + cns-1.2.1-r6.ebuild, cns-1.3_p5.ebuild: + Steal bitness check from dev-libs/nss 28 May 2011; Justin Lecher <jlec@gentoo.org> cns-1.2.1-r6.ebuild: Removed bad alias definition diff --git a/sci-chemistry/cns/cns-1.2.1-r5.ebuild b/sci-chemistry/cns/cns-1.2.1-r5.ebuild index b06f3930156b..aa45879a4e2c 100644 --- a/sci-chemistry/cns/cns-1.2.1-r5.ebuild +++ b/sci-chemistry/cns/cns-1.2.1-r5.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r5.ebuild,v 1.7 2011/05/11 07:27:13 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r5.ebuild,v 1.8 2011/05/28 12:19:18 jlec Exp $ -EAPI="3" +EAPI=3 inherit eutils toolchain-funcs versionator flag-o-matic @@ -52,9 +52,22 @@ pkg_setup() { get_fcomp } +get_bitness() { + echo > "${T}"/test.c + $(tc-getCC) ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o + case $(file "${T}"/test.o) in + *64-bit*|*ppc64*|*x86_64*) export _bitness="64";; + *32-bit*|*ppc*|*i386*) export _bitness="32";; + *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; + esac +} + src_prepare() { - epatch "${FILESDIR}"/${PV}-gentoo.patch - epatch "${FILESDIR}"/${PV}-parallel.patch + epatch \ + "${FILESDIR}"/${PV}-gentoo.patch \ + "${FILESDIR}"/${PV}-parallel.patch + + get_bitness if use aria; then pushd "${WORKDIR}"/aria* >& /dev/null @@ -72,19 +85,17 @@ src_prepare() { use openmp && \ append-flags -fopenmp && append-ldflags -fopenmp COMP="gfortran" - use amd64 && \ + [[ ${_bitness} == 64 ]] && \ append-fflags -fdefault-integer-8 elif [[ $(tc-getFC) == if* ]]; then epatch "${FILESDIR}"/${PV}-ifort.patch use openmp && \ append-flags -openmp && append-ldflags -openmp COMP="ifort" - use amd64 && append-fflags -i8 - append-fflags -Vaxlib - append-ldflags -Vaxlib + [[ ${_bitness} == 64 ]] && append-fflags -i8 fi - use amd64 && \ + [[ ${_bitness} == 64 ]] && \ append-cflags "-DINTEGER='long long int'" # Set up location for the build directory diff --git a/sci-chemistry/cns/cns-1.2.1-r6.ebuild b/sci-chemistry/cns/cns-1.2.1-r6.ebuild index e3ffb706245d..b63ea17178c9 100644 --- a/sci-chemistry/cns/cns-1.2.1-r6.ebuild +++ b/sci-chemistry/cns/cns-1.2.1-r6.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r6.ebuild,v 1.3 2011/05/28 12:09:36 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r6.ebuild,v 1.4 2011/05/28 12:19:18 jlec Exp $ -EAPI="3" +EAPI=3 inherit eutils toolchain-funcs versionator flag-o-matic @@ -52,9 +52,22 @@ pkg_setup() { get_fcomp } +get_bitness() { + echo > "${T}"/test.c + $(tc-getCC) ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o + case $(file "${T}"/test.o) in + *64-bit*|*ppc64*|*x86_64*) export _bitness="64";; + *32-bit*|*ppc*|*i386*) export _bitness="32";; + *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; + esac +} + src_prepare() { - epatch "${FILESDIR}"/${PV}-gentoo.patch - epatch "${FILESDIR}"/${PV}-parallel.patch + epatch \ + "${FILESDIR}"/${PV}-gentoo.patch \ + "${FILESDIR}"/${PV}-parallel.patch + + get_bitness if use aria; then pushd "${WORKDIR}"/aria* >& /dev/null @@ -72,17 +85,17 @@ src_prepare() { use openmp && \ append-flags -fopenmp && append-ldflags -fopenmp COMP="gfortran" - use amd64 && \ + [[ ${_bitness} == 64 ]] && \ append-fflags -fdefault-integer-8 elif [[ $(tc-getFC) == if* ]]; then epatch "${FILESDIR}"/${PV}-ifort.patch use openmp && \ append-flags -openmp && append-ldflags -openmp COMP="ifort" - use amd64 && append-fflags -i8 + [[ ${_bitness} == 64 ]] && append-fflags -i8 fi - use amd64 && \ + [[ ${_bitness} == 64 ]] && \ append-cflags "-DINTEGER='long long int'" # Set up location for the build directory diff --git a/sci-chemistry/cns/cns-1.3_p5.ebuild b/sci-chemistry/cns/cns-1.3_p5.ebuild index a2833808dd5f..de5d9f4cbcdd 100644 --- a/sci-chemistry/cns/cns-1.3_p5.ebuild +++ b/sci-chemistry/cns/cns-1.3_p5.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.3_p5.ebuild,v 1.1 2011/02/13 12:09:12 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.3_p5.ebuild,v 1.2 2011/05/28 12:19:18 jlec Exp $ -EAPI="3" +EAPI=3 inherit eutils toolchain-funcs versionator flag-o-matic @@ -52,11 +52,23 @@ pkg_setup() { get_fcomp } +get_bitness() { + echo > "${T}"/test.c + $(tc-getCC) ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o + case $(file "${T}"/test.o) in + *64-bit*|*ppc64*|*x86_64*) export _bitness="64";; + *32-bit*|*ppc*|*i386*) export _bitness="32";; + *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; + esac +} + src_prepare() { epatch \ "${FILESDIR}"/${PV}-gentoo.patch \ "${FILESDIR}"/${PV}-delete.patch + get_bitness + if use aria; then pushd "${WORKDIR}"/aria* >& /dev/null # Update the cns sources in aria for version 1.2.1 @@ -72,18 +84,16 @@ src_prepare() { use openmp && \ append-flags -fopenmp && append-ldflags -fopenmp COMP="gfortran" - use amd64 && \ + [[ ${_bitness} == 64 ]] && \ append-fflags -fdefault-integer-8 elif [[ $(tc-getFC) == if* ]]; then use openmp && \ append-flags -openmp && append-ldflags -openmp COMP="ifort" - use amd64 && append-fflags -i8 - append-fflags -Vaxlib - append-ldflags -Vaxlib + [[ ${_bitness} == 64 ]] && append-fflags -i8 fi - use amd64 && \ + [[ ${_bitness} == 64 ]] && \ append-cflags "-DINTEGER='long long int'" # Set up location for the build directory |