# Maintainer: PktSurf <smlinux@pktsurf.in>
app=gdb
version=12.1
build=1sml
homepage="https://www.gnu.org/software/gdb/"
download="https://ftp.gnu.org/gnu/gdb/gdb-$version.tar.xz"
desc="GNU symbolic debugger"
requires="gcc-libs netbsd-curses expat xz python3 gmp mpfr"
noautoconfsite=1

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

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

build() {
  ./configure \
    --prefix= \
    --disable-werror \
    --with-system-zlib \
    --disable-sim 

  make
  make install DESTDIR=$pkg 

  cp COPYING* $pkgdocs/

  mkfinalpkg
}

sha512sums="
96aad47b58195812057959de5e09bc3e2d3321f4f1e2fe1495a06178223f2f85c55b4bad28d315bc859dee7cd54841f34b04d0a33fcf29835cbf75be75470f09  gdb-12.1.tar.lz
"
