summaryrefslogtreecommitdiff
path: root/lang/ocaml/Makefile
blob: 5fb250be16f4b737a1b525b88cd3df9905e049f6 (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
60
61
# New ports collection makefile for:	Objective Caml
# Date created:		24 December 1996
# Whom:			Kiriyama Kazuhiko <kiri@kiri.toba-cmt.ac.jp>
#
# $FreeBSD$
#

PORTNAME=	ocaml
PORTVERSION=	3.00
CATEGORIES=	lang
MASTER_SITES=	ftp://ftp.inria.fr/lang/caml-light/ \
		ftp://ftp.kurims.kyoto-u.ac.jp/pub/lang/caml-light/
DISTFILES=	${PKGNAME}.tar.gz ${DOCFILES}
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}-refman.html${EXTRACT_SUFX}

MAINTAINER=	patrick@watson.org

.if defined(WITH_TK)
PLIST_SUB+=     LABLTK:=""
LIB_DEPENDS=    tk82.1:${PORTSDIR}/x11-toolkits/tk82
.else
PLIST_SUB+=     LABLTK:="@comment "
.endif

USE_XLIB=	yes
HAS_CONFIGURE=	yes
ALL_TARGET=	world bootstrap opt ocamlc.opt ocamlopt.opt

.if ${MACHINE_ARCH} != "i386"
PLIST_SUB+=     PROF:="@comment "
.else
PLIST_SUB+=     PROF:=""
.endif

MAN1=		ocaml.1 ocamlc.1 ocamlcp.1 ocamldep.1 ocamllex.1 \
		ocamlopt.1 ocamlprof.1 ocamlrun.1 ocamlyacc.1 ocamlmktop.1 \
		ocamlc.opt.1 ocamlopt.opt.1

CONFIGURE_ARGS=	-prefix ${PREFIX} \
		-x11include ${X11BASE}/include \
		-x11lib ${X11BASE}/lib

.if defined(WITH_TK)
CONFIGURE_ARGS+= -tkdefs "-I${PREFIX}/include/tcl8.2 -I${PREFIX}/include/tk8.2"
.endif

.if !defined(NOPORTDOCS)
DOCFILES=	${DISTNAME}-refman.html.tar.gz ${DISTNAME}-refman.ps.gz
.endif

post-install:
	@${MKDIR} ${PREFIX}/share/doc/ocaml
	${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/ocaml/
.if !defined(NOPORTDOCS)
	@${MKDIR} ${PREFIX}/share/doc/ocaml/html
	@cd ${WRKDIR}/htmlman; ${INSTALL_DATA} * ${PREFIX}/share/doc/ocaml/html
	@${CP} ${DISTDIR}/${DISTNAME}-refman.ps.gz ${PREFIX}/share/doc/ocaml
.endif
	@strip ${PREFIX}/bin/ocamlrun ${PREFIX}/bin/ocamlyacc

.include <bsd.port.mk>