# -*- 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                   qt5 1.0

github.setup                chris2511 xca 2.4.0 RELEASE.
revision                    1
github.tarball_from         releases

categories                  security crypto
platforms                   darwin
license                     Permissive
license_noconflict          openssl

maintainers                 nomaintainer

description                 X Certificate and Key management
long_description            XCA is a CA & PKI management tool that supports creating and managing X.509 certificates, \
                            certificate requests, RSA, DSA and EC private keys, Smartcards and CRLs.
homepage                    https://www.hohnstaedt.de/xca/

checksums                   rmd160  c2c6d08aec25c6c0a109dc54a6575112907ef4fa \
                            sha256  66da8954fe9709ace965c6fcb1cfbb7b08ce75b7222988acb9e2b8b5fac7cf10 \
                            size    1778572

qt5.depends_component       qtdeclarative \
                            qtmacextras \
                            qtmultimedia \
                            qtsvg \
                            qttools \
                            qttranslations \
                            sqlite-plugin

variant RemoteSQL description { Add support MySQL/MariaDB and PostgreSQL databases } {
    qt5.depends_component   qtdeclarative \
                            qtmacextras \
                            qtmultimedia \
                            qtsvg \
                            qttools \
                            qttranslations \
                            sqlite-plugin \
                            mysql-plugin \
                            psql-plugin
}

depends_lib-append          port:libtool

openssl.branch              1.1

configure.cppflags-append   -L[openssl::lib_dir]

post-patch {
    move ${worksrcpath}/VERSION ${worksrcpath}/VERSION.txt
}

patchfiles                  rename-VERSION.patch

build.target                xca.app

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