freebsd-ports/math/why3/Makefile.common
John Marino bf1b55a763 Add two new math ports: why3 and why3-gpl
The primary motivation for adding why3 is to support the upcoming SPARK
2014 port.  However, SPARK 2014 requires a custom version.  In time the
customizations should make it upstream, but currently the stock version
cannot be used to build SPARK.  They are also licensed differently (LGPL2
for stock, GPLv3 for SPARK version).

Rather than force people that find why3 useful on their own to accept a
custom version, both are offered although they currently conflict.

Why3 has optional dependencies on coq, isabelle, and frama-c, and all
three have issus:
  * coq rebuilds its libraries in $LOCALBASE, could be issue with coq
  * isabella currently has a broken dependency (sjsml) and only for i386
    when it's not.  Updating to 2013-2 version failed, as did trying to
    build it with polyml instead of sjsml
  * frama-c is fine, but the plugin code in why3 is still experimental
    and upstream recommends that it not be used.

     ==============================================================

Why3 is a platform for deductive program verification. It provides a rich
language for specification and programming, called WhyML, and relies on
external theorem provers, both automated and interactive, to discharge
verification conditions. Why3 comes with a standard library of logical
theories (integer and real arithmetic, Boolean operations, sets and maps,
etc.) and basic programming data structures (arrays, queues, hash tables,
etc.). A user can write WhyML programs directly and get correct-by-
construction OCaml programs through an automated extraction mechanism.
WhyML is also used as an intermediate language for the verification of C,
Java, or Ada programs.

Why3 is a complete reimplementation of the former Why platform. Among the
new features are: numerous extensions to the input language, a new
architecture for calling external provers, and a well-designed API,
allowing to use Why3 as a software library. An important emphasis is put
on modularity and genericity, giving the end user a possibility to easily
reuse Why3 formalizations or to add support for a new external prover if
wanted.
2014-06-04 19:22:33 +00:00

73 lines
2.4 KiB
Text

# 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