# -*- 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 115042 2013-12-23 06:18:24Z devans@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-poppler
version             0.12.1
revision            3

platforms           darwin
license             GPL-2
maintainers         nomaintainer
description         Python bindings to the Poppler library
long_description    Python bindings for the Poppler PDF rendering library (glib).
python.versions     26 27

checksums           md5 1a89e5ed3042afc81bbd4d02e0cf640a \
                    rmd160 d6c196d6bbbaa9ef96c2ea3a38eb6a89308bab15 \
                    sha256 322f183d24798a056f3005d1ab8e3ac27d8cfbbf0982725b323bbfec1bab5355

homepage            https://launchpad.net/poppler-python
master_sites         ${homepage}/trunk/development/+download/
distname            pypoppler-${version}

patchfiles          patch-poppler.defs.diff \
                    patch-poppler.override.diff

if {${name} ne ${subport}} {
    depends_build-append \
                        port:pkgconfig
    depends_lib-append  port:atk \
                        port:poppler \
                        port:py${python.version}-pygtk

    use_configure       yes
    configure.cmd       ./configure
    configure.pkg_config_path \
        ${prefix}/lib/pkgconfig:${prefix}/share/pkgconfig:${python.prefix}/lib/pkgconfig/
    configure.pre_args  --prefix=${python.prefix}

    build.cmd           make
    build.target        all

    use_parallel_build  no

    destroot.cmd        make
    destroot.destdir    DESTDIR=${destroot}

    livecheck.type      none
}
