Magellan Linux

Contents of /branches/magellan-next/core/ppl/ppl-0.10.2-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6348 - (show annotations) (download)
Fri Aug 20 23:50:34 2010 UTC (13 years, 8 months ago) by niro
File size: 2140 byte(s)
auto added: ver bump to 0.10.2-r2
1 # $Id$
2
3 PNAME="ppl"
4 PVER="0.10.2"
5 PBUILD="r2"
6
7 PCATEGORIE="dev-libs"
8 STATE="unstable"
9
10 DESCRIPTION="The Parma Polyhedra Library (PPL) provides numerical abstractions especially targeted at applications in the field of analysis and verification of complex systems."
11 HOMEPAGE="http://www.cs.unipr.it/ppl/"
12
13 # do not depend on glibc, as it depends ob libstdc++ and this wants mpc
14 # as SRCDEPEND -> this may generate loops
15
16 # x86_64 specific dependencies
17 DEPEND_x86_64=">= sys-apps/multiarch-wrapper-1"
18 SPECIAL_VARS="DEPEND_x86_64"
19
20 DEPEND="\$(eval echo \\\$DEPEND_\${ARCH/i*86/x86} | tr ';' '\n')
21 >= dev-libs/gmp-5.0.1"
22
23 SRCFILE="${PNAME}-${PVER}.tar.bz2"
24 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
25
26 sminclude mtools multilib
27
28 SRC_URI=(
29 ftp://ftp.cs.unipr.it/pub/ppl/releases/${PVER}/${SRCFILE}
30 mirror://${PNAME}/${SRCFILE}
31 )
32
33 UP2DATE="updatecmd ftp://ftp.cs.unipr.it/pub/ppl/releases/LATEST/ | lasttarball"
34
35 src_prepare()
36 {
37 munpack ${SRCFILE} || die
38
39 # fixes detection of newer gmp versions
40 all-abis 'sed -i "s/__GMP_BITS_PER_MP_LIMB/GMP_LIMB_BITS/g" configure' || die
41 }
42
43 src_compile()
44 {
45 mconfigure \
46 --docdir=/usr/share/doc/${PNAME}-${PVER} \
47 --enable-shared \
48 --disable-static \
49 --disable-optimization \
50 || die
51
52 mmake || die
53 }
54
55 src_install()
56 {
57 local abi
58 for abi in ${MULTILIB_ABIS}
59 do
60 cd ${SRCDIR}-${abi}
61 make DESTDIR=${BINDIR} install || die
62
63 if [[ ${ARCH} = x86_64 ]]
64 then
65 # move the header
66 mv ${BINDIR}/usr/include/ppl{,-${abi}}.hh || die
67
68 # move the config program
69 mv ${BINDIR}/usr/bin/ppl-config{,-${abi}} || die
70
71 # create a wrapper header
72 cat > ${BINDIR}/usr/include/ppl.h << "EOF"
73 /* ppl.h - Stub Header */
74 #ifndef __STUB__PPL_HH__
75 #define __STUB__PPL_HH__
76
77 #if defined(__x86_64__) || \
78 defined(__sparc64__) || \
79 defined(__arch64__) || \
80 defined(__powerpc64__) || \
81 defined (__s390x__)
82 # include "ppl-m64.h"
83 #else
84 # include "ppl-m32.h"
85 #endif
86
87 #endif /* __STUB__PPL_HH__ */
88 EOF
89
90 # install the multiarch-wrapper
91 minstalldir /usr/bin || die
92 mlink multiarch-wrapper /usr/bin/ppl-config || die
93 fi
94
95 minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die
96 done
97 }