# -*- 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 84223 2011-09-21 00:58:17Z snc@macports.org $

PortSystem          1.0

name                potrace
version             1.9
revision            1
categories          graphics
maintainers         nomaintainer
# GPL-2 or GPL-2+ at our option
license             {GPL-2 GPL-2+}
platforms           darwin

description         Transform bitmaps into vector graphics

long_description    Potrace is a utility for tracing a bitmap, which means, \
                    transforming a bitmap into a smooth, scalable image. \
                    The input is a bitmap (PBM, PGM, PPM, or BMP), and the \
                    default output is one of several vector file formats. A \
                    typical use is to create EPS files from scanned data, \
                    such as company or university logos, handwritten notes, \
                    etc. The resulting image is not "jaggy" like a bitmap, \
                    but smooth. It can then be rendered at any resolution.

homepage            http://potrace.sourceforge.net/
master_sites        sourceforge

checksums           sha1    c3ace609c24a0d5e03bbab5f22478c2af69cf1c4 \
                    rmd160  a8e35a216684b5ac7cf2753c31023bee397179eb

depends_lib         port:zlib

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS COPYING ChangeLog NEWS README \
        ${destroot}${prefix}/share/doc/${name}
}

variant metric_default \
    description {compile potrace with centimeters as the default unit \
        instead of inches.} { \
    configure.args-append   --enable-metric
}

variant a4_default \
    description {compile potrace with A4 as the default page size.} { \
    configure.args-append   --enable-a4
}
