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

github.setup            xaos-project XaoS 4.3.4 release-
revision                0
github.tarball_from     archive

name                    xaos
categories              graphics math
license                 GPL-2+
maintainers             nomaintainer

homepage                https://xaos-project.github.io/

description             Real-time interactive fractal zoomer

long_description        XaoS is a fast portable real-time interactive \
                        fractal zoomer. It displays the Mandelbrot set \
                        (among other escape time fractals) and allows you to \
                        zoom smoothly into the fractal. Various coloring \
                        modes are provided for both the points inside and \
                        outside the selected set. In addition, switching \
                        between Julia and Mandelbrot fractal types and \
                        on-the-fly plane switching is provided. The first \
                        version was a minimal X Window Mandelbrot viewer \
                        by Thomas later modified by Jan to support high \
                        frame-rate zooming. Other additions were later \
                        made by both Thomas and Jan including autopilot \
                        (for those of you without drivers licenses), \
                        palette changing, GIF saving, and fractal inversion.

checksums               rmd160  333d4e464bb134f7336fedebed66ae1e0a1d6807 \
                        sha256  4bb1c6bdc3a136e7bdceaa626ae48944ef289cdc092dc5e46b4f8e9e049c5b07 \
                        size    11085358

# XaoS does not link to Qt Network, which is the only component of Qt that uses OpenSSL.
license_noconflict      openssl

qt6.depends_build       qttools

compiler.thread_local_storage yes

compiler.cxx_standard   2017

# Same as qt64
compiler.blacklist-append   {clang < 1100}

cmake.module_path-append \
                        ${qt6.dir}/lib/cmake/Qt6LinguistTools

destroot {
    # See tools/deploy-mac for the origin of the following four steps:
    file mkdir ${build.dir}/XaoS.app/Contents/Resources/examples/
    copy {*}[glob ${worksrcpath}/examples/*/*] ${build.dir}/XaoS.app/Contents/Resources/examples/
    copy ${worksrcpath}/catalogs ${build.dir}/XaoS.app/Contents/Resources/
    copy ${worksrcpath}/tutorial ${build.dir}/XaoS.app/Contents/Resources/

    move ${build.dir}/XaoS.app ${destroot}${applications_dir}
}
