pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/grub2



Module Name:    pkgsrc
Committed By:   wiz
Date:           Wed Feb  7 17:50:45 UTC 2024

Modified Files:
        pkgsrc/sysutils/grub2: Makefile PLIST distinfo options.mk
Added Files:
        pkgsrc/sysutils/grub2/patches: patch-tests_util_grub-shell.in
Removed Files:
        pkgsrc/sysutils/grub2: MESSAGE
        pkgsrc/sysutils/grub2/patches: patch-configure
            patch-grub-core_osdep_bsd_hostdisk.c
            patch-grub-core_osdep_generic_blocklist.c patch-util_getroot.c

Log Message:
grub2: update to 2.12.

With help from Anon.

New in 2.12:

* GCC 13 support.
* clang 14 support.
* binutils 2.38 support.
* Unification of EFI Linux kernel loader across architectures.
* Transition to EFI Linux kernel stub loader for x86 architecture.
* Initial support for Boot Loader Interface.
* Support for dynamic GRUB runtime memory addition using firmware calls.
* PCI and MMIO UARTs support.
* SDL2 support.
* LoongArch support.
* TPM driver fixes.
* Many filesystems fixes.
* Many CVE and Coverity fixes.
* Debugging support improvements.
* Tests improvements.
* Documentation improvements.
* ...and tons of other fixes and cleanups...

New in 2.06:

* GCC 10 support.
* clang 10 support.
* SBAT support.
* LUKS2 support.
* Drop small MBR gap support.
* Xen Security Modules (XSM/FLASK) support.
* The lockdown mechanism similar to the Linux kernel one.
* Disable the os-prober by default.
* Many backports of GRUB distros specific patches.
* BootHole and BootHole2 fixes.
* ...and tons of other fixes and cleanups...


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 pkgsrc/sysutils/grub2/MESSAGE
cvs rdiff -u -r1.33 -r1.34 pkgsrc/sysutils/grub2/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/grub2/PLIST
cvs rdiff -u -r1.12 -r1.13 pkgsrc/sysutils/grub2/distinfo
cvs rdiff -u -r1.5 -r1.6 pkgsrc/sysutils/grub2/options.mk
cvs rdiff -u -r1.3 -r0 pkgsrc/sysutils/grub2/patches/patch-configure \
    pkgsrc/sysutils/grub2/patches/patch-util_getroot.c
cvs rdiff -u -r1.2 -r0 \
    pkgsrc/sysutils/grub2/patches/patch-grub-core_osdep_bsd_hostdisk.c
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/sysutils/grub2/patches/patch-grub-core_osdep_generic_blocklist.c
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/sysutils/grub2/patches/patch-tests_util_grub-shell.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/grub2/Makefile
diff -u pkgsrc/sysutils/grub2/Makefile:1.33 pkgsrc/sysutils/grub2/Makefile:1.34
--- pkgsrc/sysutils/grub2/Makefile:1.33 Sun Nov 12 13:23:32 2023
+++ pkgsrc/sysutils/grub2/Makefile      Wed Feb  7 17:50:45 2024
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.33 2023/11/12 13:23:32 wiz Exp $
+# $NetBSD: Makefile,v 1.34 2024/02/07 17:50:45 wiz Exp $
 
-DISTNAME=              grub-2.04
+DISTNAME=              grub-2.12
 PKGNAME=               ${DISTNAME:S/grub/grub2/}
-PKGREVISION=           6
 CATEGORIES=            sysutils
 MASTER_SITES=          ftp://ftp.gnu.org/gnu/grub/
+EXTRACT_SUFX=          .tar.xz
 DISTFILES=             ${DISTNAME}${EXTRACT_SUFX}
 
 MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
@@ -12,17 +12,19 @@ HOMEPAGE=           https://www.gnu.org/software/
 COMMENT=               GRand Unified Bootloader, version 2
 LICENSE=               gnu-gpl-v3
 
+TOOL_DEPENDS+=         help2man>=1.36:../../converters/help2man
+
 CONFLICTS=             grub-[0-9]*
 
 ONLY_FOR_PLATFORM=     *-*-i386 *-*-x86_64
 
-SSP_SUPPORTED=         no
 FORTIFY_SUPPORTED=     no
 MKPIE_SUPPORTED=       no
 RELRO_SUPPORTED=       no
+SSP_SUPPORTED=         no
 
 USE_LANGUAGES+=                c c++
