# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           active_variants 1.1
PortGroup           cmake 1.1
PortGroup           lua 1.0

name                awesome
version             3.5.6
revision            2
categories          x11 x11-wm
maintainers         nomaintainer
license             GPL-2+

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            https://awesomewm.org/
master_sites        https://github.com/awesomeWM/awesome-releases/raw/master/
use_xz              yes

checksums           rmd160  87f834bd4c9b133dce991678c017d5bb4a5bfee1 \
                    sha256  37f49de187825425cb3096fc870959d5fec9302b22ffd0f2874d8a18e85046d7 \
                    size    720112

depends_build       path:bin/cmake:cmake \
                    port:ImageMagick \
                    port:pkgconfig

depends_lib         path:bin/dbus-daemon:dbus \
                    path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \
                    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-libXcursor \
                    port:xorg-xcb-util-cursor \
                    port:xorg-xcb-util-image \
                    port:xorg-xcb-util-keysyms \
                    port:xorg-xcb-util-wm \
                    port:xorg-xorgproto \
                    port:startup-notification \
                    port:libxdg-basedir \
                    port:imlib2 \
                    port:libev

# awesomeConfig.cmake uses FindLua51 module
lua.version         5.1
lua.modules         lgi

require_active_variants path:lib/pkgconfig/cairo.pc:cairo x11

configure.args-append \
                    -DGENERATE_MANPAGES=OFF \
                    -DCOMPRESS_MANPAGES=OFF \
                    -DGENERATE_DOC=OFF \
                    -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-awesomerc.lua.in.diff

variant doc description {Build man pages} {
    depends_build-append \
                    port:asciidoc \
                    port:xmlto \
                    path:bin/doxygen:doxygen \
                    path:bin/dot:graphviz

    configure.args-delete \
                    -DGENERATE_MANPAGES=OFF
}

livecheck.type      regex
livecheck.url       ${homepage}download/
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
