# -*- 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 87178 2011-11-13 06:12:07Z ryandesign@macports.org $

PortSystem          1.0

name                subtitleripper
version             0.3-4
revision            1
categories          multimedia
platforms           darwin
maintainers         shortround.net:stephen

description         DVD subtitle ripper

long_description    If you want to convert DVD subtitles into text format \
                    (e.g. subrip format) or VobSub format this program could \
                    be useful for you.

homepage            http://subtitleripper.sourceforge.net/
master_sites        sourceforge
extract.suffix      .tgz
worksrcdir          ${name}

checksums           sha1    d93ff3578dd5f722c8f4ef16bc0903eec5781a0d \
                    rmd160  141355960773ab2dfe3782522858273d197cf797

depends_lib         port:netpbm \
                    port:libpng \
                    port:transcode

use_configure       no

if {${os.platform} == "darwin" && ${os.major} >= 11} {
    configure.cflags-append -DHAVE_GETLINE
}

build.args          CC="${configure.cc} ${configure.cc_archflags}" \
                    CFLAGS="${configure.cflags}" \
                    LDFLAGS="${configure.ldflags}"

destroot {
    xinstall -W ${worksrcpath} \
        srttool \
        subtitle2pgm \
        subtitle2vobsub \
        vobsub2pgm \
        ${destroot}${prefix}/bin
}
