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

PortSystem          1.0
PortGroup           perl5 1.0

name                GTorrentViewer
version             0.2b
revision            7
platforms           darwin
categories          net x11
license             GPL-2+
maintainers         nomaintainer

description         GTK2 based viewer for .torrent files.
long_description    GTorrentViewer is a GTK2-based viewer/editor for BitTorrent \
                    meta files for UNIX like operating systems. It gathers information \
                    from trackers, checks files, shows detailed information about \
                    .torrents and even modifies some of it.

homepage            http://gtorrentviewer.sourceforge.net/
master_sites        sourceforge:gtorrentviewer

checksums           rmd160  3a2c08b1c39c14a715fd5bfc0dbf0efb5fb49803 \
                    sha256  6e56351103f5d46a45be160baa1b7b956b4416fcdb4533b3d17a309665690c95

perl5.branches      5.28

depends_build       port:pkgconfig
depends_lib         lib:libgtk.2:gtk2 \
                    port:curl \
                    port:p${perl5.major}-xml-parser

patchfiles          src_main.c.patch

configure.args      --mandir=${prefix}/share/man \
                    --with-curl-config=${prefix}/bin \
                    --disable-gtktest

build.type          gnu
build.args          LDFLAGS="-bind_at_load"

livecheck.name      GTorrentViewer
# MacPorts considers 0.2b < 0.2.0, so we temporarily use a more restricted regex
set livecheck.regex [list "/[quotemeta ${livecheck.name}]/(\[a-zA-Z0-9\]+\\.\[a-zA-Z0-9\]+)/"]