pkgsrc-WIP-changes archive

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

grub2: finish update to 2.12, add EFI option



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%gatalith.at@localhost>
Pushed By:	wiz
Date:		Wed Feb 7 18:09:04 2024 +0100
Changeset:	d01ac49a36d08d74b3c7957c2dab501c28b683c7

Modified Files:
	grub2/Makefile
	grub2/PLIST
	grub2/distinfo
	grub2/options.mk
Removed Files:
	grub2/TODO

Log Message:
grub2: finish update to 2.12, add EFI option

EFI support from Anon

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d01ac49a36d08d74b3c7957c2dab501c28b683c7

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

diffstat:
 grub2/Makefile   |  56 +++++++++++------------
 grub2/PLIST      | 134 +++++++++++++++++++++++++++++++++----------------------
 grub2/TODO       |  12 -----
 grub2/distinfo   |   2 +-
 grub2/options.mk |  44 +++++++++++++-----
 5 files changed, 141 insertions(+), 107 deletions(-)

diffs:
diff --git a/grub2/Makefile b/grub2/Makefile
index acb2ef3c3a..beec44742b 100644
--- a/grub2/Makefile
+++ b/grub2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2021/05/24 19:54:11 wiz Exp $
+# $NetBSD: Makefile,v 1.33 2023/11/12 13:23:32 wiz Exp $
 
 DISTNAME=		grub-2.12
 PKGNAME=		${DISTNAME:S/grub/grub2/}
@@ -14,9 +14,6 @@ LICENSE=		gnu-gpl-v3
 
 TOOL_DEPENDS+=		help2man>=1.36:../../converters/help2man
 
-GCC_REQD+=		4.4
-FLEX_REQD+=		2.5.35
-
 CONFLICTS=		grub-[0-9]*
 
 ONLY_FOR_PLATFORM=	*-*-i386 *-*-x86_64
@@ -26,9 +23,6 @@ MKPIE_SUPPORTED=	no
 RELRO_SUPPORTED=	no
 SSP_SUPPORTED=		no
 
-# kernel.img in grub-core sometimes doesn't exist for the 'install' rule
-MAKE_JOBS_SAFE=		no
-
 USE_LANGUAGES+=		c c++
 USE_TOOLS+=		gmake flex bison gettext:run gawk pkg-config
 
@@ -36,43 +30,35 @@ USE_TOOLS+=		gmake flex bison gettext:run gawk pkg-config
 PYTHON_FOR_BUILD_ONLY=	tool
 
 GNU_CONFIGURE=		yes
+#CONFIGURE_ARGS+=	AWK=/usr/pkg/bin/gawk
+#CONFIGURE_ARGS+=	YACC=/usr/pkg/bin/bison
 CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
 CONFIGURE_ARGS+=	--disable-efiemu
 CONFIGURE_ARGS+=	--disable-grub-emu-sdl
 CONFIGURE_ARGS+=	--disable-grub-emu-pci
 CONFIGURE_ARGS+=	--disable-werror
-
 INFO_FILES=		yes
 USE_PKGLOCALEDIR=	yes
 
-MAKE_FLAGS+=	BUILD_LDFLAGS=${COMPILER_RPATH_FLAG}${X11BASE}/lib
-
 .include "../../mk/bsd.prefs.mk"
 
 CFLAGS+=		-Wno-unused-value
-
-post-configure:
-	touch work/${DISTNAME}/grub-core/extra_deps.lst
-
-#post-build:
-#cd ${WRKSRC}/grub-core && ${GMAKE} kernel.img
+MAKE_FLAGS+=		BUILD_LDFLAGS=${COMPILER_RPATH_FLAG}${X11BASE}/lib
 
 #
-# 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.
+# Build requirements, taken from the INSTALL file in GRUB's distribution:
 #
