summaryrefslogtreecommitdiff
path: root/math/why3/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'math/why3/Makefile.common')
-rw-r--r--math/why3/Makefile.common73
1 files changed, 73 insertions, 0 deletions
diff --git a/math/why3/Makefile.common b/math/why3/Makefile.common
new file mode 100644
index 000000000000..2cb742ddc043
--- /dev/null
+++ b/math/why3/Makefile.common
@@ -0,0 +1,73 @@
+# Created by: John Marino <marino@FreeBSD.org>
+# $FreeBSD$
+
+BUILD_DEPENDS= ocaml-zarith>1.2:${PORTSDIR}/math/ocaml-zarith \
+ lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2 \
+ ocaml-sqlite3>2:${PORTSDIR}/databases/ocaml-sqlite3 \
+ ocaml-ocamlgraph>1.8:${PORTSDIR}/math/ocaml-ocamlgraph \
+ camlp5o:${PORTSDIR}/devel/ocaml-camlp5
+
+GNU_CONFIGURE= yes
+INSTALL_TARGET= install-all
+
+USES= gmake
+USE_OCAML= yes
+MAKE_JOBS_UNSAFE= yes
+
+# The FRAMA_C plugin is experimental, it actually doesn't even build
+# with ocaml 4.01. Leave the option commented out for future use.
+# There is something wrong with coq, it rebuilds itself in /usr/local.
+# Leave it for now with a TO-DO to fix coq
+# Isabelle is currently i386-only due to issues with polyml and default
+# reliance on i386-only sml-nj (also currently broke). Disable for now.
+
+CONFIGURE_ARGS= --enable-relocation \
+ --disable-doc \
+ --disable-pvs-libs \
+ --disable-profiling \
+ --disable-coq-tactic \
+ --disable-coq-libs \
+ --disable-isabelle-libs
+
+.if defined(HAS_MANUAL)
+PORTDOCS= manual.pdf
+OPTIONS_DEFINE= DOCS #ISABELLE COQ FRAMA_C
+.endif
+
+COQ_CONFIGURE_ENABLE= coq-tactic coq-libs
+COQ_DESC= Build coq realizations and tactics
+COQ_BUILD_DEPENDS= coqc:${PORTSDIR}/math/coq
+COQ_RUN_DEPENDS= coqc:${PORTSDIR}/math/coq
+FRAMA_C_CONFIGURE_ENABLE= frama_c
+FRAMA_C_DESC= Build Frama-C plugin
+FRAMA_C_BUILD_DEPENDS= frama-c:${PORTSDIR}/devel/frama-c
+FRAMA_C_RUN_DEPENDS= frama-c:${PORTSDIR}/devel/frama-c
+ISABELLE_CONFIGURE_ENABLE= isabelle-libs
+ISABELLE_DESC= Enable Isabelle realizations
+ISABELLE_BUILD_DEPENDS= isabelle:${PORTSDIR}/math/isabelle
+ISABELLE_RUN_DEPENDS= isabelle:${PORTSDIR}/math/isabelle
+
+# The pdf is pre-built, but the makefile wants to build it again in order
+# to generate manual.bbl which is used to build the html documention.
+# Regenerating pdf fails, and the dependencies are heavy. Disable this
+# all for now and just manually install the pdf. The "doc" target was
+# also removed from ALL_TARGET
+#
+#DOCS_CONFIGURE_ENABLE= doc
+#DOCS_BUILD_DEPENDS= rubber:${PORTSDIR}/textproc/rubber \
+# hevea:${PORTSDIR}/textproc/hevea
+
+.include <bsd.port.options.mk>
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|g' \
+ ${WRKSRC}/src/util/sysutil.ml \
+ ${WRKSRC}/src/jessie/Makefile.in
+
+post-install:
+.if ${PORT_OPTIONS:MDOCS}
+. if defined(HAS_MANUAL)
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/manual.pdf ${STAGEDIR}${DOCSDIR}
+. endif
+.endif