name=limine
from_source=limine
revision=1
hostdeps="gcc autoconf automake libtool pkg-config"
imagedeps="nasm gcc mtools"

build() {
    "${source_dir}"/configure \
        --prefix="${prefix}" \
        TOOLCHAIN_FOR_TARGET=${OS_TRIPLET} \
        LDFLAGS="-static" \
        --enable-uefi-ia32 \
        --enable-uefi-x86-64 \
        --enable-uefi-cd \
        --enable-bios \
        --enable-bios-cd \
        --enable-bios-pxe

    make -j${parallelism}
}

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

        strip_command=strip \
    post_package_strip
}
