# -*- 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

PortSystem          1.0
PortGroup           github 1.0

github.setup        verdammelt tnef 1.4.18
github.tarball_from archive
categories          textproc mail
installs_libs       no
license             GPL-2+
maintainers         nomaintainer
homepage            https://tnef.sourceforge.net/

description         Microsoft MS-TNEF attachment unpacker
long_description    TNEF provides a way to unpack those pesky \
                    Microsoft MS-TNEF MIME attachments. It operates like tar in order \
                    to upack any files which may have been put into the MS-TNEF \
                    attachment instead of being attached seperately.

checksums           rmd160  e02bb30ae64b9a72a6489f8c5dcce57a53face46 \
                    sha256  fa56dd08649f51b173017911cae277dc4b2c98211721c2a60708bf1d28839922 \
                    size    4650361

depends_build-append \
                    port:gettext
depends_lib-append  port:gettext-runtime

use_autoreconf      yes

patchfiles          0001-Fix-compiler-warning.patch

test.run            yes
test.target         check

# alignof is C23. Not necessary to build
configure.checks.implicit_int   no
configure.checks.implicit_function_declaration.whitelist-append \
                    strchr \
                    alignof

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} COPYING AUTHORS ${destroot}${prefix}/share/doc/${name}
}
