PortSystem                       1.0

name                             blib
version                          1.1.7
revision                         1
categories                       graphics blinkenlights
maintainers                      nomaintainer
description                      Library of useful things to hack the Blinkenlights
long_description                 This library contains some code that you will find useful if \
                                 you want to create any kind of software related to Blinkenlights. \
                                 If you have never heard about Blinkenlights, you want to check \
                                 the project's home page first.

depends_build                    port:pkgconfig
depends_lib                      lib:libglib.2:glib2
homepage                         http://www.blinkenlights.de/
master_sites                     http://www.blinkenlights.de/dist/
checksums                        blib-1.1.7.tar.gz md5 500d65f4d6c7e42c88663680336cb900

# Update config.guess and config.sub to be able to build on arm64.
depends_build-append    port:automake
post-patch {
    set automake_dirs [glob -directory ${prefix}/share automake-*]
    set automake_dir [lindex [lsort -command vercmp $automake_dirs] end]
    copy -force ${automake_dir}/config.guess ${automake_dir}/config.sub \
        ${worksrcpath}
}

configure.args                   --disable-directfb --disable-gtk \
                                 --disable-aa --disable-modules \
                                 --disable-maintainer-mode --disable-gtk-doc \
                                 --enable-shared=yes --enable-static=no \
                                 --mandir=${prefix}/share/man

default_variants                 +gtk

variant gtk {
        depends_lib-append        lib:libgtk.2:gtk2
        configure.args-delete    --disable-gtk
        configure.args-append    --enable-gtk
}

variant aa {
        depends_lib-append        lib:libaa:aalib
        configure.args-delete    --disable-aa
        configure.args-append    --enable-aa
}
