# -*- 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                aalib
version             1.4rc5
revision            6
categories          graphics
license             LGPL
maintainers         nomaintainer

description         Portable ascii art GFX library
long_description    AA-lib is a low level gfx library just as many other \
                    libraries are. The main difference is that AA-lib does \
                    not require graphics device. In fact, there is no \
                    graphical output possible. AA-lib replaces those \
                    old-fashioned output methods with powerful ascii-art \
                    renderer. Now my linux boots with a nice penguin logo \
                    at secondary display (yes! Like Win95 does:) AA-lib API \
                    is designed to be similar to other graphics libraries. \
                    Learning a new API would be a piece of cake!

homepage            https://aa-project.sourceforge.net/aalib/
master_sites        sourceforge:aa-project freebsd

checksums           rmd160  a10bcab16d3aa0e60facca3e989f6a51846885f6 \
                    sha256  fbddda9230cf6ee2a4f5706b4b11e2190ae45f5eda1f0409dc4f99b35e0a70ee \
                    size    391028

worksrcdir          ${name}-1.4.0

configure.args      --enable-shared \
                    --disable-static \
                    --with-ncurses=${prefix} \
                    --without-x

patchfiles          aacurkbd.c-initialize-variables.patch \
                    aacurses.c-initialize-variables.patch \
                    aacurses.c-ncurses-6.5.patch \
                    aalib-config.in-libs.patch \
                    aalib.m4-underquoting.patch \
                    aarender.c-free-offset-pointer.patch \
                    aarender.c-missing-or-black-output.patch \
                    configure.in-underquoting.patch \
                    malloc.patch \
                    implicit.patch

depends_lib         port:ncurses

variant x11 {
        depends_lib-append  \
                    port:xorg-libX11
        configure.args-replace  --without-x \
                                --with-x
}

# We are patching configure.in and aalib.m4.
use_autoreconf      yes
autoreconf.args     -fvi

# Add 'a-z' to regex to match: '1.4rc5'
livecheck.regex     /${name}-(\[a-z0-9.\]+)${extract.suffix}
