# $Id: Portfile 88606 2012-01-05 20:55:40Z jmr@macports.org $

PortSystem      1.0

name            transmission-x11
version         1.73
revision        2
categories      net x11
maintainers     nomaintainer
description     Lightweight BitTorrent client
long_description Transmission is a free, lightweight BitTorrent client. \
                It features a simple, intuitive interface on top of an \
                efficient, cross-platform back-end. Transmission is open \
                source (MIT license) and runs on Mac OS X (Cocoa interface), \
                Linux/NetBSD/FreeBSD/OpenBSD (GTK+ interface) and BeOS \
                (native interface). This is the GTK+ version.
homepage        http://www.transmissionbt.com/
distname        transmission-${version}
dist_subdir     transmission
master_sites    http://download.m0k.org/transmission/files/
checksums       md5     9c1b5d84fb9ddbbd50b5776c1cd6daa4 \
                sha1    18e347141fcd65a385cd1406ba8a3303b0c99156 \
                rmd160  94140a7b699eb166472017ac3826763700e99352
use_bzip2       yes
platforms       darwin freebsd

depends_lib     port:openssl \
                port:curl \
                port:gettext \
                port:libevent1
depends_build   port:gsed \
                port:intltool \
                port:pkgconfig

configure.args  --enable-daemon \
                --enable-cli \
                --disable-wx \
                --disable-darwin \
                --disable-gtk \
                --disable-libnotify
configure.cppflags   "-I${prefix}/include/libevent1 ${configure.cppflags}"
configure.ldflags    "-L${prefix}/lib/libevent1 ${configure.ldflags}"

variant gtk description {Build Gtk front-end} {
  depends_lib-append  port:gtk2 \
        port:dbus-glib
  configure.args-delete --disable-gtk
  configure.args-append --enable-gtk
}

variant aqua description {Build Aqua front-end} {
  configure.args-delete --disable-darwin
  configure.args-append --enable-darwin
}

platform darwin 8 {
    pre-fetch {
        ui_error "${name} requires Mac OS X 10.5 or greater."
        return -code error "incompatible Mac OS X version"
    }
}

livecheck.type  regex
livecheck.url   ${master_sites}
livecheck.regex "transmission-(\\d+(?:\\.\\d+)*)${extract.suffix}"
