Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12586 - (show annotations) (download)
Tue Jun 12 15:01:05 2012 UTC (11 years, 11 months ago) by niro
File size: 2603 byte(s)
-wrap ppl_c.h
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 # only atm, remove me at the final build
29 msetfeature "!check"
30
31 SRC_URI=(
32 ftp://ftp.cs.unipr.it/pub/ppl/releases/${PVER}/${SRCFILE}
33 mirror://${PNAME}/${SRCFILE}
34 )
35
36 UP2DATE="updatecmd ftp://ftp.cs.unipr.it/pub/ppl/releases/LATEST/ | lasttarball"
37
38 src_compile()
39 {
40
41 # speed src_check up
42 local myopts
43 mqueryfeature "!check" || myopts="--enable-check=quick"
44
45 mconfigure \
46 --docdir=/usr/share/doc/${PNAME}-${PVER} \
47 --enable-shared \
48 --disable-static \
49 --disable-optimization \
50 --enable-interfaces="c,cxx" \
51 ${myopts} \
52 || die
53
54 mmake || die
55 }
56
57 src_install()
58 {
59 mmake DESTDIR=${BINDIR} install || die
60
61 if [[ ${ARCH} = x86_64 ]]
62 then
63 # move the header
64 all-abis minstallfile src/ppl.hh /usr/include/ppl-$(mabi).hh || die
65 all-abis minstallfile src/ppl.hh /usr/include/ppl_c-$(mabi).h || die
66 # move the config program
67 all-abis minstallexec src/.libs/ppl-config /usr/bin/ppl-config-$(mabi) || die
68
69 # create a wrapper header
70 cat > ${BINDIR}/usr/include/ppl.hh << "EOF"
71 /* ppl.hh - Stub Header */
72 #ifndef __STUB__PPL_HH__
73 #define __STUB__PPL_HH__
74
75 #if defined(__x86_64__) || \
76 defined(__sparc64__) || \
77 defined(__arch64__) || \
78 defined(__powerpc64__) || \
79 defined (__s390x__)
80 # include "ppl-m64.hh"
81 #else
82 # include "ppl-m32.hh"
83 #endif
84
85 #endif /* __STUB__PPL_HH__ */
86 EOF
87 cat > ${BINDIR}/usr/include/ppl_c.h << "EOF"
88 /* ppl.hh - Stub Header */
89 #ifndef __STUB__PPL_C_H__
90 #define __STUB__PPL_C_H__
91
92 #if defined(__x86_64__) || \
93 defined(__sparc64__) || \
94 defined(__arch64__) || \
95 defined(__powerpc64__) || \
96 defined (__s390x__)
97 # include "ppl_c-m64.h"
98 #else
99 # include "ppl_c-m32.h"
100 #endif
101
102 #endif /* __STUB__PPL_C_H__ */
103 EOF
104
105 # install the multiarch-wrapper
106 minstalldir /usr/bin || die
107 mlink multiarch-wrapper /usr/bin/ppl-config || die
108 fi
109
110 minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die
111 }