PORTNAME=	sexplib0
DISTVERSIONPREFIX=	v
DISTVERSION=	0.17.0
CATEGORIES=	devel
PKGNAMEPREFIX=	ocaml-

MAINTAINER=	freebsd@dev.thsi.be
COMMENT=	OCaml library for working with S-expressions
WWW=		https://janestreet.github.io/

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE.md

USES=		ocaml:dune

USE_GITHUB=	yes
GH_ACCOUNT=	janestreet

OPTIONS_DEFINE=	DOCS

DOCSDIR=	${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS=	CHANGES.md LICENSE.md README.md

post-patch:
	@${REINPLACE_CMD} \
		-e "s/(lang dune 3.11)/(lang dune 3.7)/" \
		${WRKSRC}/dune-project

post-install:
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/${PORTNAME}/${PORTNAME}.cmxs

.include <bsd.port.mk>
