Magellan Linux

Contents of /branches/R11-stable/core/ppl/ppl-1.0-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17021 - (show annotations) (download)
Thu Apr 4 15:37:31 2013 UTC (11 years, 1 month ago) by niro
File size: 2647 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="ppl"
4 PVER="1.0"
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="$(marchdepend)
20 >= dev-libs/gmp-5.1
21 >= sys-libs/libstdc++-4.7"
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 mirror://${PNAME}/${PNAME}-${PVER}-gmp51.patch
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 # fix build against gmp-5.1.x
41 mpatch ${PNAME}-${PVER}-gmp51.patch || 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 --enable-interfaces="c,cxx" \
57 ${myopts} \
58 || die
59
60 mmake || die
61 }
62
63 src_install()
64 {
65 mmake DESTDIR=${BINDIR} install || die
66
67 if [[ ${ARCH} = x86_64 ]]
68 then
69 # move the header
70 all-abis minstallfile src/ppl.hh /usr/include/ppl-$(mabi).hh || die
71 all-abis minstallfile src/ppl.hh /usr/include/ppl_c-$(mabi).h || die
72 # move the config program
73 all-abis minstallexec src/.libs/ppl-config /usr/bin/ppl-config-$(mabi) || die
74
75 # create a wrapper header
76 cat > ${BINDIR}/usr/include/ppl.hh << "EOF"
77 /* ppl.hh - Stub Header */
78 #ifndef __STUB__PPL_HH__
79 #define __STUB__PPL_HH__
80
81 #if defined(__x86_64__) || \
82 defined(__sparc64__) || \
83 defined(__arch64__) || \
84 defined(__powerpc64__) || \
85 defined (__s390x__)
86 # include "ppl-m64.hh"
87 #else
88 # include "ppl-m32.hh"
89 #endif
90
91 #endif /* __STUB__PPL_HH__ */
92 EOF
93 cat > ${BINDIR}/usr/include/ppl_c.h << "EOF"
94 /* ppl.hh - Stub Header */
95 #ifndef __STUB__PPL_C_H__
96 #define __STUB__PPL_C_H__
97
98 #if defined(__x86_64__) || \
99 defined(__sparc64__) || \
100 defined(__arch64__) || \
101 defined(__powerpc64__) || \
102 defined (__s390x__)
103 # include "ppl_c-m64.h"
104 #else
105 # include "ppl_c-m32.h"
106 #endif
107
108 #endif /* __STUB__PPL_C_H__ */
109 EOF
110
111 # install the multiarch-wrapper
112 minstalldir /usr/bin || die
113 mlink multiarch-wrapper /usr/bin/ppl-config || die
114 fi
115
116 minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die
117 }