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

perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         Wx 0.9932

maintainers         {mojca @mojca} openmaintainer
license             {Artistic-1 GPL}

description         Interface to the wxWidgets cross-platform GUI toolkit
long_description    ${description}

checksums           rmd160  5abb796f4998bc2cf49380271060082cbd4d4c16 \
                    sha256  1cfdb6535a0f4676e6f1aab2c9d8e16d577be3eb3b7cc04c8074d685e6651b70

if {${perl5.major} != ""} {
    wxWidgets.use   wxWidgets-3.0

    depends_build-append \
                    port:p${perl5.major}-extutils-xspp

    depends_lib-append \
                    port:p${perl5.major}-alien-wxwidgets \
                    port:${wxWidgets.port}

    # patch for apparent API change in wxWidgets 3.0.3
    # https://github.com/wxWidgets/wxWidgets/commit/6b335c8ca440a7adea8309c2272b53aaff59f526
    # https://rt.cpan.org/Public/Bug/Display.html?ShowHeaders=1;id=121603
    patchfiles      patch-XS-PropertySheetDialog.xsp.diff

    # https://trac.macports.org/ticket/61588
    configure.cc    {*}${configure.cxx}
    
    configure.args  installdirs=vendor
}
