forked from ports/contrib
42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
# Description: GNU GRUB2 (EFI version)
|
|
# URL: http://www.gnu.org/software/grub/
|
|
# Maintainer: Matt Housh, jaeger at morpheus dot net
|
|
# Depends on: grub2
|
|
|
|
name=grub2-efi
|
|
version=2.00
|
|
release=2
|
|
source=(http://ftp.gnu.org/gnu/grub/grub-$version.tar.xz \
|
|
http://unifoundry.com/unifont-5.1.20080820.pcf.gz)
|
|
|
|
build() {
|
|
export CFLAGS="${CFLAGS} -Wno-error"
|
|
|
|
# fix for glibc 'gets' removal
|
|
sed -i -e '/gets is a/d' grub-$version/grub-core/gnulib/stdio.in.h
|
|
|
|
MODLIST="boot chain configfile fat ext2 linux normal ntfs part_gpt part_msdos"
|
|
|
|
for ARCH in i386 x86_64
|
|
do
|
|
mkdir $ARCH
|
|
cd $ARCH
|
|
../grub-$version/configure --prefix=/usr \
|
|
--with-platform=efi --target=$ARCH \
|
|
--program-prefix=""
|
|
make
|
|
make DESTDIR=$PKG install
|
|
cd grub-core
|
|
../grub-mkimage -O $ARCH-efi -d . -o grub2-$ARCH.efi -p "" $MODLIST
|
|
cp grub2-$ARCH.efi $PKG/usr/lib/grub/
|
|
cd ../..
|
|
done
|
|
|
|
gzip -d $SRC/unifont-5.1.20080820.pcf.gz
|
|
mkdir -p $PKG/usr/lib/grub/fonts
|
|
x86_64/grub-mkfont -o ${PKG}/usr/lib/grub/fonts/unifont.pf2 \
|
|
$SRC/unifont-5.1.20080820.pcf
|
|
|
|
rm -r $PKG/usr/{bin,etc,sbin,share}
|
|
}
|