openbsd-ports/sysutils/findlib/Makefile
daniel f146869f61 update findlib to 1.9.6; needed for ocaml > 4.12
ocaml 4.13 changed capitalization of some of the lib files which confuses
some of the findlib build tests (and then leads to fallback code which
depends on ocamlbuild).

A newer version of findlib addresses this.

In addition, findlib 1.9.4 added proper DESTDIR support, so we can drop
FAKE_FLAGS from the port Makefile as part of this update.

Diff from Volker Schlecht; and tested by myself on amd64.
2023-01-08 03:42:44 +00:00

56 lines
1.2 KiB
Makefile

COMMENT= OCaml package manager
CATEGORIES= sysutils
DISTNAME= findlib-1.9.6
MASTER_SITES= http://download.camlcity.org/download/
MAINTAINER= Anil Madhavapeddy <avsm@openbsd.org>
HOMEPAGE= http://projects.camlcity.org/projects/findlib.html
# MIT/X11
PERMIT_PACKAGE= Yes
MODULES+= x11/tk
WANTLIB += c m
RUN_DEPENDS += lang/ocaml
BUILD_DEPENDS += lang/ocaml
CONFIGURE_STYLE=simple
CONFIGURE_ARGS= -no-custom \
-sitelib "${PREFIX}/lib/ocaml" \
-config ${SYSCONFDIR}/findlib.conf
USE_GMAKE= Yes
NO_TEST= Yes
.include <bsd.port.arch.mk>
.if ${PROPERTIES:Mocaml_native}
PKG_ARGS+=-Dnative=1
ALL_TARGET += all opt
.else
PKG_ARGS+=-Dnative=0
ALL_TARGET = all
.endif
.if ${PROPERTIES:Mocaml_native_dynlink}
PKG_ARGS+=-Ddynlink=1
.else
PKG_ARGS+=-Ddynlink=0
.endif
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/findlib
mv \
${WRKINST}${SYSCONFDIR}/findlib.conf \
${PREFIX}/share/examples/findlib/
# Since our OCaml is >=4.03, declare uchar availability according to
# D. Bünzli's compatibility package. https://github.com/ocaml/uchar.
${INSTALL_DATA_DIR} ${PREFIX}/lib/ocaml/uchar
${INSTALL_DATA} \
${FILESDIR}/META.uchar \
${PREFIX}/lib/ocaml/uchar/META
.include <bsd.port.mk>