# -*- 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           gitlab 1.0
PortGroup           cmake 1.1

gitlab.setup        openconnect openconnect-gui 1.5.3 v
revision            0
categories          net
platforms           darwin
maintainers         nomaintainer
license             GPL-2+

description         GUI client for openconnect VPN
long_description    ${description}

depends_lib-append  path:lib/pkgconfig/gnutls.pc:gnutls \
                    port:openconnect

depends_run         port:vpnc-scripts

checksums           rmd160  95831016dba67d55b9891ddb16d62931b3d95cfe \
                    sha256  708db60f8753cc9b45ef89e0aabb56629587450befc8b951a39d4501bf39dc66 \
                    size 14742968

use_parallel_build  no

cmake.install_prefix \
                    ${applications_dir}
cmake.build_type    Release

patchfiles          patch-cmake.diff

post-patch {
    reinplace "s,@PREFIX@,${prefix}," CMake/Modules/FindOpenConnect.cmake
}

post-destroot {
    file rename \
        ${destroot}${applications_dir}/LICENSE.txt \
        ${destroot}${applications_dir}/OpenConnect-GUI.app/Contents/Resources
}
