# Maintainer: PktSurf <smlinux@pktsurf.in>
app=libgpg-error
version=1.47
build=1sml
homepage="https://www.gnupg.org/software/libgpg-error/index.html"
download="https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$version.tar.bz2"
desc="library that provides common error values and functions for all GnuPG components"
requires="musl"

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

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

  applypatch $srcdir/libgpg-error-1.44-remove_broken_check.patch
}

build() {
  autoreconf -vif
  ./configure \
    --prefix= \
    --enable-install-gpg-error-config

  make
  make install DESTDIR=$pkg

  cp COPYING* $pkgdocs/

  mkfinalpkg
}

sha512sums="
bbb4b15dae75856ee5b1253568674b56ad155524ae29a075cb5b0a7e74c4af685131775c3ea2226fff2f84ef80855e77aa661645d002b490a795c7ae57b66a30  libgpg-error-1.47.tar.bz2
"
