# -*- 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 55194 2009-08-07 12:01:25Z snc@macports.org $

PortSystem        1.0

name              awesome
version           2.0
revision          2
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/
checksums         md5  b3e245bd9b8c05b759cc0acbec9f6a29 \
                  sha1 7a3257e7a76f9d77bd59558aa8393f2bed50057f \
                  rmd160  3a3a7014a11915f316bfce9ce5a2a606a057363a

depends_build \
	port:pkgconfig

depends_lib \
        port:xorg-libXext \
        port:Xft2 \
        port:xorg-libXinerama \
        port:xorg-libXrandr \
        path:lib/pkgconfig/cairo.pc:cairo \
        port:libconfuse

patchfiles        patch-config.mk.diff patch-Makefile.diff
post-patch      {
        reinplace "s|/opt/local|${prefix}|" ${worksrcpath}/config.mk
	reinplace "s|CFLAGS =|CFLAGS = \$(UNIV_FLAGS)|" ${worksrcpath}/config.mk
	reinplace "s|LDFLAGS =|LDFLAGS = \$(UNIV_FLAGS)|" ${worksrcpath}/config.mk
}

use_configure     no

variant doc description {Build man pages} {
    depends_build     port:asciidoc port:xmlto
    destroot.target   install install-man
    build.target      all man
}

variant universal {
	build.target-append UNIV_FLAGS="${configure.universal_cflags}"
}
