# -*- 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
categories devel graphics
description Portable and native GUI library for Haskell
long_description gtk2hs is a Haskell binding to GTK, a comprehensive \
C GUI library that is portable across many platforms.
homepage http://projects.haskell.org/gtk2hs/
checksums rmd160 c72acd0e2c5471c7757532cfb44c841be8e83f1d \
sha256 07cc98520ce6c9e0d2549fd8fd23fc5118148b7509843b0163340713a762d0c0
depends_build port:pkgconfig
path:lib/pkgconfig/cairo.pc:cairo \
configure.args --with-hc=${prefix}/bin/ghc \
--disable-deprecated-packages \
--enable-gtksourceview2 \
depends_lib-append port:gtkglext
configure.args-append --enable-opengl
# Fix gtk.package.conf to allow interoperating with non-MacPorts
# ghc. (MacPorts' ghc adds ${prefix}/lib to the linker path
set pkgs {glib gio cairo svgcairo gtk gconf glade gtkglext gtksourceview2 soegtk}
if {![variant_isset x11]} {
set pkgs {glib gio cairo svgcairo gtk gconf glade gtksourceview2 soegtk}
reinplace "s|library-dirs: |library-dirs: \"${prefix}/lib\",|" \
${destroot}${prefix}/lib/${name}/${pkg}.package.conf
# Note that the order of package registration is important: certain
# packages must be registered before the packages that depend on them.
set pkgs {glib gio cairo svgcairo gtk gconf glade gtkglext gtksourceview2 soegtk}
if {![variant_isset x11]} {
set pkgs {glib gio cairo svgcairo gtk gconf glade gtksourceview2 soegtk}
system "ghc-pkg update ${destroot}${prefix}/lib/${name}/${pkg}.package.conf"