pkgsrc/lang/ocaml/Makefile.common
riastradh c97a0751ef Enable native dynamic loading support on NetBSD/{i386,amd64}.
Bump pkgrevision.

While I'm here: add a comment to patch-at explaining what it does.

Tested by

$ make install
$ cd work/ocaml-3.12.0/testsuite && gmake one DIR=tests/lib-dynlink-native

(Not in a build-env because that uses the wrappers, which don't let the
test suite see the installed OCaml files.)

This is only a workaround on NetBSD/{i386,amd64} for the problems of
OCaml PR#5049 <http://caml.inria.fr/mantis/view.php?id=5049>.  (E.g.,
this workaround makes Coccinelle build on those platforms -- but it
still won't build on platforms with native compilation but no native
dynamic loading.  Need to hack everything that uses dynlink to have
four compile-time cases -- {yes,no} {byte,nat}dynlink.)
2011-07-20 14:10:09 +00:00

51 lines
1.5 KiB
Text

# $NetBSD: Makefile.common,v 1.30 2011/07/20 14:10:09 riastradh Exp $
# used by x11/labltk/Makefile
# used by x11/ocaml-graphics/Makefile
DISTNAME= ocaml-3.12.0
PKGREVISION= 3
CATEGORIES= lang
MASTER_SITES= http://caml.inria.fr/pub/distrib/ocaml-3.12/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= adam@NetBSD.org
HOMEPAGE= http://caml.inria.fr/ocaml/
COMMENT= The latest implementation of the Caml dialect of ML
LICENSE= gnu-gpl-v2
USE_TOOLS+= gmake
HAS_CONFIGURE= yes
CONFIGURE_ENV+= BDB_LIBS=${BDB_LIBS:Q}
CONFIGURE_ENV+= BDB_BUILTIN=${USE_BUILTIN.${BDB_TYPE}:Q}
CONFIGURE_ARGS+= -prefix ${PREFIX}
CONFIGURE_ARGS+= -libs ${LDFLAGS:Q}
CONFIGURE_ARGS+= -with-pthread
CONFIGURE_ARGS+= -host ${MACHINE_GNU_PLATFORM:Q}
CONFIGURE_ARGS+= -mandir ${PREFIX}/${PKGMANDIR}
CPPFLAGS+= -DDB_DBM_HSEARCH
INSTALL_MAKE_FLAGS+= PREFIX=${DESTDIR}${PREFIX} \
MANDIR=${DESTDIR}${PREFIX}/${PKGMANDIR}
DISTINFO_FILE= ${.CURDIR}/../../lang/ocaml/distinfo
PATCHDIR= ${.CURDIR}/../../lang/ocaml/patches
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "Darwin" || ${OPSYS} == "Linux"
INSTALL_UNSTRIPPED= yes
.endif
.include "../../mk/bdb.buildlink3.mk"
post-extract: cp-power-bsd cp-gnu-config
.PHONY: cp-power-bsd
cp-power-bsd:
${CP} ${WRKSRC}/asmrun/power-elf.S ${WRKSRC}/asmrun/power-bsd.S
.PHONY: cp-gnu-config
cp-gnu-config:
${CP} ${PKGSRCDIR}/mk/gnu-config/config.guess ${WRKSRC}/config/gnu/
${CP} ${PKGSRCDIR}/mk/gnu-config/config.sub ${WRKSRC}/config/gnu/
.include "../../mk/pthread.buildlink3.mk"