# -*- 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               cmake 1.1
PortGroup               github 1.0

github.setup            linux-noah noah 0.5.1
revision                0
checksums               rmd160  85823bb389f84a17a573584cb8d1b82beee98267 \
                        sha256  452c00b1baeafca73e6566b552c9d63dc304504be95296f6568274cd74073660 \
                        size    49644147

categories              emulators
maintainers             nomaintainer
platforms               darwin
license                 {MIT GPL-2+}
# Per the Portfile included in the upstream repository.
supported_archs         x86_64

description             Linux ABI implementation for macOS

long_description        Noah is a Darwin subsystem for Linux. Noah is \
                        implemented as a hypervisor that traps Linux \
                        system calls and translates them into Darwin \
                        system calls. Noah also has an interpreter of \
                        ELF files so that Linux binary executables run \
                        directly and flawlessly without any \
                        modifications. It's effectively a macOS Linux \
                        execution flavor, similar to that of FreeBSD \
                        Linuxolator, a.k.a. Linux emulation, a.k.a. \
                        Linux ABI. In other words, it's the reverse of \
                        the Linux Darling project.

github.tarball_from     archive

depends_run             port:noahstrap

patchfiles              noah.in.patch

# Noah uses the Hypervisor framework introduced in OS X Yosemite but the
# readme says it requires Sierra or later. (This has not been verified.)
if {${os.platform} ne "darwin" || ${os.major} < 16} {
    known_fail          yes
    pre-configure {
        ui_error "${name} @${version} requires macOS Sierra or later"
        return -code error "unsupported OS"
    }
}
