Tweak editors/scribes version 0.4.b954_1
[dports.git] / math / ocaml-ocamlgraph / Makefile
1 # Created by: Joseph Koshy <jkoshy@FreeBSD.org>
2 # $FreeBSD$
3
4 PORTNAME=       ocamlgraph
5 PORTVERSION=    1.8.3
6 CATEGORIES=     math
7 MASTER_SITES=   http://ocamlgraph.lri.fr/download/ \
8                 ftp://ftp.stack.nl/pub/users/johans/ocamlgraph/
9 PKGNAMEPREFIX=  ocaml-
10
11 MAINTAINER=     johans@FreeBSD.org
12 COMMENT=        Graph manipulation library for OCaml
13
14 OPTIONS_DEFINE= GUI
15 OPTIONS_DEFAULT=GUI
16 GUI_DESC=       Include GUI user programs: viewer and editor
17
18 USE_OCAML=      yes
19 USE_OCAML_FINDLIB=      yes
20 USE_OCAML_LDCONFIG=     yes
21 USE_OCAMLFIND_PLIST=    yes
22 USE_GMAKE=      yes
23 GNU_CONFIGURE=  yes
24
25 PLIST_SUB+=     OCAMLGRAPHDIR="${OCAML_LIBDIR}/${PORTNAME}"
26
27 ALL_TARGET=     all
28 INSTALL_TARGET= install install-findlib
29
30 MAKE_JOBS_UNSAFE=       yes
31
32 PORTSCOUT=      skipv:1.81
33
34 NO_STAGE=       yes
35 .include <bsd.port.options.mk>
36
37 .if ${PORT_OPTIONS:MGUI}
38 BUILD_DEPENDS+= lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
39 RUN_DEPENDS+=   lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
40 PLIST_SUB+=     GUI=""
41 .else
42 CONFIGURE_ARGS+=        LABLGTK2=no
43 PLIST_SUB+=             GUI="@comment "
44 .endif
45
46 .if ${PORT_OPTIONS:MDOCS}
47 ALL_TARGET+=    doc
48 PORTDOCS=       *
49
50 post-patch:
51         @${REINPLACE_CMD} -e '/VIEWER_DIR. doc/d' ${WRKSRC}/Makefile.in
52 .if empty(PORT_OPTIONS:MGUI)
53         # Override auto-detection
54         @${REINPLACE_CMD} -Ee 's/(LABLGTK2)=yes/\1=no/' ${WRKSRC}/configure
55 .endif
56
57 post-install:
58         ${MKDIR} ${DOCSDIR}
59         cd ${WRKSRC}/doc; ${INSTALL_DATA} * ${DOCSDIR}
60 .endif
61
62 .include <bsd.port.mk>