-USE_TOOLS+=            gmake flex bison gettext:run awk pkg-config
+USE_TOOLS+=            gmake flex bison gettext:run gawk pkg-config
 
 .include "../../lang/python/tool.mk"
 PYTHON_FOR_BUILD_ONLY= tool
@@ -51,25 +53,10 @@ MAKE_FLAGS+=                BUILD_LDFLAGS=${COMPILER_R
 # Additionnaly, help2man is required to generate the manual pages.
 #
 GCC_REQD+=             4.4
-FLEX_REQD=             2.5.35
-TOOL_DEPENDS+=         help2man>=1.36:../../converters/help2man
+FLEX_REQD+=            2.5.35
 
-#
-# The configure script sets the variables `target_cpu' and `platform', which
-# are used for the location of the library directory.  The following mimics
-# the configure script's behavior for i386 and x86_64.
-#
-GRUB_TARGET_CPU=       ${MACHINE_ARCH}
-.if ${LOWER_VENDOR} == "apple"
-GRUB_PLATFORM=         efi
-.else
-GRUB_PLATFORM=         pc
-.endif
-.if ${GRUB_TARGET_CPU} == "x86_64" && ${GRUB_PLATFORM} == "pc"
-GRUB_TARGET_CPU=       i386
-.endif
-PLIST_SUBST+=          GRUB_TARGET_CPU=${GRUB_TARGET_CPU}
-PLIST_SUBST+=          GRUB_PLATFORM=${GRUB_PLATFORM}
+CONFIGURE_ARGS+=       --target=${GRUB_TARGET_CPU}
+CONFIGURE_ARGS+=       --with-platform=${GRUB_PLATFORM}
 
 #
 # Unset ABI to prevent pkgsrc's gcc wrapper from messing with -m flags.
@@ -101,6 +88,10 @@ CONF_FILES_PERMS+=  ${EGDIR}/${file} ${PK
 CONF_FILES+=           ${EGDIR}/README ${PKG_SYSCONFDIR}/README
 CONF_FILES+=           ${EGDIR}/default.conf.sample ${PKG_SYSCONFDIR}/default.conf
 
+post-extract:
+       [ -f  ${WRKSRC}/grub-core/extra_deps.lst ] || \
+       touch ${WRKSRC}/grub-core/extra_deps.lst
+
 post-install: do-install-custom-config
 
 .PHONY: do-install-custom-config
@@ -134,7 +125,7 @@ SUBST_CLASSES+=                     fix-fonts
 SUBST_STAGE.fix-fonts=         pre-configure
 SUBST_MESSAGE.fix-fonts=       Fixing fonts search paths in configure.
 SUBST_FILES.fix-fonts=         configure
-SUBST_VARS.fix-fonts=          PREFIX
+SUBST_SED.fix-fonts=           -e 's,/usr/share/fonts,${PREFIX}/share/fonts,'
 
 #
 # Do not use `\t' with sed, as it's not portable.
@@ -150,5 +141,8 @@ SUBST_SED.fix-sed-tabs=             -e 's,\\t,      ,g'
 #
 .include "options.mk"
 
+# build needs 'strip' for build, and this setting removes it
+INSTALL_UNSTRIPPED=    no
+
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/sysutils/grub2/PLIST
diff -u pkgsrc/sysutils/grub2/PLIST:1.4 pkgsrc/sysutils/grub2/PLIST:1.5
--- pkgsrc/sysutils/grub2/PLIST:1.4     Sat May  2 16:53:54 2020
+++ pkgsrc/sysutils/grub2/PLIST Wed Feb  7 17:50:45 2024
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2020/05/02 16:53:54 triaxx Exp $
+@comment $NetBSD: PLIST,v 1.5 2024/02/07 17:50:45 wiz Exp $
 bin/grub-editenv
 bin/grub-file
 bin/grub-fstest
@@ -27,12 +27,16 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/affs.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/afs.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/afs.module
+lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/afsplitter.mod
+lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/afsplitter.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ahci.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ahci.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/all_video.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/all_video.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/aout.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/aout.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/appleldr.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/appleldr.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/archelp.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/archelp.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/at_keyboard.mod
@@ -43,20 +47,22 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/backtrace.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/bfs.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/bfs.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/biosdisk.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/biosdisk.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/biosdisk.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/biosdisk.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/bitmap.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/bitmap.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/bitmap_scale.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/bitmap_scale.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/bli.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/bli.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/blocklist.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/blocklist.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/boot.image
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/boot.img
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/boot.image
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/boot.img
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/boot.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/boot.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/boot_hybrid.image
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/boot_hybrid.img
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/boot_hybrid.image
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/boot_hybrid.img
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/bsd.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/bsd.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/bswap_test.mod
@@ -77,16 +83,16 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cbtable.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cbtime.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cbtime.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cdboot.image
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cdboot.img
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cdboot.image
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cdboot.img
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/chain.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/chain.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmdline_cat_test.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmdline_cat_test.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmosdump.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmosdump.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmostest.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmostest.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmosdump.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmosdump.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmostest.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmostest.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmp.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmp.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cmp_test.mod
@@ -120,8 +126,8 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/datetime.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/disk.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/disk.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/diskboot.image
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/diskboot.img
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/diskboot.image
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/diskboot.img
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/diskfilter.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/diskfilter.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/div.mod
@@ -130,12 +136,22 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/div_test.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/dm_nv.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/dm_nv.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/drivemap.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/drivemap.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/drivemap.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/drivemap.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/echo.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/echo.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efiemu.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efiemu.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efi_gop.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efi_gop.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efi_uga.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efi_uga.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efiemu.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efiemu.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efifwsetup.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efifwsetup.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efinet.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efinet.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efitextmode.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/efitextmode.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ehci.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ehci.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/elf.mod
@@ -157,10 +173,12 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/fdt.lst
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/file.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/file.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/fixvideo.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/fixvideo.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/font.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/font.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/freedos.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/freedos.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/freedos.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/freedos.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/fs.lst
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/fshelp.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/fshelp.module
@@ -210,9 +228,10 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gcry_twofish.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gcry_whirlpool.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gcry_whirlpool.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gdb.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gdb.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gdb.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gdb.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gdb_grub
+lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gdb_helper.py
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/geli.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/geli.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gettext.mod
@@ -225,7 +244,6 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gfxterm_background.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gfxterm_menu.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gfxterm_menu.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gmodule.pl
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gptsync.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gptsync.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gzio.mod
@@ -258,6 +276,8 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/jfs.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/jpeg.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/jpeg.module
+lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/json.mod
+lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/json.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/kernel.exec
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/kernel.img
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/keylayouts.mod
@@ -274,8 +294,10 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/linux.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/linux16.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/linux16.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lnxboot.image
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lnxboot.img
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lnxboot.image
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lnxboot.img
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/loadbios.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/loadbios.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/loadenv.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/loadenv.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/loopback.mod
@@ -284,26 +306,36 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ls.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsacpi.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsacpi.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsapm.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsapm.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsapm.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsapm.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsefi.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsefi.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsefimmap.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsefimmap.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsefisystab.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsefisystab.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsmmap.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lsmmap.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lspci.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lspci.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lssal.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lssal.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/luks.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/luks.module
+lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/luks2.mod
+lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/luks2.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lvm.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lvm.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lzma_decompress.image
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lzma_decompress.img
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lzma_decompress.image
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lzma_decompress.img
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lzopio.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/lzopio.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/macbless.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/macbless.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/macho.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/macho.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/mda_text.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/mda_text.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/mda_text.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/mda_text.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/mdraid09.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/mdraid09.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/mdraid09_be.mod
@@ -358,8 +390,8 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ntfs.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ntfscomp.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ntfscomp.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ntldr.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ntldr.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ntldr.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ntldr.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/odc.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/odc.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/offsetio.mod
@@ -402,14 +434,16 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pbkdf2.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pbkdf2_test.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pbkdf2_test.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pci.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pci.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pci.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pci.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pcidump.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pcidump.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pgp.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pgp.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/plan9.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/plan9.module
+lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/plainmount.mod
+lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/plainmount.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/plan9.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/plan9.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/play.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/play.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/png.mod
@@ -422,12 +456,12 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/procfs.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/progress.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/progress.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxe.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxe.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxeboot.image
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxeboot.img
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxechain.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxechain.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxe.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxe.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxeboot.image
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxeboot.img
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxechain.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pxechain.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/raid5rec.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/raid5rec.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/raid6rec.mod
@@ -458,8 +492,8 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/search_fs_uuid.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/search_label.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/search_label.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/sendkey.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/sendkey.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/sendkey.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/sendkey.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/serial.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/serial.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/setjmp.mod
@@ -478,6 +512,8 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/sleep.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/sleep_test.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/sleep_test.module
+lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/smbios.mod
+lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/smbios.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/spkmodem.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/spkmodem.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/squash4.mod
@@ -507,14 +543,16 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/tga.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/time.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/time.module
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/tpm.mod
+${PLIST.efi}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/tpm.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/tr.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/tr.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/trig.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/trig.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/true.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/true.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/truecrypt.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/truecrypt.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/truecrypt.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/truecrypt.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/udf.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/udf.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ufs1.mod
@@ -541,14 +579,12 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATF
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/usbserial_usbdebug.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/usbtest.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/usbtest.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vbe.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vbe.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/verifiers.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/verifiers.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vga.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vga.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vga_text.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vga_text.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vbe.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vbe.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vga.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vga.module
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vga_text.mod
+${PLIST.pc}lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/vga_text.module
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/video.lst
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/video.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/video.module
@@ -632,7 +668,9 @@ share/examples/grub/10_netbsd
 share/examples/grub/10_windows
 share/examples/grub/10_xnu
 share/examples/grub/20_linux_xen
+share/examples/grub/25_bli
 share/examples/grub/30_os-prober
+share/examples/grub/30_uefi-firmware
 share/examples/grub/40_custom
 share/examples/grub/41_custom
 share/examples/grub/README
@@ -692,12 +730,15 @@ share/locale/es/LC_MESSAGES/grub.mo
 share/locale/fi/LC_MESSAGES/grub.mo
 share/locale/fr/LC_MESSAGES/grub.mo
 share/locale/gl/LC_MESSAGES/grub.mo
+share/locale/he/LC_MESSAGES/grub.mo
 share/locale/hr/LC_MESSAGES/grub.mo
 share/locale/hu/LC_MESSAGES/grub.mo
 share/locale/id/LC_MESSAGES/grub.mo
 share/locale/it/LC_MESSAGES/grub.mo
 share/locale/ja/LC_MESSAGES/grub.mo
+share/locale/ka/LC_MESSAGES/grub.mo
 share/locale/ko/LC_MESSAGES/grub.mo
+share/locale/lg/LC_MESSAGES/grub.mo
 share/locale/lt/LC_MESSAGES/grub.mo
 share/locale/nb/LC_MESSAGES/grub.mo
 share/locale/nl/LC_MESSAGES/grub.mo

Index: pkgsrc/sysutils/grub2/distinfo
diff -u pkgsrc/sysutils/grub2/distinfo:1.12 pkgsrc/sysutils/grub2/distinfo:1.13
--- pkgsrc/sysutils/grub2/distinfo:1.12 Tue Oct 26 11:19:39 2021
+++ pkgsrc/sysutils/grub2/distinfo      Wed Feb  7 17:50:45 2024
@@ -1,12 +1,6 @@
-$NetBSD: distinfo,v 1.12 2021/10/26 11:19:39 nia Exp $
+$NetBSD: distinfo,v 1.13 2024/02/07 17:50:45 wiz Exp $
 
-BLAKE2s (grub-2.04.tar.gz) = f419778d32d0a09878747d78113be4b79b47fd40c389eb32e61eeb2f20660a96
-SHA512 (grub-2.04.tar.gz) = 3ba14fe8fdd15322ef89dd2f90e7f4a9e1e9a2ea19b795e0677c1f504b3fb93329109a83ddf5230f7173068e3f043dd5c9a92f6f2bb9257e13e236f62df10453
-Size (grub-2.04.tar.gz) = 11130271 bytes
-BLAKE2s (unifont-5.1.20080820.pcf.gz) = fba529620cea036f864dd2d1fb3667b5e26e9367479effa47a95e4b8e103fb67
-SHA512 (unifont-5.1.20080820.pcf.gz) = 8939e2bc82ca97b60e6678f3ff079a2be7ba9b702f2e8ee289e853af5823695f7baafbf14b674fc5e41071f2a6de4f2dadd56bf8b4653849dd756d59622f1649
-Size (unifont-5.1.20080820.pcf.gz) = 1379965 bytes
-SHA1 (patch-configure) = 9c84557e13f6ce747a5e30e383aa3599a2c607b7
-SHA1 (patch-grub-core_osdep_bsd_hostdisk.c) = 2c7251081082d671d21343b5e95300a6779b4b21
-SHA1 (patch-grub-core_osdep_generic_blocklist.c) = e1bf4511edfea1754204ffb5fb2a6a5a777b8b94
-SHA1 (patch-util_getroot.c) = 7c2f148ffa778872de4f59b6fcf365bd1a497acf
+BLAKE2s (grub-2.12.tar.xz) = 6d20361f04dc5145fa17b4ba299d240cbe8d5a3efddd0484a879c3e2cf8f5836
+SHA512 (grub-2.12.tar.xz) = 761c060a4c3da9c0e810b0ea967e3ebc66baa4ddd682a503ae3d30a83707626bccaf49359304a16b3a26fc4435fe6bea1ee90be910c84de3c2b5485a31a15be3
+Size (grub-2.12.tar.xz) = 6675608 bytes
+SHA1 (patch-tests_util_grub-shell.in) = 23630b840159dfd9caa2506c2082a7c8d9422ace

Index: pkgsrc/sysutils/grub2/options.mk
diff -u pkgsrc/sysutils/grub2/options.mk:1.5 pkgsrc/sysutils/grub2/options.mk:1.6
--- pkgsrc/sysutils/grub2/options.mk:1.5        Tue Jun  6 12:42:19 2023
+++ pkgsrc/sysutils/grub2/options.mk    Wed Feb  7 17:50:45 2024
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.5 2023/06/06 12:42:19 riastradh Exp $
+# $NetBSD: options.mk,v 1.6 2024/02/07 17:50:45 wiz Exp $
 #
 
 #
@@ -9,7 +9,7 @@
 #
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.grub2
-PKG_SUPPORTED_OPTIONS= debug freetype fuse
+PKG_SUPPORTED_OPTIONS= debug freetype fuse grub-efi
 PKG_SUGGESTED_OPTIONS= freetype
 
 .include "../../mk/bsd.options.mk"
@@ -48,3 +48,25 @@ PLIST.fuse=          yes
 .else
 CONFIGURE_ARGS+=       --disable-grub-mount
 .endif
+
+#
+# The configure script sets the variables `target_cpu' and `platform', which
+# are used for the location of the library directory.  The following mimics
+# the configure script's behavior for i386 and x86_64.
+#
+GRUB_TARGET_CPU=       ${MACHINE_ARCH}
+.if ${LOWER_VENDOR} == "apple" || !empty(PKG_OPTIONS:Mgrub-efi)
+GRUB_PLATFORM=         efi
+.else
+.  if !defined(GRUB_PLATFORM)
+GRUB_PLATFORM=         pc
+.  endif
+.endif
+.if ${GRUB_TARGET_CPU} == "x86_64" && ${GRUB_PLATFORM} == "pc"
+GRUB_TARGET_CPU=       i386
+.endif
+PLIST_SUBST+=          GRUB_TARGET_CPU=${GRUB_TARGET_CPU}
+PLIST_SUBST+=          GRUB_PLATFORM=${GRUB_PLATFORM}
+PLIST_VARS+=           efi
+PLIST_VARS+=           pc
+PLIST.${GRUB_PLATFORM}=        yes

Added files:

Index: pkgsrc/sysutils/grub2/patches/patch-tests_util_grub-shell.in
diff -u /dev/null pkgsrc/sysutils/grub2/patches/patch-tests_util_grub-shell.in:1.1
--- /dev/null   Wed Feb  7 17:50:45 2024
+++ pkgsrc/sysutils/grub2/patches/patch-tests_util_grub-shell.in        Wed Feb  7 17:50:45 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-tests_util_grub-shell.in,v 1.1 2024/02/07 17:50:45 wiz Exp $
+
+Fix unportable test(1) operator.
+
+--- tests/util/grub-shell.in.orig      2024-01-27 16:08:06.031712989 +0000
++++ tests/util/grub-shell.in
+@@ -426,7 +426,7 @@ if test -z "$debug"; then
+   # doesn't seem to be a better option.
+   #
+   # SeaBIOS is used for i386, except on EFI.
+-  if [ ${grub_modinfo_target_cpu} == 'i386' ] && [ ${grub_modinfo_platform} != 'efi' ]; then
++  if [ ${grub_modinfo_target_cpu} = 'i386' ] && [ ${grub_modinfo_platform} != 'efi' ]; then
+     qemuopts="${qemuopts} -fw_cfg name=etc/sercon-port,string=0"
+   fi
+ fi



Home | Main Index | Thread Index | Old Index