# -*- 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
# $Id: Portfile 57393 2009-09-10 15:12:49Z snc@macports.org $

PortSystem          1.0

name                sketch
version             0.2.161
categories          tex
maintainers         snc openmaintainer
description         2D and 3D drawings with LaTeX output.
long_description    \
    Sketch is a small, simple system for producing line drawings of two- or \
    three-dimensional objects and scenes.  Sketch accepts a tiny scene \
    description language and generates PSTricks or TikZ/PGF code for LaTeX.
homepage            http://www.frontiernet.net/~eugene.ressler/

platforms           darwin
depends_run         bin:latex:texlive

master_sites        ${homepage}
checksums           md5     459532b00121140a168231023fca59e5 \
                    sha1    fdfd857e9a4c93f8a44025ada68009a83ec68c19 \
                    rmd160  e61a069a24ab856901132ae79e82aba0d35420c0

extract.suffix      .tgz

use_configure       no

build.target        sketch

destroot {
    xinstall ${worksrcpath}/sketch ${destroot}${prefix}/bin
    xinstall ${worksrcpath}/Doc/sketch.info ${destroot}${prefix}/share/info
    xinstall -d ${destroot}${prefix}/share/sketch/doc
    xinstall ${worksrcpath}/Doc/sketch.pdf ${destroot}${prefix}/share/sketch/doc
    eval xinstall [ glob ${worksrcpath}/Doc/sketch/* ] \
        ${destroot}${prefix}/share/sketch/doc
    xinstall -d ${destroot}${prefix}/share/sketch/examples
    eval xinstall [ glob ${worksrcpath}/Data/* ] \
        ${destroot}${prefix}/share/sketch/examples
}

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