# -*- 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: Portfile 119993 2014-05-12 18:29:54Z mk@macports.org $

PortSystem          1.0
PortGroup           github 1.0

github.setup        jonas tig 2.0.2 tig-
checksums           rmd160  ed21ff5d384f9e5baedccfc3db6002feac8cab68 \
                    sha256  48e3bdd3dfa2e9d9d21a19d73c7c90417d26d0a56e2fa09e98a3a8d3333e7a26

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-core \
                    port:libiconv \
                    port:ncurses

# 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
