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

github.setup        qos-ch slf4j 2.0.18 v_
github.tarball_from archive

# Prevent *-alpha* tags from counting as new versions
github.livecheck.regex \
                    {([0-9.]+)}

categories          java
maintainers         nomaintainer
platforms           any
supported_archs     noarch
license             MIT

description         Simple Logging Facade for Java (SLF4J)
long_description    The Simple Logging Facade for Java or (SLF4J) is \
                    intended to serve as a simple facade for various \
                    logging APIs allowing to the end-user to plug in \
                    the desired implementation at deployment time.  \
                    SLF4J also supports a bridging legacy APIs as \
                    well as a source code migration tool.  SLF4J API \
                    offers an advanced abstraction of various logging \
                    systems, including JDK 1.4 logging, log4j and \
                    logback.  Features include parameterized logging \
                    and MDC support.

homepage            https://www.slf4j.org/
checksums           rmd160  f9a7252ca8b541bf097d5dd30a17e8ec87fb444c \
                    sha256  13562c210eb5d31d795bd906839886b59caa866bc07b2f8666c3bdc958f66765 \
                    size    384556

java.version        11+
java.fallback       openjdk11

destroot {
    set destdocdir  ${destroot}${prefix}/share/doc/${name}
    set docs {
        LICENSE.txt
        README.md
        SECURITY.md
    }

    set destjavadir ${destroot}${prefix}/share/java/${name}
    set modules {
        jcl-over-slf4j
        jul-to-slf4j
        log4j-over-slf4j
        osgi-over-slf4j
        slf4j-api
        slf4j-ext
        slf4j-jdk-platform-logging
        slf4j-jdk14
        slf4j-migrator
        slf4j-nop
        slf4j-reload4j
        slf4j-simple
    }

    # Ensure needed directories
    xinstall -d -m 755 ${destdocdir} ${destjavadir}

    foreach doc ${docs} {
        xinstall -m 644 ${worksrcpath}/${doc} ${destdocdir}
    }

    foreach module ${modules} {
        xinstall -m 644 \
            ${worksrcpath}/${module}/target/${module}-${version}.jar \
            ${destjavadir}/${module}.jar
    }
}
