# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 67134 2010-04-30 02:53:14Z rmsfisher@macports.org $

PortSystem          1.0
PortGroup           python26 1.0

name                quodlibet
version             2.2.1
revision            2
categories-append   audio gnome
maintainers         elelay rmsfisher openmaintainer
platforms           darwin
description         audio library manager and player for GTK+

long_description \
Quod Libet is a GTK+-based audio player written in Python, \
using the Mutagen tagging library and GStreamer for playback.\
It provides several different ways to view your audio library, \
as well as support for Internet radio and audio feeds.\
It has extremely flexible metadata tag editing and searching capabilities.

homepage            http://code.google.com/p/quodlibet/
master_sites        googlecode

distfiles-append    ${name}-plugins-${version}${extract.suffix}

checksums           ${name}-${version}${extract.suffix} \
                    md5     8e2bf197afbfca98975d0f2103629d2d \
                    sha1    f6ae9a000f98a0a0d5928aa63b71244161255551 \
                    rmd160  bc24798632767b06288f020acc4043be5223f4ec \
                    ${name}-plugins-${version}${extract.suffix} \
                    md5     c93d244eb1ceb83f4402de9143c03a2c \
                    sha1    bd46e850a66630faec0b6885e98d5921f04c3637 \
                    rmd160  6cb4943d9469d74006cbedd340475a48cc360940

depends_lib         port:gst-plugins-good \
                    port:py26-gst-python \
                    port:py26-mutagen \
                    port:py26-feedparser \
                    port:python-musicbrainz2

patchfiles          patch-setup.py.diff \
                    patch-quodlibet-qltk-properties.py.diff \
                    patch-quodlibet-qltk-x.py.diff
post-patch {
    foreach file { quodlibet.py exfalso.py } {
        reinplace "s|/usr/bin/env python|${frameworks_dir}/Python.framework/Versions/2.6/bin/python2.6|g" \
            ${worksrcpath}/${file}
    }
}

post-destroot {
    system "cd ${workpath}/${name}-plugins-${version}/ && cp -vR * ${destroot}/${python.pkgd}/${name}/plugins/"
}

livecheck.type		regex
livecheck.url		${homepage}downloads/list
livecheck.regex		"${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
