# -*- 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
# $Id: Portfile 84550 2011-09-27 21:05:11Z snc@macports.org $

PortSystem          1.0

name                log4shib
version             1.0.4
categories          sysutils shibboleth devel
license             LGPL-2.1
maintainers         snc scantor
description         configurable logging for C++, fork of log4cpp
long_description    Log4shib is library of C++ classes for flexible logging to \
                    files, syslog, IDSA and other destinations. It is modeled \
                    after the Log4j Java library, staying as close to their \
                    API as is reasonable.
homepage            http://www.shibboleth.net/

platforms           darwin

master_sites        http://www.shibboleth.net/downloads/log4shib/${version}/

checksums           rmd160  b288250631d0de51665837500a2f3fd8f53c3c64 \
                    sha256  4e5f9e58f14f2498d8be15dc0a6223e83f0510a924494295329b20745cacbc38

configure.args      --disable-doxygen \
                    --disable-dot \
                    --disable-html-docs \
                    --disable-latex-docs

variant universal {
    depends_lib-append  port:libtool
}

post-configure {
    if {[variant_isset universal]} {
        file copy -force ${prefix}/bin/glibtool ${worksrcpath}/libtool
    }
}

post-build {
    if {[variant_isset universal]} {
        foreach arch ${universal_archs} {
            reinplace "s|\-arch ${arch}||" \
                ${worksrcpath}/log4shib-config \
                ${worksrcpath}/log4shib.pc
        }
    }
}

livecheck.type      regex
livecheck.url       http://www.shibboleth.net/downloads/log4shib/latest/
livecheck.regex     ${name}-(\\d+\\.\\d+\\.\\d+)
