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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sun Nov 13 20:03:31 2011 UTC (2 years, 5 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +3 -3 lines
Convert USE=nocxx to USE=cxx.

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

  ViewVC Help
Powered by ViewVC 1.1.20