# -*- 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
PortGroup               legacysupport 1.0

github.setup            bbidulock blackboxwm 0.76
revision                0
checksums               rmd160  158989098ecda323ed1ac896e8dd747a822168c9 \
                        sha256  57af0e14487cdcf9dda50b54e5dda5849b30153f2784fd4dba8cebc394fc625e \
                        size    558554

name                    blackbox
categories              x11 x11-wm
license                 MIT
maintainers             nomaintainer

distname                ${name}-${version}
github.tarball_from     releases
use_lzip                yes

description             blackbox is a fast, light window manager
long_description        blackbox is that fast, light window manager you \
                        have been looking for without all those annoying \
                        library dependancies. If you have a C++ compiler \
                        and the X Window System you can compile and use it. \
                        This is a maintained fork of the original blackbox CVS \
                        that is on Sourceforge. It includes is all changes \
                        made on the official blackbox CVS repository on branch \
                        blackbox-0_70_2cvs, as well as patches collected from \
                        pdl-linux, Debian, the blackbox bug list, other \
                        GitHub forks. It also includes enhanced EWMH/ICCCM compliance.

depends_build-append    port:pkgconfig \
                        port:asciidoc \
                        port:gsed

depends_lib-append      port:Xft2 \
                        port:xorg-libXext \
                        port:libiconv \
                        port:gettext

# error: use of undeclared identifier 'strtoul'
compiler.blacklist-append { clang < 802 }

# error: expected primary-expression before ‘.’ token
compiler.blacklist-append *gcc-3.* *gcc-4.*

configure.args          --disable-dependency-tracking \
                        --disable-silent-rules \
                        --enable-shared \
                        --disable-rpath \
                        SED=${prefix}/bin/gsed

configure.cxxflags-append -Wno-format-security \
                          -std=c++98

# Unicode.cc:103:23: error: invalid conversion from 'char**' to 'const char**' [-fpermissive]
platform darwin 8 {
    configure.cxxflags-append -fpermissive
}

configure.ldflags-append  -lintl

patchfiles              patch-blackbox-menu-advance.diff \
                        dynamic_lookup-11.patch

if {${os.platform} eq "darwin" && ${os.major} < 10} {
    # https://trac.macports.org/ticket/61561
    patchfiles-append   lib_EWMH-include-stdlib.diff
}

notes "
new blackbox users may find this setup guide useful:
https://ubuntuforums.org/showthread.php?t=125084

and how to change windowmanagers:
https://fanf.livejournal.com/142372.html

"
