From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-867084-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 62C3A59CA3
	for <garchives@archives.gentoo.org>; Fri,  4 Mar 2016 22:12:34 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 19A99E083C;
	Fri,  4 Mar 2016 22:12:32 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 8DD25E083C
	for <gentoo-commits@lists.gentoo.org>; Fri,  4 Mar 2016 22:12:31 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id EF2E73409EC
	for <gentoo-commits@lists.gentoo.org>; Fri,  4 Mar 2016 22:12:29 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 40EA21606
	for <gentoo-commits@lists.gentoo.org>; Fri,  4 Mar 2016 22:12:27 +0000 (UTC)
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" <floppym@gentoo.org>
Message-ID: <1457129542.13f15068ad3b0125327953f117fa484e74d841d7.floppym@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-boot/grub/grub-9999-r1.ebuild
X-VCS-Directories: sys-boot/grub/
X-VCS-Committer: floppym
X-VCS-Committer-Name: Mike Gilbert
X-VCS-Revision: 13f15068ad3b0125327953f117fa484e74d841d7
X-VCS-Branch: master
Date: Fri,  4 Mar 2016 22:12:27 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 4ce75d3a-b5cd-40b7-834d-07b6bb1a1e0e
X-Archives-Hash: 70e0d36ecc0b8ba20d7096b7a7d847ae

commit:     13f15068ad3b0125327953f117fa484e74d841d7
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  4 21:41:02 2016 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Mar  4 22:12:22 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13f15068

sys-boot/grub: Update the live ebuild

Move to EAPI 6 and various other cleanups.

Package-Manager: portage-2.2.27_p64

 sys-boot/grub/grub-9999-r1.ebuild | 87 ++++++++++++++-------------------------
 1 file changed, 32 insertions(+), 55 deletions(-)

diff --git a/sys-boot/grub/grub-9999-r1.ebuild b/sys-boot/grub/grub-9999-r1.ebuild
index 149153a..9941709 100644
--- a/sys-boot/grub/grub-9999-r1.ebuild
+++ b/sys-boot/grub/grub-9999-r1.ebuild
@@ -1,20 +1,15 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
+EAPI=6
 
-if [[ ${PV} == 9999 ]]; then
-	AUTOTOOLS_AUTORECONF=1
-	GRUB_AUTOGEN=1
+if [[ ${PV} == 9999  ]]; then
+	PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
+	inherit autotools python-any-r1
 fi
 
-if [[ -n ${GRUB_AUTOGEN} ]]; then
-	PYTHON_COMPAT=( python{2_7,3_3,3_4} )
-	inherit python-any-r1
-fi
-
-inherit autotools-utils bash-completion-r1 eutils flag-o-matic mount-boot multibuild pax-utils toolchain-funcs versionator
+inherit autotools bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs versionator
 
 if [[ ${PV} != 9999 ]]; then
 	if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
@@ -29,13 +24,14 @@ if [[ ${PV} != 9999 ]]; then
 		S=${WORKDIR}/${P%_*}
 	fi
 	KEYWORDS="~amd64 ~x86"
-	PATCHES=()
 else
 	inherit git-r3
 	EGIT_REPO_URI="git://git.sv.gnu.org/grub.git
 		http://git.savannah.gnu.org/r/grub.git"
 fi
 
+PATCHES=( "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch )
+
 DEJAVU=dejavu-sans-ttf-2.34
 UNIFONT=unifont-7.0.06
 SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
@@ -46,7 +42,7 @@ HOMEPAGE="https://www.gnu.org/software/grub/"
 
 # Includes licenses for dejavu and unifont
 LICENSE="GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( BitstreamVera )"
-SLOT="2"
+SLOT="2/${PVR}"
 IUSE="debug device-mapper doc efiemu +fonts mount +multislot nls static sdl test +themes truetype libzfs"
 
 GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen )
