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

github.setup        italiangrid voms 2_0_9
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            3
version             [strsed ${github.version} {g/_/./}]
categories          security
platforms           darwin
maintainers         nikhef.nl:okoeroo
license             Apache-2

description         create a proxy with VOMS extensions

long_description    The voms-proxy-init generates a proxy with the VOMS information included in a non-critical extension.

checksums           rmd160  5d6f8ba7aba00173cb22149d7b867ec4684e7435 \
                    sha256  aab51fab8ad4a89fb8dc68dcfc4e44a9eab0542bf437ec3bc330628830ba8633

patchfiles          patch-automake-1.13.diff \
                    patch-ipv6sock-posix.diff \
                    patch-empty-replib.diff

depends_build       port:autoconf \
                    port:automake \
                    port:libtool

depends_lib         port:expat \
                    path:lib/libssl.dylib:openssl

pre-configure {
    system -W ${worksrcpath} "./autogen.sh"
}

configure.args      --with-expat-prefix=${prefix} \
                    --with-openssl-prefix=${prefix}

# Fix build conflict with mongodb's ${prefix}/include/server.h
configure.cppflags-delete -I${prefix}/include
configure.cppflags-append -isystem${prefix}/include

pre-test {
    if {![file exists ${prefix}/bin/runtest]} {
        ui_error "To test ${name}, you must first install the dejagnu port."
        return -code error "dejagnu is not installed"
    }
}

test.run            yes
test.target         check