aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2011-04-01 22:30:11 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2011-04-02 01:02:14 +0100
commit810b82310fad911f53d17d6bc29896a984ba433f (patch)
treef37a9a9460fbf72c6a1c59940615c3e71094690c
parent568b21f7bec6a17356bedfbc95a6adf505d74d59 (diff)
downloadpaludis-810b82310fad911f53d17d6bc29896a984ba433f.tar.gz
paludis-810b82310fad911f53d17d6bc29896a984ba433f.tar.xz
EAPI 4 econf only uses --disable-dependency-tracking if --help says so
See: Gentoo#211529
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_0_setup.sh5
-rw-r--r--paludis/repositories/e/e_repository_TEST_4.cc9
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_4_setup.sh11
-rw-r--r--paludis/repositories/e/eapi.cc1
-rw-r--r--paludis/repositories/e/eapi.hh2
-rw-r--r--paludis/repositories/e/eapis/4.conf2
-rw-r--r--paludis/repositories/e/ebuild.cc2
-rw-r--r--paludis/repositories/e/ebuild/0/build_functions.bash5
8 files changed, 32 insertions, 5 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_0_setup.sh b/paludis/repositories/e/e_repository_TEST_0_setup.sh
index ca1ff7a..0fd252f 100755
--- a/paludis/repositories/e/e_repository_TEST_0_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_0_setup.sh
@@ -887,6 +887,11 @@ src_unpack() {
cat <<'EOF' > configure
#!/bin/sh
+if echo "$@" | grep -q 'help' ; then
+ echo disable-dependency-tracking
+ exit 0
+fi
+
if echo "$@" | grep -q 'disable-dependency-tracking' ; then
exit 1
fi
diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc
index a3ccf6a..df126c3 100644
--- a/paludis/repositories/e/e_repository_TEST_4.cc
+++ b/paludis/repositories/e/e_repository_TEST_4.cc
@@ -197,6 +197,15 @@ TEST(ERepository, InstallEAPI4)
{
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-dependency-tracking-4_beta",
+ &env, { })), make_null_shared_ptr(), { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value());
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-dependency-tracking-4",
&env, { })), make_null_shared_ptr(), { }))]->last());
ASSERT_TRUE(bool(id));
diff --git a/paludis/repositories/e/e_repository_TEST_4_setup.sh b/paludis/repositories/e/e_repository_TEST_4_setup.sh
index f20568c..5c7d939 100755
--- a/paludis/repositories/e/e_repository_TEST_4_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_4_setup.sh
@@ -877,8 +877,8 @@ src_install() {
}
END
mkdir -p "cat/econf-disable-dependency-tracking" || exit 1
-cat << 'END' > cat/econf-disable-dependency-tracking/econf-disable-dependency-tracking-0.ebuild || exit 1
-EAPI="${PV}"
+cat << 'END' > cat/econf-disable-dependency-tracking/econf-disable-dependency-tracking-4_beta.ebuild || exit 1
+EAPI="${PV%_*}"
DESCRIPTION="The Description"
HOMEPAGE="http://example.com/"
SRC_URI=""
@@ -886,7 +886,6 @@ SLOT="0"
IUSE="spork"
LICENSE="GPL-2"
KEYWORDS="test"
-EAPI="0"
S="${WORKDIR}"
@@ -916,7 +915,6 @@ SLOT="0"
IUSE="spork"
LICENSE="GPL-2"
KEYWORDS="test"
-EAPI="4"
S="${WORKDIR}"
@@ -927,6 +925,11 @@ src_unpack() {
cat <<'EOF' > configure
#!/bin/sh
+if echo "$@" | grep -q 'help' ; then
+ echo disable-dependency-tracking
+ exit 0
+fi
+
if ! echo "$@" | grep -q 'disable-dependency-tracking' ; then
exit 1
fi
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index 8f59768..a7c8d0b 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -243,6 +243,7 @@ namespace
n::doman_lang_filenames_overrides() = destringify_key<bool>(k, "doman_lang_filenames_overrides"),
n::dosym_mkdir() = destringify_key<bool>(k, "dosym_mkdir"),
n::econf_extra_options() = k.get("econf_extra_options"),
+ n::econf_extra_options_help_dependent() = k.get("econf_extra_options_help_dependent"),
n::failure_is_fatal() = destringify_key<bool>(k, "failure_is_fatal"),
n::unpack_fix_permissions() = destringify_key<bool>(k, "unpack_fix_permissions"),
n::unpack_suffixes() = k.get("unpack_suffixes"),
diff --git a/paludis/repositories/e/eapi.hh b/paludis/repositories/e/eapi.hh
index e9c8745..a40398a 100644
--- a/paludis/repositories/e/eapi.hh
+++ b/paludis/repositories/e/eapi.hh
@@ -87,6 +87,7 @@ namespace paludis
typedef Name<struct name_ebuild_variable> ebuild_variable;
typedef Name<struct name_ebuild_new_upgrade_phase_order> ebuild_new_upgrade_phase_order;
typedef Name<struct name_econf_extra_options> econf_extra_options;
+ typedef Name<struct name_econf_extra_options_help_dependent> econf_extra_options_help_dependent;
typedef Name<struct name_eclass_must_not_set_variables> eclass_must_not_set_variables;
typedef Name<struct name_env_a> env_a;
typedef Name<struct name_env_aa> env_aa;
@@ -464,6 +465,7 @@ namespace paludis
NamedValue<n::doman_lang_filenames_overrides, bool> doman_lang_filenames_overrides;
NamedValue<n::dosym_mkdir, bool> dosym_mkdir;
NamedValue<n::econf_extra_options, std::string> econf_extra_options;
+ NamedValue<n::econf_extra_options_help_dependent, std::string> econf_extra_options_help_dependent;
NamedValue<n::failure_is_fatal, bool> failure_is_fatal;
NamedValue<n::unpack_fix_permissions, bool> unpack_fix_permissions;
NamedValue<n::unpack_suffixes, std::string> unpack_suffixes;
diff --git a/paludis/repositories/e/eapis/4.conf b/paludis/repositories/e/eapis/4.conf
index 363791f..3d14ef5 100644
--- a/paludis/repositories/e/eapis/4.conf
+++ b/paludis/repositories/e/eapis/4.conf
@@ -64,7 +64,7 @@ use_with_enable_empty_third_argument = true
rdepend_defaults_to_depend = false
-econf_extra_options = --disable-dependency-tracking
+econf_extra_options_help_dependent = disable-dependency-tracking::--disable-dependency-tracking
doman_lang_filenames_overrides = true
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index f2980d1..bea3b95 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -231,6 +231,8 @@ EbuildCommand::operator() ()
params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_distdir())
.setenv("PALUDIS_ECONF_EXTRA_OPTIONS",
params.package_id()->eapi()->supported()->tools_options()->econf_extra_options())
+ .setenv("PALUDIS_ECONF_EXTRA_OPTIONS_HELP_DEPENDENT",
+ params.package_id()->eapi()->supported()->tools_options()->econf_extra_options_help_dependent())
.setenv("PALUDIS_UNPACK_UNRECOGNISED_IS_FATAL",
params.package_id()->eapi()->supported()->tools_options()->unpack_unrecognised_is_fatal() ? "yes" : "")
.setenv("PALUDIS_UNPACK_FIX_PERMISSIONS",
diff --git a/paludis/repositories/e/ebuild/0/build_functions.bash b/paludis/repositories/e/ebuild/0/build_functions.bash
index ac8a177..571951c 100644
--- a/paludis/repositories/e/ebuild/0/build_functions.bash
+++ b/paludis/repositories/e/ebuild/0/build_functions.bash
@@ -45,6 +45,11 @@ econf()
[[ -z "${CBUILD}" ]] || LOCAL_EXTRA_ECONF="--build=${CBUILD} ${LOCAL_EXTRA_ECONF}"
[[ -z "${CTARGET}" ]] || LOCAL_EXTRA_ECONF="--target=${CTARGET} ${LOCAL_EXTRA_ECONF}"
+ for i in ${PALUDIS_ECONF_EXTRA_OPTIONS_HELP_DEPENDENT}; do
+ "${ECONF_SOURCE}/configure" --help 2>/dev/null | grep -q "${i%%::*}" \
+ && LOCAL_EXTRA_ECONF+=" ${i#*::}"
+ done
+
# If the ebuild passed in --prefix, use that to set --libdir. KDE at least needs this.
ECONF_PREFIX=/usr