aboutsummaryrefslogtreecommitdiffstats
path: root/math/coq/Makefile
blob: 87f8f8c8b88694f9984925d56c2e07f9a3b5ed82 (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
57
58
59
# Created by: Rene Ladan <r.c.ladan@student.tue.nl>
# $FreeBSD$

PORTNAME=   coq
PORTVERSION=    8.4.3
PORTEPOCH=  1
CATEGORIES= math
MASTER_SITES=   http://coq.inria.fr/distrib/V${COQVERSION}/files/ \
        ftp://ftp.stack.nl/pub/users/johans/coq/
DISTNAME=   ${PORTNAME}-${COQVERSION}

MAINTAINER= johans@FreeBSD.org
COMMENT=    Theorem prover based on lambda-C

BUILD_DEPENDS=  camlp5:${PORTSDIR}/devel/ocaml-camlp5 \
        ocamlfind:${PORTSDIR}/devel/ocaml-findlib

COQVERSION= ${PORTVERSION:R}pl${PORTVERSION:E}
USES=       gmake
USE_OCAML=  yes
ALL_TARGET= world

HAS_CONFIGURE=  yes
CONFIGURE_ARGS= --prefix ${PREFIX} \
        --mandir ${PREFIX}/man \
        --emacslib ${PREFIX}/share/emacs/site-lisp \
        --opt
MAKE_ENV=   COQINSTALLPREFIX=${DESTDIR}

OPTIONS_DEFINE=     DOCS IDE
OPTIONS_DEFAULT=    DOCS IDE
OPTIONS_SUB=        yes
IDE_DESC=       Include desktop environment (coqide)
IDE_BUILD_DEPENDS=  lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
IDE_RUN_DEPENDS=    ${IDE_BUILD_DEPENDS
IDE_CONFIGURE_OFF=  --coqide no
DOCS_USE=       TEX=latex:build,dvipsk:build
DOCS_BUILD_DEPENDS= hevea:${PORTSDIR}/textproc/hevea \
    ${LOCALBASE}/share/texmf/tex/latex/ucs/utf8x.def:${PORTSDIR}/print/latex-ucs
DOCS_CONFIGURE_OFF= --with-doc none
PORTDOCS=       *

.include <bsd.port.pre.mk>

.if ${ARCH} == "powerpc"
BROKEN=     Does not link on powerpc
.endif

post-patch:
    @${REINPLACE_CMD} -e '/FreeBSD.*\.byte/s/^/#/' \
        -e '1s:/bin/bash:/bin/sh:' \
        -e '/^MAKE=/d' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's:/bin/bash:/bin/sh:' \
        ${WRKSRC}/Makefile* ${WRKSRC}/install.sh
    @${REINPLACE_CMD} -e '/^#COQINSTALLPREFIX/{s/^#//;s|$$|$${DESTDIR}|;}' \
        ${WRKSRC}/Makefile.build
    @${REINPLACE_CMD} -e '/show_latex_mes/s/)$$/; true)/' ${WRKSRC}/Makefile.doc

.include <bsd.port.post.mk>