# -*- 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 77836 2011-04-14 15:07:09Z devans@macports.org $

PortSystem      1.0
PortGroup       cmake 1.0

name            podofo
version         0.9.0
categories      graphics
maintainers     devans openmaintainer
platforms       darwin
homepage        http://podofo.sourceforge.net/
master_sites    sourceforge

description \
    PoDoFo is a library to work with the PDF file format.

long_description \
    PoDoFo is a library to work with the PDF file format. The PoDoFo library \
    is a free, portable C++ library which includes classes to parse PDF files and \
    modify their contents into memory. The changes can be written back to disk easily. \
    The parser can also be used to extract information from a PDF file.

checksums       md5     2a9ac8cbb5e6575dbc00f083ad8996fb \
                sha1    981e08ac853e6461cf850359a8d8939508787e6f \
                rmd160  68639d138358750d9cf4a8e4df45b874a13f30e9

depends_build   port:cmake

depends_lib     port:fontconfig \
                port:libpng \
                port:tiff \
                port:cppunit \
                port:openssl \
                port:lua

configure.cmd   cmake
configure.args-append  -G \"Unix Makefiles\" \
                -DWANT_FONTCONFIG:BOOL=TRUE \
                -DPODOFO_BUILD_SHARED:BOOL=TRUE \
                -DPODOFO_BUILD_STATIC:BOOL=TRUE \
                -DCMAKE_INCLUDE_PATH=${prefix}/include/ \
                -DCMAKE_LIBRARY_PATH=${prefix}/lib

#
# FIXME: will build universal if there is no
# previous non-universal build installed
# but will not upgrade from non-universal
# to universal (previously installed libraries
# override newly built ones)
#

universal_variant no

livecheck.type  regex
livecheck.url   http://podofo.sourceforge.net/download.html
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