@@ -136,11 +132,11 @@ src_unpack() {
 	if [[ ${PV} == 9999 ]]; then
 		git-r3_src_unpack
 	fi
-	default_src_unpack
+	default
 }
 
 src_prepare() {
-	[[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
+	default
 
 	sed -i -e /autoreconf/d autogen.sh || die
 
@@ -149,24 +145,20 @@ src_prepare() {
 		sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die
 	fi
 
-	epatch_user
-
-	if [[ -n ${GRUB_AUTOGEN} ]]; then
+	if [[ ${PV} == 9999 ]]; then
 		python_setup
 		bash autogen.sh || die
-	fi
-
-	if [[ -n ${AUTOTOOLS_AUTORECONF} ]]; then
-		autopoint() { return 0; }
+		autopoint() { :; }
 		eautoreconf
 	fi
 }
 
-setup_fonts() {
-	ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
-	if use themes; then
-		ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
-	fi
+grub_do() {
+	multibuild_foreach_variant run_in_build_dir "$@"
+}
+
+grub_do_once() {
+	multibuild_for_best_variant run_in_build_dir "$@"
 }
 
 grub_configure() {
@@ -196,7 +188,6 @@ grub_configure() {
 		--libdir="${EPREFIX}"/usr/lib
 		--htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
 		$(use_enable debug mm-debug)
-		$(use_enable debug grub-emu-usb)
 		$(use_enable device-mapper)
 		$(use_enable mount grub-mount)
 		$(use_enable nls)
@@ -214,10 +205,13 @@ grub_configure() {
 		myeconfargs+=( --program-transform-name="s,grub,grub2," )
 	fi
 
-	mkdir -p "${BUILD_DIR}" || die
-	run_in_build_dir setup_fonts
+	# Set up font symlinks
+	ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
+	if use themes; then
+		ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
+	fi
 
-	autotools-utils_src_configure
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
 src_configure() {
@@ -242,31 +236,28 @@ src_configure() {
 
 	# Portage will take care of cleaning up GRUB_PLATFORMS
 	MULTIBUILD_VARIANTS=( ${GRUB_PLATFORMS:-guessed} )
-	multibuild_parallel_foreach_variant grub_configure
+	grub_do grub_configure
 }
 
 src_compile() {
 	# Sandbox bug 404013.
 	use libzfs && addpredict /etc/dfs:/dev/zfs
 
-	multibuild_foreach_variant autotools-utils_src_compile
-
-	use doc && multibuild_for_best_variant \
-		autotools-utils_src_compile -C docs html
+	grub_do emake
+	use doc && grub_do_once emake -C docs html
 }
 
 src_test() {
 	# The qemu dependency is a bit complex.
 	# You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
-	multibuild_foreach_variant autotools-utils_src_test
+	grub_do emake check
 }
 
 src_install() {
-	multibuild_foreach_variant autotools-utils_src_install \
-		bashcompletiondir="$(get_bashcompdir)"
+	grub_do emake install DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)"
+	use doc && grub_do_once emake -C docs install-html DESTDIR="${D}"
 
-	use doc && multibuild_for_best_variant run_in_build_dir \
-		emake -C docs DESTDIR="${D}" install-html
+	einstalldocs
 
 	if use multislot; then
 		mv "${ED%/}"/usr/share/info/grub{,2}.info || die
@@ -277,20 +268,6 @@ src_install() {
 }
 
 pkg_postinst() {
-	mount-boot_mount_boot_partition
-
-	if [[ -e "${ROOT%/}/boot/grub2/grub.cfg"  ]]; then
-		ewarn "The grub directory has changed from /boot/grub2 to /boot/grub."
-		ewarn "Please run grub2-install and grub2-mkconfig -o /boot/grub/grub.cfg."
-
-		if [[ ! -e "${ROOT%/}/boot/grub/grub.cfg" ]]; then
-			mkdir -p "${ROOT%/}/boot/grub"
-			ln -s ../grub2/grub.cfg "${ROOT%/}/boot/grub/grub.cfg"
-		fi
-	fi
-
-	mount-boot_pkg_postinst
-
 	elog "For information on how to configure GRUB2 please refer to the guide:"
 	elog "    https://wiki.gentoo.org/wiki/GRUB2_Quick_Start"