# -*- 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
# $Id: Portfile 120087 2014-05-15 04:08:01Z devans@macports.org $

PortSystem      1.0

name            gnome-desktop
version         3.12.2
set branch      [join [lrange [split ${version} .] 0 1] .]
maintainers     devans openmaintainer
categories      gnome
license         LGPL-2+
platforms       darwin
description     gnome-desktop contains the libgnome-desktop library, the gnome-about \
                program as well as some desktop-wide documents.

long_description \
                ${description} The libgnome-desktop library provides API shared \
                by several applications on the desktop, but that cannot live \
                in the platform for various reasons. Documentation for the API \
                is available with gtk-doc.

homepage        http://www.gnome.org/
master_sites    gnome:sources/${name}/${branch}/

use_xz          yes

checksums       rmd160  9f801d21dec8b84d467e5a13206f568efd824210 \
                sha256  b7d691363ccc90182caff1980efa7d99e4569bea968d39654102a0c4e824a44d

depends_build   port:pkgconfig \
                port:intltool \
                port:gnome-common \
                port:gtk-doc

depends_lib     port:desktop-file-utils \
                port:gsettings-desktop-schemas \
                path:share/themes/HighContrast/index.theme:gnome-themes-standard \
                port:gtk3 \
                port:gobject-introspection \
                port:iso-codes \
                port:xorg-libXext \
                port:xorg-libXrandr \
                port:xkeyboard-config \
                port:xorg-libxkbfile

patchfiles      patch-gnome-desktop-Makefile.am.diff \
                patch-libgnome-destktop-libgsystem.diff

# update m4/intltool.m4 and autoreconf

pre-configure {
    copy -force ${prefix}/share/aclocal/intltool.m4 ${worksrcpath}/m4
}

use_autoreconf  yes
autoreconf.args -fvi

configure.args  --enable-introspection=no \
                --disable-maintainer-mode \
                --disable-silent-rules \
                --disable-desktop-docs \
                --with-gnome-distributor=MacPorts \
                --x-includes=${prefix}/include \
                --x-libraries=${prefix}/lib

#
#  portions of this port are strictly X11 specific
#  so a +quartz build is not possible (fails in configure if X11 is absent)
#

post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}

livecheck.type  gnome
