# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 79235 2011-06-06 02:11:48Z jeremyhu@macports.org $

PortSystem        1.0

name              awesome
version           3.4.10
categories        x11 x11-wm
maintainers       milosh openmaintainer
platforms         darwin

description       awesome is a tiling window manager
long_description  \
    awesome is a tiling window manager initially based on a dwm code\
    rewriting. It is extremely fast, small, dynamic and awesome.\
    Windows can be managed in several layouts: tiled, maximized and floating.\
    Each layout can be applied on the fly, optimizing the environment for the\
    application in use and the task performed.\
    awesome has the following features: very stable, no mouse needed,\
    multihead support, some real transparency support, some xrandr support, no\
    lua integration, no 9P support, no editable tagbars, no limits on its\
    source size, key, script and mouse bindings, etc.

homepage          http://awesome.naquadah.org
master_sites      ${homepage}/download/
use_bzip2         yes
checksums         md5     245087f8065867eff37a2133287d5c03 \
                  sha1    f3fb824623197aa70708c28ea3aa0c0665617016 \
                  rmd160  f64298c9865effca1730650142d2efe9be690dd3

depends_build \
	port:cmake

depends_lib \
	port:dbus \
	port:lua \
	path:lib/pkgconfig/glib-2.0.pc:glib2 \
	path:lib/pkgconfig/pango.pc:pango \
	path:lib/pkgconfig/cairo.pc:cairo \
	port:xorg-libxcb \
	port:xorg-xcb-util-image \
	port:xorg-xcb-util-keysyms \
	port:xorg-xcb-util-wm \
	port:xorg-randrproto \
	port:startup-notification \
	port:libxdg-basedir \
	port:ImageMagick \
	port:imlib2 \
	port:libev

build.target-append \
	CMAKE_ARGS="\
	-DCMAKE_INSTALL_PREFIX=${prefix} \
	-DPREFIX=${prefix} \
	-DAWESOME_DOC_PATH=${prefix}/share/doc/awesome \
	-DAWESOME_MAN_PATH=${prefix}/share/man \
	-DAWESOME_XSESSION_PATH=${prefix}/share/xsessions \
	-DSYSCONFDIR=${prefix}/etc \
	-DXDG_CONFIG_HOME=${prefix}/etc/xdg"

patchfiles \
	patch-CMakeLists.txt.diff \
	patch-upstream-xcb.diff

patch.pre_args    -p1

use_configure     no

variant doc description {Build man pages} {
    depends_build  \
	port:asciidoc \
	port:xmlto \
	port:doxygen
}

variant x11_xcb description {does nothing in this port, but its presence triggers cairo x11_xcb variant} {}

default_variants +x11_xcb
