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

github.setup            async-profiler async-profiler 4.1 v
github.tarball_from     archive
revision                0

checksums               rmd160  51f200aa77e2d31f17c51bcbbe5d3a2bbf3ecf0a \
                        sha256  6f11022645000deb9dde4cf74c5bbdb5486554bb5fb968f03e77fa6d3610203a \
                        size    2406985

categories              java
platforms               macosx
supported_archs         arm64 x86_64
license                 Apache-2
maintainers             nomaintainer

description             Low overhead sampling profiler for Java
long_description        The profiler works with OpenJDK and other Java runtimes based on the HotSpot JVM. \
                        It features HotSpot-specific API to collect stack traces and to track memory allocations. \
                        Unlike traditional Java profilers, async-profiler monitors non-Java threads (e.g., GC and JIT compiler threads) \
                        and shows native and kernel frames in stack traces.

java.version            11+
java.fallback           openjdk11

patchfiles-append       patch-Makefile.diff

compiler.cxx_standard   2011

destroot {
    xinstall -m 755 ${worksrcpath}/build/bin/asprof ${destroot}${prefix}/bin/
    xinstall -m 755 ${worksrcpath}/build/bin/jfrconv ${destroot}${prefix}/bin/
    xinstall -m 755 ${worksrcpath}/build/lib/libasyncProfiler.dylib ${destroot}${prefix}/lib/
}
