sys-boot/grub: bootstrap gnulib in the live ebuild
authorMike Gilbert <floppym@gentoo.org>
Thu, 21 Mar 2019 03:10:59 +0000 (23:10 -0400)
committerMike Gilbert <floppym@gentoo.org>
Thu, 21 Mar 2019 03:10:59 +0000 (23:10 -0400)
Package-Manager: Portage-2.3.62, Repoman-2.3.12_p83
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
sys-boot/grub/grub-9999.ebuild

index 662c83807eeb34ba6310999bce59d5a79864edf9..0663509415edd84a9806dd9b2bff9bbe8487bbdd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -6,6 +6,7 @@ EAPI=6
 if [[ ${PV} == 9999  ]]; then
        GRUB_AUTOGEN=1
        GRUB_AUTORECONF=1
+       GRUB_BOOTSTRAP=1
 fi
 
 if [[ -n ${GRUB_AUTOGEN} ]]; then
@@ -136,6 +137,11 @@ QA_MULTILIB_PATHS="usr/lib/grub/.*"
 src_unpack() {
        if [[ ${PV} == 9999 ]]; then
                git-r3_src_unpack
+               cd "${P}" || die
+               local GNULIB_URI="https://git.savannah.gnu.org/git/gnulib.git"
+               local GNULIB_REVISION=$(source bootstrap.conf; echo "${GNULIB_REVISION}")
+               git-r3_fetch "${GNULIB_URI}" "${GNULIB_REVISION}"
+               git-r3_checkout "${GNULIB_URI}" gnulib
        fi
        default
 }
@@ -160,11 +166,15 @@ src_prepare() {
 
        if [[ -n ${GRUB_AUTOGEN} ]]; then
                python_setup
-               bash autogen.sh || die
+               if [[ -n ${GRUB_BOOTSTRAP} ]]; then
+                       eautopoint --force
+                       AUTOPOINT=: AUTORECONF=: ./bootstrap || die
+               else
+                       ./autogen.sh || die
+               fi
        fi
 
        if [[ -n ${GRUB_AUTORECONF} ]]; then
-               autopoint() { :; }
                eautoreconf
        fi
 }