app=weechat
version=2.5
build=1sml
homepage="http://www.weechat.org"
download="https://weechat.org/files/src/weechat-2.5.tar.xz"
desc="Fast, modular text-mode IRC client"
requires="netbsd-curses openssl curl libidn libtasn1 nettle gmp gnutls libgcrypt aspell perl python3"

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

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

  mkdir smbuild && cd smbuild
  cmake .. \
    -DCMAKE_INSTALL_PREFIX="" \
    -DENABLE_MAN=ON \
    -DENABLE_TCL=OFF \
    -DENABLE_PYTHON=OFF \
    -DENABLE_PYTHON3=ON \
    -DCMAKE_BUILD_TYPE=Release 

  make
  make install DESTDIR=$pkg

  cp ../COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
803ee697823b415d6af7a452717610648288bfb4c2ffd2b63a21a2d0d0cebf5ed32f98f0ef952402b3fea8c39121c429ae517b3446d26a203f76f09a8aed47af  weechat-2.5.tar.lz
"
