# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           ocaml 1.0

github.setup        ocaml camlp4 5.5+1
name                ocaml-camlp4
version             [string map {+ -} ${version}]
revision            0
categories          lang devel ocaml
maintainers         {pmetzger @pmetzger} openmaintainer
license             {LGPL-2.1 OpenSSLException}
description         Caml Preprocessor and Pretty-Printer
long_description    \
    Camlp4 is a software system for writing extensible parsers for programming \
    languages. It provides a set of OCaml libraries that are used to define \
    grammars as well as loadable syntax extensions of such grammars. Camlp4 \
    stands for Caml Preprocessor and Pretty-Printer and one of its most \
    important applications is the definition of domain-specific extensions of \
    the syntax of OCaml. \
    Camlp4 was part of the official OCaml distribution until its version \
    4.01.0. Since then it has been replaced by a simpler system which is \
    easier to maintain and to learn: ppx rewriters and extension points.

checksums           rmd160  9c6c9500a4d884750bedcca9e169abad10c905e9 \
                    sha256  45f14d312a1f08eaae7368a9eeffce11c2ccb2fafca0d730ac7fd9403e2f5046 \
                    size    653225
github.tarball_from archive

configure.pre_args  --bindir=${prefix}/bin --libdir=${prefix}/lib/ocaml --pkgdir=${ocamlfind_dir}

depends_build       port:ocaml-ocamlbuild
depends_lib-append  port:ocaml-camlp-streams

use_parallel_build  no

if {${configure.build_arch} in [list i386 ppc ppc64]} {
    build.target    byte
} else {
    build.target    byte native
}

destroot.target     install install-META
destroot.destdir    BINDIR=${destroot}${prefix}/bin \
                    LIBDIR=${destroot}${prefix}/lib/ocaml \
                    MANDIR=${destroot}${prefix}/share/man \
                    PKGDIR=${destroot}${ocamlfind_dir}
