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

github.setup        fvwmorg fvwm 2.6.9
revision            0
github.tarball_from releases
# consider renaming this to fvwm
name                fvwm2
categories          x11 x11-wm
license             GPL-2+
platforms           darwin
maintainers         nomaintainer

description         Version 2.x of FVWM, an X11 window manager.
long_description    FVWM 2.x is an extremely powerful ICCCM-compliant multiple \
                    virtual desktop window manager for the X Window system.

checksums           rmd160  6a3a554f94773c559ebc5284d00b4297491f3131 \
                    sha256  1bc64cf3ccd0073008758168327a8265b8059def9b239b451d6b9fab2cc391ae \
                    size    3942859

depends_build-append    port:pkgconfig \
                        port:libxslt

depends_lib-append  port:xorg-libsm \
                    port:xorg-libXinerama \
                    port:xorg-libXcursor \
                    port:xpm \
                    port:Xft2 \
                    port:libpng \
                    port:librsvg \
                    port:readline

configure.args      --x-includes=${prefix}/include \
                    --x-libraries=${prefix}/lib \
                    --disable-bidi \
                    --disable-nls \
                    --with-ncurses-library=yes \
                    --without-rplay-library \
                    --without-stroke-library

variant bidi description {Enable support for bidirection text handling} {
    configure.args-delete --disable-bidi
    depends_lib-append port:fribidi
}

notes "
If this is your first install of an alternative WM, these steps
may be helpful:
    $ mkdir ~/.xinitrc.d
    $ cat >~/.xinitrc.d/99-wm.sh
    #!/bin/sh
    exec fvwm
    ^D
    $ chmod +x ~/.xinitrc.d/99-wm.sh
    $ open /Applications/MacPorts/X11.app
"