# -*- 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
# $Id$

PortSystem          1.0
PortGroup           github 1.0

github.setup        jonas tig 2.2 tig-
checksums           rmd160  11cbe17b2505e6b4e370f1cc5d3f45521ef17891 \
                    sha256  0cb315ac31eb749eba4b700cec4c3c81934204487e04055cf76982f09b83b770

categories          devel
maintainers         mk cal openmaintainer
description         A text interface to git repositories
long_description    ${description}

homepage            http://jonas.nitro.dk/tig/
license             GPL-2+
platforms           darwin

depends_build       port:automake \
                    port:autoconf \
                    port:asciidoc \
                    port:xmlto

depends_lib         port:git \
                    port:libiconv \
                    port:ncurses

# -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
universal_variant   no

# We need to create the configure file,
# the github version does not contain it.
pre-configure {
    system -W ${worksrcpath} "make configure"
}

build.target-append doc-man doc-html
# for some reason, the XML tools fail to find and use $prefix/etc/catalog,
# where these paths are configured
build.target-append XMLTO=\"${prefix}/bin/xmlto \
                    --searchpath ${prefix}/share/xml/docbook/4.5/ \
                    --searchpath ${prefix}/share/xsl/docbook-xsl/manpages\"
destroot.target-append \
                    install-doc-man install-doc-html