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