# -*- 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
PortGroup           yelp 1.0

# as of version 3.21.4 requires C++11 to build
compiler.cxx_standard 2011

name                gnome-sudoku
version             3.26.0
license             GPL-2+
set branch          [join [lrange [split ${version} .] 0 1] .]
description         Sudoku is a Japanese logic game that exploded in popularity in 2005.
long_description    ${description}
maintainers         {devans @dbevans} openmaintainer
categories          gnome games
platforms           darwin
homepage            https://wiki.gnome.org/Apps/Sudoku
master_sites        gnome:sources/${name}/${branch}/

use_xz              yes

checksums           rmd160  dce5ebc7c84381efcdffd9a7b846b7ca623a7c84 \
                    sha256  8774c7093a97131b94d39142f1e044c8619cfdb6ad2546176271589fbb12d3a0

depends_build       port:pkgconfig \
                    port:itstool \
                    port:yelp-tools \
                    port:appstream-glib

depends_lib         port:desktop-file-utils \
                    path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \
                    path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                    port:json-glib \
                    port:libgee \
                    port:qqwing

depends_run         port:adwaita-icon-theme

# use autoreconf to regenerate configure with a valid time stamp
# configure is post-dated by about 12 hours causing sanity check
# to fail

use_autoreconf      yes
autoreconf.args     -fvi

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

post-activate {
   system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
   system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
   system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
}

livecheck.type      gnome