# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem      1.0

name            libpgf
version         6.14.12
revision        2
categories      graphics
license         LGPL-2+
platforms       darwin
maintainers     nomaintainer
description     PGF image library

long_description \
    The Progressive Graphics File (PGF) is an efficient image file format, \
    that is based on a fast, discrete wavelet transform with progressive \
    coding features. PGF can be used for lossless and lossy compression.

homepage        http://www.libpgf.org/

master_sites    sourceforge:project/${name}/${name}/${version}-latest
distname        ${name}-src-${version}

depends_build   path:bin/doxygen:doxygen \
                path:bin/dot:graphviz \
                port:libtool \
                port:autoconf \
                port:automake

checksums \
    rmd160  8ac4922959c31bb02b406165499e82417d0f6b1d \
    sha256  bda5995d80762966a25fca3f6a9821f4458657aa87d8631c014c166ae09258eb

worksrcdir      ${name}

post-extract {
    reinplace "s/libtoolize/glibtoolize/" autogen.sh
    # DOS to UNIX line endings.
    reinplace "s|\r||g" ${worksrcpath}/configure.ac
}

pre-configure {
    system -W ${worksrcpath} ./autogen.sh
}

post-destroot {
    delete ${destroot}${prefix}/share/man
    move ${destroot}${prefix}/share/doc/${name}-${version} \
        ${destroot}${prefix}/share/doc/${name}
    copy ${worksrcpath}/COPYING \
        ${destroot}${prefix}/share/doc/${name}/
}
