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

# system_info(29955) malloc: *** error for object 0xa00a6754: pointer being freed was not allocated
legacysupport.redirect_bins live_monitor system_info

github.setup        lfreist hwinfo f71ee147222e9b6d31cac7c079a8a390035cb7b2
version             2026.07.01
revision            0
categories          sysutils
license             MIT
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
description         Easy-to-use and modern C++ API for retrieving hardware \
                    information of your systemʼs components
long_description    {*}${description}
checksums           rmd160  9dea4653a08e2c57503b0cff7ae5860f93f685fd \
                    sha256  c714d814b29b8c23047a60fb23ca9193eec20fa725c83d8adbf804a93cf25cf7 \
                    size    735307
github.tarball_from archive

patchfiles          patch-apple-ram.diff

set libfmt_v        12
cmake.prefix_path-append \
                    ${prefix}/lib/libfmt${libfmt_v}/cmake

depends_lib-append  port:libfmt${libfmt_v}

compiler.cxx_standard   2020

# Otherwise tests cannot find dylibs.
configure.pre_args-replace \
                    -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
                    -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF

# FIXME: tests pass on PowerPC, but some info is missing.
# See: https://github.com/lfreist/hwinfo/issues/26
test.run            yes
test.cmd            ctest
