# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0

name            lout
version         3.38
categories      textproc
platforms       darwin freebsd
maintainers     gmail.com:ggreif
description     A text formatting system similar to TeX, but simpler
long_description \
    Lout is a text-formatting system and a purely functional programming    \
    language. It outputs PostScript directly, achieving high quality        \
    printouts in one step.

homepage        http://lout.sourceforge.net/
master_sites    http://www.ctan.org/tex-archive/support/lout/ \
                ftp://ftp.it.usyd.edu.au/jeff/lout/

checksums       md5     388ed456cfcb493ca706677688ec5dde \
                sha1    2c4aec500dc27a00298f8265b9249d74d97e5466 \
                rmd160  8835b223f67b383bdbb1d4105a28e002745d4dbb

depends_build   port:zlib

use_configure   no

use_parallel_build  yes
build.args          PREFIX=${prefix} \
                    LOUTLIBDIR=${prefix}/share/lout \
                    PDF_COMPRESSION=1 \
                    ZLIB=${prefix}/lib/libz.a \
                    ZLIBPATH=-I${prefix}/include \
                    USESTAT=1 \
                    COLLATE=1

set docdir          ${prefix}/share/doc/${name}-${version}

destroot.target     allinstall
destroot.destdir    PREFIX=${destroot}${prefix}
destroot.args       LOUTLIBDIR=${destroot}${prefix}/share/lout \
                    LOUTLIB=${destroot}${prefix}/share/lout \
                    MANDIR=${destroot}${prefix}/share/man/man1 \
                    LOUTDOCDIR=${destroot}${docdir}

pre-destroot {
    xinstall -d ${destroot}${docdir}
}

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     ${name}-(\\d+(?:\\.\\d+)*)
