Magellan Linux

Contents of /trunk/core/ppl/ppl-0.12.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12571 - (show annotations) (download)
Tue Jun 12 08:16:31 2012 UTC (11 years, 11 months ago) by niro
File size: 2231 byte(s)
-ver bump to 0.12.1-r1; rebuild against new toolchain (gcc-4.7.0, glibc-2.15)
1 # $Id$
2
3 PNAME="ppl"
4 PVER="0.12.1"
5 PBUILD="r1"
6
7 PCAT="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.2
22 >= sys-libs/libstdc++-4.6"
23
24 SRCFILE="${PNAME}-${PVER}.tar.bz2"
25 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
26
27 sminclude mtools multilib
28
29 SRC_URI=(
30 ftp://ftp.cs.unipr.it/pub/ppl/releases/${PVER}/${SRCFILE}
31 mirror://${PNAME}/${SRCFILE}
32 )
33
34 UP2DATE="updatecmd ftp://ftp.cs.unipr.it/pub/ppl/releases/LATEST/ | lasttarball"
35
36 src_prepare()
37 {
38 munpack ${SRCFILE} || die
39
40 # fixes detection of newer gmp versions
41 all-abis 'sed -i "s/__GMP_BITS_PER_MP_LIMB/GMP_LIMB_BITS/g" configure' || die
42 }
43
44 src_compile()
45 {
46
47 # speed src_check up
48 local myopts
49 mqueryfeature "!check" || myopts="--enable-check=quick"
50
51 mconfigure \
52 --docdir=/usr/share/doc/${PNAME}-${PVER} \
53 --enable-shared \
54 --disable-static \
55 --disable-optimization \
56 ${myopts} \
57 || die
58
59 mmake || die
60 }
61
62 src_install()
63 {
64 mmake DESTDIR=${BINDIR} install || die
65
66 if [[ ${ARCH} = x86_64 ]]
67 then
68 # move the header
69 all-abis minstallfile src/ppl.hh /usr/include/ppl-$(mabi).hh || die
70 # move the config program
71 all-abis minstallexec src/.libs/ppl-config /usr/bin/ppl-config-$(mabi) || die
72
73 # create a wrapper header
74 cat > ${BINDIR}/usr/include/ppl.h << "EOF"
75 /* ppl.h - Stub Header */
76 #ifndef __STUB__PPL_HH__
77 #define __STUB__PPL_HH__
78
79 #if defined(__x86_64__) || \
80 defined(__sparc64__) || \
81 defined(__arch64__) || \
82 defined(__powerpc64__) || \
83 defined (__s390x__)
84 # include "ppl-m64.h"
85 #else
86 # include "ppl-m32.h"
87 #endif
88
89 #endif /* __STUB__PPL_HH__ */
90 EOF
91 # install the multiarch-wrapper
92 minstalldir /usr/bin || die
93 mlink multiarch-wrapper /usr/bin/ppl-config || die
94 fi
95
96 minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die
97 }