aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/grub2
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-07-28 02:13:31 +0800
committerJohn Marino <marino@FreeBSD.org>2014-07-28 02:13:31 +0800
commitd7ab3d4063ad47e84b33e34dd90aeb45c8a5e04f (patch)
tree4d7353a6a26de19d418fa9bae2b45a8435a0781f /sysutils/grub2
parentdc30a09198a84afb6447806f6f4b5d4bc3d7b9cb (diff)
downloadfreebsd-ports-gnome-d7ab3d4063ad47e84b33e34dd90aeb45c8a5e04f.tar.gz
freebsd-ports-gnome-d7ab3d4063ad47e84b33e34dd90aeb45c8a5e04f.tar.zst
freebsd-ports-gnome-d7ab3d4063ad47e84b33e34dd90aeb45c8a5e04f.zip
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
Diffstat (limited to 'sysutils/grub2')
-rw-r--r--sysutils/grub2/Makefile42
-rw-r--r--sysutils/grub2/files/patch-grub-2.00-zfs-feature-flag-support3
-rw-r--r--sysutils/grub2/pkg-plist3
3 files changed, 18 insertions, 30 deletions
diff --git a/sysutils/grub2/Makefile b/sysutils/grub2/Makefile
index 16a8b3899028..e3c0337c4b59 100644
--- a/sysutils/grub2/Makefile
+++ b/sysutils/grub2/Makefile
@@ -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)
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} != "amd64"
-EFIEMU= "@comment "
-.endif
-
-PLIST_SUB+= EFIEMU=${EFIEMU}
+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
-.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
-.else
-CONFIGURE_ARGS+= --disable-grub-mkfont
-MKFONT= "@comment "
-.endif
+FUSE_CONFIGURE_ENABLE= grub-mount
+FUSE_LIB_DEPENDS= libfuse.so:${PORTSDIR}/sysutils/fusefs-libs
-PLIST_SUB+= MKFONT=${MKFONT}
+.include <bsd.port.pre.mk>
-.if ${PORT_OPTIONS:MFUSE}
-LIB_DEPENDS+= libfuse.so:${PORTSDIR}/sysutils/fusefs-libs
-CONFIGURE_ARGS+= --enable-grub-mount
+.if ${ARCH} != amd64
+PLIST_SUB+= EFIEMU="@comment "
.else
-CONFIGURE_ARGS+= --disable-grub-mount
-FUSE= "@comment "
+PLIST_SUB+= EFIEMU=""
.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>
diff --git a/sysutils/grub2/files/patch-grub-2.00-zfs-feature-flag-support b/sysutils/grub2/files/patch-grub-2.00-zfs-feature-flag-support
index c5ec880dd362..e582bf96c958 100644
--- a/sysutils/grub2/files/patch-grub-2.00-zfs-feature-flag-support
+++ b/sysutils/grub2/files/patch-grub-2.00-zfs-feature-flag-support
@@ -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>
diff --git a/sysutils/grub2/pkg-plist b/sysutils/grub2/pkg-plist
index fb5d55c7d75a..ef224bc76fc3 100644
--- a/sysutils/grub2/pkg-plist
+++ b/sysutils/grub2/pkg-plist
@@ -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