# -*- 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 65634 2010-03-29 12:20:03Z milosh@macports.org $

PortSystem        1.0

name              awesome
version           3.4.4
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     8c2537ad898d7f58a0f3ba92e6a561a1 \
                  sha1    923355b2e34320c4265fba4906a5b923869b88a6 \
                  rmd160  7ff57a27ef69b35104dd2c753aaf65166e1087a0

depends_build \
	port:cmake

depends_lib \
	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-randrproto \
	port:startup-notification \
	port:libxdg-basedir \
	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

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
