--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>wraeth@wraeth.id.au</email>
+ <name>Sam Jorna</name>
+ <description>Proxy - Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <longdescription>EFI Boot Manager</longdescription>
+ <use>
+ <flag name="ext2">Builds the EFI binary ext2 filesystem driver</flag>
+ <flag name="ext4">Builds the EFI binary ext4 filesystem driver</flag>
+ <flag name="reiserfs">Builds the EFI binary reiserfs filesystem driver</flag>
+ <flag name="iso9660">Builds the EFI binary iso9660 filesystem driver</flag>
+ <flag name="hfs">Builds the EFI binary hfs filesystem driver</flag>
+ <flag name="btrfs"> Builds the EFI binary btrfs filesystem driver</flag>
+ <flag name="ntfs">Builds the EFI binary ntfs filesystem driver</flag>
+ </use>
+</pkgmetadata>
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="The rEFInd UEFI Boot Manager by Rod Smith"
+HOMEPAGE="http://www.rodsbooks.com/refind/index.html"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-src-${PV}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs"
+
+DOCS="BUILDING.txt NEWS.txt README.txt refind.conf-sample {refind,Styles}"
+
+DEPEND=">=sys-boot/gnu-efi-3.0u"
+RDEPEND=""
+
+src_compile() {
+ emake gnuefi || die "Failed to build refind EFI binary"
+
+ cd "${S}/filesystems"
+ for fs in ext2 ext4 reiserfs iso9660 hfs btrfs ; do
+ if use "${fs}" ; then
+ einfo "Building ${fs} filesystem driver"
+ rm -f fsw_efi.o
+
+ # ARCH detection in the Makefile not working
+ use x86 && buildarch=ia32
+ use amd64 && buildarch=x86_64
+ emake DRIVERNAME=${fs} ARCH=${buildarch} -f Make.gnuefi || die "Failed building ${fs} filesystem EFI binary"
+ fi
+ done
+}
+
+src_install() {
+ exeinto "/usr/share/${P}"
+ doexe install.sh
+
+ dodoc -r ${DOCS}
+
+ insinto "/usr/share/${P}/refind"
+ use x86 && doins refind/refind_ia32.efi
+ use amd64 && doins refind/refind_x64.efi
+
+ use x86 && filearch=ia32
+ use amd64 && filearch=x64
+ insinto "/usr/share/${P}/refind/drivers_${filearch}"
+ for fs in ext2 ext4 reiserfs iso9660 hfs btrfs ; do
+ if use "${fs}" ; then doins "drivers_${filearch}/${fs}_${filearch}.efi" ; fi
+ done
+
+ for dir in images icons fonts banners ; do
+ insinto "/usr/share/${P}/refind/${dir}"
+ doins -r "${dir}"
+ done
+
+ insinto "/usr/share/${P}/keys"
+ doins keys/*
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "EFI executables have been built and installed into /usr/share/${P}"
+ einfo "You will need to use the provided install script 'install.sh' or"
+ einfo "manually install the binaries into your EFI System Partition."
+ einfo ""
+ einfo "For key generation and binary signing for use with SecureBoot, the"
+ einfo "package app-crypt/sbsigntool can be installed."
+ einfo ""
+ einfo "A sample configration can be found at"
+ einfo "/usr/share/doc/${P}/refind.conf-sample.bz2"
+ einfo ""
+}