# $Id: Portfile 98501 2012-10-07 13:49:54Z mww@macports.org $

PortSystem 1.0

name                camlp5
version             6.06
revision            3
categories          lang ml
license             BSD
platforms           darwin
maintainers         nomaintainer

description         Camlp5 is a preprocessor-pretty-printer of OCaml.
long_description    Camlp5 is a preprocessor and pretty-printer for \
        OCaml programs. It also provides parsing and printing tools. \
        As a preprocessor, it allows to: extend the syntax of OCaml, \
        redefine the whole syntax of the language. As a pretty printer, \
        it allows to: display OCaml programs in an elegant way, convert \
        from one syntax to another, check the results of syntax \
        extensions. Camlp5 also provides some parsing and pretty \
        printing tools: extensible grammars, extensible printers, \
        stream parsers and lexers pretty print module.  It works as a \
        shell command and can also be used in the OCaml toplevel.

homepage            http://pauillac.inria.fr/~ddr/camlp5/
master_sites        ${homepage}distrib/src/

checksums           rmd160  fefa727e756266d3b0697df494042c327f32294d \
                    sha256  763f89ee6cde4ca063a50708c3fe252d55ea9f8037e3ae9801690411ea6180c5

depends_build       port:ocaml
extract.suffix      .tgz
post-extract {
    file rename ${worksrcpath}/ocaml_stuff/4.01.0 ${worksrcpath}/ocaml_stuff/4.00.1
    file rename ${worksrcpath}/ocaml_src/lib/versdep/4.01.0.ml ${worksrcpath}/ocaml_src/lib/versdep/4.00.1.ml
}
patchfiles          patch-ocaml_stuff-4.00.1-utils-pconfig.ml.diff
configure.pre_args  --prefix "${prefix}" \
                    --mandir "${prefix}/share/man"
build.target        world.opt
use_parallel_build  no

# ocaml is not universal
universal_variant   no

livecheck.type  regex
livecheck.url   [lindex ${master_sites} 0]
livecheck.regex ${name}-(\[0-9.\]+)\\.tgz
