/[gentoo-x86]/sci-libs/mpir/mpir-2.2.1.ebuild
Gentoo

Contents of /sci-libs/mpir/mpir-2.2.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat May 14 09:33:32 2011 UTC (3 years, 5 months ago) by tomka
Branch: MAIN
Changes since 1.2: +2 -2 lines
x86 stable per bug 366377

(Portage version: 2.1.9.49/cvs/Linux i686)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/mpir/mpir-2.2.1.ebuild,v 1.2 2011/05/10 20:27:59 hwoarang Exp $
4
5 EAPI="3"
6
7 inherit eutils autotools
8
9 DESCRIPTION="Library for arbitrary precision integer arithmetic derived from version 4.2.1 of gmp"
10 HOMEPAGE="http://www.mpir.org/"
11 SRC_URI="http://www.mpir.org/${P}.tar.bz2"
12
13 LICENSE="LGPL-3"
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 IUSE="+cxx cpudetection"
17
18 DEPEND="x86? ( dev-lang/yasm )
19 amd64? ( dev-lang/yasm )"
20 RDEPEND=""
21
22 src_prepare(){
23 epatch \
24 "${FILESDIR}/${PN}-2.2.0-yasm.patch" \
25 "${FILESDIR}/${PN}-1.3.0-ABI-multilib.patch"
26 # In the same way there was QA regarding executable stacks
27 # with GMP we have some here as well. We cannot apply the
28 # GMP solution as yasm is used, at least on x86/amd64.
29 # Furthermore we are able to patch config.ac.
30
31 ebegin "Patching assembler files to remove executable sections"
32
33 for i in $(find . -type f -name '*.asm') ; do
34 cat >> $i <<-EOF
35 #if defined(__linux__) && defined(__ELF__)
36 .section .note.GNU-stack,"",%progbits
37 #endif
38 EOF
39 done
40
41 for i in $(find . -type f -name '*.as') ; do
42 cat >> $i <<-EOF
43 %ifidn __OUTPUT_FORMAT__,elf
44 section .note.GNU-stack noalloc noexec nowrite progbits
45 %endif
46 EOF
47 done
48
49 eend
50
51 eautoreconf
52 }
53
54 src_configure() {
55 # beware that cpudetection aka fat binaries is x86/amd64 only.
56 # Place mpir in profiles/arch/$arch/package.use.mask when making it available on $arch.
57 econf \
58 $(use_enable cxx) \
59 $(use_enable cpudetection fat)
60 }
61
62 src_install() {
63 emake DESTDIR="${D}" install || die "emake install failed"
64 dodoc ChangeLog README NEWS || die
65 }

  ViewVC Help
Powered by ViewVC 1.1.20