# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortGroup compiler_blacklist_versions 1.0
PortGroup gobject_introspection 1.0
set branch [join [lrange [split ${version} .] 0 1] .]
description GUPnP-IGD is a library to handle UPnP IGD port mapping.
long_description ${description}
maintainers {devans @dbevans} openmaintainer
homepage https://wiki.gnome.org/Projects/GUPnP
master_sites gnome:sources/${name}/${branch}/
checksums rmd160 5c4ac056b1ddbcc0a2c831c99d2f9b7d410fc3ba \
sha256 8b4a1aa38bacbcac2c1755153147ead7ee9af7d4d1f544b6577cfc35e10e3b20
depends_build port:pkgconfig
patchfiles patch-configure.diff \
patch-python-pygupnp-igd-module.c.diff
gobject_introspection yes
# blacklist compilers that do not support C11
# due to error: redefinition of typedef 'GUPnPService'
# build fix for SL and earlier
compiler.blacklist *gcc* {clang < 300}
configure.args --disable-silent-rules \
variant python27 description {Enable Python 2.7 bindings} {
configure.args-replace --disable-python --enable-python
depends_lib-append port:py27-gobject
configure.python ${prefix}/bin/python2.7
set python_prefix ${frameworks_dir}/Python.framework/Versions/2.7
set python_pkg_config_path ${python_prefix}/lib/pkgconfig
configure.pkg_config_path ${python_pkg_config_path}
build.env-append PATH=${python_prefix}/bin:$env(PATH)
default_variants +python27