# -*- 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 74893 2011-01-06 05:36:11Z ryandesign@macports.org $

PortSystem          1.0

name                tnef2txt
version             1.4
revision            1
categories          textproc
platforms           darwin
maintainers         nomaintainer

description         Converts Microsoft TNEF attachments to ASCII text

long_description    This is a simple program used to decode Microsoft's \
                    Translation Neutral Encapsulation Format (TNEF), which \
                    is used by various Microsoft OS products to transfer \
                    MAPI information through text only gateways such as SMTP.

homepage            http://www.fiction.net/blong/programs/#tnef2txt
master_sites        http://www.fiction.net/blong/programs/tnef2txt/

checksums           md5     a32a9fe1d558f076c2b0d24b742661f6

patchfiles          patch-Makefile

use_configure       no

variant universal {}
if {[variant_isset universal]} {
    set archflags ${configure.universal_cflags}
} else {
    set archflags ${configure.cc_archflags}
}

build.target        tnef2txt
build.args          CC="${configure.cc} ${archflags}"

destroot {
    xinstall ${worksrcpath}/${name} ${destroot}${prefix}/bin
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    eval xinstall -m 644 [glob ${worksrcpath}/apptnef.*] ${destroot}${prefix}/share/doc/${name}
}
