wok view grub2-efi-x64/receipt @ rev 21809

Add grub2-efi-x64-modules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 17 17:28:25 2019 +0200 (2019-08-17)
parents cc07895be981
children 9b196667495f
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 fuse-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 sed -i 's| -Werror||' grub-core/Makefile &&
48 make $MAKEFLAGS &&
49 cd grub-core &&
50 ../grub-mkimage -d . -o ../bootx64.efi -O x86_64-efi -p /boot/grub \
51 -c $stuff/grub.cfg \
52 lsefisystab lssal lsefimmap lsacpi ls \
53 ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \
54 iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \
55 xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \
56 loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \
57 scsi loopback normal configfile gzio all_video efi_gop efi_uga \
58 gfxterm gettext echo boot chain
59 }
61 # Rules to gen a SliTaz package suitable for Tazpkg.
62 genpkg_rules()
63 {
64 mkdir -p $fs/boot/efi/boot
65 cp $src/bootx64.efi $fs/boot/efi/boot
66 }