# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                gnome-font-viewer
version             3.24.0
revision            1
license             GPL-2
set branch          [join [lrange [split ${version} .] 0 1] .]
description         GNOME font viewer and thumbnailer.
long_description    GNOME font viewer can preview fonts and create thumbnails for fonts.

maintainers         {devans @dbevans} openmaintainer
categories          gnome
platforms           darwin
homepage            https://www.gnome.org
master_sites        gnome:sources/${name}/${branch}/

use_xz              yes

checksums           rmd160  87d74cd28b025419f758f06c32e762fd8af75181 \
                    sha256  f3658216a744603fd2100d60de7b31062e014f02333e8433dcaf6a3bb4b7dc76

depends_build       port:pkgconfig \
                    port:intltool \
                    port:gnome-common \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib         port:desktop-file-utils \
                    port:gsettings-desktop-schemas \
                    path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                    port:gnome-desktop \
                    port:fontconfig \
                    port:freetype

depends_run         port:adwaita-icon-theme

# reconfigure using upstream autogen.sh for intltool 0.51 compatibility

post-patch {
    xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath}
}

configure.cmd       ./autogen.sh

configure.args      --disable-schemas-compile \
                    --disable-silent-rules

# port installs desktop application file
post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}

livecheck.type      gnome
