# -*- 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.1

github.setup        ocamleditor ocamleditor 1.18.1 {} -ocaml414
revision            3
categories          editors ocaml
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             LGPL-3
description         OCamlEditor is a GTK+ source code editor and build tool
long_description    {*}${description} for OCaml.
checksums           rmd160  eb5c2778bff0a647494a2e1609dce90d27e7d23f \
                    sha256  30084e8a887c33fa5c3becee1e4e43a8f29d768335f5a13c8448653474a3f869 \
                    size    5784655
github.tarball_from archive

depends_lib-append  port:lablgtk2 \
                    port:ocaml-atdgen \
                    port:ocaml-findlib \
                    port:ocaml-merlin \
                    port:ocaml-ocamldiff \
                    port:ocaml-ocp-indent \
                    port:ocaml-xml-light \
                    port:ocaml-yojson

use_configure       no

build.cmd           ${prefix}/bin/ocaml build.ml

if {${configure.build_arch} in [list ppc ppc64]} {
    build.target    ocamleditor-bytecode
} else {
    build.target    ocamleditor
}

destroot {
    system -W ${worksrcpath} "${prefix}/bin/ocaml ./tools/install.ml -prefix ${destroot}${prefix}"
}

# FIXME: https://github.com/ocamleditor/ocamleditor/issues/82
