# Description: XSL Transformations library
# URL: https://gitlab.gnome.org/GNOME/libxslt/-/wikis/home
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
# Depends on: libxml2-32 libxslt

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

build() {
    cd libxslt-v$version

    sed -i -e 's/libgcrypt-config/&-32/g' configure.ac

    NOCONFIGURE=1 ./autogen.sh
    ./configure \
        --prefix=/usr \
        --libdir=/usr/lib32 \
        --without-python

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

    make
    make DESTDIR=$PKG install

    rm -r \
        $PKG/usr/share/doc \
        $PKG/usr/{bin,include,share/man}
}
