# -*- 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            figlet
version         2.2.5
categories      textproc amusements
maintainers     {toby @tobypeterson}
license         BSD

description     banner-like program prints strings as ASCII art
long_description \
    FIGlet is a program for making large letters out of ordinary text
homepage        http://www.figlet.org/
platforms       darwin freebsd

master_sites    ftp://ftp.figlet.org/pub/figlet/program/unix/

checksums       rmd160  37abd6fc6ffdd7c0057850425640fe544278a2d9 \
                sha256  bf88c40fd0f077dab2712f54f8d39ac952e4e9f2e1882f1195be9e5e4257417d

patchfiles      patch-Makefile patch-figlet.6

use_configure   no

configure.cflags-append -Dunix

variant universal {}

post-patch {
    reinplace "s|__PREFIX__|${prefix}|" "${worksrcpath}/Makefile"
    reinplace "s|__CC__|${configure.cc}|" "${worksrcpath}/Makefile"
    reinplace "s|__CFLAGS__|${configure.cflags} [get_canonical_archflags cc]|" "${worksrcpath}/Makefile"
    reinplace "s|__LDFLAGS__|[get_canonical_archflags ld]|" "${worksrcpath}/Makefile"
}
