# -*- 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 active_variants 1.1
set branch [join [lrange [split ${version} .] 0 1] .]
python.versions 27 34 35 36 37
description Python bindings for GObject.
PyGObject provides a convenient wrapper for the GObject+ library \
for use in Python programs, and takes care of many of the boring details \
such as managing memory and type casting. \
When combined with PyGTK, PyORBit and gnome-python, \
it can be used to write full featured Gnome applications.
homepage http://www.pygtk.org/
master_sites gnome:sources/${my_name}/${branch}/
distname ${my_name}-${version}
checksums rmd160 e9fea538da79ad27c42434d4a2173b3eb636408b \
sha256 bb9d25a3442ca7511385a7c01b057492095c263784ef31231ffe589d83a96a5a \
depends_build-append port:pkgconfig
depends_lib-append path:lib/pkgconfig/glib-2.0.pc:glib2 \
port:py${python.version}-cairo \
port:gobject-introspection
patchfiles patch-pygi-info.c.diff
configure.python ${python.bin}
configure.env-append PKG_CONFIG_PATH=${python.prefix}/lib/pkgconfig
configure.pre_args --prefix='${python.prefix}'
configure.args-append --disable-glibtest \
--enable-introspection=no
configure.cppflags-append \
-I${python.prefix}/include \
-I${prefix}/include/cairo
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} AUTHORS COPYING ChangeLog NEWS README \
require_active_variants path:lib/pkgconfig/glib-2.0.pc:glib2 quartz
patchfiles-append patch-quartz.diff
require_active_variants path:lib/pkgconfig/glib-2.0.pc:glib2 x11
if {![variant_isset quartz]} {
if {![variant_isset x11]} {
if {![variant_isset quartz] && ![variant_isset x11]} {
return -code error "Either +x11 or +quartz is required"