# $Id$ PNAME="ppl" PVER="1.2" PBUILD="r1" PCAT="dev-libs" DESCRIPTION="The Parma Polyhedra Library (PPL) provides numerical abstractions especially targeted at applications in the field of analysis and verification of complex systems." HOMEPAGE="http://www.cs.unipr.it/ppl/" # do not depend on glibc, as it depends ob libstdc++ and this wants mpc # as SRCDEPEND -> this may generate loops # x86_64 specific dependencies DEPEND_x86_64=">= sys-apps/multiarch-wrapper-1" SPECIAL_VARS="DEPEND_x86_64" DEPEND="$(marchdepend) >= dev-libs/gmp-5.1 >= sys-libs/libstdc++-4.8" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools multilib SRC_URI=( ftp://ftp.cs.unipr.it/pub/ppl/releases/${PVER}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd ftp://ftp.cs.unipr.it/pub/ppl/releases/LATEST/ | highesttarball" src_compile() { # speed src_check up local myopts mqueryfeature "!check" || myopts="--enable-check=quick" mconfigure \ --docdir=/usr/share/doc/${PNAME}-${PVER} \ --enable-shared \ --disable-static \ --disable-optimization \ --enable-interfaces="c,cxx" \ ${myopts} \ || die mmake || die } src_install() { mmake DESTDIR=${BINDIR} install || die if [[ ${ARCH} = x86_64 ]] then # move the header all-abis minstallfile src/ppl.hh /usr/include/ppl-$(mabi).hh || die all-abis minstallfile src/ppl.hh /usr/include/ppl_c-$(mabi).h || die # move the config program all-abis minstallexec src/.libs/ppl-config /usr/bin/ppl-config-$(mabi) || die # create a wrapper header cat > ${BINDIR}/usr/include/ppl.hh << "EOF" /* ppl.hh - Stub Header */ #ifndef __STUB__PPL_HH__ #define __STUB__PPL_HH__ #if defined(__x86_64__) || \ defined(__sparc64__) || \ defined(__arch64__) || \ defined(__powerpc64__) || \ defined (__s390x__) # include "ppl-m64.hh" #else # include "ppl-m32.hh" #endif #endif /* __STUB__PPL_HH__ */ EOF cat > ${BINDIR}/usr/include/ppl_c.h << "EOF" /* ppl.hh - Stub Header */ #ifndef __STUB__PPL_C_H__ #define __STUB__PPL_C_H__ #if defined(__x86_64__) || \ defined(__sparc64__) || \ defined(__arch64__) || \ defined(__powerpc64__) || \ defined (__s390x__) # include "ppl_c-m64.h" #else # include "ppl_c-m32.h" #endif #endif /* __STUB__PPL_C_H__ */ EOF # install the multiarch-wrapper minstalldir /usr/bin || die mlink multiarch-wrapper /usr/bin/ppl-config || die fi minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die }