wok-6.x view grub2-efi-x64/receipt @ rev 21773

Add grub2-efi-x64
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jul 08 17:07:31 2019 +0200 (2019-07-08)
parents
children cc07895be981
line source
1 # SliTaz package receipt.
3 PACKAGE="grub2-efi-x64"
4 SOURCE="grub"
5 VERSION="2.02"
6 CATEGORY="base-system"
7 SHORT_DESC="GRUB2 boot loader."
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL3"
10 TARBALL="$SOURCE-$VERSION.tar.xz"
11 WEB_SITE="http://www.gnu.org/software/grub/"
12 WGET_URL="ftp://ftp.gnu.org/gnu/grub/$TARBALL"
14 DEPENDS="zlib freetype ncurses libusb-compat grep libusb libdevmapper"
15 BUILD_DEPENDS="flex bison zlib-dev xz-dev freetype-dev ncurses-dev \
16 libusb-compat-dev libusb-dev libdevmapper-dev uclibc-cross-compiler-x86_64"
18 AUFS_NOT_RAMFS="uclibc-cross-compiler-x86_64 is not compatible with aufs+tmpfs 8("
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 sed -i 's|sys/types.h>|&\n#include <sys/sysmacros.h>|' \
24 util/getroot.c grub-core/kern/emu/hostdisk.c
26 # CVE-2015-8370
27 sed -i "s/'.b'/& \\&\\& cur_len/" grub-core/lib/crypto.c \
28 grub-core/normal/auth.c
30 # Fixes for flex 2.5.37
31 export CFLAGS="-Wno-error=sign-compare -Wno-error=unused-value"
32 sed -i '/#undef gets/{N;s/.*/#ifdef gets\n&\n#endif/}' \
33 grub-core/gnulib/stdio*h
34 sed -i 's/YY_FATAL_ERROR/REMOVED_&/' grub-core/script/yylex.l
36 export EFI_ARCH=x86_64
37 sed -i 's/is_symbol_local /type == 2 || /' util/grub-module-verifier*.c*
38 sed -i 's/.*unsupported relocation.*/continue;/' util/grub-module-verifier*.c*
39 sed -i 's|.*add fixup entry for R_X86_64_32|// &|' util/grub-mkimage*.c*
40 ./configure BUILD_CC=gcc CFLAGS="${CFLAGS/-march=i486/-g0}" \
41 TARGET_CC=uclibc-x86_64-gcc TARGET_OBJCOPY=uclibc-x86_64-objcopy \
42 TARGET_NM=uclibc-x86_64-nm TARGET_STRIP=uclibc-x86_64-strip \
43 TARGET_RANLIB='uclibc-x86_64-ranlib' \
44 --prefix=/usr --sysconfdir=/etc \
45 --with-platform=efi --target=${EFI_ARCH} --program-prefix="" \
46 --mandir=/usr/share/man $CONFIGURE_ARGS &&
47 make $MAKEFLAGS &&
48 cd grub-core &&
49 ../grub-mkimage -d . -o ../bootx64.efi -O x86_64-efi -p /boot/grub \
50 -c $stuff/grub.cfg \
51 lsefisystab lssal lsefimmap lsacpi ls \
52 ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \
53 iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \
54 xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \
55 loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \
56 scsi loopback normal configfile gzio all_video efi_gop efi_uga \
57 gfxterm gettext echo boot chain
58 }
60 # Rules to gen a SliTaz package suitable for Tazpkg.
61 genpkg_rules()
62 {
63 mkdir -p $fs/boot/efi/boot
64 cp $src/bootx64.efi $fs/boot/efi/boot
65 }