# Maintainer: PktSurf <smlinux@pktsurf.in>
app=hexchat
version=2.12.4
build=2sml
homepage="https://hexchat.github.io/"
download="https://dl.hexchat.net/hexchat/hexchat-$version.tar.xz"
desc="Modern GTK+ IRC client"
requires="intltool iso-codes netbsd-curses perl glib desktop-file-utils enchant openssl libnotify libcanberra gtk2 dbus-glib python3 pango"

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

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

build() {
  # Since we are using skarnet's toolchain and a custom gcc specs file,
  # this can cause errors because skarnet's toolchain also looks inside
  # /usr/local which we only use for occasional builds
  sed -i 's@Werror=missing-include-dirs @@g' configure

  ./configure \
    --prefix="" \
    --enable-openssl \
    --enable-textfe \
    --disable-lua \
    --enable-python=python3

  make
  make install DESTDIR=$pkg

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
3acbcb037360628267593d5c87f84511f0d7d9772002d2bfaf9d2c29cd8f01a034a423f6a64d24c8c173a534e7dd9acb67147c6247f5f4c9834b729ebc980bd7  hexchat-2.12.4.tar.lz
"
