# -*- 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
PortGroup           python 1.0

name                py-cairocffi
version             1.7.1
revision            0

categories-append   graphics
platforms           {darwin any}
supported_archs     noarch
license             BSD
maintainers         {reneeotten @reneeotten} openmaintainer

description         cairocffi is a CFFI-based drop-in replacement for Pycairo
long_description    {*}${description}

homepage            https://github.com/Kozea/cairocffi

checksums           rmd160  aac10dbb24b57465c6683a3ec72038daf9ee61d8 \
                    sha256  2e48ee864884ec4a3a34bfa8c9ab9999f688286eb714a15a43ec9d068c36557b \
                    size    88096

python.versions     310 311 312 313 314
python.pep517_backend flit

if {${name} ne ${subport}} {
    depends_lib-append  path:lib/pkgconfig/cairo.pc:cairo \
                        path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \
                        port:libffi \
                        port:py${python.version}-cffi

    depends_test-append \
                    port:py${python.version}-numpy \
                    port:py${python.version}-pikepdf

    test.run        yes
    test.dir        ${worksrcpath}/build/lib/cairocffi
}
