Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH 02/13] Add tentative support for EAPI6 --docdir and --htmldir
Date: Mon, 18 Aug 2014 17:56:14
Message-Id: 1408384612-14713-3-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCHES] Initial EAPI6 patch set for review by "Michał Górny"
1 Pass --docdir and --htmldir to configure scripts that support it.
2 ---
3 bin/eapi.sh | 4 ++++
4 bin/phase-helpers.sh | 12 +++++++++++-
5 2 files changed, 15 insertions(+), 1 deletion(-)
6
7 diff --git a/bin/eapi.sh b/bin/eapi.sh
8 index 623b89f..5f96c3b 100644
9 --- a/bin/eapi.sh
10 +++ b/bin/eapi.sh
11 @@ -110,6 +110,10 @@ ___eapi_econf_passes_--disable-silent-rules() {
12 [[ ! ${1-${EAPI}} =~ ^(0|1|2|3|4|4-python|4-slot-abi)$ ]]
13 }
14
15 +___eapi_econf_passes_--docdir_and_--htmldir() {
16 + [[ ! ${1-${EAPI}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
17 +}
18 +
19 ___eapi_use_enable_and_use_with_support_empty_third_argument() {
20 [[ ! ${1-${EAPI}} =~ ^(0|1|2|3)$ ]]
21 }
22 diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
23 index b96c3f5..c2161f6 100644
24 --- a/bin/phase-helpers.sh
25 +++ b/bin/phase-helpers.sh
26 @@ -522,7 +522,7 @@ econf() {
27 fi
28
29 local conf_args=()
30 - if ___eapi_econf_passes_--disable-dependency-tracking || ___eapi_econf_passes_--disable-silent-rules; then
31 + if ___eapi_econf_passes_--disable-dependency-tracking || ___eapi_econf_passes_--disable-silent-rules || ___eapi_econf_passes_--docdir_and_--htmldir; then
32 local conf_help=$("${ECONF_SOURCE}/configure" --help 2>/dev/null)
33
34 if ___eapi_econf_passes_--disable-dependency-tracking; then
35 @@ -536,6 +536,16 @@ econf() {
36 conf_args+=( --disable-silent-rules )
37 fi
38 fi
39 +
40 + if ___eapi_econf_passes_--docdir_and_--htmldir; then
41 + if [[ ${conf_help} == *--docdir* ]]; then
42 + conf_args+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} )
43 + fi
44 +
45 + if [[ ${conf_help} == *--htmldir* ]]; then
46 + conf_args+=( --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html )
47 + fi
48 + fi
49 fi
50
51 # if the profile defines a location to install libs to aside from default, pass it on.
52 --
53 2.0.4