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

regenerate() {
    autotools_recursive_regen
}

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
}
