APP=libsodium
VERSION=1.0.18
BUILD=1sml
HOMEPAGE='https://github.com/jedisct1/libsodium'
DOWNLOAD='https://github.com/jedisct1/libsodium/archive/refs/tags/1.0.18.tar.gz'
DESC="easy-to-use crypto library"
REQUIRES="musl"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  ac_cv_tls=__thread \
  ax_cv_check_cflags___ftls_model_local_dynamic=no \
  ./configure \
    --prefix="" \
    --disable-ssp \
    --disable-static

  make
  make install DESTDIR=$PKG

  cp LICEN?E $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
922647608e7be1acf4f7d901913e15e2acb595c9e53202b5a10b366e19ca4542e9583959096e6560273f01c7594936bd6a9f625d22d4e4582c5e16d6aac5fe96  libsodium-1.0.18.tar.lz
"
