# -*- 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

name                    herbstluftwm
version                 0.6.2
categories              x11 x11-wm
platforms               darwin
license                 BSD
maintainers             {cal @neverpanic} openmaintainer

description             herbstluftwm is a very configurable tiling window manager
long_description        \
    herbstluftwm is a tiling window manager written from scratch supporting \
    tags, multiple monitors and a flexible configuration.

notes "In order to run herbstluftwm, you need to run the following commands as your user:
    mkdir -p ~/.config/herbstluftwm
    cp ${prefix}/etc/xdg/herbstluftwm/autostart ~/.config/herbstluftwm/autostart
To make herbstluftwm your default X11 window manager, create a file named
herbstluftwm.sh in your ~/.xinitrc.d directory with the following contents:
    USERWM=${prefix}/bin/herbstluftwm"

homepage                http://wwwcip.cs.fau.de/~re06huxa/herbstluftwm/
master_sites            ${homepage}/tarballs/

checksums               rmd160  dd6303e34c5ac72b712dce375922289844919f40 \
                        sha256  a89f5c397aee7f1aa3b39dd53bc67e282679f02f1c0bf3c33c41a608e217f0ac

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

patchfiles              config.patch

depends_build           bin:a2x:asciidoc \
                        port:pkgconfig

depends_lib             path:lib/pkgconfig/glib-2.0.pc:glib2 \
                        port:xorg-libX11 \
                        port:xorg-libXinerama

# declare universal variant, so get_canonical_archflags works
variant universal       {}

use_configure           no
build.env-append        PKG_CONFIG_PATH=${prefix}/lib/pkgconfig \
                        "CFLAGS=${configure.cflags} [get_canonical_archflags]" \
                        "LDFLAGS=${configure.ldflags} [get_canonical_archflags]"

build.args-append       CC=${configure.cc} \
                        LD=${configure.cc} \
                        COLOR=0 \
                        VERBOSE=

destroot.args-append    PREFIX=${prefix} \
                        SYSCONFDIR=${prefix}/etc/ \
                        COLOR=0 \
                        VERBOSE=