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

name                mtools
conflicts           multimarkdown
version             4.0.49
revision            0
checksums           rmd160  5eee5224616df3e22972e428ac975cbdcd42fa77 \
                    sha256  76dfea98d923dfc9806ce34bd1786aa9b5a39d70f56f26c0670a348c664f1d2a \
                    size    397000

categories          sysutils
maintainers         {ryandesign @ryandesign} openmaintainer
license             GPL-3+
description         MS-DOS disk access utilities
long_description    Utilities to access MS-DOS disks from Unix without \
                    mounting them

homepage            https://www.gnu.org/software/mtools
master_sites        gnu:mtools
use_lzip            yes

depends_lib         port:libiconv

# https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
configure.checks.implicit_function_declaration.whitelist-append strchr

configure.args      --without-x

# https://lists.gnu.org/archive/html/info-mtools/2020-11/msg00002.html
configure.ldflags-append    -Wl,-liconv

variant x11 {
    depends_lib-append \
                    port:xorg-libX11 \
                    port:xorg-libXau
    configure.args-replace \
                    --without-x --with-x
}
