# -*- 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 92481 2012-04-29 23:43:32Z cal@macports.org $

PortSystem          1.0
PortGroup           github 1.0

set uname           mpeg
github.setup        dhmunro yorick-${uname} CVS-final
version             0.1
categories          science multimedia
platforms           darwin
maintainers         users.sourceforge.net:paumard openmaintainer
description         Write MPEG-1 movies from Yorick
long_description    This is a standalone mpeg movie encoder for Yorick. \
                    In contrast to yorick-av, yorick-mpeg has no external \
                    dependency: it is therefore easy to install and won't \
                    break with every change of the FFmpeg API. On the other \
                    hand, it can only produce MPEG-1 movies.
homepage            https://github.com/dhmunro/yorick-mpeg
# license is unknown

checksums           rmd160  8344dcac33aa6ae08374fa2e23dce5000db57596 \
                    sha256  eb073ac8ff7d3894977693816c8cdf99b1a8a540c74eb2ac9870e30a51823136

depends_lib-append  path:bin/yorick:yorick

universal_variant   no

configure.cmd       ${prefix}/bin/yorick
configure.pre_args
configure.args      -batch make.i
post-configure {
    reinplace "s/undef HAVE_OSX/define HAVE_OSX/" ${worksrcpath}/config.h
}

build.pre_args      PKG_DEPLIBS=libavcodec/libavcodec.a
build.args          yompeg.so \
                    CC=${configure.cc}

destroot.pre_args-append   PKG_I_EXTRA=mpgtest.i
