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

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