# -*- 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                djvulibre
version             3.5.28
revision            3
categories          graphics www
license             GPL-2+
maintainers         {nicos @NicosPavlov} openmaintainer

description         Web centric format and software platform for distributing \
                    documents and images.
long_description    DjVu can advantageously replace PDF, PS, TIFF, JPEG, and GIF for \
                    distributing scanned documents, digital documents, or high-\
                    resolution pictures. DjVu content downloads faster, displays \
                    and renders faster, looks nicer onscreen and consumes fewer \
                    client resources than competing formats.

homepage            http://djvu.sourceforge.net/
master_sites        sourceforge:project/djvu/DjVuLibre/3,5,28

#Upstream patch for handling UTF8 paths on Mac (ticket #34827)
#patchfiles          patch-ByteStream.diff

checksums           rmd160  4656d10fa83dfb73998b00eeba2170059bd06d19 \
                    sha256  82e392a9cccfee94fa604126c67f06dbc43ed5f9f0905d15b6c8164f83ed5655 \
                    size    3262159

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

patchfiles          patch-noconvert.diff
 
# Teach glibtool about -stdlib=libc++
use_autoreconf  yes
autoreconf.args -fvi

configure.args      --mandir=${prefix}/share/man \
                    --enable-threads \
                    --enable-shared \
                    --enable-xmltools \
                    --disable-desktopfiles \
                    --disable-silent-rules

livecheck.regex      /${name}-(\[0-9.\]+)${extract.suffix}
