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

set my_name     pangomm
name            ${my_name}
conflicts       ${my_name}-devel
version         2.56.2
revision        0

# some build files are GPL-2+ but they are not installed
license         LGPL-2.1+
categories      x11 devel
maintainers     {devans @dbevans} {mascguy @mascguy} openmaintainer

description     C++ interface to Pango
long_description \
                ${my_name} is the official C++ interface for the Pango text layout library.
homepage        http://www.gtkmm.org

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

checksums       rmd160  64c513f8607591bc3cf12f2bdb6f96ff17dea586 \
                sha256  f1e984c85a85b6a0e61616366521f51dd8282a072bb45d15b5084762b62f4c0e \
                size    784648

# Disable unexpected download of subprojects
meson.wrap_mode nodownload

depends_build-append \
                port:mm-common \
                path:bin/pkg-config:pkgconfig

depends_lib-append \
                path:lib/pkgconfig/cairomm-1.16.pc:cairomm \
                path:lib/pkgconfig/glibmm-2.68.pc:glibmm \
                path:lib/pkgconfig/harfbuzz.pc:harfbuzz \
                port:libsigcxx3 \
                path:lib/pkgconfig/pango.pc:pango

compiler.cxx_standard 2017

configure.args-append \
                -Dbuild-documentation=false

# dummy variants to ensure that this port gets rebuilt if
# the corresponding variants for pango change
variant x11 {}
variant quartz {}

default_variants +x11 +quartz

if {[variant_isset x11]} {
    require_active_variants path:lib/pkgconfig/cairomm-1.0.pc:cairomm x11
    require_active_variants path:lib/pkgconfig/pango.pc:pango x11
}

if {[variant_isset quartz]} {
    require_active_variants path:lib/pkgconfig/cairomm-1.0.pc:cairomm quartz
    require_active_variants ath:lib/pkgconfig/pango.pc:pango quartz
}

livecheck.type  gnome
livecheck.name  ${my_name}
