# -*- 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        qorelanguage module-jni 2.3.1 v
github.tarball_from releases

PortGroup           cmake 1.1

name                qore-jni-module
categories          lang
license             LGPL-2.1
maintainers         {davidnichols @davidnich} openmaintainer
description         msgpack module for Qore
long_description    Module allowing for dynamic imports of Java code into Qore and dynamic imports of Qore and Python code into Java using bytecode generation
homepage            http://qore.org
platforms           darwin
use_bzip2           yes
distname            qore-jni-module-${version}

checksums           rmd160 9ee4e8c670fb7231f8ff9e35ea11a5c40f7f1780 \
                    sha256 d0c12489c43aeb98bf181a75f4f02d75ea407affc0f0a34befbf8fc73dc85766 \
                    size 4109393

variant openjdk11 conflicts openjdk13 openjdk15 openjdk17 description {Enable OpenJDK 11} {}
variant openjdk13 conflicts openjdk11 openjdk15 openjdk17 description {Enable OpenJDK 13} {}
variant openjdk15 conflicts openjdk11 openjdk13 openjdk17 description {Enable OpenJDK 15} {}
variant openjdk17 conflicts openjdk11 openjdk13 openjdk15 description {Enable OpenJDK 17} {}

if {![variant_isset openjdk11] && ![variant_isset openjdk13] && ![variant_isset openjdk15] && ![variant_isset openjdk16] && ![variant_isset openjdk17]} {
    default_variants +openjdk17
}

if {[variant_isset openjdk11]} {
    set jdk "openjdk11"
} elseif {[variant_isset openjdk13]} {
    set jdk "openjdk13"
} elseif {[variant_isset openjdk15]} {
    set jdk "openjdk15"
} elseif {[variant_isset openjdk17]} {
    set jdk "openjdk17"
}

depends_lib         port:qore \
                    port:${jdk}
