mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
sysutils/grub2-efi: the port had been improved (+)
- Revert previous naive -fpermissive "fix" and #include
<grub/env.h> to obtain the grub_env_set() prototype
- Replace RUN_DEPENDS manipulation with USE_GCC=yes:build
and hand-rolled `do-install' target with INSTALL_WRKSRC
- While here, adjust LICENSE and wrap overly long lines
Fixes: 9bc25ee236
PR: 284483
This commit is contained in:
parent
a09b35aea4
commit
891000e056
2 changed files with 20 additions and 17 deletions
|
@ -9,7 +9,7 @@ MAINTAINER= ports@FreeBSD.org
|
||||||
COMMENT= Multiboot EFI boot loader
|
COMMENT= Multiboot EFI boot loader
|
||||||
WWW= https://www.gnu.org/software/grub/
|
WWW= https://www.gnu.org/software/grub/
|
||||||
|
|
||||||
LICENSE= GPLv3
|
LICENSE= GPLv3+
|
||||||
|
|
||||||
RUN_DEPENDS= ${LOCALBASE}/bin/mformat:filesystems/mtools \
|
RUN_DEPENDS= ${LOCALBASE}/bin/mformat:filesystems/mtools \
|
||||||
${LOCALBASE}/bin/grub-mkrescue:sysutils/grub2-pcbsd
|
${LOCALBASE}/bin/grub-mkrescue:sysutils/grub2-pcbsd
|
||||||
|
@ -21,20 +21,19 @@ ONLY_FOR_ARCHS= amd64
|
||||||
USES= autoreconf:build bison cpe gettext gmake python tar:xz
|
USES= autoreconf:build bison cpe gettext gmake python tar:xz
|
||||||
|
|
||||||
WRKSRC= ${WRKDIR}/grub-${PORTVERSION}
|
WRKSRC= ${WRKDIR}/grub-${PORTVERSION}
|
||||||
|
INSTALL_WRKSRC= ${WRKSRC}/grub-core
|
||||||
SSP_UNSAFE= yes
|
SSP_UNSAFE= yes
|
||||||
USE_GCC= yes
|
USE_GCC= yes:build
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
MAKE_JOBS_UNSAFE= yes
|
MAKE_JOBS_UNSAFE= yes
|
||||||
|
|
||||||
CPE_PRODUCT= grub
|
CPE_PRODUCT= grub
|
||||||
CPE_VENDOR= gnu
|
CPE_VENDOR= gnu
|
||||||
|
|
||||||
CONFIGURE_ARGS= --with-platform=efi --disable-werror --localedir=${PREFIX}/share/locale
|
CONFIGURE_ARGS= --with-platform=efi --disable-werror \
|
||||||
|
--localedir=${PREFIX}/share/locale
|
||||||
CONFIGURE_ENV= CPP="${CC} -E" \
|
CONFIGURE_ENV= CPP="${CC} -E" \
|
||||||
LEX=${LOCALBASE}/bin/flex
|
LEX=${LOCALBASE}/bin/flex
|
||||||
CFLAGS+= -fpermissive
|
|
||||||
|
|
||||||
.include <bsd.port.pre.mk>
|
|
||||||
|
|
||||||
post-patch:
|
post-patch:
|
||||||
@${LN} -s ${LOCALBASE}/share/fonts/dejavu/DejaVuSans.ttf ${WRKSRC}
|
@${LN} -s ${LOCALBASE}/share/fonts/dejavu/DejaVuSans.ttf ${WRKSRC}
|
||||||
|
@ -45,11 +44,7 @@ pre-configure:
|
||||||
cd ${WRKSRC} && ./autogen.sh
|
cd ${WRKSRC} && ./autogen.sh
|
||||||
|
|
||||||
post-configure:
|
post-configure:
|
||||||
@${LN} -sfh /usr/include/machine /usr/include/sys /usr/include/x86 ${WRKSRC}/grub-core
|
@${LN} -sfh /usr/include/machine /usr/include/sys /usr/include/x86 \
|
||||||
|
${WRKSRC}/grub-core
|
||||||
|
|
||||||
do-install:
|
.include <bsd.port.mk>
|
||||||
@cd ${WRKSRC}/grub-core && ${GMAKE} install DESTDIR=${STAGEDIR}
|
|
||||||
|
|
||||||
RUN_DEPENDS:= ${RUN_DEPENDS:Ngcc*}
|
|
||||||
|
|
||||||
.include <bsd.port.post.mk>
|
|
||||||
|
|
|
@ -1,12 +1,20 @@
|
||||||
--- grub-core/disk/geli.c.orig 2015-01-30 16:34:55 UTC
|
--- grub-core/disk/geli.c.orig 2015-01-30 16:34:55 UTC
|
||||||
+++ grub-core/disk/geli.c
|
+++ grub-core/disk/geli.c
|
||||||
@@ -445,6 +445,9 @@ recover_key (grub_disk_t source, grub_cr
|
@@ -50,6 +50,7 @@
|
||||||
|
#include <grub/misc.h>
|
||||||
|
#include <grub/mm.h>
|
||||||
|
#include <grub/dl.h>
|
||||||
|
+#include <grub/env.h>
|
||||||
|
#include <grub/err.h>
|
||||||
|
#include <grub/disk.h>
|
||||||
|
#include <grub/crypto.h>
|
||||||
|
@@ -444,6 +445,9 @@ recover_key (grub_disk_t source, grub_cryptodisk_t dev
|
||||||
|
grub_free (tmp);
|
||||||
if (!grub_password_get (passphrase, MAX_PASSPHRASE))
|
if (!grub_password_get (passphrase, MAX_PASSPHRASE))
|
||||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Passphrase not supplied");
|
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Passphrase not supplied");
|
||||||
|
+
|
||||||
+ /* Set the GELI passphrase to GRUB env, for passing to FreeBSD kernel */
|
+ /* Set the GELI passphrase to GRUB env, for passing to FreeBSD kernel */
|
||||||
+ grub_env_set ("gelipassphrase", passphrase);
|
+ grub_env_set ("gelipassphrase", passphrase);
|
||||||
+
|
|
||||||
/* Calculate the PBKDF2 of the user supplied passphrase. */
|
/* Calculate the PBKDF2 of the user supplied passphrase. */
|
||||||
if (grub_le_to_cpu32 (header.niter) != 0)
|
if (grub_le_to_cpu32 (header.niter) != 0)
|
||||||
{
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue