wok-6.x view grub2-efi-x64/receipt @ rev 25372
updated trash-cli (0.17.1.14 -> 0.22.4.16)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Jul 29 14:58:56 2022 +0100 (2022-07-29) |
parents | 17091bc7c301 |
children |
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="http://ftp.gnu.org/gnu/grub/$TARBALL"
15 DEPENDS="freetype grep libdevmapper libusb libusb-compat ncurses zlib"
16 BUILD_DEPENDS="bison flex freetype-dev fuse2-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 # What is the latest version available today?
25 current_version()
26 {
27 wget -O - ${WGET_URL%/*} 2>/dev/null | \
28 sed "/$SOURCE-/!d;/tar/!d;s|.*$SOURCE-||;s|.tar.*||" | sort -Vr | sed q
29 }
31 # Rules to configure and make the package.
32 compile_rules()
33 {
34 sed -i 's|sys/types.h>|&\n#include <sys/sysmacros.h>|' \
35 util/getroot.c grub-core/kern/emu/hostdisk.c
37 # CVE-2015-8370
38 sed -i "s/'.b'/& \\&\\& cur_len/" grub-core/lib/crypto.c \
39 grub-core/normal/auth.c
41 # Fixes for flex 2.5.37
42 export CFLAGS="-Wno-error=sign-compare -Wno-error=unused-value"
43 sed -i 's/YY_FATAL_ERROR/REMOVED_&/' \
44 grub-core/script/yylex.l
46 export EFI_ARCH=x86_64
47 sed -i 's/is_symbol_local /type == 2 || /' \
48 util/grub-module-verifier*.c*
49 sed -i 's/.*unsupported relocation.*/continue;/' \
50 util/grub-module-verifier*.c*
51 sed -i 's|.*add fixup entry for R_X86_64_32|// &|' \
52 util/grub-mkimage*.c*
54 ./configure \
55 BUILD_CC=gcc \
56 CFLAGS="${CFLAGS/-march=i486/-g0}" \
57 TARGET_CC=uclibc-x86_64-gcc \
58 TARGET_OBJCOPY=uclibc-x86_64-objcopy \
59 TARGET_NM=uclibc-x86_64-nm \
60 TARGET_STRIP=uclibc-x86_64-strip \
61 TARGET_RANLIB='uclibc-x86_64-ranlib' \
62 --prefix=/usr \
63 --sysconfdir=/etc \
64 --with-platform=efi \
65 --target=${EFI_ARCH} \
66 --program-prefix="" \
67 --mandir=/usr/share/man $CONFIGURE_ARGS &&
69 sed -i 's| -Werror||;s|-Wl,--copy-dt-needed-entries||' \
70 Makefile grub-core/Makefile &&
71 make $MAKEFLAGS &&
73 cd grub-core &&
74 ../grub-mkimage -d . -o ../bootx64.efi -O x86_64-efi -p /boot/grub \
75 -c $stuff/grub.cfg \
76 lsefisystab lssal lsefimmap lsacpi ls \
77 ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \
78 iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \
79 xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \
80 loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \
81 scsi loopback normal configfile gzio all_video efi_gop efi_uga \
82 gfxterm gettext echo boot chain
83 }
85 # Rules to gen a SliTaz package suitable for Tazpkg.
86 genpkg_rules()
87 {
88 mkdir -p $fs/boot/efi/boot
89 cp $src/bootx64.efi $fs/boot/efi/boot
90 }