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