# -*- 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               java 1.0
PortGroup               github 1.0

github.setup            java-native-access jna 5.19.1
github.tarball_from     archive
revision                0
categories              java
license                 {LGPL-2.1+ Apache-2}
maintainers             nomaintainer
platforms               any
supported_archs         noarch

description             Access to native shared libraries with pure Java code

long_description        Java Native Access provides Java programs easy \
                        access to native shared libraries (DLLs on Windows) \
                        without writing anything but Java code - no JNI or \
                        native code is required.  This functionality is \
                        comparable to Windows' Platform/Invoke and Python's \
                        ctypes.  Access is dynamic at runtime without code \
                        generation.  JNA's design aims to provide native \
                        access in a natural way with a minimum of effort.  \
                        No boilerplate or generated code is required.  While \
                        some attention is paid to performance, correctness \
                        and ease of use take priority.

checksums               rmd160  e85225ca417c619d0e5e91f07bd292cae8628479 \
                        sha256  33a9e27b5a6eaa024bb117325392d1ccba7ca63f95d201230ad7c33d60f54c23 \
                        size    121713304

depends_build           bin:ant:apache-ant

java.version            9+
java.fallback           openjdk11

use_configure           no

build.cmd               ant
build.target            jar

destroot {
    set destdocdir  ${destroot}${prefix}/share/doc/${name}
    set destjavadir ${destroot}${prefix}/share/java

    xinstall -d ${destdocdir} ${destjavadir}

    xinstall -m 644 \
        ${worksrcpath}/AL2.0 \
        ${worksrcpath}/CHANGES.md \
        ${worksrcpath}/LGPL2.1 \
        ${worksrcpath}/LICENSE \
        ${worksrcpath}/OTHERS \
        ${worksrcpath}/README.md \
        ${destdocdir}

    xinstall -m 644 \
        ${worksrcpath}/build/${name}.jar \
        ${worksrcpath}/build/${name}-jpms.jar \
        ${destjavadir}
}
