# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup       github 1.0
PortGroup       conflicts_build 1.0
PortGroup       cmake 1.1

github.setup    AXIS5hacker DNX-Note-Width-Changer 1.3.4 v
github.tarball_from \
                archive
name            dynamix-chart-width-control
revision        1
categories      games
maintainers     {i0ntempest @i0ntempest} openmaintainer
license         MIT

description     A tool for changing the note width in a Dynamix Fanmade Chart
long_description \
                {*}${description}. \
                Compatible with xml charts produced with DynaMaker.

checksums       rmd160  c938c0173cbb2a6238cbe28db7520eb294c1a240 \
                sha256  d42d02daf3eab2894bd17e44f4539c34b75f7461edf3a75dd988cb51afa471b4 \
                size    758029

conflicts_build libunwind
#macosx_deployment_target 12.0

if {${name} eq ${subport}} {
    compiler.cxx_standard \
                    2011

    configure.args-append \
                    -DBUILD_CLI=YES \
                    -DBUILD_GUI=NO
}

subport ${name}-gui {
    PortGroup       qt6 1.0
    PortGroup       app 1.1

    long_description-append \
                    This is the Qt GUI version.

    compiler.cxx_standard \
                    2014

    qt6.depends_build \
                    qttools

    configure.args-append \
                    -DBUILD_CLI=NO \
                    -DBUILD_GUI=YES

    app.name        Dynamix Chart Width Changer
    app.executable  ${cmake.build_dir}/bin/Dynamix_note_width_changer_GUI
    app.icon        ${worksrcpath}/Dynamix_chart_width_control_GUI/DNX icon_macOS.png
    app.identifier  com.${github.author}.${github.project}

    destroot {}
}