-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}
+# - GCC >= 4.1.3	(in fact >= 4.4 is required for a successful build)
+# - Flex >= 2.5.35
+# - gettext >= 0.17	(the need for >= 0.17 seems to only concern msgfmt)
+#
+# Additionnaly, help2man is required to generate the manual pages.
+#
+GCC_REQD+=		4.4
+FLEX_REQD+=		2.5.35
+
+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.
@@ -104,6 +90,10 @@ CONF_FILES_PERMS+=	${EGDIR}/${file} ${PKG_SYSCONFDIR}/${file} ${REAL_ROOT_USER}
 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
@@ -148,7 +138,13 @@ SUBST_MESSAGE.fix-sed-tabs=	Fixing tabulations for sed in scripts.
 SUBST_FILES.fix-sed-tabs=	util/grub.d/*.in
 SUBST_SED.fix-sed-tabs=		-e 's,\\t,	,g'
 
+#
+# Includes.
+#
 .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"
diff --git a/grub2/PLIST b/grub2/PLIST
index a1f4ff140b..913f2855d0 100644
--- a/grub2/PLIST
+++ b/grub2/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD$
+@comment $NetBSD: PLIST,v 1.4 2020/05/02 16:53:54 triaxx Exp $
 bin/grub-editenv
 bin/grub-file
 bin/grub-fstest
@@ -35,6 +35,8 @@ 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
@@ -45,20 +47,22 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/backtrace.mod
 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
@@ -79,16 +83,16 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/cbtable.mod
 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
@@ -122,8 +126,8 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/datetime.mod
 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
@@ -132,12 +136,22 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/div_test.mod
 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
@@ -159,10 +173,12 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/fat.module
 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
@@ -212,8 +228,8 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/gcry_twofish.mod
 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
@@ -278,8 +294,10 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/linux.mod
 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
@@ -288,28 +306,36 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ls.mod
 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
@@ -364,8 +390,8 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/ntfs.mod
 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
@@ -408,16 +434,16 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/pbkdf2.mod
 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}/plainmount.mod
 lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/plainmount.module
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/plan9.mod
-lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/plan9.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
@@ -430,12 +456,12 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/procfs.mod
 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
@@ -466,8 +492,8 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/search_fs_uuid.mod
 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
@@ -517,14 +543,16 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/tga.mod
 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
@@ -551,12 +579,12 @@ lib/grub/${GRUB_TARGET_CPU}-${GRUB_PLATFORM}/usbserial_usbdebug.mod
 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}/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
diff --git a/grub2/TODO b/grub2/TODO
deleted file mode 100644
index 7e780b7096..0000000000
--- a/grub2/TODO
+++ /dev/null
@@ -1,12 +0,0 @@
-Making install in grub-core
-gmake[2]: Entering directory '/scratch/wip/grub2.12/work/grub-2.12/grub-core'
-/usr/pkg/bin/gmake  install-am
-gmake[3]: Entering directory '/scratch/wip/grub2.12/work/grub-2.12/grub-core'
-if test x0 = x1; then   strip -S -x  -o kernel.img.bin kernel.exec;    -felf32 -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -ed2022 -ed2016 -wd1106 -nu -nd kernel.img.bin kernel.img;   rm -f kernel.img.bin;    elif test ! -z ''; then      strip  -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version -R .MIPS.abiflags -R .ARM.exidx  -o kernel.img.bin kernel.exec &&       kernel.img.bin kernel.img || (rm -f kernel.img; rm -f kernel.img.bin; exit 1);      rm -f kernel.img.bin; else strip  -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version -R .MIPS.abiflags -R .ARM.exidx  -o kernel.img kernel.exec; fi
-gmake[4]: Entering directory '/scratch/wip/grub2.12/work/grub-2.12/grub-core'
-if test x0 = x1; then   strip -S -x  -o kernel.img.bin kernel.exec;    -felf32 -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -ed2022 -ed2016 -wd1106 -nu -nd kernel.img.bin kernel.img;   rm -f kernel.img.bin;    elif test ! -z ''; then      strip  -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version -R .MIPS.abiflags -R .ARM.exidx  -o kernel.img.bin kernel.exec &&       kernel.img.bin kernel.img || (rm -f kernel.img; rm -f kernel.img.bin; exit 1);      rm -f kernel.img.bin; else strip  -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version -R .MIPS.abiflags -R .ARM.exidx  -o kernel.img kernel.exec; fi
- ../build-aux/install-sh -c -d '/scratch/wip/grub2.12/work/.destdir/usr/pkg/lib/grub/i386-pc'
- /usr/bin/install -c -o pbulk -g builder -m 644 ./kernel.img boot.img boot_hybrid.img cdboot.img pxeboot.img diskboot.img lnxboot.img lzma_decompress.img gdb_helper.py gdb_grub fs.lst command.lst partmap.lst terminal.lst fdt.lst parttool.lst video.lst crypto.lst moddep.lst disk.mod trig.mod cs5536.mod usb.mod usbserial_common.mod usbserial_pl2303.mod usbserial_ftdi.mod usbserial_usbdebug.mod uhci.mod ohci.mod ehci.mod pci.mod nativedisk.mod cmostest.mod cmosdump.mod iorw.mod cbtable.mod cbtime.mod cbls.mod cbmemc.mod regexp.mod '/scratch/wip/grub2.12/work/.destdir/usr/pkg/lib/grub/i386-pc'
-install: ./kernel.img: stat: No such file or directory
-gmake[4]: *** [Makefile:43902: install-platformDATA] Error 1
-
diff --git a/grub2/distinfo b/grub2/distinfo
index 6d9f8622bc..e9b3945bfa 100644
--- a/grub2/distinfo
+++ b/grub2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v$
+$NetBSD: distinfo,v 1.12 2021/10/26 11:19:39 nia Exp $
 
 BLAKE2s (grub-2.12.tar.xz) = 6d20361f04dc5145fa17b4ba299d240cbe8d5a3efddd0484a879c3e2cf8f5836
 SHA512 (grub-2.12.tar.xz) = 761c060a4c3da9c0e810b0ea967e3ebc66baa4ddd682a503ae3d30a83707626bccaf49359304a16b3a26fc4435fe6bea1ee90be910c84de3c2b5485a31a15be3
diff --git a/grub2/options.mk b/grub2/options.mk
index 8a43915d24..7637c16158 100644
--- a/grub2/options.mk
+++ b/grub2/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.4 2020/05/09 12:17:52 triaxx Exp $
+# $NetBSD: options.mk,v 1.5 2023/06/06 12:42:19 riastradh Exp $
 #
 
 #
@@ -9,8 +9,8 @@
 #
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.grub2
-PKG_SUPPORTED_OPTIONS=	debug freetype fuse
-PKG_SUGGESTED_OPTIONS=	freetype fuse
+PKG_SUPPORTED_OPTIONS=	debug freetype fuse grub-efi
+PKG_SUGGESTED_OPTIONS=	freetype
 
 .include "../../mk/bsd.options.mk"
 
@@ -25,22 +25,22 @@ CONFIGURE_ARGS+=	--enable-mm-debug
 CONFIGURE_ARGS+=	--disable-mm-debug
 .endif
 
-# ###
-# ### FreeType support
-# ###
+###
+### FreeType support
+###
 .if !empty(PKG_OPTIONS:Mfreetype)
 CONFIGURE_ARGS+=	--enable-grub-mkfont
 PLIST.freetype=		yes
-BUILD_DEPENDS+=		dejavu-ttf>=2.34nb1:../../fonts/dejavu-ttf
-BUILD_DEPENDS+=		unifont-[0-9]*:../../fonts/unifont
+TOOL_DEPENDS+=		dejavu-ttf>=2.34nb1:../../fonts/dejavu-ttf
+TOOL_DEPENDS+=		unifont-[0-9]*:../../fonts/unifont
 .include "../../graphics/freetype2/buildlink3.mk"
 .else
 CONFIGURE_ARGS+=	--disable-grub-mkfont
 .endif
 
-# ###
-# ### FUSE support
-# ###
+###
+### FUSE support
+###
 .if !empty(PKG_OPTIONS:Mfuse)
 CONFIGURE_ARGS+=	--enable-grub-mount
 PLIST.fuse=		yes
@@ -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


Home | Main Index | Thread Index | Old Index