aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2012-09-08 18:07:23 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2012-09-08 19:18:14 +0100
commitff863a7160da5dcbe8a007847a0d82aabc9580e4 (patch)
tree8161890f79a134a3cece02a4c0d46a7088d8a4bf
parent714dd6f3faaf0d78ff1b531eeecfa87a970d4d69 (diff)
downloadpaludis-ff863a7160da5dcbe8a007847a0d82aabc9580e4.tar.gz
paludis-ff863a7160da5dcbe8a007847a0d82aabc9580e4.tar.xz
Support {best,has}_version --host-root for EAPI 5
-rw-r--r--paludis/repositories/e/eapi.cc1
-rw-r--r--paludis/repositories/e/eapi.hh2
-rw-r--r--paludis/repositories/e/eapis/0.conf1
-rw-r--r--paludis/repositories/e/eapis/5.conf2
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf1
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf1
-rw-r--r--paludis/repositories/e/ebuild.cc2
-rw-r--r--paludis/repositories/e/ebuild/0/portage_stubs.bash14
8 files changed, 22 insertions, 2 deletions
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index 81e6702..28262e9 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -232,6 +232,7 @@ namespace
std::shared_ptr<const EAPIToolsOptions> make_tool_options(const KeyValueConfigFile & k)
{
return std::make_shared<EAPIToolsOptions>(make_named_values<EAPIToolsOptions>(
+ n::best_has_version_host_root() = destringify_key<bool>(k, "best_has_version_host_root"),
n::dodoc_r() = destringify_key<bool>(k, "dodoc_r"),
n::doins_symlink() = destringify_key<bool>(k, "doins_symlink"),
n::doman_lang_filenames() = destringify_key<bool>(k, "doman_lang_filenames"),
diff --git a/paludis/repositories/e/eapi.hh b/paludis/repositories/e/eapi.hh
index 61a3c8c..aeae47f 100644
--- a/paludis/repositories/e/eapi.hh
+++ b/paludis/repositories/e/eapi.hh
@@ -40,6 +40,7 @@ namespace paludis
{
typedef Name<struct name_allow_tokens_in_mask_files> allow_tokens_in_mask_files;
typedef Name<struct name_annotations> annotations;
+ typedef Name<struct name_best_has_version_host_root> best_has_version_host_root;
typedef Name<struct name_binary_from_env_variables> binary_from_env_variables;
typedef Name<struct name_blocker_resolution> blocker_resolution;
typedef Name<struct name_blocker_resolution_manual> blocker_resolution_manual;
@@ -462,6 +463,7 @@ namespace paludis
struct EAPIToolsOptions
{
+ NamedValue<n::best_has_version_host_root, bool> best_has_version_host_root;
NamedValue<n::dodoc_r, bool> dodoc_r;
NamedValue<n::doins_symlink, bool> doins_symlink;
NamedValue<n::doman_lang_filenames, bool> doman_lang_filenames;
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index 2de6468..92596f9 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -278,6 +278,7 @@ dosym_mkdir = true
failure_is_fatal = false
no_s_workdir_fallback = false
use_with_enable_empty_third_argument = false
+best_has_version_host_root = false
unpack_suffixes = tar tar.gz,tgz,tar.Z tar.bz2,tbz2,tbz zip,ZIP,jar gz,Z,z bz2 rar,RAR lha,LHa,LHA,lzh a,deb tar.lzma lzma 7z,7Z
diff --git a/paludis/repositories/e/eapis/5.conf b/paludis/repositories/e/eapis/5.conf
index 954a37a..f46b4c1 100644
--- a/paludis/repositories/e/eapis/5.conf
+++ b/paludis/repositories/e/eapis/5.conf
@@ -13,4 +13,6 @@ dependency_spec_tree_parse_options = ${dependency_spec_tree_parse_options} allow
load_modules = ${load_modules} usex
+best_has_version_host_root = true
econf_extra_options_help_dependent = ${econf_extra_options_help_dependent} disable-silent-rules::--disable-silent-rules
+
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index 590a19a..b633a96 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -353,6 +353,7 @@ no_s_workdir_fallback = true
use_with_enable_empty_third_argument = true
fix_mtimes = true
shell_options = extglob globstar
+best_has_version_host_root = false
unpack_suffixes = tar tar.gz,tgz,tar.Z tar.bz2,tbz2,tbz zip,ZIP,jar gz,Z,z bz2 rar,RAR lha,LHa,LHA,lzh a,deb tar.lzma lzma 7z,7Z tar.xz xz
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index ca066eb..4f6b536 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -275,6 +275,7 @@ dosym_mkdir = false
doins_symlink = false
use_with_enable_empty_third_argument = true
failure_is_fatal = false
+best_has_version_host_root = false
unpack_suffixes = tar tar.gz,tgz,tar.Z tar.bz2,tbz2,tbz zip,ZIP,jar gz,Z,z bz2 rar,RAR lha,LHa,LHA,lzh a,deb tar.lzma lzma 7z,7Z tar.xz xz
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index dede6c3..bb819b9 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -239,6 +239,8 @@ EbuildCommand::operator() ()
params.package_id()->eapi()->supported()->tools_options()->unpack_fix_permissions() ? "yes" : "")
.setenv("PALUDIS_UNPACK_SUFFIXES",
params.package_id()->eapi()->supported()->tools_options()->unpack_suffixes())
+ .setenv("PALUDIS_BEST_HAS_VERSION_HOST_ROOT",
+ params.package_id()->eapi()->supported()->tools_options()->best_has_version_host_root() ? "yes" : "")
.setenv("PALUDIS_DODOC_R",
params.package_id()->eapi()->supported()->tools_options()->dodoc_r() ? "yes" : "")
.setenv("PALUDIS_DOINS_SYMLINK",
diff --git a/paludis/repositories/e/ebuild/0/portage_stubs.bash b/paludis/repositories/e/ebuild/0/portage_stubs.bash
index 4916932..de8038c 100644
--- a/paludis/repositories/e/ebuild/0/portage_stubs.bash
+++ b/paludis/repositories/e/ebuild/0/portage_stubs.bash
@@ -60,16 +60,26 @@ portageq()
best_version()
{
+ local type=--root
+ if [[ -n ${PALUDIS_BEST_HAS_VERSION_HOST_ROOT} && ${1} == --host-root ]] ; then
+ type=--slash
+ shift
+ fi
[[ "${#@}" -ne 1 ]] && die "$0 should take exactly one arg"
- local r=$(paludis_pipe_command BEST_VERSION "$EAPI" --root "$1" )
+ local r=$(paludis_pipe_command BEST_VERSION "$EAPI" $type "$1" )
echo ${r#*;}
return ${r%%;*}
}
has_version()
{
+ local type=--root
+ if [[ -n ${PALUDIS_BEST_HAS_VERSION_HOST_ROOT} && ${1} == --host-root ]] ; then
+ type=--slash
+ shift
+ fi
[[ "${#@}" -ne 1 ]] && die "$0 should take exactly one arg"
- local r=$(paludis_pipe_command HAS_VERSION "$EAPI" --root "$1" )
+ local r=$(paludis_pipe_command HAS_VERSION "$EAPI" $type "$1" )
return ${r%%;*}
}