sysutils/grub2: Fix wrong lz4 endianness and general port cleanup
Due to lack of inclusion of <sys/endian.h>, the lz4 code incorrectly assumes a big-endian system. The result issues manifest with errors like, "error: no such device: <pool id>." and "lz3 decompression failed" at the grub prompt. Modify existing patch to add <sys/endian.h>. While here, simplify the port with OPTIONS_SUB framework and fix the manpage stuff on the options which apparently has been broken since this unmaintained port was staged. PR: 192066 Submitted by: Andrey Zholos
This commit is contained in:
parent
dc30a09198
commit
d7ab3d4063
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=363087
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= grub2
|
||||
PORTVERSION= 2.00
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= GNU/grub
|
||||
DISTNAME= grub-${PORTVERSION}
|
||||
@ -18,12 +18,11 @@ BUILD_DEPENDS= ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex \
|
||||
|
||||
CONFLICTS= grub-0*
|
||||
SSP_UNSAFE= yes
|
||||
USE_XZ= yes
|
||||
USE_GCC= yes
|
||||
USE_AUTOTOOLS= automake aclocal autoconf
|
||||
ACLOCAL_ARGS= -Im4
|
||||
GNU_CONFIGURE= yes
|
||||
USES= bison gettext gmake
|
||||
USES= bison gettext gmake tar:xz
|
||||
ONLY_FOR_ARCHS= i386 amd64
|
||||
INFO= grub grub-dev
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
@ -33,44 +32,31 @@ CONFIGURE_ENV= CPP="${CC} -E" \
|
||||
LEX=${LOCALBASE}/bin/flex
|
||||
|
||||
OPTIONS_DEFINE= MKFONT FUSE
|
||||
OPTIONS_SUB= yes
|
||||
MKFONT_DESC= Build grub-mkfont (require freetype2)
|
||||
FUSE_DESC= Build grub-mount (require FUSE)
|
||||
|
||||
MKFONT_CONFIGURE_ENABLE= grub-mkfont
|
||||
MKFONT_LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2
|
||||
MKFONT_BUILD_DEPENDS= ${LOCALBASE}/lib/X11/fonts/dejavu/DejaVuSans.ttf:${PORTSDIR}/x11-fonts/dejavu
|
||||
|
||||
FUSE_CONFIGURE_ENABLE= grub-mount
|
||||
FUSE_LIB_DEPENDS= libfuse.so:${PORTSDIR}/sysutils/fusefs-libs
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} != "amd64"
|
||||
EFIEMU= "@comment "
|
||||
.endif
|
||||
|
||||
PLIST_SUB+= EFIEMU=${EFIEMU}
|
||||
|
||||
.if ${PORT_OPTIONS:MMKFONT}
|
||||
LIB_DEPENDS+= libfreetype.so:${PORTSDIR}/print/freetype2
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/dejavu/DejaVuSans.ttf:${PORTSDIR}/x11-fonts/dejavu
|
||||
MAN1+= grub-mkfont.1
|
||||
CONFIGURE_ARGS+= --enable-grub-mkfont
|
||||
.if ${ARCH} != amd64
|
||||
PLIST_SUB+= EFIEMU="@comment "
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-grub-mkfont
|
||||
MKFONT= "@comment "
|
||||
PLIST_SUB+= EFIEMU=""
|
||||
.endif
|
||||
|
||||
PLIST_SUB+= MKFONT=${MKFONT}
|
||||
|
||||
.if ${PORT_OPTIONS:MFUSE}
|
||||
LIB_DEPENDS+= libfuse.so:${PORTSDIR}/sysutils/fusefs-libs
|
||||
CONFIGURE_ARGS+= --enable-grub-mount
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-grub-mount
|
||||
FUSE= "@comment "
|
||||
.endif
|
||||
|
||||
PLIST_SUB+= FUSE=${FUSE}
|
||||
|
||||
post-patch:
|
||||
@${LN} -s ${LOCALBASE}/lib/X11/fonts/dejavu/DejaVuSans.ttf ${WRKSRC}
|
||||
@${TOUCH} -t 200001010000 ${WRKSRC}/Makefile.util.def
|
||||
|
||||
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
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -395,7 +395,7 @@ new file mode 100644
|
||||
index 0000000..ff85a77
|
||||
--- /dev/null
|
||||
+++ grub-core/fs/zfs/zfs_lz4.c
|
||||
@@ -0,0 +1,317 @@
|
||||
@@ -0,0 +1,318 @@
|
||||
+/*
|
||||
+ * LZ4 - Fast LZ compression algorithm
|
||||
+ * Header File
|
||||
@ -430,6 +430,7 @@ index 0000000..ff85a77
|
||||
+ * - LZ4 source repository : http://code.google.com/p/lz4/
|
||||
+ */
|
||||
+
|
||||
+#include <sys/endian.h>
|
||||
+#include <grub/err.h>
|
||||
+#include <grub/mm.h>
|
||||
+#include <grub/misc.h>
|
||||
|
@ -1,6 +1,7 @@
|
||||
%%FUSE%%bin/grub-mount
|
||||
%%FUSE%%man/man1/grub-mount.1
|
||||
%%FUSE%%man/man1/grub-mount.1.gz
|
||||
%%MKFONT%%bin/grub-mkfont
|
||||
%%MKFONT%%man/man1/grub-mkfont.1.gz
|
||||
%%MKFONT%%share/grub/themes/starfield/dejavu_10.pf2
|
||||
%%MKFONT%%share/grub/themes/starfield/dejavu_12.pf2
|
||||
%%MKFONT%%share/grub/themes/starfield/dejavu_bold_14.pf2
|
||||
|
Loading…
Reference in New Issue
Block a user