# $Id: Portfile 83507 2011-09-03 20:19:25Z rmstonecipher@macports.org $

PortSystem 1.0

name            lout
version         3.39
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://savannah.nongnu.org/projects/lout/
master_sites    http://www.ctan.org/tex-archive/support/lout/ \
                ftp://ftp.it.usyd.edu.au/jeff/lout/

checksums           md5     151e1fba676c7052936ccc1bcd9663a9 \
                    sha1    ab2c982d7e235b132aaae05f28af1795df2d1c71 \
                    rmd160  5bc6f8dad43bdf0262fa36c4f6b3a570bc0c3d6b

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+)*)
