# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 63568 2010-02-09 02:55:49Z scantor@macports.org $

PortSystem          1.0

name                log4shib
version             1.0.4
categories          sysutils shibboleth devel
#license             LGPLv2.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://shibboleth.internet2.edu/

platforms           darwin

master_sites        http://shibboleth.internet2.edu/downloads/log4shib/${version}/
checksums           md5     7dcec788b0b73923dde9756869edc011 \
                    sha1    28db40713d5cb73d4df980c1519a0022d06b83f9

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://shibboleth.internet2.edu/downloads/log4shib/latest/
livecheck.regex     ${name}-(\\d+\\.\\d+\\.\\d+)
