# -*- 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 107727 2013-07-04 18:07:36Z ryandesign@macports.org $

PortSystem      1.0

name            libwnck
version         2.30.7
revision        4
set branch      [join [lrange [split ${version} .] 0 1] .]
maintainers     nomaintainer
categories      gnome
platforms       darwin
license         LGPL-2+
description     Library used for writing pagers and taskslists.

long_description \
    libwnck is a Window Navigator Construction Kit, i.e. a library \
    to use for writing pagers and taskslists and stuff.  It is \
    needed for the GNOME 2.0 desktop.

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

checksums       sha256  8be84d5333f0ade0e61af9f4cbf7685cb7cce2aa0ee32f53bac32107a81fe194

depends_build   port:pkgconfig \
                port:intltool \
                port:gnome-doc-utils

depends_lib     port:startup-notification \
                port:gobject-introspection \
                port:gtk2 \
                port:xorg-libXres

pre-fetch {
    if {![file exists $prefix/lib/libgdk-x11-2.0.dylib]} {
        ui_error "gtk2 must be installed with +x11 variant enabled."
        error "gtk2 must be installed with +x11 variant."
    }
}

configure.args  --x-includes=${prefix}/include \
                --x-libraries=${prefix}/lib \
                --enable-introspection \
                --disable-silent-rules

# gobject-introspection uses g-ir-scanner, which uses $CC from env
build.args-append       CC="${configure.cc} ${configure.cc_archflags}"

# The rules enabled by gobject-introspection require GNU make 3.81+
platform darwin 8 {
    depends_build-append    port:gmake
    build.cmd               ${prefix}/bin/gmake
}

livecheck.type  gnome
