PortSystem          1.0

name                fluxbox
version             1.3.7
revision            2
categories          x11 x11-wm
maintainers         nomaintainer
platforms           darwin freebsd
license             MIT

description         Lightweight window manager based on Blackbox 0.61.1
long_description    It's based on the Blackbox 0.61.1 code. Fluxbox \
                    looks like blackbox and handles styles, colors, \
                    window placement and similar thing exactly like \
                    blackbox (100% theme/style compatibility).

homepage            http://fluxbox.org
master_sites        sourceforge:project/fluxbox/fluxbox/${version}/
use_bzip2           yes

checksums           rmd160  efb8d458edf2b429fb2999eb184ab3aed6a54f7a \
                    sha256  d47a58edba857f3c36bf8430bbd17834693ad0e6aa431d3507039f022af7aee8 \
                    size    911098

depends_build       port:pkgconfig

depends_lib         port:imlib2 \
                    port:xorg-libsm \
                    port:Xft2 \
                    port:xorg-libXinerama \
                    port:xpm \
                    port:xorg-libXrandr \
                    port:xorg-libX11

patchfiles          patch-Makefile.in.diff

# https://trac.macports.org/ticket/56196
patchfiles-append   patch-fbtime-gettime.diff \
                    patch-fluxbox-remote.diff

# https://trac.macports.org/ticket/65979
patchfiles-append   patch-ewmh-static-cast.diff

configure.args      ac_cv_prog_regex_cmd="LC_CTYPE=C sed"

post-destroot {
    set docdir ${prefix}/share/doc/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS \
        COPYING \
        ChangeLog \
        NEWS \
        README \
        TODO \
        doc/CODESTYLE \
        ${destroot}${docdir}
}
