# New ports collection makefile for:   ocaml-pcre
# Date created:        21 April 2002
# Whom:                Henrik Motakef <henrik.motakef@web.de>
#
# $FreeBSD: ports/devel/ocaml-pcre/Makefile,v 1.45 2012/02/14 12:45:17 mm Exp $
#

PORTNAME=	pcre
PORTVERSION=	6.2.5
PORTREVISION=	1
CATEGORIES=	devel
MASTER_SITES=	http://hg.ocaml.info/release/pcre-ocaml/archive/
PKGNAMEPREFIX=	ocaml-
DISTNAME=	release-${PORTVERSION}

MAINTAINER=	johans@FreeBSD.org
COMMENT=	Perl compatible regular expressions for Objective Caml

LIB_DEPENDS=	pcre.1:${PORTSDIR}/devel/pcre
WRKSRC=		${WRKDIR}/pcre-ocaml-${DISTNAME}

USE_BZIP2=	yes
USE_OCAML=	yes
USE_OCAML_FINDLIB=	yes
USE_OCAML_LDCONFIG=	yes
CFLAGS+=	-I${LOCALBASE}/include
MAKE_ENV+=	LIBDIRS="${LOCALBASE}/lib"

USE_GMAKE=	yes
EXAMPLESDIR=	${OCAML_EXAMPLESDIR}/${PORTNAME}

post-install:
.if !defined(NOPORTEXAMPLES)
	@${MKDIR} ${EXAMPLESDIR}
	@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/)
.endif

.include <bsd.port.mk>
