# $Id: Portfile 66347 2010-04-09 15:10:29Z macsforever2000@macports.org $

PortSystem      1.0

name            transmission-x11
version         1.73
revision        1
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
depends_build   port:gsed \
                port:intltool

configure.args  --enable-daemon \
                --enable-cli \
                --disable-wx \
                --disable-darwin \
                --disable-gtk \
                --disable-libnotify

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
  pre-fetch {
    if {"darwin" == ${os.platform} && ${os.major} < 9} {
      ui_error "${name} +aqua requires Mac OS X 10.5 or greater. Try the +gtk variant instead."
      return -code error "incompatible Mac OS X version"
    }
  }
}

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