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