# -*- 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
PortGroup           qt6 1.0

github.setup        Arisotura melonDS 0.9.4
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            1

name                melonds
license             GPL-3+
maintainers         {gmail.com:audvare @Tatsh} openmaintainer
categories          emulators games
description         Nintendo DS emulator.
long_description    {*}${description}

checksums           rmd160  9ac70ae80604a84cdad7efebad3b1afd434751cc \
                    sha256  8b962c6b00fd6fb21267bc05edee49bfb26f35da5265f352bb17c96ba1f9cb79 \
                    size    2331101

compiler.cxx_standard 2017

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:gettext \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:libarchive \
                    port:libepoxy \
                    port:libiconv \
                    port:libsdl2 \
                    port:libslirp \
                    port:mesa

destroot {
    move ${workpath}/build/melonDS.app ${destroot}${applications_dir}
}

if {${os.platform} eq "darwin" && ${os.major} < 18} {
    post-install {
        ui_warn "${name} @${version} is only supported on macOS 10.14 or later and may not work properly on your OS version."
    }
}
