aboutsummaryrefslogtreecommitdiffstats
path: root/devel/ppl/Makefile
blob: e04608981dbfefb4dbae5608bdd9dbdb3a2549e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Created by: ijliao
# $FreeBSD$

PORTNAME=   ppl
PORTVERSION=    1.1
PORTREVISION=   1
CATEGORIES= devel
MASTER_SITES=   ftp://ftp.cs.unipr.it/pub/ppl/releases/%SUBDIR%/ \
        http://bugseng.com/products/ppl/download/ftp/releases/%SUBDIR%/
MASTER_SITE_SUBDIR= ${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    C++ library for the manipulation of convex polyhedra

LICENSE=    GPLv3 # (or later)

BUILD_DEPENDS=  gm4:${PORTSDIR}/devel/m4
LIB_DEPENDS=    libglpk.so:${PORTSDIR}/math/glpk \
        libgmp.so:${PORTSDIR}/math/gmp

USES=       gmake perl5 tar:xz libtool
USE_PERL5=  build
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --disable-debugging \
        --enable-optimization \
        --enable-documentation \
        --with-cflags="${CFLAGS}" \
        --with-cxxflags="${CXXFLAGS}" \
        --with-gmp-include="${LOCALBASE}/include" \
        --with-gmp-lib="${LOCALBASE}/lib" \
        --enable-interfaces="${INTERFACES}"
USE_LDCONFIG=   yes

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

PORTDOCS=   *

OPTIONS_DEFINE= DOCS

# Only enable C and C++ interfaces. Checks for java, prolog and ocaml
# have to be added.
INTERFACES= c,cxx

post-patch:
    @${REINPLACE_CMD} -e \
        '/OPT_FLAGS/s|-O2||' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e \
        '/for file in/s|COPYING||' ${WRKSRC}/doc/Makefile.in

post-install:
.for i in libppl.so libppl_c.so
    @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${i}
.endfor

.include <bsd.port.mk>