# -*- 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 active_variants 1.1
set branch [join [lrange [split ${version} .] 0 1] ""]
maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
description Gtk bindings for the Mono .NET Development Framework
long_description This is the Gtk# toolkit for Mono, an implementation \
of the .NET Development Framework.
homepage https://www.mono-project.com/docs/gui/gtksharp/
master_sites https://download.mono-project.com/sources/${my_name}${branch}/
distname ${my_name}-${version}
checksums rmd160 f11d2e151e2266b0b4a2aea620a4c2d6d8753676 \
sha256 02680578e4535441064aac21d33315daa009d742cab8098ac8b2749d86fffb6a \
# taken from Debian (https://sources.debian.org/patches/gtk-sharp2/2.12.40-2/01_dllmaps/)
patchfiles patch-dllmaps.diff
depends_build port:pkgconfig
path:lib/pkgconfig/glib-2.0.pc:glib2 \
path:lib/pkgconfig/pango.pc:pango
# TODO This shouldn't be needed, we need to fix Mono dllmap library path.
fs-traverse {f} ${worksrcpath} {
if {[string match *.dll.config ${f}]} {
reinplace -E "s|(target=\")|\\1${prefix}/lib/|" ${f}
set docdir ${prefix}/share/doc/${my_name}-${version}
xinstall -d ${destroot}${docdir}
xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING README README.generator \
variant debug description {Enable debug build} {
configure.args-append --enable-debug