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

name                QJson4
github.setup        eteran qjson4 fceaaf0786a924966cfaba7b23a95742a0a6b547
version             2024.01.16
categories          devel
maintainers         nomaintainer
license             GPL-2

description         Qt4 library providing an API compatible with Qt5 JSON implementation
long_description    {*}${description}

checksums           rmd160  4a0c70ea301facb4ea1624b3a733e9f9b560e228 \
                    sha256  70e556e70c3a1e56337530fa4aebade364c080074158c8939cd8b0e29d01fa13 \
                    size    19771
github.tarball_from archive

patchfiles          0001-Fix-building-library.patch

post-patch {
    reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/QJson4.pro
}

post-destroot {
    set incdir ${destroot}${prefix}/include/${name}
    xinstall -d ${incdir}
    foreach h [glob ${worksrcpath}/*.h] {
        xinstall -m 0644 -W ${worksrcpath} ${h} ${incdir}
    }
}
