# $Id: Portfile 48911 2009-03-31 10:02:34Z ryandesign@macports.org $

PortSystem 1.0

name            libmms
version         0.4
revision        1
categories      multimedia
maintainers     boeyms openmaintainer
description     Library for parsing mms:// and mmsh:// network streams
long_description \
    LibMMS is a common library for parsing the legacy mms:// and mmsh:// type \
    network streams, created and now abandoned by Microsoft. These are \
    commonly used to stream Windows Media Video content over the web. LibMMS \
    itself is only for receiving MMS streams, it doesn't handle sending at \
    all. If you need streaming functionality, look at other protocols, such \
    as RT(S)P.
homepage        http://libmms.sourceforge.net/
platforms       darwin
master_sites    sourceforge
checksums       md5     4a681a815186fe26bb1b02ccea57fb75 \
                sha1    301dff27db1742eeab699d6f7619a05cd7b0d8a4 \
                rmd160  5fcc9cddd50b82f0f37e2f21b6f9cd51ec3706f8
depends_build   path:bin/pkg-config:pkgconfig
depends_lib     path:lib/pkgconfig/glib-2.0.pc:glib2 port:libiconv port:gettext
configure.args-append \
    --mandir=${prefix}/share/man --infodir=${prefix}/share/info

# avoid warning about nested comments
patchfiles patch-mms_config.h.in.diff

post-patch {
    # avoid use of C++ keyword this
    reinplace "s|*this|*instance|" \
        ${worksrcpath}/src/mms.h \
        ${worksrcpath}/src/mmsh.h
}
