APP=guile
VERSION=2.2.6
BUILD=1sml
HOMEPAGE='https://www.gnu.org/software/guile/'
DOWNLOAD='https://ftp.gnu.org/gnu/guile/guile-2.2.6.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
"
