wok-current view grub2-efi-x64/receipt @ rev 25694

Fix cifs-utils, up grub2-efi-x64 stuff for iso EFI
author Stanislas Leduc <shann@slitaz.org>
date Sat Mar 30 18:05:22 2024 +0000 (7 weeks ago)
parents 72f2704d3ae0
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 xz-dev zlib-dev"
19 CONFIG_FILES="/etc/default/grub /etc/grub.d/40_custom"
21 #AUFS_NOT_RAMFS="uclibc-cross-compiler-x86_64 is not compatible with aufs+tmpfs 8("
23 # What is the latest version available today?
24 current_version()
25 {
26 wget -O - ${WGET_URL%/*} 2>/dev/null | \
27 sed "/$SOURCE-/!d;/tar/!d;s|.*$SOURCE-||;s|.tar.*||" | sort -Vr | sed q
28 }
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 sed -i 's|sys/types.h>|&\n#include <sys/sysmacros.h>|' \
34 util/getroot.c grub-core/kern/emu/hostdisk.c
36 # CVE-2015-8370
37 sed -i "s/'.b'/& \\&\\& cur_len/" grub-core/lib/crypto.c \
38 grub-core/normal/auth.c
40 # Fixes for flex 2.5.37
41 export CFLAGS="-Wno-error=sign-compare -Wno-error=unused-value"
42 sed -i 's/YY_FATAL_ERROR/REMOVED_&/' \
43 grub-core/script/yylex.l
45 export EFI_ARCH=x86_64
46 sed -i 's/is_symbol_local /type == 2 || /' \
47 util/grub-module-verifier*.c*
48 sed -i 's/.*unsupported relocation.*/continue;/' \
49 util/grub-module-verifier*.c*
50 sed -i 's|.*add fixup entry for R_X86_64_32|// &|' \
51 util/grub-mkimage*.c*
53 # Use cross toolchain x86_64
54 export PATH=$PATH:/cross/x86_64/tools/bin
56 ./configure \
57 BUILD_CC=gcc \
58 CFLAGS="${CFLAGS/-march=i486/-g0}" \
59 TARGET_CC=x86_64-slitaz-linux-gcc \
60 TARGET_OBJCOPY=x86_64-slitaz-linux-objcopy \
61 TARGET_NM=x86_64-slitaz-linux-nm \
62 TARGET_STRIP=x86_64-slitaz-linux-strip \
63 TARGET_RANLIB='x86_64-slitaz-linux-ranlib' \
64 --prefix=/usr \
65 --sysconfdir=/etc \
66 --with-platform=efi \
67 --target=${EFI_ARCH} \
68 --program-prefix="" \
69 --mandir=/usr/share/man $CONFIGURE_ARGS &&
71 sed -i 's| -Werror||;s|-Wl,--copy-dt-needed-entries||' \
72 Makefile grub-core/Makefile &&
73 make $MAKEFLAGS &&
75 cd grub-core &&
76 ../grub-mkimage -d . -o ../bootx64.efi -O x86_64-efi -p /boot/grub \
77 -c $stuff/grub.cfg \
78 lsefisystab lssal lsefimmap lsacpi ls \
79 ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \
80 iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \
81 xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \
82 loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \
83 scsi loopback normal configfile gzio all_video efi_gop efi_uga \
84 gfxterm gettext echo boot chain
86 # Build grub bootloader for livecd
87 ../grub-mkimage -d . -o ../bootx64-live.efi -O x86_64-efi -p /boot/grub \
88 -c $stuff/grub-embed.cfg \
89 lsefisystab lssal lsefimmap lsacpi ls \
90 ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \
91 iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \
92 xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \
93 loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \
94 scsi loopback normal configfile gzio all_video efi_gop efi_uga \
95 gfxterm gettext echo boot chain
96 }
98 # Rules to gen a SliTaz package suitable for Tazpkg.
99 genpkg_rules()
100 {
101 mkdir -p $fs/boot/efi/boot
102 cp $src/bootx64.efi $fs/boot/efi/boot
103 }