Mike Gilbert avatar Mike Gilbert committed 29dc649

sys-boot/grub: Add zfs use flag.

(Portage version: 2.2.0_alpha84/hg/Linux x86_64, unsigned Manifest commit)

Comments (0)

Files changed (3)

sys-boot/grub/files/grub2-zfs-optional.patch

+--- configure.ac
++++ configure.ac
+@@ -968,11 +968,16 @@
+                         [Define to 1 if you have the LZMA library.])],)
+ AC_SUBST([LIBLZMA])
+ 
+-AC_CHECK_LIB([zfs], [libzfs_init],
+-             [LIBZFS="-lzfs"
+-              AC_DEFINE([HAVE_LIBZFS], [1],
+-                        [Define to 1 if you have the ZFS library.])],)
++AC_ARG_ENABLE([zfs],
++			[AS_HELP_STRING([--with-zfs], [Enable ZFS support.])])
++
++if test x"$enable_zfs" != xno; then
++  AC_CHECK_LIB([zfs], [libzfs_init],
++               [LIBZFS="-lzfs"
++                AC_DEFINE([HAVE_LIBZFS], [1],
++                          [Define to 1 if you have the ZFS library.])],)
++fi
+ AC_SUBST([LIBZFS])
+ 
+ AC_CHECK_LIB([nvpair], [nvlist_print],
+              [LIBNVPAIR="-lnvpair"

sys-boot/grub/grub-9999.ebuild

 
 LICENSE="GPL-3"
 SLOT="2"
-IUSE="custom-cflags debug device-mapper efiemu nls static sdl truetype"
+IUSE="custom-cflags debug device-mapper efiemu nls static sdl truetype zfs"
 
 GRUB_PLATFORMS=(
 	# everywhere:
 		sdl? ( media-libs/libsdl )
 	)
 	device-mapper? ( >=sys-fs/lvm2-2.02.45 )
+	zfs? ( sys-fs/zfs )
 	truetype? ( media-libs/freetype >=media-fonts/unifont-5 )"
 DEPEND="${RDEPEND}
 	>=dev-lang/python-2.5.2
 		$(use_enable efiemu) \
 		$(use_enable nls) \
 		$(use_enable truetype grub-mkfont) \
+		$(use_enable zfs) \
 		$(use sdl && use_enable debug grub-emu-sdl) \
 		${platform}
 }
 src_prepare() {
 	local i j archs
 
+	epatch "${FILESDIR}"/grub2-zfs-optional.patch
+
 	epatch_user
 
 	# fix texinfo file name, as otherwise the grub2.info file will be

sys-boot/grub/metadata.xml

 	<flag name='efiemu'>
 		Build and install the efiemu runtimes
 	</flag>
+	<flag name='zfs'>
+		Enable support for <pkg>sys-fs/zfs</pkg>
+	</flag>
 </use>
 </pkgmetadata>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.