# -*- 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
PortGroup compiler_blacklist_versions 1.0
set branch [join [lrange [split ${version} .] 0 1] .]
maintainers {devans @dbevans} openmaintainer
description Python bindings for GObject, version 3
long_description PyGObject is a Python dynamic module that enables developers to use the \
power of GObject, which is part of the GNOME platform.
homepage https://pygobject.readthedocs.io/
master_sites gnome:sources/${my_name}/${branch}/
distname ${my_name}-${version}
checksums rmd160 85a69fc1b45c094f55121901c60635f652321b21 \
sha256 3dd3e21015d06e00482ea665fc1733b77e754a6ab656a5db5d7f7bfaf31ad0b0 \
python.versions 27 35 36 37
if {${name} ne ${subport}} {
depends_build-append port:pkgconfig
depends_lib-append path:lib/pkgconfig/glib-2.0.pc:glib2 \
port:py${python.version}-cairo \
port:gobject-introspection
depends_test port:py${python.version}-pytest
# blacklist compilers that do not support C11
compiler.blacklist *gcc-3.* *gcc-4.* {clang < 300}
patchfiles-append patch-configure.ac.diff
configure.python ${python.bin}
configure.pkg_config_path \
${python.prefix}/lib/pkgconfig
configure.pre_args --prefix='${python.prefix}'
configure.args --enable-compile-warnings=no \
configure.cppflags-append \
-I${python.prefix}/include
build.cmd [portbuild::build_getmaketype]
destroot.cmd ${build.cmd}
destroot.destdir DESTDIR=${destroot}
test.env PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
set docdir ${prefix}/share/doc/${subport}
xinstall -d ${destroot}${docdir}
xinstall -m 0644 -W ${worksrcpath} \
COPYING ChangeLog NEWS PKG-INFO README.rst \
livecheck.name ${my_name}