Magellan Linux

Contents of /smage/trunk/core/gmp/gmp-4.3.1-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8 - (show annotations) (download)
Sat Jan 2 20:29:44 2010 UTC (14 years, 3 months ago) by niro
File size: 2070 byte(s)
auto added: ver bump to 4.3.1-r2
1 # $Id$
2
3 PNAME="gmp"
4 PVER="4.3.1"
5 PBUILD="r2"
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 alx
22
23 SRC_URI=(
24 gnu://${PNAME}/${SRCFILE}
25 mirror://${PNAME}/${SRCFILE}
26 )
27
28 UP2DATE="updatecmd_gnu ${PNAME}"
29
30 src_compile()
31 {
32 install -d ${SRCDIR}/build
33 cd ${SRCDIR}/build
34 ../configure \
35 --host=${CHOST} \
36 --prefix=/usr \
37 --mandir=/usr/share/man \
38 --infodir=/usr/share/info \
39 --libdir=/usr/$(mlibdir) \
40 --enable-mpbsd \
41 || die
42 mmake || die
43
44 # build 32bit libraries for multilib systems
45 if [[ ${ARCH} = x86_64 ]]
46 then
47 install -d ${SRCDIR}/build-m32
48 cd ${SRCDIR}/build-m32
49 ABI=32 CC="gcc -m32" \
50 ../configure \
51 --host=${CHOST} \
52 --prefix=/usr \
53 --mandir=/usr/share/man \
54 --infodir=/usr/share/info \
55 --libdir=/usr/lib \
56 --enable-mpbsd \
57 || die
58 mmake || die
59 fi
60 }
61
62 src_install()
63 {
64 cd ${SRCDIR}/build
65 make DESTDIR=${BINDIR} install || die
66
67 # build 32bit libraries for multilib systems
68 if [[ ${ARCH} = x86_64 ]]
69 then
70 # move the 64bit header
71 mv ${BINDIR}/usr/include/gmp{,-64}.h || die
72
73 cd ${SRCDIR}/build-m32
74 make DESTDIR=${BINDIR} install || die
75
76 # move the 32bit header
77 mv ${BINDIR}/usr/include/gmp{,-32}.h || die
78
79 # create a wrapper header
80 cat > ${BINDIR}/usr/include/gmp.h << "EOF"
81 /* gmp.h - Stub Header */
82 #ifndef __STUB__GMP_H__
83 #define __STUB__GMP_H__
84
85 #if defined(__x86_64__) || \
86 defined(__sparc64__) || \
87 defined(__arch64__) || \
88 defined(__powerpc64__) || \
89 defined (__s390x__)
90 # include "gmp-64.h"
91 #else
92 # include "gmp-32.h"
93 #endif
94
95 #endif /* __STUB__GMP_H__ */
96 EOF
97 fi
98
99 cd ${SRCDIR}
100 minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die
101 }

Properties

Name Value
svn:keywords Id