# -*- 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
# $Id: Portfile 92319 2012-04-25 02:14:42Z rmstonecipher@macports.org $

PortSystem          1.0
PortGroup           python27 1.0

name                quodlibet
version             2.4
categories-append   audio gnome
maintainers         elelay rmstonecipher 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}.tar.gz \
                    md5     0d5291ecfab0ba0cc69d12d551d2a434 \
                    sha1    7e11cda2827bb0d04b7d2b7854b8a2854ed074c8 \
                    rmd160  d6703b0889377d407bb28a10dd8388e3aef18515 \
                    ${name}-plugins-${version}.tar.gz \
                    md5     ea38d33bfc38888ff45d5a759d257351 \
                    sha1    761fe89ed200daf602c1b0685a664a438c6de3bb \
                    rmd160  5f33fd96e81e1a8a0b436f9c8190bd62b06028e6

depends_build       port:intltool
depends_lib         port:dbus-python27 \
                    port:gst-plugins-good \
                    port:py27-gst-python \
                    port:py27-mutagen \
                    port:py27-feedparser \
                    port:python-musicbrainz2

patchfiles          patch-setup.py.diff

post-patch {
    foreach file { quodlibet.py exfalso.py } {
        reinplace "s|/usr/bin/env python|${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7|g" \
            ${worksrcpath}/${file}
    }
}

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

notes "If you want to play mp3 files, don't forget to install gst-plugins-ugly"

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