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

name            gnome
version         3.26.2
license         Permissive
categories      gnome
platforms       any
supported_archs noarch
maintainers     {devans @dbevans} openmaintainer
description     The GNOME Desktop mega-port.

long_description \
                GNOME is a complete, free and easy-to-use desktop environment for users, \
                as well as a powerful application development framework for software developers.

homepage        https://www.gnome.org/
master_sites
depends_lib     port:desktop-file-utils \
                path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                port:shared-mime-info \
                port:gnome3-core \
                port:gnome3-apps

distfiles
use_configure   no
build           { }

destroot    {
    file mkdir ${destroot}${prefix}/share/doc
    system "echo ${long_description} > ${destroot}${prefix}/share/doc/README.${name}.txt"
}

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

variant office description {Include GNOME office applications} {
    depends_lib-append port:gnumeric \
                       port:abiword-x11 \
                       port:dia \
                       port:planner
}

variant graphics description {Include GNOME graphics applications} {
    depends_lib-append path:bin/inkscape:inkscape \
                       port:gimp
}

livecheck.type  none
