| 1 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/gmp-4.3.2.ebuild,v 1.10 2011/10/03 15:31:45 vapier Exp $
|
| 4 |
|
| 5 |
inherit flag-o-matic eutils libtool toolchain-funcs
|
| 6 |
|
| 7 |
DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
|
| 8 |
HOMEPAGE="http://gmplib.org/"
|
| 9 |
SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"
|
| 10 |
# doc? ( http://www.nada.kth.se/~tege/${PN}-man-${PV}.pdf )"
|
| 11 |
|
| 12 |
LICENSE="LGPL-3"
|
| 13 |
SLOT="0"
|
| 14 |
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
| 15 |
IUSE="cxx" #doc
|
| 16 |
|
| 17 |
DEPEND="sys-devel/m4"
|
| 18 |
RDEPEND=""
|
| 19 |
|
| 20 |
src_unpack() {
|
| 21 |
unpack ${A}
|
| 22 |
cd "${S}"
|
| 23 |
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
|
| 24 |
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
|
| 25 |
epatch "${FILESDIR}"/${PN}-4.3.2-ABI-multilib.patch
|
| 26 |
epatch "${FILESDIR}"/${PN}-4.2.1-s390.diff
|
| 27 |
|
| 28 |
sed -i -e 's:ABI = @ABI@:GMPABI = @GMPABI@:' \
|
| 29 |
Makefile.in */Makefile.in */*/Makefile.in
|
| 30 |
|
| 31 |
# note: we cannot run autotools here as gcc depends on this package
|
| 32 |
elibtoolize
|
| 33 |
}
|
| 34 |
|
| 35 |
src_compile() {
|
| 36 |
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
|
| 37 |
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
|
| 38 |
if [[ ${CHOST} == hppa2.0-* ]] ; then
|
| 39 |
export GMPABI="1.0"
|
| 40 |
fi
|
| 41 |
|
| 42 |
# ABI mappings (needs all architectures supported)
|
| 43 |
case ${ABI} in
|
| 44 |
32|x86) export GMPABI=32;;
|
| 45 |
64|amd64|n64) export GMPABI=64;;
|
| 46 |
o32|n32) export GMPABI=${ABI};;
|
| 47 |
esac
|
| 48 |
|
| 49 |
tc-export CC
|
| 50 |
econf \
|
| 51 |
--localstatedir=/var/state/gmp \
|
| 52 |
--disable-mpfr \
|
| 53 |
--disable-mpbsd \
|
| 54 |
$(use_enable cxx) \
|
| 55 |
|| die "configure failed"
|
| 56 |
|
| 57 |
emake || die "emake failed"
|
| 58 |
}
|
| 59 |
|
| 60 |
src_install() {
|
| 61 |
emake DESTDIR="${D}" install || die "make install failed"
|
| 62 |
|
| 63 |
dodoc AUTHORS ChangeLog NEWS README
|
| 64 |
dodoc doc/configuration doc/isa_abi_headache
|
| 65 |
dohtml -r doc
|
| 66 |
|
| 67 |
#use doc && cp "${DISTDIR}"/gmp-man-${PV}.pdf "${D}"/usr/share/doc/${PF}/
|
| 68 |
}
|