# $Id: Portfile 51220 2009-05-21 06:21:21Z toby@macports.org $

PortSystem 1.0

name            figlet
version         2.2.2
categories      textproc amusements
maintainers     toby
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/
distname        ${name}[string map {"." ""} ${version}]

dist_subdir     ${name}/fix

checksums       md5 5f84ad52d092d5db4ad5916df767646b \
                sha1 9578892559cda95f076507299fb6d689c809ce42 \
                rmd160 58a3cca61639f07595df2dad4e8e505c639d02ad

patchfiles      patch-Makefile patch-figlet.6 patch-chkfont.c

configure {
    reinplace "s|__PREFIX__|${prefix}|" "${worksrcpath}/Makefile"
    reinplace "s|__CC__|${configure.cc}|" "${worksrcpath}/Makefile"
    reinplace "s|__CFLAGS__|${configure.cflags}|" "${worksrcpath}/Makefile"
}

destroot.destdir    DESTROOT=${destroot}

post-destroot {
    file attributes ${destroot}${prefix}/bin/figlist -permissions +x
    file attributes ${destroot}${prefix}/bin/showfigfonts -permissions +x
}
