summaryrefslogtreecommitdiff
path: root/ftp/ocaml-ocurl/Makefile
blob: 0bb54074b181ba1cf5d96e000907487c106c2707 (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
# Created by: Marwan BURELLE <marwan.burelle@lri.fr>
# $FreeBSD$

PORTNAME=	ocurl
PORTVERSION=	0.7.6
CATEGORIES=	ftp
MASTER_SITES=	https://forge.ocamlcore.org/frs/download.php/1563/ \
		http://ygrek.org.ua/p/release/ocurl/
PKGNAMEPREFIX=	ocaml-

MAINTAINER=	johans@FreeBSD.org
COMMENT=	Interface for OCaml to the curl lib

BUILD_DEPENDS=	ocamlc:${PORTSDIR}/lang/ocaml \
		ocamlfind:${PORTSDIR}/devel/ocaml-findlib
RUN_DEPENDS:=	${BUILD_DEPENDS}
LIB_DEPENDS=	libcurl.so:${PORTSDIR}/ftp/curl

USES=		gmake
GNU_CONFIGURE=	yes
CONFIGURE_ARGS+="--with-findlib"
MAKE_JOBS_UNSAFE=	yes

USE_OCAML=		yes
USE_OCAML_CAMLP4=	yes
USE_OCAML_FINDLIB=	yes
USE_OCAML_LDCONFIG=	yes
OCAML_PKGDIRS=		curl

OPTIONS_DEFINE=	LWT
OPTIONS_DEFAULT=LWT
OPTIONS_SUB=	yes
LWT_DESC=	Include threading support (ocaml-lwt)
LWT_RUN_DEPENDS=${LOCALBASE}/${OCAML_SITELIBDIR}/lwt/lwt.a:${PORTSDIR}/devel/ocaml-lwt
LWT_BUILD_DEPENDS=${LWT_RUN_DEPENDS}

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/curl/dllcurl-helper.so

.include <bsd.port.options.mk>

.if ! ${PORT_OPTIONS:MLWT}
# Override auto-detection
post-configure:
	${REINPLACE_CMD} 's/(lwt,no)/(no,no)/' ${WRKSRC}/Makefile \
		${WRKSRC}/examples/Makefile
.endif

.include <bsd.port.mk>