Magellan Linux

Annotation of /branches/R11-stable/core/gmp/gmp-5.1.3-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19622 - (hide annotations) (download)
Mon Oct 7 09:11:15 2013 UTC (10 years, 7 months ago) by niro
Original Path: trunk/core/gmp/gmp-5.1.3-r1.smage2
File size: 3046 byte(s)
auto added: ver bump to 5.1.3-r1
1 niro 19622 # $Id$
2    
3     PNAME="gmp"
4     PVER="5.1.3"
5     PBUILD="r1"
6    
7     PCAT="dev-libs"
8    
9     DESCRIPTION="GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers."
10     HOMEPAGE="http://www.swox.com/gmp/"
11    
12     DEPEND=">= virtual/glibc
13     >= sys-libs/libstdc++-4.8"
14    
15     SRCFILE="${PNAME}-${PVER}.tar.bz2"
16     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
17    
18     # not multilib.sminc compat, don't use it!
19     sminclude mbuild mtools
20    
21     SRC_URI=(
22     gnu://${PNAME}/${SRCFILE}
23     mirror://${PNAME}/${SRCFILE}
24     )
25    
26     UP2DATE="updatecmd_gnu ${PNAME}"
27    
28     src_compile()
29     {
30     install -d ${SRCDIR}/build
31     cd ${SRCDIR}/build
32     CPPFLAGS="-fexceptions" \
33     CC="gcc -isystem /usr/include" \
34     CXX="g++ -isystem /usr/include" \
35     LDFLAGS="-Wl,-rpath-link,/$(mlibdir)" \
36     ../configure \
37     --build=${CHOST} \
38     --host=${CHOST} \
39     --prefix=/usr \
40     --mandir=/usr/share/man \
41     --infodir=/usr/share/info \
42     --libdir=/usr/$(mlibdir) \
43     --enable-mpbsd \
44     --enable-cxx \
45     || die
46     mmake || die
47    
48     # build 32bit libraries for multilib systems
49     if [[ ${ARCH} = x86_64 ]]
50     then
51     install -d ${SRCDIR}/build-m32
52     cd ${SRCDIR}/build-m32
53     CPPFLAGS="-fexceptions" \
54     ABI=32 \
55     CC="gcc -m${ABI} -isystem /usr/include" \
56     CXX="g++ -m${ABI} -isystem /usr/include" \
57     LDFLAGS="-Wl,-rpath-link,/lib -m${ABI}" \
58     ../configure \
59     --build=${CHOST} \
60     --host=${CHOST} \
61     --prefix=/usr \
62     --mandir=/usr/share/man \
63     --infodir=/usr/share/info \
64     --libdir=/usr/lib \
65     --enable-mpbsd \
66     --enable-cxx \
67     || die
68     mmake || die
69     fi
70     }
71    
72     src_check()
73     {
74     cd ${SRCDIR}/build
75     make -k check || die
76    
77     if [[ ${ARCH} = x86_64 ]]
78     then
79     cd ${SRCDIR}/build-m32
80     make -k check || die
81     fi
82     }
83    
84     src_install()
85     {
86     cd ${SRCDIR}/build
87     make DESTDIR=${BINDIR} install || die
88    
89     # build 32bit libraries for multilib systems
90     if [[ ${ARCH} = x86_64 ]]
91     then
92     # move the 64bit header
93     mv ${BINDIR}/usr/include/gmp{,-64}.h || die
94     minstallfile gmp-mparam.h /usr/include/gmp-mparam-64.h || die
95    
96     cd ${SRCDIR}/build-m32
97     make DESTDIR=${BINDIR} install || die
98    
99     # move the 32bit header
100     mv ${BINDIR}/usr/include/gmp{,-32}.h || die
101     minstallfile gmp-mparam.h /usr/include/gmp-mparam-32.h || die
102    
103     # create a wrapper header
104     cat > ${BINDIR}/usr/include/gmp.h << "EOF"
105     /* gmp.h - Stub Header */
106     #ifndef __STUB__GMP_H__
107     #define __STUB__GMP_H__
108    
109     #if defined(__x86_64__) || \
110     defined(__sparc64__) || \
111     defined(__arch64__) || \
112     defined(__powerpc64__) || \
113     defined (__s390x__)
114     # include "gmp-64.h"
115     #else
116     # include "gmp-32.h"
117     #endif
118    
119     #endif /* __STUB__GMP_H__ */
120     EOF
121     # create a wrapper header
122     cat > ${BINDIR}/usr/include/gmp-mparam.h << "EOF"
123     /* gmp-mparam.h - Stub Header */
124     #ifndef __STUB__GMP_MPARAM_H__
125     #define __STUB__GMP_MPARAM_H__
126    
127     #if defined(__x86_64__) || \
128     defined(__sparc64__) || \
129     defined(__arch64__) || \
130     defined(__powerpc64__) || \
131     defined (__s390x__)
132     # include "gmp-mparam-64.h"
133     #else
134     # include "gmp-mparam-32.h"
135     #endif
136    
137     #endif /* __STUB__GMP_MPARAM_H__ */
138     EOF
139     fi
140    
141     cd ${SRCDIR}
142     minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die
143     }