# -*- 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 79731 2011-06-24 13:37:12Z rmstonecipher@macports.org $

PortSystem          1.0

name                gst-plugins-base
version             0.10.35
description         This is gst-plugins, a set of plug-ins for GStreamer.
long_description    ${description}
maintainers         rmstonecipher openmaintainer
categories          gnome
platforms           darwin
homepage            http://gstreamer.freedesktop.org/modules/${name}.html

use_bzip2           yes
master_sites        gnome:sources/gst-plugins-base/0.10/ http://gstreamer.freedesktop.org/src/${name}/

checksums           md5     1d300983525f4f09030eb3ba47cb04b0 \
                    sha1    6d7dc463fed5dd43f79a53ad523fcbd6d0916303 \
                    rmd160  877e6b1c5439ef71262037b7a1aced07d37f4d49

depends_lib	\
    port:gstreamer \
    port:gnome-vfs \
    port:libtheora \
    port:openssl \
    port:orc

configure.args-append \
    --enable-experimental \
    --disable-examples \
    --disable-libvisual\
    --disable-gst_v4l \
    --disable-alsa \
    --disable-cdparanoia \
    --disable-ivorbis \
    --disable-introspection

variant no_x11 {
    configure.args-append --without-x --disable-x --disable-xvideo --disable-xshm
}

variant examples description {Build example programs} {
    PortGroup qt4 1.0
    depends_lib-append port:gtk2
    configure.args-delete --disable-examples
}

# users of qt4-x11, which depends on gst-plugins-base but has no use for its
# deeper gnome-related dependencies may wish to use this variant
variant no_gnome_vfs description {Remove library dependency on gnome-vfs} {
    depends_lib-delete port:gnome-vfs
    configure.args-append --disable-gnome_vfs
}

variant no_ogg description {Remove library dependency on libogg and its dependents} {
    depends_lib-delete port:libtheora
    configure.args-append --disable-ogg --disable-vorbis --disable-theora
}
#
# current cdparanoia port (cdparanoia III 10.2) appears to not be API compatible
# with gst-plugins-base.  See #19843.
# disable by default until this is rectified.
#

variant cdparanoia description {Enable (currently broken) cdparanoia plugin} {
    depends_lib-append port:cdparanoia
    configure.args-delete --disable-cdparanoia
}

platform darwin {
    if {${os.major} >= 9} {
        configure.optflags-append -Xarch_i386 -O1
    }
}

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