# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=gtk-sharp-3
_pkgname=gtk-sharp
pkgver=2.99.3
pkgrel=2
pkgdesc="C# bindings for GTK+ 3"
arch=('x86_64')
url="http://mono-project.com/GtkSharp"
license=('LGPL')
depends=('mono' 'gtk3')
source=(https://download.gnome.org/sources/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.xz)
sha256sums=('6440f571416267ae0cb5698071d087b31e3084693fa2c829b1db37ca7ea2c3a2')

prepare() {
  cd $_pkgname-$pkgver
  sed -i 's/gmcs/mcs/' configure{,.ac}
  sed -e '/MONO_PROFILE_ENTER_LEAVE/d' -i gtk/gui-thread-check/profiler/gui-thread-check.c # Fix build with newer mono
}

build() {
  cd $_pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $_pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
