# -*- 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                abclock
version             1.0d
revision            3
categories          x11
license             GPL-2+
maintainers         nomaintainer
description         analog clock for X
long_description    \
    Analogue Bitmap Clock displays the current time with \
    hours and minutes in an analogue fashion but unlike \
    the traditional clock\; unlike ordinary analogue clocks, \
    this design is clear even in very small bitmaps.
homepage            https://www.let.rug.nl/kleiweg/abclock/
platforms           darwin
master_sites        ${homepage}

checksums           rmd160  a49681af06d0554436545f2ad0d2401f8763505a \
                    sha256  8f925f897b04212e24258226e17722fec3bee361dc158e5a9993467fbd44e816 \
                    size    18252

patch {
    reinplace "s|#include <values.h>||" ${worksrcpath}/abclock.c
}
use_configure       no
variant universal   {}
build.target        all
build.args          CC=${configure.cc} XLIBDIR="-L${prefix}/lib" \
                    XINCLUDEDIR="-I${prefix}/include" \
                    OPT="${configure.cflags} [get_canonical_archflags cc]"
destroot {
    xinstall -m 755 ${worksrcpath}/abclock ${destroot}${prefix}/bin
    xinstall -m 755 ${worksrcpath}/abc_img ${destroot}${prefix}/bin
}

depends_lib         port:xorg-libX11

livecheck.regex    ${name}-(\\d+(?:\\.\\d+)*\[a-z\])
