Tweak math/geg version 1.0.2_7
[dports.git] / math / alt-ergo / Makefile
1 # Created by: b.f. <bf@FreeBSD.org>
2 # $FreeBSD$
3
4 PORTNAME=       alt-ergo
5 PORTVERSION=    0.95.2
6 CATEGORIES=     math
7 MASTER_SITES=   http://alt-ergo.ocamlpro.com/http/alt-ergo-${PORTVERSION}/
8
9 MAINTAINER=     bf@FreeBSD.org
10 COMMENT=        Automatic solver of mathematical formulas for program verification
11
12 LICENSE=        CeCILL-C
13 LICENSE_NAME=   Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre] C license, version 1
14 LICENSE_FILE=   ${WRKSRC}/LICENSE
15 LICENSE_PERMS=  auto-accept
16
17 BUILD_DEPENDS=  ocaml-zarith>1.2:${PORTSDIR}/math/ocaml-zarith \
18                 ocaml-ocamlgraph>1.8:${PORTSDIR}/math/ocaml-ocamlgraph
19 RUN_DEPENDS=    ocaml-ocamlgraph>1.8:${PORTSDIR}/math/ocaml-ocamlgraph
20
21 GNU_CONFIGURE=  yes
22 USES=           gmake
23 USE_OCAML=      yes
24 ALL_TARGET=     opt pack xpack META
25 INSTALL_TARGET= install install-pack-opt install-pack-byte
26
27 OPTIONS_DEFINE= GUI
28 OPTIONS_DEFAULT=GUI
29 OPTIONS_SUB=    yes
30
31 .include <bsd.port.options.mk>
32
33 .if ${PORT_OPTIONS:MGUI}
34 BUILD_DEPENDS +=        lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
35 RUN_DEPENDS+=           lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
36 ALL_TARGET+=            gui
37 INSTALL_TARGET+=        install-gui
38 .endif
39
40 post-patch:
41         @${REINPLACE_CMD} -e '\|^# installation|,\|^# documentation|{ \
42                 \|cp -f.*$$(BINDIR)|s|cp -f|${INSTALL_SCRIPT}|; \
43                 \|cp -f.*$$(MANDIR)|s|cp -f|${INSTALL_MAN}|; \
44                 \|cp -f.*$$(LIBDIR)|s|cp -f|${INSTALL_DATA}|; }' \
45                 -e 's|make -C|${MAKE_CMD} -C|' \
46                         ${WRKSRC}/Makefile.in
47         @${REINPLACE_CMD} -Ee 's@(\+|/)(lablgtk2)@\1site-lib/\2@' \
48                 ${WRKSRC}/configure
49
50 .if ${PORT_OPTIONS:MGUI}
51 pre-configure:
52         @(if [ ! -e ${LOCALBASE}/${OCAML_SITELIBDIR}/lablgtk2/lablgtksourceview2.cmxa ] ; then \
53         ${ECHO_MSG} "==> The WITH_GUI option for ${PKGNAME} requires" ; \
54         ${ECHO_MSG} "==> x11-toolkits/ocaml-lablgtk2 to be built" ; \
55         ${ECHO_MSG} "==> WITH_GTKSOURCEVIEW2" ; \
56         exit 1; fi)
57 .endif
58
59 .include <bsd.port.mk>