diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-10-07 16:41:47 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-10-07 16:41:47 +0000 |
commit | a6069d2a342253b74355383663fe01a9dae72461 (patch) | |
tree | 9033ebb46f52889246b47c5074077582e376ded9 /dev-libs | |
parent | made init-script compatible with shells other than bash (bug #194919), change... (diff) | |
download | gentoo-2-a6069d2a342253b74355383663fe01a9dae72461.tar.gz gentoo-2-a6069d2a342253b74355383663fe01a9dae72461.tar.bz2 gentoo-2-a6069d2a342253b74355383663fe01a9dae72461.zip |
cleanup code a bit
(Portage version: 2.1.3.11)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/gmp/gmp-4.2.1-r1.ebuild | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/dev-libs/gmp/gmp-4.2.1-r1.ebuild b/dev-libs/gmp/gmp-4.2.1-r1.ebuild index 78bf21d90cfe..5bd2382501f9 100644 --- a/dev-libs/gmp/gmp-4.2.1-r1.ebuild +++ b/dev-libs/gmp/gmp-4.2.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/gmp-4.2.1-r1.ebuild,v 1.2 2007/07/26 19:39:20 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/gmp-4.2.1-r1.ebuild,v 1.3 2007/10/07 16:41:47 vapier Exp $ inherit flag-o-matic eutils libtool @@ -34,21 +34,18 @@ src_unpack () { src_compile() { # GMP believes hppa2.0 is 64bit + local is_hppa_2_0 if [[ ${CHOST} == hppa2.0-* ]] ; then is_hppa_2_0=1 - export CHOST="${CHOST/2.0/1.1}" + export CHOST=${CHOST/2.0/1.1} fi # ABI mappings (needs all architectures supported) - if [ -n "${ABI}" ]; then - [ "${ABI}" = "32" ] && export GMPABI=32 - [ "${ABI}" = "64" ] && export GMPABI=64 - [ "${ABI}" = "x86" ] && export GMPABI=32 - [ "${ABI}" = "amd64" ] && export GMPABI=64 - [ "${ABI}" = "n64" ] && export GMPABI=64 - [ "${ABI}" = "o32" ] && export GMPABI=o32 - [ "${ABI}" = "n32" ] && export GMPABI=n32 - fi + case ${ABI} in + 32|x86) export GMPABI=32;; + 64|amd64|n64) export GMPABI=64;; + o32|n32) export GMPABI=${ABI};; + esac econf \ --localstatedir=/var/state/gmp \ @@ -58,9 +55,11 @@ src_compile() { || die "configure failed" # Fix the ABI for hppa2.0 - if [ ! -z "${is_hppa_2_0}" ]; then - sed -i "${S}/config.h" -e 's:pa32/hppa1_1:pa32/hppa2_0:' - export CHOST="${CHOST/1.1/2.0}" + if [[ -n ${is_hppa_2_0} ]] ; then + sed -i \ + -e 's:pa32/hppa1_1:pa32/hppa2_0:' \ + "${S}"/config.h || die + export CHOST=${CHOST/1.1/2.0} fi emake || die "emake failed" |