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

github.setup        hyprwm hyprutils 0.13.1 v
revision            0
categories          devel
license             BSD
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
description         C++ library for utilities used across the Hypr* ecosystem
long_description    ${name} is a small {*}${description}.
checksums           rmd160  6211dcb83e424380645aa278ef52f211b53bcd53 \
                    sha256  480ee026105deea64a24eb96d80cabe54b357594ce36cb05c021ea226c69aede \
                    size    60796
github.tarball_from archive

# https://github.com/hyprwm/hyprutils/pull/50
patchfiles-append   0001-FileDescriptor-provide-fallback-if-F_DUPFD_CLOEXEC-i.patch
# The code is unaware of gcc's dual C++ ABI.
patchfiles-append   patch-Logger.cpp.diff

depends_build-append \
                    path:bin/pkg-config:pkgconfig
depends_lib-append  port:libpixman

compiler.cxx_standard       2026
compiler.blacklist-append   {clang} {macports-clang-1[1-9]}
if {${configure.cxx_stdlib} eq "libc++"} {
    compiler.blacklist-append \
                            macports-gcc-13
}

configure.pre_args-replace \
                    -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
                    -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF

test.run            yes
