# SlapOS component for GDB.
# https://www.gnu.org/software/gdb

[buildout]
extends =
  ../xz-utils/buildout.cfg
  ../binutils/buildout.cfg
  ../libexpat/buildout.cfg
  ../texinfo/buildout.cfg

parts = gdb

[gdb]
recipe = slapos.recipe.cmmi
shared = true
url = https://ftp.gnu.org/gnu/gdb/gdb-14.1.tar.xz
md5sum = 4a084d03915b271f67e9b8ea2ab24972
location = @@LOCATION@@
# gdb refuses to build in-tree -> build it inside build/
pre-configure =
  mkdir -p build
configure-command =
  cd build && ../configure
configure-options =
  --prefix=${:location}
  --disable-bootstrap
  --with-mpc=${mpc:location}
  --with-mpfr=${mpfr:location}
  --with-gmp=${gmp:location}
  --with-isl=${isl:location}
  --with-expat=${libexpat:location}
make-binary =
make-targets = cd build && make && make install
environment =
  PATH=${texinfo:location}/bin:${xz-utils:location}/bin:%(PATH)s
  LDFLAGS=-Wl,-rpath=${libexpat:location}/lib
