summaryrefslogtreecommitdiffstats
path: root/x11-toolkits/ocaml-labltk/Makefile
blob: 1da4b11ea8d619f04ee102254087e8048865ad26 (plain)
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
# Created by: Michael Grünewald <michipili@gmail.com>
# $FreeBSD$

PORTNAME=	labltk
PORTVERSION=	8.06.0
CATEGORIES=	x11-toolkits
MASTER_SITES=	http://forge.ocamlcore.org/frs/download.php/1455/
PKGNAMEPREFIX=	ocaml-

MAINTAINER=	michipili@gmail.com
COMMENT=	Objective Caml interface to Tk

LICENSE=	LGPL20

USES=		gmake tk:84,85
HAS_CONFIGURE=	yes
MAKE_JOBS_UNSAFE=yes
MAKE_ENV+=	STAGEDIR="${STAGEDIR}"
USE_OCAML=	yes

ALL_TARGET=	all opt

post-patch:
	@${FIND} ${WRKSRC} -name 'Makefile*' | ${XARGS} ${REINPLACE_CMD} \
		-e 's/$$(INSTALLDIR)/$$(STAGEDIR)$$(INSTALLDIR)/g' \
		-e 's/$$(INSTALLBINDIR)/$$(STAGEDIR)$$(INSTALLBINDIR)/g' \
		-e 's/$$(STUBLIBDIR)/$$(STAGEDIR)$$(STUBLIBDIR)/g' \
		-e 's/mkdir /& -p /g'
	@${REINPLACE_CMD} -e 's|%%SCRIPTBASE%%|${PREFIX}/lib/ocaml/labltk/|g' \
		${WRKSRC}/lib/Makefile

pre-install:
	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/ocaml/stublibs

post-install:
	${INSTALL_DATA} ${WRKSRC}/support/META ${STAGEDIR}${PREFIX}/lib/ocaml/${PORTNAME}
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ocaml/stublibs/dlllabltk.so

.include <bsd.port.mk>
OpenPOWER on IntegriCloud