# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           meson 1.0

github.setup        hughsie libxmlb 0.3.27
revision            0
categories          devel
license             LGPL-2.1
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer

description         Library to help create and query binary XML blobs
long_description    {*}${description}

checksums           rmd160  629a120fbf5da98c03e2d017a1d3980619d7f3bc \
                    sha256  e7a6d493e25b38a85fb3c46ec25be0b4eeae851a5ed1b850c8dd04e7c0a7cef8 \
                    size    135718
github.tarball_from archive

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    path:lib/pkgconfig/gobject-introspection-1.0.pc:gobject-introspection \
                    port:xz \
                    port:zstd

# cc1: error: unrecognized command line option "-fstack-protector-strong"
compiler.blacklist-append \
                    *gcc-4.0 *gcc-4.2 {clang < 700}

# fix :info:build Undefined symbols:
# :info:build   "___stack_chk_fail",
# with a solution from https://trac.macports.org/ticket/63469 on Tiger
platform darwin 8 {
    configure.ldflags-append -lssp
}

configure.args-append \
                    -Dcli=true \
                    -Dgtkdoc=false \
                    -Dintrospection=true \
                    -Dlzma=enabled \
                    -Dstemmer=false \
                    -Dtests=true \
                    -Dzstd=enabled

test.run            yes
