freebsd-ports/databases/ocaml-dbm/Makefile
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

39 lines
1 KiB
Makefile

PORTNAME= dbm
PORTVERSION= 1.3
DISTVERSIONPREFIX= camldbm-
CATEGORIES= databases
PKGNAMEPREFIX= ocaml-
EXTRA_PATCHES= ${PATCHDIR}/3bb91d6-revised-configuration:-p1
MAINTAINER= ports@FreeBSD.org
COMMENT= OCaml binding to the NDBM and GDBM database library
WWW= https://github.com/ocaml/dbm
LICENSE= LGPL20 # with a special exception to clause 6
USES= ocaml:ldconfig
USE_GITHUB= yes
GH_ACCOUNT= ocaml
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
HAS_CONFIGURE= yes
MAKE_ENV+= LIBDIR="${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/dbm" \
STUBLIBDIR="${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/dbm"
post-patch:
@${REINPLACE_CMD} \
-E 's/^(LIBDIR|STUBLIBDIR)=/\1?=/' ${WRKSRC}/Makefile
@${REINPLACE_CMD} \
-e 's/^version =.*/version = "${PORTVERSION}"/' ${WRKSRC}/META
pre-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/dbm
post-install:
@${STRIP_CMD} \
${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/dbm/dllcamldbm.so
@${INSTALL_DATA} ${WRKSRC}/META \
${STAGEDIR}${PREFIX}/lib/ocaml/site-lib/dbm
.include <bsd.port.mk>