# -*- 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           legacysupport 1.1
PortGroup           cmake 1.1

github.setup        quickjs-ng quickjs 0.15.1 v
github.tarball_from archive
revision            0
name                ${github.author}
categories          devel
homepage            https://quickjs-ng.github.io/quickjs/m
license             MIT
conflicts           ${github.project} ${github.project}-devel
maintainers         {i0ntempest @i0ntempest} openmaintainer

description         a small, embeddable, but mighty JavaScript engine
long_description    ${name} is a small and embeddable JavaScript engine. It aims to support\
                    the latest ECMAScript specification.

checksums           rmd160  8f1475e4343424823871e3c653e90b89aadf3c04 \
                    sha256  c4e813951b7c46845096a948e978c620b11ab4cf5fd622ca09c727ec31f42623 \
                    size    847869

# _clock_gettime
legacysupport.newest_darwin_requires_legacy \
                    15

compiler.c_standard 2011
# fatal error: 'stdatomic.h' file not found
compiler.blacklist-append \
                    {clang < 700}

post-destroot {
    xinstall -d ${destroot}${prefix}/lib/pkgconfig
    xinstall -m 0644 ${filespath}/${github.project}.pc ${destroot}${prefix}/lib/pkgconfig
    reinplace "s|@@PREFIX@@|${prefix}|" ${destroot}${prefix}/lib/pkgconfig/${github.project}.pc
    reinplace "s|@@VERSION@@|${version}|" ${destroot}${prefix}/lib/pkgconfig/${github.project}.pc
}
