# -*- 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

PortSystem                      1.0

name                            minidjvu
version                         0.8
revision                        4
platforms                       darwin
maintainers                     {raphael @raphael-st} openmaintainer
license                         GPL-2
categories                      graphics
description                     A bitonal DjVu encoder/decoder
homepage                        http://${name}.sourceforge.net/
long_description                minidjvu is a command line utility which encodes and decodes \
                                single page black-and-white DjVu files, and can compress multiple \
                                pages, taking advantage from similarities between pages.

depends_lib                     port:tiff \
                                path:include/turbojpeg.h:libjpeg-turbo \
                                port:zlib

master_sites                    sourceforge

checksums                       md5     b354eb74d83c6e2d91aab2a6c2879ba7 \
                                sha1    23835f73bc3580b72c6afe1f77feaf1e2611e714 \
                                rmd160  a89bc883f4ffa9fbb53988c6d27f80880089a973

patchfiles                      patch-Makefile.in.diff
if {${os.platform} eq "darwin" && [vercmp ${os.version} 10] < 0} {
    patchfiles-append           patch-configure.ac.diff
    use_autoconf                yes
}

use_parallel_build              no

post-destroot {                 set docdir ${destroot}${prefix}/share/doc/${name}
                                xinstall -d ${docdir}
                                xinstall -m 644 -W ${worksrcpath} \
                                    COPYING \
                                    NEWS \
                                    README \
                                    ${docdir}
                                xinstall -d ${docdir}/html
                                xinstall -m 644 -W ${worksrcpath}/doc \
                                    decode.html \
                                    encode.html \
                                    tifftodjvu_help.html \
                                    ${docdir}/html
}

livecheck.type                  regex
livecheck.url                   http://sourceforge.net/projects/${name}/files/
livecheck.regex                 ${name}-(\[0-9.\]+)\\.tar
