# -*- 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 88208 2011-12-22 00:38:44Z rmstonecipher@macports.org $

PortSystem          1.0

name                py25-gst-python
version             0.10.22
license             LGPL
categories          python gnome multimedia
maintainers         rmstonecipher openmaintainer
description         GStreamer python bindings
set my_name         gst-python
long_description    ${my_name} allows python programs built with the gnome toolkit to use gstreamer for multimedia input/output
homepage            http://gstreamer.freedesktop.org/modules/gst-python.html
platforms           darwin
master_sites        http://gstreamer.freedesktop.org/src/${my_name}/
distname            ${my_name}-${version}
use_bzip2           yes
checksums           md5     937152fe896241f827689f4b53e79b22 \
                    sha1    7012445d921ae1b325c162500750c9b0e777201f \
                    rmd160  6c4e43c5464297e0d45aa89f3cb82ed424caa283
depends_build       port:pkgconfig
depends_lib         port:py25-gtk \
                    port:gst-plugins-base

#gst-python does not use setup.py, so python arguments are passed to configure
set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.5
configure.pre_args-delete   --prefix=${prefix}
configure.pre_args-append   --prefix=${python_prefix}
configure.args-append       --includedir=${python_prefix}/include/python2.5 \
                            --with-libpython-dir=${prefix}/lib 
configure.pkg_config_path   ${python_prefix}/lib/pkgconfig
configure.python            ${prefix}/bin/python2.5
configure.cppflags-append   -I${prefix}/include/pygtk-2.0

post-destroot {
    # Workaround for python25 framework bug (#16334)
	move ${destroot}${frameworks_dir}/Python.framework/Versions/2.5/lib/python2.5 \
		${destroot}${prefix}/lib/python2.5
	move ${destroot}${frameworks_dir}/Python.framework/Versions/2.5/share \
		${destroot}${prefix}/share
}

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