# -*- 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           meson 1.0
PortGroup           gobject_introspection 1.0

name                libosinfo
version             1.12.0
revision            3

categories          sysutils gnome
license             LGPL-2.1+
maintainers         {danchr @danchr} openmaintainer

description         The Operating System information database
long_description    {*}${description}

homepage            https://libosinfo.org
master_sites        https://releases.pagure.org/libosinfo/

checksums           rmd160  f6fedadcae4e1f0465701436089a9589c4d7937b \
                    sha256  ad8557ece26793da43d26de565e3d68ce2ee6bfb8d0113b7cc7dfe07f6bfc6b6 \
                    size    307984

use_xz              yes

depends_build       path:bin/vala:vala \
                    port:gtk-doc \
                    port:gettext \
                    path:bin/pkg-config:pkgconfig

depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    path:lib/pkgconfig/libsoup-3.0.pc:libsoup \
                    port:gettext-runtime \
                    port:libxml2 \
                    port:libxslt

depends_run         port:hwdata \
                    port:osinfo-db

license_noconflict  vala

# Undefined symbols: "___gcc_personality_v0", "__Unwind_Resume"
patchfiles-append   patch-unbreak-linking.diff \
                    patch-fix-build.diff

gobject_introspection   yes

compiler.blacklist-append *gcc-4.* {clang < 400}

pre-configure {
    configure.args-replace  -Dintrospection=enabled \
                            -Denable-introspection=enabled
}

# https://gitlab.com/libosinfo/libosinfo/-/issues/59
configure.args-append \
                    -Dwith-pci-ids-path=${prefix}/share/hwdata/pci.ids \
                    -Dwith-usb-ids-path=${prefix}/share/hwdata/usb.ids
