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

# CLOCK_MONOTONIC
legacysupport.newest_darwin_requires_legacy 15

github.setup        XQuartz wayland 04654ba7b57ccbf583db899a327f8f7000f90546
version             2023.01.28
revision            1
categories          devel graphics
license             MIT
maintainers         nomaintainer
description         Core Wayland protocol and libraries
long_description    {*}${description}

checksums           rmd160  bb764639d4eeabf3f613196a53a400fb54a1e7b3 \
                    sha256  2d168e637a62350bbfc1535931d7e6d34893de30bb710c7d1bf87dc14eeeb38c \
                    size    351832
github.tarball_from archive

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

depends_lib-append  port:epoll-shim \
                    port:libffi \
                    port:libxml2

patch.pre_args-replace  -p0 -p1
patchfiles-append   0001-Darwin-fixes-from-owl-compositor.patch \
                    0002-wayland-os.c-LOCAL_PEERPID-may-not-be-defined.patch \
                    0003-os-wrappers-test-F_DUPFD_CLOEXEC-may-not-be-defined.patch

# stdatomic.h
compiler.c_standard 2011

configure.args-append \
                    -Ddocumentation=false \
                    -Ddtd_validation=true \
                    -Dlibraries=true \
                    -Dscanner=true \
                    -Dtests=true

test.run            yes

github.livecheck.branch darwin-portability
