# -*- 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 67195 2010-05-01 13:41:25Z rmsfisher@macports.org $

PortSystem          1.0

name                gstreamer
version             0.10.29
description \
    GStreamer is a development framework for creating multimedia applications.
long_description \
    GStreamer is the core library. It contains the headers, core library files, \
    and core elements.
maintainers	rmsfisher openmaintainer
categories	gnome
platforms	darwin
homepage	http://gstreamer.freedesktop.org/

master_sites \
    gnome:sources/gstreamer/[join [lrange [split ${version} .] 0 1] .]/ \
    http://gstreamer.freedesktop.org/src/${name}/

checksums           md5     c92d6bce4fc65fa9d5a3ad35cdd1a466 \
                    sha1    8d218f4b04445a7dc388d6466c10efb8f23d2468 \
                    rmd160  c5b71e4f9c3c77305c92c242b44820521c88ee89

depends_build   \
    port:gzip \
    port:m4 \
    path:bin/perl:perl5 \
    port:pkgconfig
depends_lib \
    port:bison \
    port:flex \
    port:gettext \
    path:lib/pkgconfig/glib-2.0.pc:glib2 \
    port:libxml2

use_bzip2           yes

configure.env-append    PERL_PATH=${prefix}/bin/perl
configure.cflags-append -funroll-loops -fstrict-aliasing -fno-common

post-patch {
    # http://trac.macports.org/ticket/24002
    reinplace "s|\"mul %3|\"mulq %3|" ${worksrcpath}/gst/gstutils.c
}

pre-build	{
    ui_msg "It is likely that this port will fail to build if the 'check'"
    ui_msg "port is active. If this port fails to build, deactive 'check'"
    ui_msg "by running:"
    ui_msg "port deactivate check"
    ui_msg "Reactivate 'check' after successfully installing gstreamer"
    ui_msg "by running:"
    ui_msg "port activate check"
    ui_msg "If you do not have 'check' installed, ignore this message."
}

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