# -*- 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 64763 2010-03-15 16:31:33Z nox@macports.org $

PortSystem 1.0

name            djvulibre
version         3.5.22
revision        3
categories      graphics www
platforms       darwin
maintainers     nomaintainer

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 on a screen and consume less client resources than competing \
                            formats.

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

checksums       md5     d1513784ce0e4f37d71595dc34c95ec7 \
                sha1    f869d4114052a7df7b8da2d334d124934f1293a6 \
                rmd160  f74cec88c5fbda28976e64669d3e48833b4dfdcd
                    
depends_lib     port:libiconv \
		port:jpeg \
                port:tiff \
                port:libpng \
		port:zlib

depends_build	port:ImageMagick

configure.args	--mandir=${prefix}/share/man \
		--enable-threads \
		--enable-shared \
		--enable-xmltools \
		--disable-djview \
		--disable-desktopfiles 
		
patchfiles      patch-djvulibre.diff
patch.pre_args	-p1

variant djview3 description {Build the (outdated) djview3 viewer. The newer QT4-based viewer called 'djview4' is now a separate package called 'djview'.} {
    depends_lib-append          port:qt3
    configure.args-delete       --disable-djview
    configure.args-append       --with-qt=${prefix}/lib/qt3
    configure.ldflags-append    "-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
}

livecheck.regex  "(?i)<title>${name} (.*) released.*</title>"
