/[gentoo-x86]/dev-libs/gmp/gmp-4.3.1.ebuild
Gentoo

Contents of /dev-libs/gmp/gmp-4.3.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Fri Oct 16 13:35:50 2009 UTC (4 years, 10 months ago) by jer
Branch: MAIN
Changes since 1.4: +2 -2 lines
Stable for HPPA (bug #287519).
(Portage version: 2.2_rc46/cvs/Linux i686)

1 vapier 1.1 # Copyright 1999-2009 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 jer 1.5 # $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/gmp-4.3.1.ebuild,v 1.4 2009/10/11 17:44:23 klausman Exp $
4 vapier 1.1
5 vapier 1.2 inherit flag-o-matic eutils libtool flag-o-matic
6 vapier 1.1
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 jer 1.5 KEYWORDS="alpha amd64 ~arm hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd"
15 vapier 1.1 IUSE="nocxx" #doc
16    
17 vapier 1.2 src_unpack() {
18 vapier 1.1 unpack ${A}
19     cd "${S}"
20     [[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
21     epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
22     epatch "${FILESDIR}"/${PN}-4.3.0-ABI-multilib.patch
23     epatch "${FILESDIR}"/${PN}-4.2.1-s390.diff
24    
25     sed -i -e 's:ABI = @ABI@:GMPABI = @GMPABI@:' \
26     Makefile.in */Makefile.in */*/Makefile.in
27    
28     # note: we cannot run autotools here as gcc depends on this package
29     elibtoolize
30     }
31    
32     src_compile() {
33     # GMP believes hppa2.0 is 64bit
34     local is_hppa_2_0
35     if [[ ${CHOST} == hppa2.0-* ]] ; then
36     is_hppa_2_0=1
37     export CHOST=${CHOST/2.0/1.1}
38     fi
39    
40     # ABI mappings (needs all architectures supported)
41     case ${ABI} in
42     32|x86) export GMPABI=32;;
43     64|amd64|n64) export GMPABI=64;;
44     o32|n32) export GMPABI=${ABI};;
45     esac
46    
47 vapier 1.2 tc-export CC
48 vapier 1.1 econf \
49     --localstatedir=/var/state/gmp \
50     --disable-mpfr \
51     --disable-mpbsd \
52     $(use_enable !nocxx cxx) \
53     || die "configure failed"
54    
55     # Fix the ABI for hppa2.0
56     if [[ -n ${is_hppa_2_0} ]] ; then
57     sed -i \
58     -e 's:pa32/hppa1_1:pa32/hppa2_0:' \
59     "${S}"/config.h || die
60     export CHOST=${CHOST/1.1/2.0}
61     fi
62    
63     emake || die "emake failed"
64     }
65    
66     src_install() {
67     emake DESTDIR="${D}" install || die "make install failed"
68    
69     dodoc AUTHORS ChangeLog NEWS README
70     dodoc doc/configuration doc/isa_abi_headache
71     dohtml -r doc
72    
73     #use doc && cp "${DISTDIR}"/gmp-man-${PV}.pdf "${D}"/usr/share/doc/${PF}/
74     }

  ViewVC Help
Powered by ViewVC 1.1.20