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

name                at-spi2-core
# you probably want to keep this at the same version as at-spi2-atk
version             2.44.1

categories          gnome
license             LGPL
maintainers         {mascguy @mascguy} openmaintainer
description         Gnome Accesibility Technology Service
long_description    'at-spi' is a part of the Gnome Accessibility Project.  It provides a \
                    Service Provider Interface for the Assistive Technologies available on \
                    the GNOME platform, and a library against which applications can be linked.
homepage            http://a11y.org/

set branch          [join [lrange [split ${version} .] 0 1] .]
master_sites        gnome:sources/${name}/${branch}/
use_xz              yes

# Disable unexpected download of subprojects
meson.wrap_mode     nodownload

checksums           rmd160  86db943d67b2bbb1365b018b67f25a958c79597c \
                    sha256  4beb23270ba6cf7caf20b597354d75194d89afb69d2efcf15f4271688ba6f746 \
                    size    209780

depends_build-append \
                    port:pkgconfig \
                    port:gettext \
                    port:gtk-doc

depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:dbus \
                    path:lib/pkgconfig/gobject-introspection-1.0.pc:gobject-introspection \
                    port:xorg-libX11 \
                    port:xorg-libXi \
                    port:xorg-libXtst

configure.args      -Ddocs=true \
                    -Dintrospection=yes \
                    -Dx11=yes

# uses g-ir-scanner, which uses $CC from env
if {${universal_possible} && [variant_isset universal]} {
    foreach arch ${configure.universal_archs} {
        lappend merger_build_env(${arch})  "CC=${configure.cc} -arch ${arch}"
        lappend merger_destroot_env(${arch})  "CC=${configure.cc} -arch ${arch}"
    }
} else {
    build.env-append       "CC=${configure.cc} ${configure.cc_archflags}"
    destroot.env-append    "CC=${configure.cc} ${configure.cc_archflags}"
}

platform darwin 8 {
    # meson on Tiger cannot use rpaths, so we workaround with this to find dylib
    destroot.env-append    "DYLD_LIBRARY_PATH=${build_dir}/atspi"
}

livecheck.type      none
