# $Id: Portfile 42099 2008-11-15 05:27:55Z mcalhoun@macports.org $

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0

name            tablet-encode
version         2.19
categories      multimedia
maintainers     ecronin
platforms       darwin
description     Transcoding video files for Nokia Internet Tablets
long_description \
                As the Nokia Internet Tablets have relatively slow \
                processors, and relatively little storage space it is \
                a good idea to "transcode" your videos to a smaller, \
                more suitable format for watching them.
homepage        http://mediautils.garage.maemo.org/tablet-encode.html
master_sites    https://garage.maemo.org/frs/download.php/4264
livecheck.check regex
livecheck.url   https://garage.maemo.org/frs/?group_id=455
livecheck.regex tablet-encode-\(\[0-9\]+\.\[0-9\]+\)\.tar\.gz
checksums       md5  8c3f731f4284ec359ad0d735fda484a2 \
                sha1 25d5c57a8414f8f2bf56fc41142b150f5818b9fc \
                rmd160 6da7068097a375a3361711f03aeba1836798e987
worksrcdir      ${name}

depends_run     path:bin/perl:perl5 port:MPlayer

variant gui \
    description {GTK2 Graphical User Interface} {
    depends_run-append port:p5-gtk2
}

post-patch {
    reinplace "s|/usr/bin/perl|${prefix}/bin/perl|g" \
        ${worksrcpath}/tablet-encode
}

use_configure   no

build           {}

destroot {
    xinstall -m 755 ${worksrcpath}/tablet-encode \
        ${destroot}${prefix}/bin/tablet-encode
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 ${worksrcpath}/README.txt \
        ${destroot}${prefix}/share/doc/${name}/README.txt
}
