# -*- 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                macports-module-map
version             0.1
categories          devel
maintainers         nomaintainer
license             Permissive
platforms           {darwin any}
supported_archs     noarch

description         module map for MacPorts headers

long_description    Provides a module.modulemap to work around bugs \
                    with clang -fmodules and the macOS SDK.

homepage            https://trac.macports.org/ticket/59992
distfiles

use_configure       no
build {}
destroot {
    if {${os.platform} eq "darwin"} {
        xinstall -m 0644 ${filespath}/module.modulemap ${destroot}${prefix}/include
    } else {
        xinstall -d ${destroot}${prefix}/share/doc/${name}
        system "echo 'This port deliberately empty on non-darwin platforms.' > ${destroot}${prefix}/share/doc/${name}/README.txt"
    }
}

notes "This port should no longer be needed, since a workaround for\
the issue has been added to the ncurses headers. If you find the\
module map is still needed for some reason, please let us know."
