# Description: XSL Transformations library
# URL: https://gitlab.gnome.org/GNOME/libxslt/-/wikis/home
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: libxml2 python3-setuptools
# Optional: libgcrypt

name=libxslt
version=1.1.45
release=1
source=(https://gitlab.gnome.org/GNOME/libxslt/-/archive/v$version/libxslt-v$version.tar.bz2)

build() {
  cd $name-v$version

  prt-get isinst libgcrypt || PKGMK_LIBXSLT+=' --without-crypto'

  NOCONFIGURE=1 ./autogen.sh
  ./configure $PKGMK_LIBXSLT \
    --prefix=/usr

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
  make DESTDIR=$PKG install

  rm -r $PKG/usr/share/{gtk-,}doc
}
