summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2012-07-18 16:34:36 +0000
committerMike Gilbert <floppym@gentoo.org>2012-07-18 16:34:36 +0000
commitf291eff88fa50ef6072c6c1a8bff8155ba04eb80 (patch)
tree88d2464664c286daf689f4b8bec3f4a98663a9b5 /sys-boot/grub/grub-9999.ebuild
parentfix start-stop-daemon syntax in init script (diff)
downloadgentoo-2-f291eff88fa50ef6072c6c1a8bff8155ba04eb80.tar.gz
gentoo-2-f291eff88fa50ef6072c6c1a8bff8155ba04eb80.tar.bz2
gentoo-2-f291eff88fa50ef6072c6c1a8bff8155ba04eb80.zip
Optionally install html docs, bug 426738 by Chris Mayo.
(Portage version: 2.2.0_alpha118/cvs/Linux x86_64)
Diffstat (limited to 'sys-boot/grub/grub-9999.ebuild')
-rw-r--r--sys-boot/grub/grub-9999.ebuild18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index 23f254c85347..ee5cf6a95f1b 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.78 2012/07/13 18:05:19 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.79 2012/07/18 16:34:36 floppym Exp $
EAPI=4
@@ -30,7 +30,7 @@ HOMEPAGE="http://www.gnu.org/software/grub/"
LICENSE="GPL-3"
SLOT="2"
-IUSE="custom-cflags debug device-mapper efiemu mount nls static sdl truetype libzfs"
+IUSE="custom-cflags debug device-mapper doc efiemu mount nls static sdl truetype libzfs"
GRUB_PLATFORMS=(
# everywhere:
@@ -176,6 +176,7 @@ grub_src_configure() {
ECONF_SOURCE="${S}" \
econf \
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
--disable-werror \
--program-prefix= \
--program-transform-name="s,grub,grub2," \
@@ -202,10 +203,18 @@ grub_src_compile() {
pax-mark -mpes "${grub_binaries[@]}"
}
+grub_build_docs() {
+ emake -C docs html
+}
+
grub_src_install() {
default_src_install
}
+grub_install_docs() {
+ emake -C docs DESTDIR="${D}" install-html
+}
+
src_prepare() {
if [[ ${PV} != 9999 ]]; then
epatch "${FILESDIR}/${P}-parallel-make.patch" #424231
@@ -284,6 +293,9 @@ src_compile() {
for i in ${GRUB_ENABLED_PLATFORMS}; do
grub_run_phase ${FUNCNAME} ${i}
done
+
+ # Just build docs once
+ use doc && grub_run_phase build_docs ${i}
}
src_install() {
@@ -293,6 +305,8 @@ src_install() {
grub_run_phase ${FUNCNAME} ${i}
done
+ use doc && grub_run_phase install_docs ${i}
+
mv "${ED}"usr/share/info/grub{,2}.info || die
# can't be in docs array as we use default_src_install in different builddir