Muhammad Moinur Rahman c79c88017b
Mk/**ocaml.mk: Convert remaining bsd.ocaml.mk to Uses/ocaml.mk
- Instead of USE_OCAML=yes use USES=ocaml. If empty USES=ocaml implies
  build and run
- Instead of USE_OCAMLFIND_PLIST use USES=ocaml:findplist which also
  implies USES=ocaml:findlib
- Instead of USE_OCAML_CAMLP4 use USES=ocaml:camlp4
- Instead of USE_OCAML_FINDLIB use USES=ocaml:findlib
- Instead of USE_OCAML_LDCONFIG use USES=ocaml:ldconfig
- Instead of USE_OCAML_WASH use USES=ocaml:wash
- Instead of NO_OCAML_BUILDDEPENDS use USES=ocaml:run
- Instead of NO_OCAML_RUNDDEPENDS use USES=ocaml:build
- Instead of USE_OCAML_TK use USES=ocaml:tk which actually implies
  USES=ocaml:tkbuild and USES=ocaml:tkrun
- Instead of NO_OCAMLTK_BUILDDEPENDS use USES=ocaml:tkrun
- Instead of NO_OCAMLTK_RUNDEPENDS use USES=ocaml:tkbuild
- USES=ocaml:dune remains unchanged
- Prepare to add/remove keywords easily

Approved by: mat (portmgr)
Reviewed by: freebsd@dev.thsi.be
Differential Revision: https://reviews.freebsd.org/D48227
2024-12-31 08:41:54 +01:00

46 lines
1.2 KiB
Makefile

PORTNAME= pcre
PORTVERSION= 7.2.3
DISTVERSIONPREFIX= v
PORTREVISION= 4
CATEGORIES= devel
PKGNAMEPREFIX= ocaml-
MAINTAINER= hrs@FreeBSD.org
COMMENT= Perl compatible regular expressions for Objective Caml
WWW= http://www.ocaml.info/home/ocaml_sources.html #pcre-ocaml
LICENSE= LGPL21
BUILD_DEPENDS= ocamlbuild:devel/ocaml-ocamlbuild
LIB_DEPENDS= libpcre.so:devel/pcre
USES= ocaml:findlib,ldconfig
USE_GITHUB= yes
GH_ACCOUNT= mmottl
GH_PROJECT= ${PORTNAME}-ocaml
EXAMPLESDIR= ${OCAML_EXAMPLESDIR}/${PORTNAME}
PORTEXAMPLES= cloc count_hash pcregrep subst
DOCSDIR= ${PREFIX}/share/doc/pcre-ocaml
PORTDOCS= api
OPTIONS_DEFINE= DOCS EXAMPLES
DOCS_CONFIGURE_OFF= --disable-docs
post-patch:
${REINPLACE_CMD} -e 's|$$prefix"/"share|${STAGEDIR}${PREFIX}/share|' \
-e '/datarootdir/s|$$pkg_name|&-ocaml|' \
${WRKSRC}/setup.ml
${REINPLACE_CMD} -e 's| safe_string,||' ${WRKSRC}/_tags
post-install:
cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} \
lib/ocaml/site-lib/pcre/dllpcre_stubs.so \
lib/ocaml/site-lib/pcre/pcre.cmxs
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk>