app=guile
version=2.2.6
build=1sml
homepage="https://www.gnu.org/software/guile/"
download="https://ftp.gnu.org/gnu/guile/guile-$version.tar.xz"
desc="GNU extension language library"
requires="libtool netbsd-curses libunistring libffi gmp libgc"

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

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

  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --disable-error-on-warning \
    --disable-static

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
  make install DESTDIR=$pkg 

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
68c31e47786838f4f1dda63bfa99428a0092383f1045e836b742ccd8021fbdd83ef910ba35858c2855b3d748f228d356536496742feba5b00e07fdcc0c5a5628  guile-2.2.6.tar.xz
"
