pkgsrc/lang/coq/Makefile
2017-09-18 09:52:56 +00:00

68 lines
2 KiB
Makefile

# $NetBSD: Makefile,v 1.100 2017/09/18 09:53:24 maya Exp $
#
DISTNAME= coq-8.6.1
PKGREVISION= 1
CATEGORIES= lang math
MASTER_SITES= http://coq.inria.fr/distrib/V${PKGVERSION_NOREV}/files/
MAINTAINER= jaapb@NetBSD.org
HOMEPAGE= http://coq.inria.fr/
COMMENT= Theorem prover which extracts programs from proofs
LICENSE= gnu-lgpl-v2.1
USE_TOOLS+= gmake
HAS_CONFIGURE= yes
CONFIGURE_ARGS+= -prefix ${PREFIX}
CONFIGURE_ARGS+= -emacslib ${PREFIX}/share/emacs/site-lisp
CONFIGURE_ARGS+= -mandir ${PREFIX}/${PKGMANDIR}
CONFIGURE_ARGS+= -configdir ${PKG_SYSCONFDIR}/xdg/coq
CONFIGURE_ARGS+= -docdir ${PREFIX}/share/doc/coq
CONFIGURE_ARGS+= -coqdocdir ${PREFIX}/share/texmf-dist/tex/latex/coq
BUILD_TARGET= world
BUILDLINK_API_DEPENDS.ocaml+= ocaml>=3.10
.include "../../mk/bsd.prefs.mk"
.include "../../mk/ocaml.mk"
PLIST_VARS+= native
.if ${OCAML_USE_OPT_COMPILER} == "yes"
PLIST_SUBST+= COQIDE_TYPE="opt"
PLIST.native= yes
CONFIGURE_ARGS+= -native-compiler yes
UNLIMIT_RESOURCES+= stacksize # compilation of some files needs this
.else
PLIST_SUBST+= COQIDE_TYPE="byte"
CONFIGURE_ARGS+= -native-compiler no
.endif
.if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "x86_64")
. if !empty(MACHINE_PLATFORM:MLinux-*-*) || \
!empty(MACHINE_PLATFORM:MDragonFly-*-*) || \
!empty(MACHINE_PLATFORM:MFreeBSD-*-*) || \
!empty(MACHINE_PLATFORM:MDarwin-*-*) || \
!empty(MACHINE_PLATFORM:MNetBSD-*-*)
PLIST.natdynlink= yes
. endif
.endif
REPLACE_SH= configure install.sh
INSTALL_ENV+= COQINSTALLPREFIX=${DESTDIR}
PLIST_VARS+= coqide natdynlink doc
.include "options.mk"
EGDIR= ${PREFIX}/share/coq/examples
#CONF_FILES= {EGDIR}/coqide-gtk2rc ${PKG_SYSCONFDIR}/xdg/coq/coqide-gtk2rc
SUBST_CLASSES+= fix-paths
SUBST_STAGE.fix-paths= post-configure
SUBST_MESSAGE.fix-paths= Remove buildlink references from Coq_config module
SUBST_FILES.fix-paths= config/coq_config.ml
SUBST_SED.fix-paths= -e "s,${BUILDLINK_DIR},${PREFIX},g"
.include "../../lang/camlp4/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"