Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12753 - (show annotations) (download)
Mon Jul 2 14:37:15 2012 UTC (11 years, 10 months ago) by niro
File size: 2541 byte(s)
-marked unstable
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.5
22 >= sys-libs/libstdc++-4.7"
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_compile()
37 {
38
39 # speed src_check up
40 local myopts
41 mqueryfeature "!check" || myopts="--enable-check=quick"
42
43 mconfigure \
44 --docdir=/usr/share/doc/${PNAME}-${PVER} \
45 --enable-shared \
46 --disable-static \
47 --disable-optimization \
48 --enable-interfaces="c,cxx" \
49 ${myopts} \
50 || die
51
52 mmake || die
53 }
54
55 src_install()
56 {
57 mmake DESTDIR=${BINDIR} install || die
58
59 if [[ ${ARCH} = x86_64 ]]
60 then
61 # move the header
62 all-abis minstallfile src/ppl.hh /usr/include/ppl-$(mabi).hh || die
63 all-abis minstallfile src/ppl.hh /usr/include/ppl_c-$(mabi).h || die
64 # move the config program
65 all-abis minstallexec src/.libs/ppl-config /usr/bin/ppl-config-$(mabi) || die
66
67 # create a wrapper header
68 cat > ${BINDIR}/usr/include/ppl.hh << "EOF"
69 /* ppl.hh - Stub Header */
70 #ifndef __STUB__PPL_HH__
71 #define __STUB__PPL_HH__
72
73 #if defined(__x86_64__) || \
74 defined(__sparc64__) || \
75 defined(__arch64__) || \
76 defined(__powerpc64__) || \
77 defined (__s390x__)
78 # include "ppl-m64.hh"
79 #else
80 # include "ppl-m32.hh"
81 #endif
82
83 #endif /* __STUB__PPL_HH__ */
84 EOF
85 cat > ${BINDIR}/usr/include/ppl_c.h << "EOF"
86 /* ppl.hh - Stub Header */
87 #ifndef __STUB__PPL_C_H__
88 #define __STUB__PPL_C_H__
89
90 #if defined(__x86_64__) || \
91 defined(__sparc64__) || \
92 defined(__arch64__) || \
93 defined(__powerpc64__) || \
94 defined (__s390x__)
95 # include "ppl_c-m64.h"
96 #else
97 # include "ppl_c-m32.h"
98 #endif
99
100 #endif /* __STUB__PPL_C_H__ */
101 EOF
102
103 # install the multiarch-wrapper
104 minstalldir /usr/bin || die
105 mlink multiarch-wrapper /usr/bin/ppl-config || die
106 fi
107
108 minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die
109 }