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

github.setup        MasterQ32 kristall 0.4 V
github.tarball_from archive
name                kristall-devel
revision            0

homepage            https://kristall.random-projects.net

description         Small-Internet Browser for Gemini, Gopher, Finger & HTTP

long_description    Kristall is a browser without support for css/js/wasm or \
                    graphical websites. It can display user-styled documents \
                    in several formats, including gemini, html, markdown, ... \
                    provided by a server via gemini, gopher, http, finger, ...

categories          net
license             GPL-3
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer
platforms           darwin

checksums           rmd160  dcf2b43aea7c19c74e0e37b30a4095803e95549a \
                    sha256  1547e60978c73783d0737af3ccea6abfcf7ec214e8dedc91157ef3f88453be8f \
                    size    22015746

patchfiles          patch-project-file.diff

post-patch {
    set project_file ${worksrcpath}/src/kristall.pro

    reinplace "s|@@KRISTALL_VERSION@@|${version}-devel|"        ${project_file}
    reinplace "s|@@OPENSSL_INCLUDE@@|[openssl::include_dir]|"   ${project_file}
    reinplace "s|@@OPENSSL_LIB@@|[openssl::include_dir]|"       ${project_file}
}

destroot {
    copy ${worksrcpath}/kristall.app ${destroot}${applications_dir}
}

qt5.depends_build_component qttools

qt5.depends_component       qtmultimedia \
                            qtsvg

configure.args-append       ${worksrcpath}/src/kristall.pro

notes "Please find Kristal in the MacPorts Applications directory."
