Magellan Linux

Contents of /smage/trunk/core/ppl/ppl-0.11.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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