blob: ea3860277af16c9c1ccd2714f90376b72baf9900 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Created by: jaapb@kerguelen.org
# $FreeBSD$
PORTNAME= lwt
PORTVERSION= 2.5.1
CATEGORIES= devel
PKGNAMEPREFIX= ocaml-
MAINTAINER= johans@FreeBSD.org
COMMENT= Cooperative threading library for OCaml
LICENSE= LGPL21
BUILD_DEPENDS= ${SA_DIR}/react/react.a:${PORTSDIR}/devel/ocaml-react \
${SA_DIR}/ssl/ssl.a:${PORTSDIR}/security/ocaml-ssl
RUN_DEPENDS= ${SA_DIR}/react/react.a:${PORTSDIR}/devel/ocaml-react \
${SA_DIR}/ssl/ssl.a:${PORTSDIR}/security/ocaml-ssl
USE_GITHUB= yes
GH_ACCOUNT= ocsigen
MAKE_JOBS_UNSAFE= yes
USES= gmake
USE_OCAML= yes
OCAMLC_DEPEND= ocaml>=3.11:${OCAMLC_PORT}
USE_OCAML_FINDLIB= yes
USE_OCAML_CAMLP4= yes
USE_OCAMLFIND_PLIST= yes
USE_OCAML_LDCONFIG= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --destdir "${STAGEDIR}" \
--prefix "${PREFIX}" \
--enable-camlp4 \
--enable-ssl \
--enable-react \
--disable-libev \
--disable-glib
DOCSDIR= ${PREFIX}/share/doc/ocaml/${PORTNAME}
SA_DIR= ${PREFIX}/${OCAML_SITELIBDIR}
OPTIONS_DEFINE= DOCS
DOCS_CONFIGURE_ENABLE= docs
DOCS_CONFIGURE_ON= --docdir ${STAGEDIR}${DOCSDIR}
# For some reason, ocaml-text is needed when building documentation
DOCS_BUILD_DEPENDS= ${SA_DIR}/text/text.a:${PORTSDIR}/textproc/ocaml-text
DOCS_RUN_DEPENDS= ${SA_DIR}/text/text.a:${PORTSDIR}/textproc/ocaml-text
post-patch:
@${REINPLACE_CMD} -e 's,"install" :: findlib_name,"install" :: "-destdir ${STAGEDIR}${PREFIX}/lib/ocaml/site-lib" :: "-ldconf /dev/null" :: findlib_name,' \
${WRKSRC}/setup.ml
do-configure:
cd ${WRKSRC}; ocaml setup.ml -configure ${CONFIGURE_ARGS}
@${REINPLACE_CMD} -e 's%"-lev"%"-lev -L${PREFIX}/lib/ev -Wl,-R${PREFIX}/lib/ev"%' \
${WRKSRC}/setup.data
do-build:
cd ${WRKSRC}; ocaml setup.ml -build
do-install:
${MKDIR} ${STAGEDIR}${SA_DIR}
cd ${WRKSRC}; ocaml setup.ml -install
.include <bsd.port.mk>
|