aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-05-07 20:40:12 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-05-11 14:58:00 +0100
commit2ea3f6cc55ed2666f8df8e91e3c238094392a6d4 (patch)
tree1ac31f93a0096695a340b4731408b439291d5571
parent33c8d046ded5624271e9b7588409bc18e2b95e35 (diff)
downloadpaludis-2ea3f6cc55ed2666f8df8e91e3c238094392a6d4.tar.gz
paludis-2ea3f6cc55ed2666f8df8e91e3c238094392a6d4.tar.xz
EAPI 3 has new econf options
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc20
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_setup.sh57
-rw-r--r--paludis/repositories/e/eapi.cc1
-rw-r--r--paludis/repositories/e/eapi.hh2
-rw-r--r--paludis/repositories/e/eapis/3.conf2
-rw-r--r--paludis/repositories/e/ebuild.cc2
-rw-r--r--paludis/repositories/e/ebuild/0/build_functions.bash2
7 files changed, 86 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 23b9dbb..29b7214 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -1343,6 +1343,16 @@ namespace test_cases
TEST_CHECK(id);
id->perform_action(action);
}
+
+ {
+ TestMessageSuffix suffix("econf disable dependency tracking", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-dependency-tracking-0",
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
+ id->perform_action(action);
+ }
}
} test_e_repository_install_eapi_0;
@@ -1687,6 +1697,16 @@ namespace test_cases
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "3");
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
+
+ {
+ TestMessageSuffix suffix("econf disable dependency tracking", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-dependency-tracking-3",
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "3");
+ id->perform_action(action);
+ }
}
} test_e_repository_install_eapi_3;
diff --git a/paludis/repositories/e/e_repository_TEST_setup.sh b/paludis/repositories/e/e_repository_TEST_setup.sh
index 213a96a..41f46bc 100755
--- a/paludis/repositories/e/e_repository_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_setup.sh
@@ -1379,6 +1379,63 @@ src_install() {
dohard foo bar
}
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}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+EAPI="0"
+
+src_unpack() {
+ mkdir -p ${WORKDIR}
+ cd "${WORKDIR}"
+
+ cat <<'EOF' > configure
+#!/bin/sh
+
+if echo "$@" | grep -q 'disable-dependency-tracking' ; then
+ exit 1
+fi
+
+exit 0
+EOF
+
+ chmod +x configure
+}
+END
+cat << 'END' > cat/econf-disable-dependency-tracking/econf-disable-dependency-tracking-3.ebuild || exit 1
+EAPI="${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+EAPI="3"
+
+src_unpack() {
+ mkdir -p ${WORKDIR}
+ cd "${WORKDIR}"
+
+ cat <<'EOF' > configure
+#!/bin/sh
+
+if ! echo "$@" | grep -q 'disable-dependency-tracking' ; then
+ exit 1
+fi
+
+exit 0
+EOF
+
+ chmod +x configure
+}
+END
cd ..
mkdir -p repo14/{profiles/profile,metadata,eclass} || exit 1
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index c2ef7d9..6327654 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -211,6 +211,7 @@ namespace
value_for<n::doins_r_symlink>(destringify_key<bool>(k, "doins_r_symlink")),
value_for<n::doman_lang_filenames>(destringify_key<bool>(k, "doman_lang_filenames")),
value_for<n::dosym_mkdir>(destringify_key<bool>(k, "dosym_mkdir")),
+ value_for<n::econf_extra_options>(k.get("econf_extra_options")),
value_for<n::failure_is_fatal>(destringify_key<bool>(k, "failure_is_fatal")),
value_for<n::unpack_fix_permissions>(destringify_key<bool>(k, "unpack_fix_permissions")),
value_for<n::unpack_suffixes>(k.get("unpack_suffixes")),
diff --git a/paludis/repositories/e/eapi.hh b/paludis/repositories/e/eapi.hh
index b470117..9a1adb9 100644
--- a/paludis/repositories/e/eapi.hh
+++ b/paludis/repositories/e/eapi.hh
@@ -76,6 +76,7 @@ namespace paludis
struct ebuild_uninstall;
struct ebuild_variable;
struct ebuild_new_upgrade_phase_order;
+ struct econf_extra_options;
struct eclass_must_not_set_variables;
struct env_a;
struct env_aa;
@@ -384,6 +385,7 @@ namespace paludis
NamedValue<n::doins_r_symlink, bool> doins_r_symlink;
NamedValue<n::doman_lang_filenames, bool> doman_lang_filenames;
NamedValue<n::dosym_mkdir, bool> dosym_mkdir;
+ NamedValue<n::econf_extra_options, std::string> econf_extra_options;
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/3.conf b/paludis/repositories/e/eapis/3.conf
index db3a4b7..d33050a 100644
--- a/paludis/repositories/e/eapis/3.conf
+++ b/paludis/repositories/e/eapis/3.conf
@@ -40,3 +40,5 @@ rdepend_defaults_to_depend = 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
+econf_extra_options = --disable-dependency-tracking
+
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index f81b3c5..a796141 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -195,6 +195,8 @@ EbuildCommand::operator() ()
params.package_id()->eapi()->supported()->ebuild_options()->ebuild_functions())
.with_setenv("PALUDIS_BINARY_DISTDIR_VARIABLE",
params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_distdir())
+ .with_setenv("PALUDIS_ECONF_EXTRA_OPTIONS",
+ params.package_id()->eapi()->supported()->tools_options()->econf_extra_options())
.with_setenv("PALUDIS_UNPACK_UNRECOGNISED_IS_FATAL",
params.package_id()->eapi()->supported()->tools_options()->unpack_unrecognised_is_fatal() ? "yes" : "")
.with_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 608a432..ac8a177 100644
--- a/paludis/repositories/e/ebuild/0/build_functions.bash
+++ b/paludis/repositories/e/ebuild/0/build_functions.bash
@@ -72,6 +72,7 @@ econf()
--datadir=/usr/share \
--sysconfdir=/etc \
--localstatedir=/var/lib \
+ ${PALUDIS_ECONF_EXTRA_OPTIONS} \
${libcmd} "$@" ${LOCAL_EXTRA_ECONF} 1>&2
${LOCAL_ECONF_WRAPPER} "${ECONF_SOURCE}"/configure \
@@ -82,6 +83,7 @@ econf()
--datadir=/usr/share \
--sysconfdir=/etc \
--localstatedir=/var/lib \
+ ${PALUDIS_ECONF_EXTRA_OPTIONS} \
${libcmd} "$@" ${LOCAL_EXTRA_ECONF} || die "econf failed"
else