# -*- 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 80183 2011-07-06 08:34:33Z jeremyhu@macports.org $

PortSystem  1.0

name                gst-plugins-good
version             0.10.30
description         \
    A set of good-quality plug-ins for GStreamer under GStreamer's preferred \
    license, LGPL.
long_description    \
    GStreamer Good Plug-ins is a set of plug-ins that GStreamer's developers \
    consider to have good quality code, correct functionality, and their \
    preferred license (LGPL for the plug-in code, LGPL or LGPL-compatible for \
    the supporting library). 
maintainers         rmstonecipher openmaintainer
categories          gnome
platforms           darwin
homepage            http://gstreamer.freedesktop.org/modules/${name}.html
master_sites        http://gstreamer.freedesktop.org/src/${name}/ gnome:sources/${name}/0.10/

checksums           md5     62fd7a3ef187c4f99b3d7c352d58dae9 \
                    sha1    9c78a751bb2f20ad50a1daf6860e0098e0495f5a \
                    rmd160  e39555de8efa87af9764cad32f11e00954e82a91

depends_lib	\
    port:gst-plugins-base \
    port:aalib \
    port:esound \
    port:flac \
    port:libgnome-keyring \
    port:libcaca \
    port:libcdio \
    port:libdv \
    port:libshout2 \
    port:libsoup \
    path:lib/libspeex.dylib:speex \
    port:taglib \
    port:wavpack
      
use_bzip2   yes

# https://bugzilla.gnome.org/show_bug.cgi?id=636134
patchfiles universal.patch goom-nommx.patch
patch.pre_args  -p1

pre-configure {
    reinplace "s|OBJC = gcc|OBJC = @OBJC@|" ${worksrcpath}/sys/osxvideo/Makefile.in
    reinplace "s|-DGST_DISABLE_DEPRECATED||" ${worksrcpath}/configure
}

use_autoreconf          yes
autoreconf.args         -fvi

configure.args-append   --disable-gtk-doc --disable-schemas-install --with-default-videosink=ximagesink

# BUILD FIX TODO: clang
# SSE register return with SSE disabled
# <rdar://problem/9694837>
if {${configure.compiler} == "clang"} {
    configure.compiler llvm-gcc-4.2
}

post-activate {
        system "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` && \
             gconftool-2 --makefile-install-rule ${prefix}/etc/gconf/schemas/*.schemas"
}

livecheck.type  regex
livecheck.url   http://gstreamer.freedesktop.org/src/${name}/
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
