summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2014-10-19 16:12:59 -0400
committerTim Harder <radhermit@gmail.com>2016-05-01 18:44:21 -0400
commit35318f428e87af32e56e7e705ecaede8c43ef520 (patch)
treec892ddef11257850d6867e741dbb577ac668a0a5
parenteapi6: mark dohtml as deprecated (diff)
downloadpkgcore-35318f428e87af32e56e7e705ecaede8c43ef520.tar.gz
pkgcore-35318f428e87af32e56e7e705ecaede8c43ef520.tar.bz2
pkgcore-35318f428e87af32e56e7e705ecaede8c43ef520.zip
eapi6: econf passes --docdir and --htmldir args
X-Gentoo-Url: https://bugs.gentoo.org/show_bug.cgi?id=468202
-rw-r--r--ebd/eapi/common.lib15
-rw-r--r--pkgcore/ebuild/eapi.py6
2 files changed, 19 insertions, 2 deletions
diff --git a/ebd/eapi/common.lib b/ebd/eapi/common.lib
index 205b82349..af28c32d0 100644
--- a/ebd/eapi/common.lib
+++ b/ebd/eapi/common.lib
@@ -123,7 +123,9 @@ econf() {
set -- --libdir="$(__strip_duplicate_slashes "${CONF_PREFIX}${CONF_LIBDIR}")" "$@"
fi
- if ${PKGCORE_ECONF_DISABLE_DEPENDENCY_TRACKING} || ${PKGCORE_ECONF_DISABLE_SILENT_RULES}; then
+ if ${PKGCORE_ECONF_DISABLE_DEPENDENCY_TRACKING} || \
+ ${PKGCORE_ECONF_DISABLE_SILENT_RULES} || \
+ ${PKGCORE_ECONF_DOCDIR_AND_HTMLDIR}; then
local help_text=$("${ECONF_SOURCE}/configure" --help 2> /dev/null)
local extra_args=()
@@ -138,6 +140,17 @@ econf() {
[[ ${help_text} == *"--disable-silent-rules"* ]]; then
extra_args+=( --disable-silent-rules )
fi
+
+ # EAPI 6 and up.
+ if ${PKGCORE_ECONF_DOCDIR_AND_HTMLDIR}; then
+ if [[ ${help_text} == *"--docdir"* ]]; then
+ extra_args+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} )
+ fi
+ if [[ ${help_text} == *"--htmldir"* ]]; then
+ extra_args+=( --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html )
+ fi
+ fi
+
set -- "${extra_args[@]}" "$@"
unset extra_args
unset help_text
diff --git a/pkgcore/ebuild/eapi.py b/pkgcore/ebuild/eapi.py
index 630e5a805..ef0614fda 100644
--- a/pkgcore/ebuild/eapi.py
+++ b/pkgcore/ebuild/eapi.py
@@ -29,6 +29,9 @@ eapi_optionals = mappings.ImmutableDict({
# Controls --disable-dependency-tracking passing for econf.
'econf_disable_dependency_tracking': False,
+ # Controls --docdir and --htmldir passing for econf; see PMS.
+ 'econf_docdir_and_htmldir': False,
+
# Controls whether an ebuild_phase function exists for ebuild consumption.
'ebuild_phase_func': False,
@@ -258,7 +261,7 @@ common_env_optionals = mappings.ImmutableDict(dict.fromkeys(
("dodoc_allow_recursive", "doins_allow_symlinks",
"doman_language_detect", "doman_language_override", "ebuild_phase_func",
"econf_disable_dependency_tracking", "econf_disable_silent_rules",
- "new_reads_stdin", "nonfatal", "profile_iuse_injection",),
+ "econf_docdir_and_htmldir", "new_reads_stdin", "nonfatal", "profile_iuse_injection",),
lambda s: str(s).lower()))
@@ -377,6 +380,7 @@ eapi6 = EAPI.register(
mandatory_keys=eapi5.mandatory_keys,
tracked_attributes=eapi5.tracked_attributes,
optionals=_combine_dicts(eapi5.options, dict(
+ econf_docdir_and_htmldir=True,
is_supported=False,
)),
ebd_env_options=eapi5.ebd_env_options,