name=limine
version=7.5.1
revision=1
tarball_url="https://github.com/limine-bootloader/limine/releases/download/v${version}/limine-${version}.tar.gz"
tarball_blake2b="3d6fd20a94b517a384b3bc977a6a28811b38b4db0747c25843a8841b19896c63e2468fd17ebbeb37869423bfc533cd23cd5e2cff50d3fce54355812f4c4d99ae"
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
}
