Contents of /trunk/core/gmp/gmp-4.2.4-r3.smage2
Parent Directory | Revision Log
Revision 70 -
(show annotations)
(download)
Mon Oct 13 22:35:07 2008 UTC (15 years, 11 months ago) by niro
File size: 2117 byte(s)
Mon Oct 13 22:35:07 2008 UTC (15 years, 11 months ago) by niro
File size: 2117 byte(s)
--enabled mpbsd
1 | # $Header: /magellan-cvs/smage/gmp/gmp-4.2.2-r1.smage2,v 1.1 2008/03/15 21:59:38 niro Exp $ |
2 | |
3 | PNAME="gmp" |
4 | PVER="4.2.4" |
5 | PBUILD="r3" |
6 | |
7 | PCATEGORIE="dev-libs" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers." |
11 | HOMEPAGE="http://www.swox.com/gmp/" |
12 | |
13 | # do not depend on glibc, as it depends ob libstdc++ and this wants gmp |
14 | # as SRCDEPEND -> this may generate loops |
15 | DEPEND="" |
16 | |
17 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
18 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
19 | |
20 | # not mutilib.sminc compat, don't use it! |
21 | sminclude mbuild |
22 | |
23 | SRC_URI=( |
24 | gnu://${PNAME}/${SRCFILE} |
25 | mirror://${PNAME}/${SRCFILE} |
26 | ) |
27 | |
28 | src_compile() |
29 | { |
30 | install -d ${SRCDIR}/build |
31 | cd ${SRCDIR}/build |
32 | ../configure \ |
33 | --host=${CHOST} \ |
34 | --prefix=/usr \ |
35 | --mandir=/usr/share/man \ |
36 | --infodir=/usr/share/info \ |
37 | --libdir=/usr/$(mlibdir) \ |
38 | --enable-mpbsd \ |
39 | || die |
40 | mmake || die |
41 | |
42 | # build 32bit libraries for multilib systems |
43 | if [[ ${ARCH} = x86_64 ]] |
44 | then |
45 | install -d ${SRCDIR}/build-m32 |
46 | cd ${SRCDIR}/build-m32 |
47 | ABI=32 CC="gcc -m32" \ |
48 | ../configure \ |
49 | --host=${CHOST} \ |
50 | --prefix=/usr \ |
51 | --mandir=/usr/share/man \ |
52 | --infodir=/usr/share/info \ |
53 | --libdir=/usr/lib \ |
54 | --enable-mpbsd \ |
55 | || die |
56 | mmake || die |
57 | fi |
58 | } |
59 | |
60 | src_install() |
61 | { |
62 | cd ${SRCDIR}/build |
63 | make DESTDIR=${BINDIR} install || die |
64 | |
65 | # build 32bit libraries for multilib systems |
66 | if [[ ${ARCH} = x86_64 ]] |
67 | then |
68 | # move the 64bit header |
69 | mv ${BINDIR}/usr/include/gmp{,-64}.h || die |
70 | |
71 | cd ${SRCDIR}/build-m32 |
72 | make DESTDIR=${BINDIR} install || die |
73 | |
74 | # move the 32bit header |
75 | mv ${BINDIR}/usr/include/gmp{,-32}.h || die |
76 | |
77 | # create a wrapper header |
78 | cat > ${BINDIR}/usr/include/gmp.h << "EOF" |
79 | /* gmp.h - Stub Header */ |
80 | #ifndef __STUB__GMP_H__ |
81 | #define __STUB__GMP_H__ |
82 | |
83 | #if defined(__x86_64__) || \ |
84 | defined(__sparc64__) || \ |
85 | defined(__arch64__) || \ |
86 | defined(__powerpc64__) || \ |
87 | defined (__s390x__) |
88 | # include "gmp-64.h" |
89 | #else |
90 | # include "gmp-32.h" |
91 | #endif |
92 | |
93 | #endif /* __STUB__GMP_H__ */ |
94 | EOF |
95 | fi |
96 | |
97 | cd ${SRCDIR} |
98 | minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die |
99 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |