Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12575 - (hide annotations) (download)
Tue Jun 12 09:34:24 2012 UTC (12 years ago) by niro
File size: 2975 byte(s)
-wrap ppl_c.h and pwl.hh as well
1 niro 12571 # $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_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 niro 12573 --enable-interfaces="c cxx" \
49 niro 12571 ${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 niro 12575 all-abis minstallfile src/ppl_c.h /usr/include/ppl_c-$(mabi).h || die
64     all-abis minstallfile src/pwl.hh /usr/include/pwl-$(mabi).hh || die
65 niro 12571 # move the config program
66     all-abis minstallexec src/.libs/ppl-config /usr/bin/ppl-config-$(mabi) || die
67    
68     # create a wrapper header
69 niro 12575 cat > ${BINDIR}/usr/include/ppl.hh << "EOF"
70     /* ppl.hh - Stub Header */
71 niro 12571 #ifndef __STUB__PPL_HH__
72     #define __STUB__PPL_HH__
73    
74     #if defined(__x86_64__) || \
75     defined(__sparc64__) || \
76     defined(__arch64__) || \
77     defined(__powerpc64__) || \
78     defined (__s390x__)
79 niro 12575 # include "ppl-m64.hh"
80 niro 12571 #else
81 niro 12575 # include "ppl-m32.hh"
82 niro 12571 #endif
83    
84     #endif /* __STUB__PPL_HH__ */
85     EOF
86 niro 12575 cat > ${BINDIR}/usr/include/ppl_c.h << "EOF"
87     /* ppl_c.h - Stub Header */
88     #ifndef __STUB__PPL_C_H__
89     #define __STUB__PPL_C_H__
90    
91     #if defined(__x86_64__) || \
92     defined(__sparc64__) || \
93     defined(__arch64__) || \
94     defined(__powerpc64__) || \
95     defined (__s390x__)
96     # include "ppl_c-m64.h"
97     #else
98     # include "ppl_c-m32.h"
99     #endif
100    
101     #endif /* __STUB__PPL_C_H__ */
102     EOF
103     cat > ${BINDIR}/usr/include/ppl.hh << "EOF"
104     /* pwl.hh - Stub Header */
105     #ifndef __STUB__PWL_HH__
106     #define __STUB__PWL_HH__
107    
108     #if defined(__x86_64__) || \
109     defined(__sparc64__) || \
110     defined(__arch64__) || \
111     defined(__powerpc64__) || \
112     defined (__s390x__)
113     # include "pwl-m64.hh"
114     #else
115     # include "pwl-m32.hh"
116     #endif
117    
118     #endif /* __STUB__PWL_HH__ */
119     EOF
120 niro 12571 # install the multiarch-wrapper
121     minstalldir /usr/bin || die
122     mlink multiarch-wrapper /usr/bin/ppl-config || die
123     fi
124    
125     minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die
126     }