Magellan Linux

Contents of /trunk/core/ppl/ppl-0.11.2-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9909 - (show annotations) (download)
Sat Jan 14 17:21:22 2012 UTC (12 years, 4 months ago) by niro
File size: 2214 byte(s)
-added missing libstdc++ dependency
1 # $Id$
2
3 PNAME="ppl"
4 PVER="0.11.2"
5 PBUILD="r2"
6
7 PCAT="dev-libs"
8
9 DESCRIPTION="The Parma Polyhedra Library (PPL) provides numerical abstractions especially targeted at applications in the field of analysis and verification of complex systems."
10 HOMEPAGE="http://www.cs.unipr.it/ppl/"
11
12 # do not depend on glibc, as it depends ob libstdc++ and this wants mpc
13 # as SRCDEPEND -> this may generate loops
14
15 # x86_64 specific dependencies
16 DEPEND_x86_64=">= sys-apps/multiarch-wrapper-1"
17 SPECIAL_VARS="DEPEND_x86_64"
18
19 DEPEND="\$(eval echo \\\$DEPEND_\${ARCH/i*86/x86} | tr ';' '\n')
20 >= dev-libs/gmp-5.0.2
21 >= sys-libs/libstdc++-4.6"
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
46 # speed src_check up
47 local myopts
48 mqueryfeature "!check" || myopts="--enable-check=quick"
49
50 mconfigure \
51 --docdir=/usr/share/doc/${PNAME}-${PVER} \
52 --enable-shared \
53 --disable-static \
54 --disable-optimization \
55 ${myopts} \
56 || die
57
58 mmake || die
59 }
60
61 src_install()
62 {
63 mmake DESTDIR=${BINDIR} install || die
64
65 if [[ ${ARCH} = x86_64 ]]
66 then
67 # move the header
68 all-abis minstallfile src/ppl.hh /usr/include/ppl-$(mabi).hh || die
69 # move the config program
70 all-abis minstallexec src/.libs/ppl-config /usr/bin/ppl-config-$(mabi) || die
71
72 # create a wrapper header
73 cat > ${BINDIR}/usr/include/ppl.h << "EOF"
74 /* ppl.h - Stub Header */
75 #ifndef __STUB__PPL_HH__
76 #define __STUB__PPL_HH__
77
78 #if defined(__x86_64__) || \
79 defined(__sparc64__) || \
80 defined(__arch64__) || \
81 defined(__powerpc64__) || \
82 defined (__s390x__)
83 # include "ppl-m64.h"
84 #else
85 # include "ppl-m32.h"
86 #endif
87
88 #endif /* __STUB__PPL_HH__ */
89 EOF
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 }