From a4d47dffdf07da686de107c26d551f284d7eac70 Mon Sep 17 00:00:00 2001 From: sulincix Date: Tue, 18 Apr 2023 21:24:57 +0000 Subject: [PATCH] grub fix (untested) --- sys/boot/grub/ympbuild | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/sys/boot/grub/ympbuild b/sys/boot/grub/ympbuild index 735a8ce9..67b3f97d 100644 --- a/sys/boot/grub/ympbuild +++ b/sys/boot/grub/ympbuild @@ -8,29 +8,35 @@ email='parduscix@yandex.ru' maintainer='sulincix' license=('GPLv3') source=("https://ftp.gnu.org/gnu/grub/grub-$version.tar.xz") -depends=(xz-utils) +depends=() makedepends=() md5sums=('cf0fd928b1e5479c8108ee52cb114363') group=() uses=() arch=('x86_64') +dontstrip=1 -_target=(efi ia32 bios) +target=(efi ia32 bios) -_target_opts=( - [efi]="--with-platform=efi --disable-efiemu" - [ia32]="--with-platform=efi --target=i386 --disable-efiemu" - [bios]="--with-platform=pc" -) + +get_grub_opt(){ + if [[ "$1" == "efi" ]] ; then + echo -n "--with-platform=efi --disable-efiemu" + elif [[ "$1" == "ia32" ]] ; then + echo -n "--with-platform=efi --target=i386 --disable-efiemu" + elif [[ "$1" == "bios" ]] ; then + echo -n "--with-platform=pc" + fi +} prepare(){ - for tgt in ${_target[@]} ; do + for tgt in ${target[@]} ; do cp -prfv $name-$version $tgt done } setup(){ - for tgt in ${_target[@]} ; do + for tgt in ${target[@]} ; do cd $tgt autoreconf -fvi ./configure --prefix=/usr \ @@ -39,19 +45,19 @@ setup(){ --disable-nls \ --disable-werror \ --disable-grub-themes \ - ${_target_opts[$tgt]} + $(get_grub_opt $tgt) cd .. done } build(){ - for tgt in ${_target[@]} ; do + for tgt in ${target[@]} ; do make $jobs -C $tgt done } package(){ - for tgt in ${_target[@]} ; do + for tgt in ${target[@]} ; do make $jobs -C $tgt install done # remove gfx modules