aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-04 17:20:51 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-04 17:20:51 +0000
commit582d6e2e064dd3a2e181ce8ac26359aace867b00 (patch)
treece4f7a621adb4a419441180f6e10c60f334c2cb4
parent4f0c0fcfdcaa3f7610247bb3751cd0aee8d1b574 (diff)
downloadpaludis-582d6e2e064dd3a2e181ce8ac26359aace867b00.tar.gz
paludis-582d6e2e064dd3a2e181ce8ac26359aace867b00.tar.xz
Implement DEFAULT_SRC_CONFIGURE_PARAMS, DEFAULT_SRC_CONFIGURE_OPTION_ENABLES, DEFAULT_SRC_CONFIGURE_OPTION_WITHS for exheres-0
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc9
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_setup.sh28
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/src_configure.bash11
3 files changed, 47 insertions, 1 deletions
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 5b213be..ee0fc48 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -1353,6 +1353,15 @@ namespace test_cases
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
+
+ {
+ TestMessageSuffix suffix("econf vars", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/econf-vars-0",
+ UserPackageDepSpecOptions()))), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
}
} test_e_repository_install_exheres_0;
diff --git a/paludis/repositories/e/e_repository_TEST_setup.sh b/paludis/repositories/e/e_repository_TEST_setup.sh
index b317043..83ac9f2 100755
--- a/paludis/repositories/e/e_repository_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_setup.sh
@@ -915,6 +915,34 @@ src_compile() {
econf
}
END
+mkdir -p "packages/cat/econf-vars"
+cat <<'END' > packages/cat/econf-vars/econf-vars-0.ebuild || exit 1
+DESCRIPTION="The Description"
+
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="enabled-hamster gerbil dormouse"
+LICENSE="GPL-2"
+PLATFORM="test"
+
+DEFAULT_SRC_CONFIGURE_PARAMS="--nice-juicy-steak"
+DEFAULT_SRC_CONFIGURE_OPTION_ENABLES="enabled-hamster gerbil"
+DEFAULT_SRC_CONFIGURE_OPTION_WITHS="dormouse"
+
+src_unpack() {
+ mkdir ${S}
+ cat <<'END2' > ${S}/configure
+#!/bin/bash
+echo "${@}" | grep -q -- '--enable-enabled-hamster' || exit 1
+echo "${@}" | grep -q -- '--disable-gerbil' || exit 2
+echo "${@}" | grep -q -- '--nice-juicy-steak' || exit 3
+echo "${@}" | grep -q -- '--without-dormouse' || exit 4
+true
+END2
+ chmod +x ${S}/configure
+}
+END
cd ..
mkdir -p repo15/{eclass,distfiles,profiles/profile/subprofile} || exit 1
diff --git a/paludis/repositories/e/ebuild/exheres-0/src_configure.bash b/paludis/repositories/e/ebuild/exheres-0/src_configure.bash
index 2462ccc..d53990b 100644
--- a/paludis/repositories/e/ebuild/exheres-0/src_configure.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/src_configure.bash
@@ -22,7 +22,16 @@
default_src_configure()
{
- [[ -x ${ECONF_SOURCE:-.}/configure ]] && econf
+ if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then
+ econf \
+ ${DEFAULT_SRC_CONFIGURE_PARAMS} \
+ $(for s in ${DEFAULT_SRC_CONFIGURE_OPTION_ENABLES} ; do \
+ option_enable "${s}" ; \
+ done ) \
+ $(for s in ${DEFAULT_SRC_CONFIGURE_OPTION_WITHS} ; do \
+ option_with "${s}" ; \
+ done )
+ fi
}
src_configure()