name=limine
version=6.20240107.0
revision=1
tarball_url="https://github.com/limine-bootloader/limine/releases/download/v${version}/limine-${version}.tar.xz"
tarball_blake2b="9896f3870d99b3b8245bcc7ec4d56cd58ef7d62837d79f58fad9d52de9dd913d6ae7df622138986969faff12d873a0ad13707d6eed2608ad22d26c3c26ece83e"
source_hostdeps="autoconf automake libtool pkg-config"
imagedeps="mtools nasm"
hostdeps="gcc autoconf automake libtool pkg-config"
deps="core-libs"

regenerate() {
    autoreconf -fvi
}

build() {
    autotools_configure \
        --enable-uefi-ia32 \
        --enable-uefi-x86-64 \
        --enable-uefi-cd \
        --enable-bios \
        --enable-bios-cd \
        --enable-bios-pxe \
        TOOLCHAIN_FOR_TARGET=${OS_TRIPLET}

    make -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" make install

    post_package_strip
}
