mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-28 16:32:57 +02:00
grub: add efi support for x86_64, add patch for glibc-2.16.
This commit is contained in:
parent
a6109326d6
commit
778b741376
2 changed files with 50 additions and 5 deletions
10
srcpkgs/grub/patches/glibc-2.16.patch
Normal file
10
srcpkgs/grub/patches/glibc-2.16.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- grub-core/gnulib/stdio.in.h.orig 2012-07-05 11:43:24.596994420 +0200
|
||||||
|
+++ grub-core/gnulib/stdio.in.h 2012-07-05 11:43:28.683970680 +0200
|
||||||
|
@@ -141,7 +141,6 @@ _GL_WARN_ON_USE (fflush, "fflush is not
|
||||||
|
so any use of gets warrants an unconditional warning. Assume it is
|
||||||
|
always declared, since it is required by C89. */
|
||||||
|
#undef gets
|
||||||
|
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
||||||
|
|
||||||
|
#if @GNULIB_FOPEN@
|
||||||
|
# if @REPLACE_FOPEN@
|
|
@ -1,9 +1,7 @@
|
||||||
# Template file for 'grub'
|
# Template file for 'grub'
|
||||||
pkgname=grub
|
pkgname=grub
|
||||||
version="2.00"
|
version="2.00"
|
||||||
revision=3
|
revision=4
|
||||||
build_style=gnu-configure
|
|
||||||
configure_args="--disable-werror"
|
|
||||||
makedepends="flex libusb-compat-devel ncurses-devel freetype-devel
|
makedepends="flex libusb-compat-devel ncurses-devel freetype-devel
|
||||||
liblzma-devel device-mapper-devel font-unifont-bdf fuse-devel"
|
liblzma-devel device-mapper-devel font-unifont-bdf fuse-devel"
|
||||||
fulldepends="os-prober"
|
fulldepends="os-prober"
|
||||||
|
@ -19,12 +17,49 @@ long_desc="
|
||||||
GRUB 2 is rewritten from scratch to make GNU GRUB cleaner, safer, more
|
GRUB 2 is rewritten from scratch to make GNU GRUB cleaner, safer, more
|
||||||
robust, more powerful, and more portable."
|
robust, more powerful, and more portable."
|
||||||
|
|
||||||
pre_configure() {
|
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||||
|
makedepends="$makedepends dosfstools efibootmgr"
|
||||||
|
fi
|
||||||
|
|
||||||
|
do_configure() {
|
||||||
|
local sharedargs="--enable-device-mapper --enable-cache-stats --enable-nls \
|
||||||
|
--enable-grub-mkfont --enable-grub-mount --disable-werror"
|
||||||
|
|
||||||
# fix unifont.bdf location so grub-mkfont can create *.pf2 files
|
# fix unifont.bdf location so grub-mkfont can create *.pf2 files
|
||||||
sed -i 's|/usr/share/fonts/unifont|/usr/share/fonts/misc|' configure
|
sed -i 's|/usr/share/fonts/unifont|/usr/share/fonts/misc|' configure
|
||||||
|
|
||||||
|
# build BIOS version
|
||||||
|
mkdir $wrksrc/bios_build && cd $wrksrc/bios_build
|
||||||
|
../configure ${CONFIGURE_SHARED_ARGS} --with-platform=pc $sharedargs
|
||||||
|
|
||||||
|
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||||
|
mkdir $wrksrc/efi_build && cd $wrksrc/efi_build
|
||||||
|
../configure ${CONFIGURE_SHARED_ARGS} --with-platform=efi \
|
||||||
|
--target="x86_64" --disable-efiemu $sharedargs
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
do_build() {
|
||||||
|
msg_normal "Building BIOS grub...\n"
|
||||||
|
cd $wrksrc/bios_build && make ${makejobs}
|
||||||
|
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||||
|
msg_normal "Building EFI grub...\n"
|
||||||
|
cd $wrksrc/efi_build && make ${makejobs}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||||
|
cd $wrksrc/efi_build && make DESTDIR=$DESTDIR/efi install
|
||||||
|
# Remove non-platform specific files
|
||||||
|
rm -rf ${DESTDIR}/efi/{boot,etc,usr/{share,bin,sbin}}
|
||||||
|
rm -f ${DESTDIR}/efi/usr/lib/grub/x86_64-efi/x86_64-*
|
||||||
|
rm -f ${DESTDIR}/efi/usr/lib/grub/x86_64-efi/*.{module,image}
|
||||||
|
mv ${DESTDIR}/efi/* ${DESTDIR}
|
||||||
|
rmdir ${DESTDIR}/efi
|
||||||
|
fi
|
||||||
|
cd $wrksrc/bios_build && make DESTDIR=$DESTDIR install
|
||||||
|
|
||||||
# Required to compress info files.
|
# Required to compress info files.
|
||||||
vmkdir usr/share/info
|
vmkdir usr/share/info
|
||||||
touch -f ${DESTDIR}/usr/share/info/dir
|
touch -f ${DESTDIR}/usr/share/info/dir
|
||||||
|
|
Loading…
Add table
Reference in a new issue