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

set real_name       pivy
github.setup        FreeCAD ${real_name} 0.6.2
github.tarball_from releases
name                py-${real_name}
license             Permissive
maintainers         nomaintainer
description         Pivy is a Coin binding for Python.
long_description    {*}${description}

python.versions     310

checksums           rmd160  01b0a53134a678665067f146927cfae1b16f526c \
                    sha256  3685a40c99bce54ce39b08ebe2d577536c3f8321a79ff961ec1ca035852ebfaa \
                    size    6607183
worksrcdir          FreeCAD-${real_name}-02c4723

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:Coin-framework \
                    port:swig-python

    patchfiles      patch-setup.py.diff \
                    patch-char-to-const-char.diff

    post-patch {
        reinplace "s|%PREFIX%|${prefix}|g" ${worksrcpath}/setup.py
    }
}
