Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2013 22:00:01 GMT
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/170417: Update port: sysutils/grub2 to 2.00
Message-ID:  <201304052200.r35M01Sv056722@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/170417; it has been noted by GNATS.

From: Juergen Lock <nox@jelal.kn-bremen.de>
To: bug-followup@freebsd.org
Cc: Norihiko Murase <mur1080224@inter7.jp>, Rick <rick@sloservers.com>,
        Tom Judge <tom@tomjudge.com>,
        Christian Mangin <christian.mangin@gmail.com>, dkeav04@gmail.com
Subject: Re: ports/170417: Update port: sysutils/grub2 to 2.00
Date: Fri, 5 Apr 2013 23:51:22 +0200

 --YZ5djTAD1cGYuMQK
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Updated patch that should apply on latest ports, added ZFS support
 and fixes so it builds on 8.3, 9.1, and head (tested on redports);
 dkeav04@gmail.com tested booting 9.1 from ZFS in vbox:
 
 	http://imgur.com/a/FUdhs
 
 Patch also at:
 
 	http://people.freebsd.org/~nox/tmp/grub-2.00-004-zfs.patch
 
 --YZ5djTAD1cGYuMQK
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="grub-2.00-004-zfs.patch.txt"
 
 Index: Makefile
 ===================================================================
 RCS file: /home/pcvs/ports/sysutils/grub2/Makefile,v
 retrieving revision 1.9
 diff -u -p -r1.9 Makefile
 --- Makefile	17 Nov 2012 06:01:33 -0000	1.9
 +++ Makefile	29 Mar 2013 16:42:33 -0000
 @@ -2,39 +2,93 @@
  # $FreeBSD: ports/sysutils/grub2/Makefile,v 1.9 2012/11/17 06:01:33 svnexp Exp $
  
  PORTNAME=	grub2
 -PORTVERSION=	1.98
 -PORTREVISION=	1
 +PORTVERSION=	2.00
  CATEGORIES=	sysutils
 -MASTER_SITES=	ftp://alpha.gnu.org/gnu/grub/
 +MASTER_SITES=	GNU/grub
  DISTNAME=	grub-${PORTVERSION}
  
  MAINTAINER=	ports@FreeBSD.org
  COMMENT=	Multiboot boot loader
  
 -CONFLICTS=	grub-0*
 +LICENSE=	GPLv3
  
 -GNU_CONFIGURE=		yes
 -USE_GMAKE=		yes
 -USES=			bison
 -USE_GETTEXT=		yes
 -ONLY_FOR_ARCHS=		i386 amd64
 +BUILD_DEPENDS=	${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex \
 +		help2man:${PORTSDIR}/misc/help2man
  
 -INFO=		grub
 +CONFLICTS=	grub-0*
 +USE_XZ=		yes
 +USE_GCC=	4.6+
 +GNU_CONFIGURE=	yes
 +USE_GMAKE=	yes
 +USES=		bison
 +USE_GETTEXT=	yes
 +ONLY_FOR_ARCHS=	i386 amd64
 +INFO=		grub grub-dev
 +
 +CONFIGURE_ARGS=	--disable-werror --localedir=${PREFIX}/share/locale
 +CONFIGURE_ENV=	CPP="${CC} -E" \
 +		LEX=${LOCALBASE}/bin/flex
  
 -OPTIONS_DEFINE=	MKFONT
 +OPTIONS_DEFINE=	MKFONT FUSE ZFS
  MKFONT_DESC=	Build grub-mkfont (require freetype2)
 +FUSE_DESC=	Build grub-mount (require FUSE)
 +ZFS_DESC=	ZFS support (requires system sources for libzfs.h)
  
 -.include <bsd.port.options.mk>
 +MAN1=		grub-editenv.1 grub-mklayout.1 grub-mkpasswd-pbkdf2.1 \
 +		grub-fstest.1 grub-script-check.1 grub-kbdcomp.1 \
 +		grub-mkstandalone.1 grub-mkrelpath.1 grub-mkrescue.1 \
 +		grub-menulst2cfg.1 grub-mkimage.1
 +MAN8=		grub-reboot.8 grub-set-default.8 grub-probe.8 \
 +		grub-mkconfig.8 grub-bios-setup.8 grub-mknetdir.8 \
 +		grub-install.8 grub-sparc64-setup.8 grub-ofpathname.8
 +
 +.include <bsd.port.pre.mk>
 +
 +.if ${ARCH} != "amd64"
 +EFIEMU=		"@comment "
 +.endif
 +
 +PLIST_SUB+=	EFIEMU=${EFIEMU}
  
  .if ${PORT_OPTIONS:MMKFONT}
  LIB_DEPENDS+=	freetype.9:${PORTSDIR}/print/freetype2
 +BUILD_DEPENDS+=	${LOCALBASE}/lib/X11/fonts/dejavu/DejaVuSans.ttf:${PORTSDIR}/x11-fonts/dejavu
 +MAN1+=		grub-mkfont.1
  .else
  MKFONT=		"@comment "
  .endif
  
  PLIST_SUB+=	MKFONT=${MKFONT}
  
 +.if ${PORT_OPTIONS:MFUSE}
 +LIB_DEPENDS+=	fuse:${PORTSDIR}/sysutils/fusefs-libs
 +USE_AUTOTOOLS=	automake aclocal autoconf
 +ACLOCAL_ARGS=	-Im4
 +CONFIGURE_ARGS+=	--enable-grub-mount
 +MAN1+=		grub-mount.1
 +.else
 +CONFIGURE_ARGS+=	--disable-grub-mount
 +FUSE=		"@comment "
 +.endif
 +
 +PLIST_SUB+=	FUSE=${FUSE}
 +
 +.if ${PORT_OPTIONS:MZFS}
 +USE_AUTOTOOLS=	automake aclocal autoconf
 +ACLOCAL_ARGS=	-Im4
 +CPATH=	${SRC_BASE}/sys/cddl/compat/opensolaris:${SRC_BASE}/cddl/compat/opensolaris/include:${SRC_BASE}/cddl/compat/opensolaris/lib/libumem:${SRC_BASE}/cddl/contrib/opensolaris/lib/libnvpair:${SRC_BASE}/cddl/contrib/opensolaris/lib/libuutil/common:${SRC_BASE}/cddl/contrib/opensolaris/lib/libzfs/common:${SRC_BASE}/cddl/contrib/opensolaris/lib/libzpool/common:${SRC_BASE}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs:${SRC_BASE}/sys/cddl/contrib/opensolaris/uts/common:${SRC_BASE}/sys/cddl/contrib/opensolaris /uts/common/sys:${SRC_BASE}/sys/cddl/contrib/opensolaris/common/zfs:${SRC_BASE}/cddl/contrib/opensolaris/head:${SRC_BASE}/cddl/lib/libumem
 +CFLAGS+=	-DB_FALSE=0 -DB_TRUE=1
 +CONFIGURE_ENV+=	CPATH=${CPATH}
 +MAKE_ENV+=	CPATH=${CPATH}
 +.endif
 +
 +post-patch:
 +	@${LN} -s ${LOCALBASE}/lib/X11/fonts/dejavu/DejaVuSans.ttf ${WRKSRC}
 +
 +post-configure:
 +	@${LN} -sf /usr/include/machine /usr/include/sys /usr/include/x86 ${WRKSRC}/grub-core
 +
  post-install:
  	@${CAT} ${PKGMESSAGE}
  
 -.include <bsd.port.mk>
 +.include <bsd.port.post.mk>
 Index: distinfo
 ===================================================================
 RCS file: /home/pcvs/ports/sysutils/grub2/distinfo,v
 retrieving revision 1.2
 diff -u -p -r1.2 distinfo
 --- distinfo	19 Mar 2011 12:32:33 -0000	1.2
 +++ distinfo	16 Sep 2012 11:27:30 -0000
 @@ -1,2 +1,2 @@
 -SHA256 (grub-1.98.tar.gz) = bef2c1892e052967b65aab6aa62ac702c0e50ef8848506eacf3c0b2f5007c614
 -SIZE (grub-1.98.tar.gz) = 2449386
 +SHA256 (grub-2.00.tar.xz) = 784ec38e7edc32239ad75b8e66df04dc8bfb26d88681bc9f627133a6eb85c458
 +SIZE (grub-2.00.tar.xz) = 5136412
 Index: pkg-message
 ===================================================================
 RCS file: /home/pcvs/ports/sysutils/grub2/pkg-message,v
 retrieving revision 1.1
 diff -u -p -r1.1 pkg-message
 --- pkg-message	11 Jun 2010 11:06:20 -0000	1.1
 +++ pkg-message	16 Sep 2012 13:51:55 -0000
 @@ -4,7 +4,7 @@ use 'grub-install <drive-to-install>' co
  
  A typical menu entry in /boot/grub/grub.cfg for FreeBSD:
  menuentry "FreeBSD" {
 -	set root(hd0,1,a)
 +	set root="(hd0,msdos1,bsd1)"
  	kfreebsd /boot/loader
  }
  Or use grub-mkconfig to create the config file.
 Index: pkg-plist
 ===================================================================
 RCS file: /home/pcvs/ports/sysutils/grub2/pkg-plist,v
 retrieving revision 1.1
 diff -u -p -r1.1 pkg-plist
 --- pkg-plist	11 Jun 2010 11:06:20 -0000	1.1
 +++ pkg-plist	29 Mar 2013 01:22:05 -0000
 @@ -1,220 +1,562 @@
 -bin/grub-mkimage
 -bin/grub-mkelfimage
 -bin/grub-fstest
 -bin/grub-mkisofs
 +%%FUSE%%bin/grub-mount
  %%MKFONT%%bin/grub-mkfont
 -bin/grub-mkrelpath
 -bin/grub-bin2h
 -bin/grub-script-check
 +%%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
 +%%MKFONT%%share/grub/themes/starfield/dejavu_14.pf2
 +%%MKFONT%%share/grub/themes/starfield/dejavu_16.pf2
 +%%MKFONT%%share/grub/themes/starfield/blob_w.png
 +%%MKFONT%%share/grub/themes/starfield/boot_menu_c.png
 +%%MKFONT%%share/grub/themes/starfield/boot_menu_e.png
 +%%MKFONT%%share/grub/themes/starfield/boot_menu_ne.png
 +%%MKFONT%%share/grub/themes/starfield/boot_menu_n.png
 +%%MKFONT%%share/grub/themes/starfield/boot_menu_nw.png
 +%%MKFONT%%share/grub/themes/starfield/boot_menu_se.png
 +%%MKFONT%%share/grub/themes/starfield/boot_menu_s.png
 +%%MKFONT%%share/grub/themes/starfield/boot_menu_sw.png
 +%%MKFONT%%share/grub/themes/starfield/boot_menu_w.png
 +%%MKFONT%%share/grub/themes/starfield/slider_c.png
 +%%MKFONT%%share/grub/themes/starfield/slider_n.png
 +%%MKFONT%%share/grub/themes/starfield/slider_s.png
 +%%MKFONT%%share/grub/themes/starfield/starfield.png
 +%%MKFONT%%share/grub/themes/starfield/README
 +%%MKFONT%%share/grub/themes/starfield/terminal_box_c.png
 +%%MKFONT%%share/grub/themes/starfield/terminal_box_e.png
 +%%MKFONT%%share/grub/themes/starfield/terminal_box_ne.png
 +%%MKFONT%%share/grub/themes/starfield/terminal_box_n.png
 +%%MKFONT%%share/grub/themes/starfield/terminal_box_nw.png
 +%%MKFONT%%share/grub/themes/starfield/terminal_box_se.png
 +%%MKFONT%%share/grub/themes/starfield/terminal_box_s.png
 +%%MKFONT%%share/grub/themes/starfield/terminal_box_sw.png
 +%%MKFONT%%share/grub/themes/starfield/terminal_box_w.png
 +%%MKFONT%%share/grub/themes/starfield/theme.txt
 +%%MKFONT%%share/grub/themes/starfield/COPYING.CC-BY-SA-3.0
  bin/grub-editenv
 +bin/grub-fstest
 +bin/grub-kbdcomp
 +bin/grub-menulst2cfg
 +bin/grub-mkimage
 +bin/grub-mklayout
  bin/grub-mkpasswd-pbkdf2
 +bin/grub-mkrelpath
 +bin/grub-mkstandalone
  bin/grub-mkrescue
 +bin/grub-script-check
  etc/grub.d/00_header
  etc/grub.d/30_os-prober
  etc/grub.d/40_custom
 +etc/grub.d/41_custom
  etc/grub.d/10_kfreebsd
  etc/grub.d/README
 +etc/bash_completion.d/grub
 +lib/grub/i386-pc/acpi.mod
 +lib/grub/i386-pc/acpi.module
 +lib/grub/i386-pc/adler32.mod
 +lib/grub/i386-pc/adler32.module
 +lib/grub/i386-pc/affs.mod
 +lib/grub/i386-pc/affs.module
 +lib/grub/i386-pc/afs.mod
 +lib/grub/i386-pc/afs.module
 +lib/grub/i386-pc/ahci.mod
 +lib/grub/i386-pc/ahci.module
 +lib/grub/i386-pc/all_video.mod
 +lib/grub/i386-pc/all_video.module
 +lib/grub/i386-pc/aout.mod
 +lib/grub/i386-pc/aout.module
 +lib/grub/i386-pc/at_keyboard.mod
 +lib/grub/i386-pc/at_keyboard.module
 +lib/grub/i386-pc/ata.mod
 +lib/grub/i386-pc/ata.module
 +lib/grub/i386-pc/backtrace.mod
 +lib/grub/i386-pc/backtrace.module
 +lib/grub/i386-pc/bfs.mod
 +lib/grub/i386-pc/bfs.module
 +lib/grub/i386-pc/biosdisk.mod
 +lib/grub/i386-pc/biosdisk.module
 +lib/grub/i386-pc/bitmap.mod
 +lib/grub/i386-pc/bitmap.module
 +lib/grub/i386-pc/bitmap_scale.mod
 +lib/grub/i386-pc/bitmap_scale.module
 +lib/grub/i386-pc/blocklist.mod
 +lib/grub/i386-pc/blocklist.module
 +lib/grub/i386-pc/boot.image
  lib/grub/i386-pc/boot.img
 +lib/grub/i386-pc/boot.mod
 +lib/grub/i386-pc/boot.module
 +lib/grub/i386-pc/bsd.mod
 +lib/grub/i386-pc/bsd.module
 +lib/grub/i386-pc/btrfs.mod
 +lib/grub/i386-pc/btrfs.module
 +lib/grub/i386-pc/bufio.mod
 +lib/grub/i386-pc/bufio.module
 +lib/grub/i386-pc/cat.mod
 +lib/grub/i386-pc/cat.module
 +lib/grub/i386-pc/cdboot.image
  lib/grub/i386-pc/cdboot.img
 -lib/grub/i386-pc/diskboot.img
 -lib/grub/i386-pc/kernel.img
 -lib/grub/i386-pc/lnxboot.img
 -lib/grub/i386-pc/pxeboot.img
 -lib/grub/i386-pc/biosdisk.mod
  lib/grub/i386-pc/chain.mod
 -lib/grub/i386-pc/reboot.mod
 -lib/grub/i386-pc/halt.mod
 -lib/grub/i386-pc/vbe.mod
 -lib/grub/i386-pc/vbetest.mod
 -lib/grub/i386-pc/vbeinfo.mod
 -lib/grub/i386-pc/play.mod
 -lib/grub/i386-pc/serial.mod
 -lib/grub/i386-pc/vga.mod
 -lib/grub/i386-pc/memdisk.mod
 -lib/grub/i386-pc/pci.mod
 -lib/grub/i386-pc/lspci.mod
 -lib/grub/i386-pc/aout.mod
 -lib/grub/i386-pc/bsd.mod
 -lib/grub/i386-pc/pxe.mod
 -lib/grub/i386-pc/pxecmd.mod
 -lib/grub/i386-pc/datetime.mod
 -lib/grub/i386-pc/usb.mod
 +lib/grub/i386-pc/chain.module
 +lib/grub/i386-pc/cmostest.mod
 +lib/grub/i386-pc/cmostest.module
 +lib/grub/i386-pc/cmp.mod
 +lib/grub/i386-pc/cmp.module
 +lib/grub/i386-pc/command.lst
 +lib/grub/i386-pc/config.h
 +lib/grub/i386-pc/configfile.mod
 +lib/grub/i386-pc/configfile.module
 +lib/grub/i386-pc/cpio.mod
 +lib/grub/i386-pc/cpio.module
 +lib/grub/i386-pc/cpio_be.mod
 +lib/grub/i386-pc/cpio_be.module
 +lib/grub/i386-pc/cpuid.mod
 +lib/grub/i386-pc/cpuid.module
 +lib/grub/i386-pc/crc64.mod
 +lib/grub/i386-pc/crc64.module
 +lib/grub/i386-pc/crypto.lst
 +lib/grub/i386-pc/crypto.mod
 +lib/grub/i386-pc/crypto.module
 +lib/grub/i386-pc/cryptodisk.mod
 +lib/grub/i386-pc/cryptodisk.module
 +lib/grub/i386-pc/cs5536.mod
 +lib/grub/i386-pc/cs5536.module
  lib/grub/i386-pc/date.mod
 +lib/grub/i386-pc/date.module
  lib/grub/i386-pc/datehook.mod
 -lib/grub/i386-pc/lsmmap.mod
 -lib/grub/i386-pc/ata_pthru.mod
 -lib/grub/i386-pc/hdparm.mod
 -lib/grub/i386-pc/uhci.mod
 -lib/grub/i386-pc/ohci.mod
 -lib/grub/i386-pc/usbtest.mod
 -lib/grub/i386-pc/usbms.mod
 -lib/grub/i386-pc/usb_keyboard.mod
 -lib/grub/i386-pc/efiemu.mod
 -lib/grub/i386-pc/mmap.mod
 -lib/grub/i386-pc/acpi.mod
 +lib/grub/i386-pc/datehook.module
 +lib/grub/i386-pc/datetime.mod
 +lib/grub/i386-pc/datetime.module
 +lib/grub/i386-pc/diskboot.image
 +lib/grub/i386-pc/diskboot.img
 +lib/grub/i386-pc/diskfilter.mod
 +lib/grub/i386-pc/diskfilter.module
 +lib/grub/i386-pc/dm_nv.mod
 +lib/grub/i386-pc/dm_nv.module
  lib/grub/i386-pc/drivemap.mod
 -lib/grub/i386-pc/boot.mod
 -lib/grub/i386-pc/linux16.mod
 +lib/grub/i386-pc/drivemap.module
 +lib/grub/i386-pc/echo.mod
 +lib/grub/i386-pc/echo.module
 +lib/grub/i386-pc/efiemu.mod
 +lib/grub/i386-pc/efiemu.module
 +%%EFIEMU%%lib/grub/i386-pc/efiemu32.o
 +%%EFIEMU%%lib/grub/i386-pc/efiemu64.o
 +lib/grub/i386-pc/ehci.mod
 +lib/grub/i386-pc/ehci.module
 +lib/grub/i386-pc/elf.mod
 +lib/grub/i386-pc/elf.module
 +lib/grub/i386-pc/exfat.mod
 +lib/grub/i386-pc/exfat.module
 +lib/grub/i386-pc/exfctest.mod
 +lib/grub/i386-pc/exfctest.module
 +lib/grub/i386-pc/ext2.mod
 +lib/grub/i386-pc/ext2.module
 +lib/grub/i386-pc/extcmd.mod
 +lib/grub/i386-pc/extcmd.module
 +lib/grub/i386-pc/fat.mod
 +lib/grub/i386-pc/fat.module
 +lib/grub/i386-pc/font.mod
 +lib/grub/i386-pc/font.module
 +lib/grub/i386-pc/freedos.mod
 +lib/grub/i386-pc/freedos.module
 +lib/grub/i386-pc/fs.lst
 +lib/grub/i386-pc/fshelp.mod
 +lib/grub/i386-pc/fshelp.module
 +lib/grub/i386-pc/functional_test.mod
 +lib/grub/i386-pc/functional_test.module
 +lib/grub/i386-pc/gcry_arcfour.mod
 +lib/grub/i386-pc/gcry_arcfour.module
 +lib/grub/i386-pc/gcry_blowfish.mod
 +lib/grub/i386-pc/gcry_blowfish.module
 +lib/grub/i386-pc/gcry_camellia.mod
 +lib/grub/i386-pc/gcry_camellia.module
 +lib/grub/i386-pc/gcry_cast5.mod
 +lib/grub/i386-pc/gcry_cast5.module
 +lib/grub/i386-pc/gcry_crc.mod
 +lib/grub/i386-pc/gcry_crc.module
 +lib/grub/i386-pc/gcry_des.mod
 +lib/grub/i386-pc/gcry_des.module
 +lib/grub/i386-pc/gcry_md4.mod
 +lib/grub/i386-pc/gcry_md4.module
 +lib/grub/i386-pc/gcry_md5.mod
 +lib/grub/i386-pc/gcry_md5.module
 +lib/grub/i386-pc/gcry_rfc2268.mod
 +lib/grub/i386-pc/gcry_rfc2268.module
 +lib/grub/i386-pc/gcry_rijndael.mod
 +lib/grub/i386-pc/gcry_rijndael.module
 +lib/grub/i386-pc/gcry_rmd160.mod
 +lib/grub/i386-pc/gcry_rmd160.module
 +lib/grub/i386-pc/gcry_seed.mod
 +lib/grub/i386-pc/gcry_seed.module
 +lib/grub/i386-pc/gcry_serpent.mod
 +lib/grub/i386-pc/gcry_serpent.module
 +lib/grub/i386-pc/gcry_sha1.mod
 +lib/grub/i386-pc/gcry_sha1.module
 +lib/grub/i386-pc/gcry_sha256.mod
 +lib/grub/i386-pc/gcry_sha256.module
 +lib/grub/i386-pc/gcry_sha512.mod
 +lib/grub/i386-pc/gcry_sha512.module
 +lib/grub/i386-pc/gcry_tiger.mod
 +lib/grub/i386-pc/gcry_tiger.module
 +lib/grub/i386-pc/gcry_twofish.mod
 +lib/grub/i386-pc/gcry_twofish.module
 +lib/grub/i386-pc/gcry_whirlpool.mod
 +lib/grub/i386-pc/gcry_whirlpool.module
 +lib/grub/i386-pc/gdb.mod
 +lib/grub/i386-pc/gdb.module
 +lib/grub/i386-pc/gdb_grub
 +lib/grub/i386-pc/geli.mod
 +lib/grub/i386-pc/geli.module
 +lib/grub/i386-pc/gettext.mod
 +lib/grub/i386-pc/gettext.module
 +lib/grub/i386-pc/gfxmenu.mod
 +lib/grub/i386-pc/gfxmenu.module
 +lib/grub/i386-pc/gfxterm.mod
 +lib/grub/i386-pc/gfxterm.module
 +lib/grub/i386-pc/gmodule.pl
 +lib/grub/i386-pc/gptsync.mod
 +lib/grub/i386-pc/gptsync.module
 +lib/grub/i386-pc/gzio.mod
 +lib/grub/i386-pc/gzio.module
 +lib/grub/i386-pc/halt.mod
 +lib/grub/i386-pc/halt.module
 +lib/grub/i386-pc/hashsum.mod
 +lib/grub/i386-pc/hashsum.module
 +lib/grub/i386-pc/hdparm.mod
 +lib/grub/i386-pc/hdparm.module
 +lib/grub/i386-pc/hello.mod
 +lib/grub/i386-pc/hello.module
 +lib/grub/i386-pc/help.mod
 +lib/grub/i386-pc/help.module
 +lib/grub/i386-pc/hexdump.mod
 +lib/grub/i386-pc/hexdump.module
 +lib/grub/i386-pc/hfs.mod
 +lib/grub/i386-pc/hfs.module
 +lib/grub/i386-pc/hfsplus.mod
 +lib/grub/i386-pc/hfsplus.module
 +lib/grub/i386-pc/http.mod
 +lib/grub/i386-pc/http.module
 +lib/grub/i386-pc/iorw.mod
 +lib/grub/i386-pc/iorw.module
 +lib/grub/i386-pc/iso9660.mod
 +lib/grub/i386-pc/iso9660.module
 +lib/grub/i386-pc/jfs.mod
 +lib/grub/i386-pc/jfs.module
 +lib/grub/i386-pc/jpeg.mod
 +lib/grub/i386-pc/jpeg.module
 +lib/grub/i386-pc/kernel.exec
 +lib/grub/i386-pc/kernel.img
 +lib/grub/i386-pc/keylayouts.mod
 +lib/grub/i386-pc/keylayouts.module
 +lib/grub/i386-pc/keystatus.mod
 +lib/grub/i386-pc/keystatus.module
 +lib/grub/i386-pc/ldm.mod
 +lib/grub/i386-pc/ldm.module
 +lib/grub/i386-pc/legacycfg.mod
 +lib/grub/i386-pc/legacycfg.module
  lib/grub/i386-pc/linux.mod
 -lib/grub/i386-pc/xnu.mod
 -lib/grub/i386-pc/cpuid.mod
 -lib/grub/i386-pc/at_keyboard.mod
 -lib/grub/i386-pc/vga_text.mod
 -lib/grub/i386-pc/relocator.mod
 -lib/grub/i386-pc/ata.mod
 -lib/grub/i386-pc/setpci.mod
 +lib/grub/i386-pc/linux.module
 +lib/grub/i386-pc/linux16.mod
 +lib/grub/i386-pc/linux16.module
 +lib/grub/i386-pc/lnxboot.image
 +lib/grub/i386-pc/lnxboot.img
 +lib/grub/i386-pc/loadenv.mod
 +lib/grub/i386-pc/loadenv.module
 +lib/grub/i386-pc/loopback.mod
 +lib/grub/i386-pc/loopback.module
 +lib/grub/i386-pc/ls.mod
 +lib/grub/i386-pc/ls.module
 +lib/grub/i386-pc/lsacpi.mod
 +lib/grub/i386-pc/lsacpi.module
 +lib/grub/i386-pc/lsapm.mod
 +lib/grub/i386-pc/lsapm.module
 +lib/grub/i386-pc/lsmmap.mod
 +lib/grub/i386-pc/lsmmap.module
 +lib/grub/i386-pc/lspci.mod
 +lib/grub/i386-pc/lspci.module
 +lib/grub/i386-pc/luks.mod
 +lib/grub/i386-pc/luks.module
 +lib/grub/i386-pc/lvm.mod
 +lib/grub/i386-pc/lvm.module
 +lib/grub/i386-pc/lzma_decompress.image
 +lib/grub/i386-pc/lzma_decompress.img
 +lib/grub/i386-pc/lzopio.mod
 +lib/grub/i386-pc/lzopio.module
 +lib/grub/i386-pc/mdraid09.mod
 +lib/grub/i386-pc/mdraid09.module
 +lib/grub/i386-pc/mdraid09_be.mod
 +lib/grub/i386-pc/mdraid09_be.module
 +lib/grub/i386-pc/mdraid1x.mod
 +lib/grub/i386-pc/mdraid1x.module
 +lib/grub/i386-pc/memdisk.mod
 +lib/grub/i386-pc/memdisk.module
 +lib/grub/i386-pc/memrw.mod
 +lib/grub/i386-pc/memrw.module
 +lib/grub/i386-pc/minicmd.mod
 +lib/grub/i386-pc/minicmd.module
 +lib/grub/i386-pc/minix.mod
 +lib/grub/i386-pc/minix.module
 +lib/grub/i386-pc/minix2.mod
 +lib/grub/i386-pc/minix2.module
 +lib/grub/i386-pc/minix2_be.mod
 +lib/grub/i386-pc/minix2_be.module
 +lib/grub/i386-pc/minix3.mod
 +lib/grub/i386-pc/minix3.module
 +lib/grub/i386-pc/minix3_be.mod
 +lib/grub/i386-pc/minix3_be.module
 +lib/grub/i386-pc/minix_be.mod
 +lib/grub/i386-pc/minix_be.module
 +lib/grub/i386-pc/mmap.mod
 +lib/grub/i386-pc/mmap.module
 +lib/grub/i386-pc/moddep.lst
 +lib/grub/i386-pc/modinfo.sh
 +lib/grub/i386-pc/msdospart.mod
 +lib/grub/i386-pc/msdospart.module
  lib/grub/i386-pc/multiboot.mod
 +lib/grub/i386-pc/multiboot.module
  lib/grub/i386-pc/multiboot2.mod
 -lib/grub/i386-pc/fshelp.mod
 -lib/grub/i386-pc/fat.mod
 -lib/grub/i386-pc/ufs1.mod
 -lib/grub/i386-pc/ufs2.mod
 -lib/grub/i386-pc/ext2.mod
 +lib/grub/i386-pc/multiboot2.module
 +lib/grub/i386-pc/net.mod
 +lib/grub/i386-pc/net.module
 +lib/grub/i386-pc/newc.mod
 +lib/grub/i386-pc/newc.module
 +lib/grub/i386-pc/nilfs2.mod
 +lib/grub/i386-pc/nilfs2.module
 +lib/grub/i386-pc/normal.mod
 +lib/grub/i386-pc/normal.module
  lib/grub/i386-pc/ntfs.mod
 +lib/grub/i386-pc/ntfs.module
  lib/grub/i386-pc/ntfscomp.mod
 -lib/grub/i386-pc/minix.mod
 -lib/grub/i386-pc/hfs.mod
 -lib/grub/i386-pc/jfs.mod
 -lib/grub/i386-pc/iso9660.mod
 -lib/grub/i386-pc/xfs.mod
 -lib/grub/i386-pc/affs.mod
 -lib/grub/i386-pc/sfs.mod
 -lib/grub/i386-pc/hfsplus.mod
 -lib/grub/i386-pc/reiserfs.mod
 -lib/grub/i386-pc/cpio.mod
 -lib/grub/i386-pc/tar.mod
 -lib/grub/i386-pc/udf.mod
 -lib/grub/i386-pc/afs.mod
 -lib/grub/i386-pc/afs_be.mod
 -lib/grub/i386-pc/befs.mod
 -lib/grub/i386-pc/befs_be.mod
 +lib/grub/i386-pc/ntfscomp.module
 +lib/grub/i386-pc/ntldr.mod
 +lib/grub/i386-pc/ntldr.module
 +lib/grub/i386-pc/odc.mod
 +lib/grub/i386-pc/odc.module
 +lib/grub/i386-pc/ohci.mod
 +lib/grub/i386-pc/ohci.module
 +lib/grub/i386-pc/part_acorn.mod
 +lib/grub/i386-pc/part_acorn.module
  lib/grub/i386-pc/part_amiga.mod
 +lib/grub/i386-pc/part_amiga.module
  lib/grub/i386-pc/part_apple.mod
 +lib/grub/i386-pc/part_apple.module
 +lib/grub/i386-pc/part_bsd.mod
 +lib/grub/i386-pc/part_bsd.module
 +lib/grub/i386-pc/part_dvh.mod
 +lib/grub/i386-pc/part_dvh.module
 +lib/grub/i386-pc/part_gpt.mod
 +lib/grub/i386-pc/part_gpt.module
  lib/grub/i386-pc/part_msdos.mod
 +lib/grub/i386-pc/part_msdos.module
 +lib/grub/i386-pc/part_plan.mod
 +lib/grub/i386-pc/part_plan.module
  lib/grub/i386-pc/part_sun.mod
 -lib/grub/i386-pc/part_acorn.mod
 -lib/grub/i386-pc/part_gpt.mod
 -lib/grub/i386-pc/raid.mod
 +lib/grub/i386-pc/part_sun.module
 +lib/grub/i386-pc/part_sunpc.mod
 +lib/grub/i386-pc/part_sunpc.module
 +lib/grub/i386-pc/partmap.lst
 +lib/grub/i386-pc/parttool.lst
 +lib/grub/i386-pc/parttool.mod
 +lib/grub/i386-pc/parttool.module
 +lib/grub/i386-pc/password.mod
 +lib/grub/i386-pc/password.module
 +lib/grub/i386-pc/password_pbkdf2.mod
 +lib/grub/i386-pc/password_pbkdf2.module
 +lib/grub/i386-pc/pata.mod
 +lib/grub/i386-pc/pata.module
 +lib/grub/i386-pc/pbkdf2.mod
 +lib/grub/i386-pc/pbkdf2.module
 +lib/grub/i386-pc/pci.mod
 +lib/grub/i386-pc/pci.module
 +lib/grub/i386-pc/plan9.mod
 +lib/grub/i386-pc/plan9.module
 +lib/grub/i386-pc/play.mod
 +lib/grub/i386-pc/play.module
 +lib/grub/i386-pc/png.mod
 +lib/grub/i386-pc/png.module
 +lib/grub/i386-pc/priority_queue.mod
 +lib/grub/i386-pc/priority_queue.module
 +lib/grub/i386-pc/probe.mod
 +lib/grub/i386-pc/probe.module
 +lib/grub/i386-pc/pxe.mod
 +lib/grub/i386-pc/pxe.module
 +lib/grub/i386-pc/pxeboot.image
 +lib/grub/i386-pc/pxeboot.img
 +lib/grub/i386-pc/pxechain.mod
 +lib/grub/i386-pc/pxechain.module
  lib/grub/i386-pc/raid5rec.mod
 +lib/grub/i386-pc/raid5rec.module
  lib/grub/i386-pc/raid6rec.mod
 -lib/grub/i386-pc/mdraid.mod
 -lib/grub/i386-pc/dm_nv.mod
 -lib/grub/i386-pc/lvm.mod
 +lib/grub/i386-pc/raid6rec.module
 +lib/grub/i386-pc/read.mod
 +lib/grub/i386-pc/read.module
 +lib/grub/i386-pc/reboot.mod
 +lib/grub/i386-pc/reboot.module
 +lib/grub/i386-pc/regexp.mod
 +lib/grub/i386-pc/regexp.module
 +lib/grub/i386-pc/reiserfs.mod
 +lib/grub/i386-pc/reiserfs.module
 +lib/grub/i386-pc/relocator.mod
 +lib/grub/i386-pc/relocator.module
 +lib/grub/i386-pc/romfs.mod
 +lib/grub/i386-pc/romfs.module
  lib/grub/i386-pc/scsi.mod
 -lib/grub/i386-pc/minicmd.mod
 -lib/grub/i386-pc/extcmd.mod
 -lib/grub/i386-pc/hello.mod
 -lib/grub/i386-pc/handler.mod
 -lib/grub/i386-pc/ls.mod
 -lib/grub/i386-pc/cmp.mod
 -lib/grub/i386-pc/cat.mod
 -lib/grub/i386-pc/help.mod
 +lib/grub/i386-pc/scsi.module
  lib/grub/i386-pc/search.mod
 -lib/grub/i386-pc/loopback.mod
 -lib/grub/i386-pc/configfile.mod
 -lib/grub/i386-pc/echo.mod
 -lib/grub/i386-pc/terminfo.mod
 -lib/grub/i386-pc/test.mod
 -lib/grub/i386-pc/blocklist.mod
 -lib/grub/i386-pc/hexdump.mod
 -lib/grub/i386-pc/read.mod
 -lib/grub/i386-pc/sleep.mod
 -lib/grub/i386-pc/loadenv.mod
 -lib/grub/i386-pc/crc.mod
 -lib/grub/i386-pc/parttool.mod
 -lib/grub/i386-pc/msdospart.mod
 -lib/grub/i386-pc/memrw.mod
 -lib/grub/i386-pc/normal.mod
 -lib/grub/i386-pc/sh.mod
 -lib/grub/i386-pc/gptsync.mod
 -lib/grub/i386-pc/true.mod
 -lib/grub/i386-pc/probe.mod
 -lib/grub/i386-pc/password.mod
 -lib/grub/i386-pc/keystatus.mod
 -lib/grub/i386-pc/gfxmenu.mod
 +lib/grub/i386-pc/search.module
  lib/grub/i386-pc/search_fs_file.mod
 +lib/grub/i386-pc/search_fs_file.module
  lib/grub/i386-pc/search_fs_uuid.mod
 +lib/grub/i386-pc/search_fs_uuid.module
  lib/grub/i386-pc/search_label.mod
 +lib/grub/i386-pc/search_label.module
 +lib/grub/i386-pc/sendkey.mod
 +lib/grub/i386-pc/sendkey.module
 +lib/grub/i386-pc/serial.mod
 +lib/grub/i386-pc/serial.module
 +lib/grub/i386-pc/setjmp.mod
 +lib/grub/i386-pc/setjmp.module
 +lib/grub/i386-pc/setpci.mod
 +lib/grub/i386-pc/setpci.module
 +lib/grub/i386-pc/sfs.mod
 +lib/grub/i386-pc/sfs.module
 +lib/grub/i386-pc/sleep.mod
 +lib/grub/i386-pc/sleep.module
 +lib/grub/i386-pc/squash4.mod
 +lib/grub/i386-pc/squash4.module
 +lib/grub/i386-pc/tar.mod
 +lib/grub/i386-pc/tar.module
 +lib/grub/i386-pc/terminal.lst
 +lib/grub/i386-pc/terminal.mod
 +lib/grub/i386-pc/terminal.module
 +lib/grub/i386-pc/terminfo.mod
 +lib/grub/i386-pc/terminfo.module
 +lib/grub/i386-pc/test.mod
 +lib/grub/i386-pc/test.module
 +lib/grub/i386-pc/test_blockarg.mod
 +lib/grub/i386-pc/test_blockarg.module
 +lib/grub/i386-pc/testload.mod
 +lib/grub/i386-pc/testload.module
 +lib/grub/i386-pc/tftp.mod
 +lib/grub/i386-pc/tftp.module
 +lib/grub/i386-pc/tga.mod
 +lib/grub/i386-pc/tga.module
 +lib/grub/i386-pc/time.mod
 +lib/grub/i386-pc/time.module
 +lib/grub/i386-pc/trig.mod
 +lib/grub/i386-pc/trig.module
 +lib/grub/i386-pc/true.mod
 +lib/grub/i386-pc/true.module
 +lib/grub/i386-pc/udf.mod
 +lib/grub/i386-pc/udf.module
 +lib/grub/i386-pc/ufs1.mod
 +lib/grub/i386-pc/ufs1.module
 +lib/grub/i386-pc/ufs2.mod
 +lib/grub/i386-pc/ufs2.module
 +lib/grub/i386-pc/uhci.mod
 +lib/grub/i386-pc/uhci.module
 +lib/grub/i386-pc/usb.mod
 +lib/grub/i386-pc/usb.module
 +lib/grub/i386-pc/usb_keyboard.mod
 +lib/grub/i386-pc/usb_keyboard.module
 +lib/grub/i386-pc/usbms.mod
 +lib/grub/i386-pc/usbms.module
 +lib/grub/i386-pc/usbserial_common.mod
 +lib/grub/i386-pc/usbserial_common.module
 +lib/grub/i386-pc/usbserial_ftdi.mod
 +lib/grub/i386-pc/usbserial_ftdi.module
 +lib/grub/i386-pc/usbserial_pl2303.mod
 +lib/grub/i386-pc/usbserial_pl2303.module
 +lib/grub/i386-pc/usbtest.mod
 +lib/grub/i386-pc/usbtest.module
 +lib/grub/i386-pc/vbe.mod
 +lib/grub/i386-pc/vbe.module
 +lib/grub/i386-pc/vga.mod
 +lib/grub/i386-pc/vga.module
 +lib/grub/i386-pc/vga_text.mod
 +lib/grub/i386-pc/vga_text.module
 +lib/grub/i386-pc/video.lst
  lib/grub/i386-pc/video.mod
 +lib/grub/i386-pc/video.module
 +lib/grub/i386-pc/video_bochs.mod
 +lib/grub/i386-pc/video_bochs.module
 +lib/grub/i386-pc/video_cirrus.mod
 +lib/grub/i386-pc/video_cirrus.module
  lib/grub/i386-pc/video_fb.mod
 -lib/grub/i386-pc/bitmap.mod
 -lib/grub/i386-pc/bitmap_scale.mod
 -lib/grub/i386-pc/font.mod
 -lib/grub/i386-pc/gfxterm.mod
 +lib/grub/i386-pc/video_fb.module
 +lib/grub/i386-pc/videoinfo.mod
 +lib/grub/i386-pc/videoinfo.module
  lib/grub/i386-pc/videotest.mod
 -lib/grub/i386-pc/tga.mod
 -lib/grub/i386-pc/jpeg.mod
 -lib/grub/i386-pc/png.mod
 -lib/grub/i386-pc/gzio.mod
 -lib/grub/i386-pc/elf.mod
 -lib/grub/i386-pc/bufio.mod
 -lib/grub/i386-pc/gettext.mod
 +lib/grub/i386-pc/videotest.module
 +lib/grub/i386-pc/xfs.mod
 +lib/grub/i386-pc/xfs.module
 +lib/grub/i386-pc/xnu.mod
 +lib/grub/i386-pc/xnu.module
  lib/grub/i386-pc/xnu_uuid.mod
 -lib/grub/i386-pc/trig.mod
 -lib/grub/i386-pc/setjmp.mod
 -lib/grub/i386-pc/charset.mod
 -lib/grub/i386-pc/terminal.mod
 -lib/grub/i386-pc/crypto.mod
 -lib/grub/i386-pc/hashsum.mod
 -lib/grub/i386-pc/pbkdf2.mod
 -lib/grub/i386-pc/password_pbkdf2.mod
 -lib/grub/i386-pc/gcry_whirlpool.mod
 -lib/grub/i386-pc/gcry_tiger.mod
 -lib/grub/i386-pc/gcry_twofish.mod
 -lib/grub/i386-pc/gcry_sha512.mod
 -lib/grub/i386-pc/gcry_sha256.mod
 -lib/grub/i386-pc/gcry_sha1.mod
 -lib/grub/i386-pc/gcry_serpent.mod
 -lib/grub/i386-pc/gcry_seed.mod
 -lib/grub/i386-pc/gcry_rmd160.mod
 -lib/grub/i386-pc/gcry_rijndael.mod
 -lib/grub/i386-pc/gcry_rfc2268.mod
 -lib/grub/i386-pc/gcry_md5.mod
 -lib/grub/i386-pc/gcry_md4.mod
 -lib/grub/i386-pc/gcry_des.mod
 -lib/grub/i386-pc/gcry_crc.mod
 -lib/grub/i386-pc/gcry_cast5.mod
 -lib/grub/i386-pc/gcry_camellia.mod
 -lib/grub/i386-pc/gcry_blowfish.mod
 -lib/grub/i386-pc/gcry_arcfour.mod
 -lib/grub/i386-pc/functional_test.mod
 -lib/grub/i386-pc/example_functional_test.mod
 -lib/grub/i386-pc/moddep.lst
 -lib/grub/i386-pc/command.lst
 -lib/grub/i386-pc/fs.lst
 -lib/grub/i386-pc/partmap.lst
 -lib/grub/i386-pc/parttool.lst
 -lib/grub/i386-pc/handler.lst
 -lib/grub/i386-pc/video.lst
 -lib/grub/i386-pc/crypto.lst
 -lib/grub/i386-pc/terminal.lst
 -lib/grub/i386-pc/build_env.mk
 -lib/grub/i386-pc/config.h
 -lib/grub/i386-pc/grub_script.tab.h
 -lib/grub/grub-mkconfig_lib
 -lib/grub/update-grub_lib
 -sbin/grub-setup
 -sbin/grub-mkdevicemap
 +lib/grub/i386-pc/xnu_uuid.module
 +lib/grub/i386-pc/xzio.mod
 +lib/grub/i386-pc/xzio.module
 +lib/grub/i386-pc/zfs.mod
 +lib/grub/i386-pc/zfs.module
 +lib/grub/i386-pc/zfscrypt.mod
 +lib/grub/i386-pc/zfscrypt.module
 +lib/grub/i386-pc/zfsinfo.mod
 +lib/grub/i386-pc/zfsinfo.module
 +sbin/grub-bios-setup
  sbin/grub-probe
  sbin/grub-install
  sbin/grub-mkconfig
 +sbin/grub-mknetdir
 +sbin/grub-ofpathname
  sbin/grub-set-default
 +sbin/grub-sparc64-setup
  sbin/grub-reboot
 +share/grub/grub-mkconfig_lib
 +share/locale/ast/LC_MESSAGES/grub.mo
  share/locale/ca/LC_MESSAGES/grub.mo
 +share/locale/da/LC_MESSAGES/grub.mo
  share/locale/de/LC_MESSAGES/grub.mo
 +share/locale/de@hebrew/LC_MESSAGES/grub.mo
 +share/locale/de_CH/LC_MESSAGES/grub.mo
 +share/locale/en@arabic/LC_MESSAGES/grub.mo
 +share/locale/en@cyrillic/LC_MESSAGES/grub.mo
 +share/locale/en@greek/LC_MESSAGES/grub.mo
 +share/locale/en@hebrew/LC_MESSAGES/grub.mo
 +share/locale/en@piglatin/LC_MESSAGES/grub.mo
 +share/locale/en@quot/LC_MESSAGES/grub.mo
 +share/locale/eo/LC_MESSAGES/grub.mo
  share/locale/fi/LC_MESSAGES/grub.mo
  share/locale/fr/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/nl/LC_MESSAGES/grub.mo
 +share/locale/pa/LC_MESSAGES/grub.mo
 +share/locale/pl/LC_MESSAGES/grub.mo
  share/locale/ru/LC_MESSAGES/grub.mo
  share/locale/sv/LC_MESSAGES/grub.mo
 +share/locale/uk/LC_MESSAGES/grub.mo
 +share/locale/vi/LC_MESSAGES/grub.mo
  share/locale/zh_CN/LC_MESSAGES/grub.mo
 -share/locale/ast/LC_MESSAGES/grub.mo
 +share/locale/zh_TW/LC_MESSAGES/grub.mo
  @dirrmtry share/locale/ast/LC_MESSAGES
  @dirrmtry share/locale/ast
 +@dirrmtry share/locale/de@hebrew/LC_MESSAGES
 +@dirrmtry share/locale/de@hebrew
 +@dirrmtry share/locale/de_CH/LC_MESSAGES
 +@dirrmtry share/locale/de_CH
 +@dirrmtry share/locale/en@arabic/LC_MESSAGES
 +@dirrmtry share/locale/en@arabic
 +@dirrmtry share/locale/en@cyrillic/LC_MESSAGES
 +@dirrmtry share/locale/en@cyrillic
 +@dirrmtry share/locale/en@greek/LC_MESSAGES
 +@dirrmtry share/locale/en@greek
 +@dirrmtry share/locale/en@hebrew/LC_MESSAGES
 +@dirrmtry share/locale/en@hebrew
 +@dirrmtry share/locale/en@piglatin/LC_MESSAGES
 +@dirrmtry share/locale/en@piglatin
 +%%MKFONT%%@dirrm share/grub/themes/starfield
 +%%MKFONT%%@dirrm share/grub/themes
  @dirrm share/grub
  @dirrm lib/grub/i386-pc
  @dirrm lib/grub
  @dirrmtry etc/grub.d
 +@dirrmtry etc/bash_completion.d
 Index: files/patch-bsd-partmap
 ===================================================================
 RCS file: /home/pcvs/ports/sysutils/grub2/files/patch-bsd-partmap,v
 retrieving revision 1.1
 diff -u -p -r1.1 patch-bsd-partmap
 --- files/patch-bsd-partmap	12 Dec 2010 01:11:24 -0000	1.1
 +++ files/patch-bsd-partmap	16 Sep 2012 11:27:30 -0000
 @@ -1,47 +0,0 @@
 ---- include/grub/msdos_partition.h	2010-03-06 20:51:37.000000000 +0000
 -+++ include/grub/msdos_partition.h	2010-11-17 18:22:29.000000000 +0000
 -@@ -57,6 +57,7 @@
 - #define GRUB_PC_PARTITION_BSD_LABEL_SECTOR	1
 - #define GRUB_PC_PARTITION_BSD_LABEL_MAGIC	0x82564557
 - #define GRUB_PC_PARTITION_BSD_MAX_ENTRIES	8
 -+#define GRUB_PC_PARTITION_BSD_RAW_PART		2
 - 
 - /* BSD partition types.  */
 - #define GRUB_PC_PARTITION_BSD_TYPE_UNUSED	0
 ---- partmap/msdos.c	2010-03-06 20:51:37.000000000 +0000
 -+++ partmap/msdos.c	2010-11-17 18:26:26.000000000 +0000
 -@@ -176,6 +176,8 @@
 - 	      /* Check if this is a BSD partition.  */
 - 	      if (grub_msdos_partition_is_bsd (e->type))
 - 		{
 -+		  grub_uint32_t slice_offset = 0, raw_offset = 0;
 -+
 - 		  /* Check if the BSD label is within the DOS partition.  */
 - 		  if (p.len <= GRUB_PC_PARTITION_BSD_LABEL_SECTOR)
 - 		    {
 -@@ -200,6 +202,15 @@
 - 				    label.magic, p.index);
 - 		      continue;
 - 		    }
 -+
 -+		  /* Compensate for relative addressing in FreeBSD. */
 -+		  if (e->type == GRUB_PC_PARTITION_TYPE_FREEBSD
 -+		      && GRUB_PC_PARTITION_BSD_RAW_PART < grub_cpu_to_le16 (label.num_partitions))
 -+		    {
 -+		      slice_offset = p.start;
 -+		      raw_offset = grub_le_to_cpu32 (label.entries[GRUB_PC_PARTITION_BSD_RAW_PART].offset);
 -+		    }
 -+
 - 		  for (pcdata.bsd_part = 0;
 - 		       pcdata.bsd_part < grub_cpu_to_le16 (label.num_partitions);
 - 		       pcdata.bsd_part++)
 -@@ -207,7 +218,9 @@
 - 		      struct grub_msdos_partition_bsd_entry *be
 - 			= label.entries + pcdata.bsd_part;
 - 
 -+		      if (grub_le_to_cpu32 (be->offset) < raw_offset)
 -+			  continue;
 --		      p.start = grub_le_to_cpu32 (be->offset);
 -+		      p.start = grub_le_to_cpu32 (be->offset) - raw_offset + slice_offset;
 - 		      p.len = grub_le_to_cpu32 (be->size);
 - 		      pcdata.bsd_type = be->fs_type;
 Index: files/patch-include-grub-gpt_partition.h
 ===================================================================
 RCS file: /home/pcvs/ports/sysutils/grub2/files/patch-include-grub-gpt_partition.h,v
 retrieving revision 1.1
 diff -u -p -r1.1 patch-include-grub-gpt_partition.h
 --- files/patch-include-grub-gpt_partition.h	12 Oct 2010 15:48:46 -0000	1.1
 +++ files/patch-include-grub-gpt_partition.h	16 Sep 2012 11:27:30 -0000
 @@ -1,20 +0,0 @@
 ---- include/grub/gpt_partition.h.orig	2010-03-06 12:51:37.000000000 -0800
 -+++ include/grub/gpt_partition.h	2010-10-10 02:57:26.000000000 -0700
 -@@ -40,6 +40,17 @@
 -     { 0x74, 0x4e, 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 } \
 -   }
 - 
 -+#define GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT \
 -+  { grub_cpu_to_le32 (0x83BD6B9D), grub_cpu_to_le16 (0x7F41), grub_cpu_to_le16 (0x11DC), \
 -+    { 0xBE, 0x0B, 0x00, 0x15, 0x60, 0xB8, 0x4F, 0x0F } \
 -+  }
 -+  
 -+#define GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT \
 -+  { grub_cpu_to_le32 (0x6A82CB45), grub_cpu_to_le16 (0x1DD2), grub_cpu_to_le16 (0x11B2), \
 -+    { 0x99, 0xA6, 0x08, 0x00, 0x20, 0x73, 0x66, 0x31 } \
 -+  }
 -+
 -+
 - struct grub_gpt_header
 - {
 -   grub_uint8_t magic[8];
 Index: files/patch-util-grub.d-10_kfreebsd.in
 ===================================================================
 RCS file: /home/pcvs/ports/sysutils/grub2/files/patch-util-grub.d-10_kfreebsd.in,v
 retrieving revision 1.1
 diff -u -p -r1.1 patch-util-grub.d-10_kfreebsd.in
 --- files/patch-util-grub.d-10_kfreebsd.in	11 Jun 2010 11:06:20 -0000	1.1
 +++ files/patch-util-grub.d-10_kfreebsd.in	16 Sep 2012 11:27:30 -0000
 @@ -1,14 +0,0 @@
 ---- util/grub.d/10_kfreebsd.in.orig	2010-06-11 14:37:42.000000000 +0400
 -+++ util/grub.d/10_kfreebsd.in	2010-06-11 14:37:59.000000000 +0400
 -@@ -46,9 +46,9 @@
 -   args="$4"	# not used yet
 -   title="$(gettext "%s, with kFreeBSD %s")"
 -   printf "menuentry \"${title}\" ${CLASS} {\n" "${os}" "${version}"
 --  save_default_entry | sed -e "s/^/\t/"
 -+  save_default_entry | sed -e "s/^/	/"
 -   if [ -z "${prepare_boot_cache}" ]; then
 --    prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
 -+    prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/	/")"
 -   fi
 -   printf '%s\n' "${prepare_boot_cache}"
 -   cat << EOF
 Index: files/patch-util-i386-pc-grub-setup.c
 ===================================================================
 RCS file: /home/pcvs/ports/sysutils/grub2/files/patch-util-i386-pc-grub-setup.c,v
 retrieving revision 1.1
 diff -u -p -r1.1 patch-util-i386-pc-grub-setup.c
 --- files/patch-util-i386-pc-grub-setup.c	12 Oct 2010 15:48:46 -0000	1.1
 +++ files/patch-util-i386-pc-grub-setup.c	16 Sep 2012 11:27:30 -0000
 @@ -1,23 +0,0 @@
 ---- util/i386/pc/grub-setup.c.orig	2010-03-06 12:51:37.000000000 -0800
 -+++ util/i386/pc/grub-setup.c	2010-10-10 02:56:55.000000000 -0700
 -@@ -38,7 +38,8 @@
 - #include <grub/util/getroot.h>
 - 
 - static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
 --
 -+static const grub_gpt_part_type_t grub_gpt_partition_type_freebsd_boot = GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT;
 -+static const grub_gpt_part_type_t grub_gpt_partition_type_solaris_boot = GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT;
 - #include <grub_setup_init.h>
 - 
 - #include <stdio.h>
 -@@ -138,7 +139,9 @@
 -       struct grub_gpt_partentry *gptdata = p->data;
 - 
 -       /* If there's an embed region, it is in a dedicated partition.  */
 --      if (! memcmp (&gptdata->type, &grub_gpt_partition_type_bios_boot, 16))
 -+      if (! memcmp (&gptdata->type, &grub_gpt_partition_type_bios_boot, 16) || 
 -+	      ! memcmp (&gptdata->type, &grub_gpt_partition_type_freebsd_boot, 16) ||
 -+		  ! memcmp (&gptdata->type, &grub_gpt_partition_type_solaris_boot, 16))
 - 	{
 - 	  embed_region.start = p->start;
 - 	  embed_region.end = p->start + p->len;
 Index: files/patch-Makefile.util.am
 @@ -0,0 +1,128 @@
 +--- Makefile.util.am.orig
 ++++ Makefile.util.am
 +@@ -3361,7 +3361,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3386,7 +3386,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3411,7 +3411,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3436,7 +3436,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3461,7 +3461,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3486,7 +3486,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3511,7 +3511,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3536,7 +3536,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3561,7 +3561,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3586,7 +3586,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3611,7 +3611,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3636,7 +3636,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3661,7 +3661,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 +@@ -3686,7 +3686,7 @@ CLEANFILES += grub-mount.1
 + endif
 + grub_mount_SOURCES  = util/grub-mount.c grub-core/kern/emu/hostfs.c grub-core/disk/host.c 
 + nodist_grub_mount_SOURCES  = grub_fstest_init.c 
 +-grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse 
 ++grub_mount_LDADD  = libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a $(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse 
 + grub_mount_CFLAGS  = $(AM_CFLAGS) $(CFLAGS_PROGRAM) 
 + grub_mount_LDFLAGS  = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) 
 + grub_mount_CPPFLAGS  = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) 
 Index: files/patch-Makefile.util.def
 @@ -0,0 +1,11 @@
 +--- Makefile.util.def.orig
 ++++ Makefile.util.def
 +@@ -266,7 +266,7 @@ program = {
 +   ldadd = libgrubgcry.a;
 +   ldadd = libgrubkern.a;
 +   ldadd = grub-core/gnulib/libgnu.a;
 +-  ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse';
 ++  ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse';
 +   condition = COND_GRUB_MOUNT;
 + };
 + 
 Index: files/patch-grub-core-gnulib-Makefile.am
 @@ -0,0 +1,18 @@
 +--- grub-core/gnulib/Makefile.am.orig
 ++++ grub-core/gnulib/Makefile.am
 +@@ -404,13 +404,13 @@ all-local: charset.alias ref-add.sed ref
 + 
 + charset_alias = $(DESTDIR)$(libdir)/charset.alias
 + charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
 +-install-exec-local: install-exec-localcharset
 ++install-exec-local: 
 + install-exec-localcharset: all-local
 + 	if test $(GLIBC21) = no; then \
 + 	  case '$(host_os)' in \
 + 	    darwin[56]*) \
 + 	      need_charset_alias=true ;; \
 +-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
 ++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | freebsd*) \
 + 	      need_charset_alias=false ;; \
 + 	    *) \
 + 	      need_charset_alias=true ;; \
 Index: files/patch-grub-core-gnulib-Makefile.in
 @@ -0,0 +1,18 @@
 +--- grub-core/gnulib/Makefile.in.orig
 ++++ grub-core/gnulib/Makefile.in
 +@@ -1525,13 +1546,13 @@ langinfo.h: langinfo.in.h $(CXXDEFS_H) $
 + # avoid installing it.
 + 
 + all-local: charset.alias ref-add.sed ref-del.sed
 +-install-exec-local: install-exec-localcharset
 ++install-exec-local: 
 + install-exec-localcharset: all-local
 + 	if test $(GLIBC21) = no; then \
 + 	  case '$(host_os)' in \
 + 	    darwin[56]*) \
 + 	      need_charset_alias=true ;; \
 +-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
 ++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | freebsd*) \
 + 	      need_charset_alias=false ;; \
 + 	    *) \
 + 	      need_charset_alias=true ;; \
 Index: files/patch-grub-core-gnulib-argp-fmtstream.c
 @@ -0,0 +1,14 @@
 +--- grub-core/gnulib/argp-fmtstream.c.orig
 ++++ grub-core/gnulib/argp-fmtstream.c
 +@@ -47,7 +47,11 @@
 + #endif
 + 
 + #define INIT_BUF_SIZE 200
 ++#ifdef __FreeBSD__
 ++#define PRINTF_SIZE_GUESS 32767
 ++#else
 + #define PRINTF_SIZE_GUESS 150
 ++#endif
 + 
 + /* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
 +    written on it with LMARGIN spaces and limits them to RMARGIN columns
 Index: files/patch-grub-core-loader-i386-bsd.c
 @@ -0,0 +1,49 @@
 +=== modified file 'grub-core/loader/i386/bsd.c'
 +--- grub-core/loader/i386/bsd.c	2012-06-07 14:41:52 +0000
 ++++ grub-core/loader/i386/bsd.c	2012-07-21 17:44:45 +0000
 +@@ -1309,7 +1309,7 @@
 +       && phdr->p_type != PT_DYNAMIC)
 +       return 0;
 + 
 +-  paddr = phdr->p_paddr & 0xFFFFFF;
 ++  paddr = phdr->p_paddr & 0xFFFFFFF;
 + 
 +   if (paddr < kern_start)
 +     kern_start = paddr;
 +@@ -1333,7 +1333,7 @@
 +     }
 + 
 +   *do_load = 1;
 +-  phdr->p_paddr &= 0xFFFFFF;
 ++  phdr->p_paddr &= 0xFFFFFFF;
 +   paddr = phdr->p_paddr;
 + 
 +   *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
 +@@ -1351,7 +1351,7 @@
 +       && phdr->p_type != PT_DYNAMIC)
 +     return 0;
 + 
 +-  paddr = phdr->p_paddr & 0xffffff;
 ++  paddr = phdr->p_paddr & 0xfffffff;
 + 
 +   if (paddr < kern_start)
 +     kern_start = paddr;
 +@@ -1375,7 +1375,7 @@
 +     }
 + 
 +   *do_load = 1;
 +-  paddr = phdr->p_paddr & 0xffffff;
 ++  paddr = phdr->p_paddr & 0xfffffff;
 + 
 +   *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
 + 
 +@@ -1394,7 +1394,7 @@
 +     {
 +       grub_relocator_chunk_t ch;
 + 
 +-      entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFF;
 ++      entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFFF;
 +       err = grub_elf32_phdr_iterate (elf, filename,
 + 				     grub_bsd_elf32_size_hook, NULL);
 +       if (err)
 +
 Index: files/patch-include-grub-util-libzfs.h
 @@ -0,0 +1,12 @@
 +--- include/grub/util/libzfs.h.orig
 ++++ include/grub/util/libzfs.h
 +@@ -22,6 +22,9 @@
 + #include <config.h>
 + 
 + #ifdef HAVE_LIBZFS_H
 ++#ifdef __FreeBSD__
 ++typedef int boolean_t;
 ++#endif
 + #include <libzfs.h>
 + #else /* ! HAVE_LIBZFS_H */
 + 
 Index: files/patch-configure.ac
 @@ -0,0 +1,35 @@
 +--- configure.ac.orig
 ++++ configure.ac
 +@@ -1044,19 +1044,19 @@ fi
 + 
 + if test x"$libzfs_excuse" = x ; then
 +   # Only check for system headers if libzfs support has not been disabled.
 +-  AC_CHECK_HEADERS(libzfs.h libnvpair.h)
 ++  AC_CHECK_HEADERS(libzfs.h libnvpair.h, [], [], [typedef int boolean_t;])
 + fi
 + 
 + if test x"$libzfs_excuse" = x ; then
 +   AC_CHECK_LIB([zfs], [libzfs_init],
 +                [],
 +-               [libzfs_excuse="need zfs library"])
 ++               [libzfs_excuse="need zfs library"], [-lavl -lnvpair -luutil -lm])
 + fi
 + 
 + if test x"$libzfs_excuse" = x ; then
 +   AC_CHECK_LIB([nvpair], [nvlist_print],
 +                [],
 +-               [libzfs_excuse="need nvpair library"])
 ++               [libzfs_excuse="need nvpair library"], [-lavl -lnvpair -luutil -lm])
 + fi
 + 
 + if test x"$enable_libzfs" = xyes && test x"$libzfs_excuse" != x ; then
 +@@ -1069,6 +1069,9 @@ if test x"$libzfs_excuse" = x ; then
 +   AC_DEFINE([HAVE_LIBZFS], [1],
 +             [Define to 1 if you have the ZFS library.])
 +   LIBNVPAIR="-lnvpair"
 ++  if test x$host_kernel = xkfreebsd; then
 ++    LIBNVPAIR="$LIBNVPAIR -lavl -luutil -lm"
 ++  fi
 +   AC_DEFINE([HAVE_LIBNVPAIR], [1],
 +             [Define to 1 if you have the NVPAIR library.])
 + fi
 
 --YZ5djTAD1cGYuMQK--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304052200.r35M01Sv056722>