# -*- 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           perl5 1.0

perl5.require_variant   yes
perl5.conflict_variants yes
perl5.branches          5.28 5.30 5.32 5.34
perl5.default_branch    5.34
perl5.create_variants   ${perl5.branches}

name                mtn-browse
version             1.20
revision            2
categories          devel
license             GPL-3+
supported_archs     noarch
maintainers         nomaintainer

description         A GTK+ 2 based browser for version control system monotone
long_description    Monotone browser (mtn-browse) is an application for \
                    browsing Monotone VCS databases without the need of a \
                    workspace. The interface allows one to do various tasks \
                    very easily like selecting revisions, display file \
                    contents, compare changesets and much more.

homepage            http://www.coosoft.plus.com/software.html
master_sites        sourceforge:mtn-browse

checksums           rmd160  abdfef1bc211c8ff02666c13d7ac93dd7bb3cad7 \
                    sha256  c14ffaf742ccdc47dad7ad98f2bf93cf01f6a00bfce6ce4c020227b41006a90d \
                    size    1980519

depends_lib         port:p${perl5.major}-gnome2 \
                    port:p${perl5.major}-gtk2-gladexml \
                    port:p${perl5.major}-gtk2-sourceview2 \
                    port:p${perl5.major}-libintl-perl \
                    port:p${perl5.major}-monotone-automatestdio

# assumes yelp is available to view help files
depends_run         port:yelp

use_configure       no

build {
    reinplace "s|/usr/bin/perl|${perl5.bin}|g" \
        ${worksrcpath}/mtn-browse \
        ${worksrcpath}/mtn-browse-sv2 \
        ${worksrcpath}/linux-installer
}

destroot {
    system -W ${worksrcpath} "./linux-installer \
        --destdir=${destroot} --prefix=${prefix} \
        --no-use-dists-mas --file-comparison=opendiff \
        --globs-file=${prefix}/share/mime/globs"
}