# Description: Free library for arbitrary precision arithmetic
# URL: https://gmplib.org/
# Maintainer: CRUX System Team, core-ports at crux dot nu

name=libgmp
version=6.3.0
release=1
source=(https://gmplib.org/download/gmp/gmp-$version.tar.xz
    gmp.h)

build() {
    cd gmp-$version

    ./configure \
        --prefix=/usr \
        --enable-cxx \
        --build=x86_64-unknown-linux-gnu
    make
    make DESTDIR=$PKG install

    mv $PKG/usr/include/gmp{,-64}.h
    install -m 0644 $SRC/gmp.h $PKG/usr/include/

    rm -r $PKG/usr/share
}
