wok-current view 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
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 AUFS_NOT_RAMFS="uclibc-cross-compiler-x86_64 is not compatible with aufs+tmpfs 8("
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 sed -i 's|sys/types.h>|&\n#include <sys/sysmacros.h>|' \
26 util/getroot.c grub-core/kern/emu/hostdisk.c
28 # CVE-2015-8370
29 sed -i "s/'.b'/& \\&\\& cur_len/" grub-core/lib/crypto.c \
30 grub-core/normal/auth.c
32 # Fixes for flex 2.5.37
33 export CFLAGS="-Wno-error=sign-compare -Wno-error=unused-value"
34 sed -i '/#undef gets/{N;s/.*/#ifdef gets\n&\n#endif/}' \
35 grub-core/gnulib/stdio*h
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 }