summaryrefslogtreecommitdiff
path: root/devel/ocaml-ocplib-endian/Makefile
blob: 6cd9ce74119a0d2cf4547debab79c4fdce3f9710 (plain) (blame)
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
PORTNAME=	ocplib-endian
PORTVERSION=	1.2
CATEGORIES=	devel
PKGNAMEPREFIX=	ocaml-

MAINTAINER=	freebsd@dev.thsi.be
COMMENT=	Optimized manipulation of integers over the standard byte-array types of OCaml
WWW=		https://github.com/OCamlPro/ocplib-endian

LICENSE=	LGPL21+ # with a special exception to clause 6

BUILD_DEPENDS=	cppo:devel/ocaml-cppo

USES=		ocaml:dune
USE_GITHUB=	yes
GH_ACCOUNT=	OCamlPro

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

OPTIONS_DEFINE=	DOCS

.include <bsd.port.options.mk>

.if ${ARCH} == powerpc
USE_BINUTILS=	yes
.endif

post-patch:
	@${REINPLACE_CMD} \
		-e "s/(name ${PORTNAME})/&\n (version ${PORTVERSION})/" \
		${WRKSRC}/dune-project

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

.include <bsd.port.mk>