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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sun Dec 18 20:10:55 2011 UTC (3 years ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +2 -2 lines
Mark ppc64 stable #380675.

(Portage version: 2.2.0_alpha81/cvs/Linux x86_64)

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-5.0.2.ebuild,v 1.10 2011/11/13 20:03:31 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}-5.0.0-s390.diff
26
27 # disable -fPIE -pie in the tests for x86 #236054
28 if use x86 && gcc-specs-pie ; then
29 epatch "${FILESDIR}"/${PN}-5.0.1-x86-nopie-tests.patch
30 fi
31
32 # note: we cannot run autotools here as gcc depends on this package
33 elibtoolize
34
35 # GMP uses the "ABI" env var during configure as does Gentoo (econf).
36 # So, to avoid patching the source constantly, wrap things up.
37 mv configure configure.wrapped || die
38 cat <<-\EOF > configure
39 #!/bin/sh
40 exec env ABI="$GMPABI" "${0}.wrapped" "$@"
41 EOF
42 chmod a+rx configure
43 }
44
45 src_compile() {
46 # Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
47 # http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
48 if [[ ${CHOST} == hppa2.0-* ]] ; then
49 export GMPABI="1.0"
50 fi
51
52 # ABI mappings (needs all architectures supported)
53 case ${ABI} in
54 32|x86) GMPABI=32;;
55 64|amd64|n64) GMPABI=64;;
56 o32|n32) GMPABI=${ABI};;
57 esac
58 export GMPABI
59
60 tc-export CC
61 econf \
62 --localstatedir=/var/state/gmp \
63 --disable-mpbsd \
64 $(use_enable cxx) \
65 || die "configure failed"
66
67 emake || die "emake failed"
68 }
69
70 src_install() {
71 emake DESTDIR="${D}" install || die "make install failed"
72
73 dodoc AUTHORS ChangeLog NEWS README
74 dodoc doc/configuration doc/isa_abi_headache
75 dohtml -r doc
76
77 #use doc && cp "${DISTDIR}"/gmp-man-${PV}.pdf "${D}"/usr/share/doc/${PF}/
78 }
79
80 pkg_preinst() {
81 preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
82 }
83
84 pkg_postinst() {
85 preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
86 }

  ViewVC Help
Powered by ViewVC 1.1.20