app=vinagre
version=3.22.0
build=1sml
homepage="https://wiki.gnome.org/Apps/Vinagre"
download="https://gitlab.gnome.org/GNOME/vinagre/-/archive/3.22.0/vinagre-3.22.0.tar.bz2"
desc="Remote desktop viewer written in GTK+3"
requires="gcc-libs glib pango gdk-pixbuf gobject-introspection gnutls libxml2 pcre gtk-vnc libgcrypt libgpg-error wayland wayland-protocols libpng libidn libtasn1 mesa ffmpeg dbus libdrm libcroco libvorbis gtk3 freerdp"

build() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version 
  fixbuilddirpermissions

  sed -i 's@freerdp@freerdp2@g' configure
  applypatch $srcdir/freerdp2017.diff

  ./configure \
    --prefix="" \
    --enable-compile-warnings=no \
    --disable-schemas-compile \
    --disable-nls \
    --enable-rdp

  make
  make install DESTDIR=$pkg 

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
9ec34f000948fca43f6aa93dbeee53ace7192667292c2db23d892770c8e066c58f32b4fc04cd0776048f67665ca4e8b2e7247237e2a505d6ee61fa0369fa1961  vinagre-3.22.0.tar.lz
965e57339b4ce776904ce612f1e6f96a10735f220395bd023f212919280c02ca7ad5838f111b25c1e99b493a65e0355b6fb3e52d8d6e56a50146c5c821c9cb48  freerdp2017.diff
"
