aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-06-01 08:12:26 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-06-01 08:12:26 +0000
commitf0367218d0a0dbffbb46ce627318e54baa844952 (patch)
tree27cb06c87515d89e604fc266789320be4ec84c1b
parentb940f402bb7ea55d9e3b62958ab4e2681e3f21ae (diff)
downloadpaludis-f0367218d0a0dbffbb46ce627318e54baa844952.tar.gz
paludis-f0367218d0a0dbffbb46ce627318e54baa844952.tar.xz
EAPI definable metadata variables. Fixes: ticket:265
-rw-r--r--paludis/eapis/exheres-0.conf9
-rw-r--r--paludis/repositories/gentoo/ebuild.cc31
-rw-r--r--paludis/repositories/gentoo/ebuild/builtin_metadata.bash5
3 files changed, 25 insertions, 20 deletions
diff --git a/paludis/eapis/exheres-0.conf b/paludis/eapis/exheres-0.conf
index 16b53e0..161a294 100644
--- a/paludis/eapis/exheres-0.conf
+++ b/paludis/eapis/exheres-0.conf
@@ -46,8 +46,8 @@ ebuild_variable = \
ebuild_config = \
sandbox : config
-metadata_build_depend = DEPEND
-metadata_run_depend = RDEPEND
+metadata_build_depend =
+metadata_run_depend =
metadata_slot = SLOT
metadata_src_uri = SRC_URI
metadata_restrict = RESTRICT
@@ -58,7 +58,8 @@ metadata_keywords = KEYWORDS
metadata_eclass_keywords = E_KEYWORDS
metadata_inherited = INHERITED
metadata_iuse = IUSE
-metadata_pdepend = PDEPEND
-metadata_provide = PROVIDE
+metadata_pdepend =
+metadata_provide =
metadata_eapi = EAPI
+metadata_dependencies = DEPENDENCIES
diff --git a/paludis/repositories/gentoo/ebuild.cc b/paludis/repositories/gentoo/ebuild.cc
index c885285..141b2ea 100644
--- a/paludis/repositories/gentoo/ebuild.cc
+++ b/paludis/repositories/gentoo/ebuild.cc
@@ -195,21 +195,24 @@ EbuildMetadataCommand::do_run_command(const Command & cmd)
bool ok(false);
try
{
- _metadata->set_build_depend(f.get("DEPEND"));
- _metadata->set_run_depend(f.get("RDEPEND"));
- _metadata->slot = SlotName(f.get("SLOT"));
- _metadata->set_src_uri(f.get("SRC_URI"));
- _metadata->set_restrictions(f.get("RESTRICT"));
- _metadata->set_homepage(f.get("HOMEPAGE"));
- _metadata->license_interface->set_license(f.get("LICENSE"));
- _metadata->description = f.get("DESCRIPTION");
- _metadata->set_keywords(f.get("KEYWORDS"));
- _metadata->set_eclass_keywords(f.get("E_KEYWORDS"));
- _metadata->set_inherited(f.get("INHERITED"));
- _metadata->set_iuse(f.get("IUSE"));
- _metadata->set_post_depend(f.get("PDEPEND"));
- _metadata->set_provide(f.get("PROVIDE"));
_metadata->eapi = EAPIData::get_instance()->eapi_from_string(f.get("EAPI"));
+ if (_metadata->eapi->supported)
+ {
+ _metadata->set_build_depend(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_build_depend));
+ _metadata->set_run_depend(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_run_depend));
+ _metadata->slot = SlotName(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_slot));
+ _metadata->set_src_uri(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_src_uri));
+ _metadata->set_restrictions(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_restrict));
+ _metadata->set_homepage(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_homepage));
+ _metadata->license_interface->set_license(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_license));
+ _metadata->description = f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_description);
+ _metadata->set_keywords(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_keywords));
+ _metadata->set_eclass_keywords(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_eclass_keywords));
+ _metadata->set_inherited(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_inherited));
+ _metadata->set_iuse(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_iuse));
+ _metadata->set_post_depend(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_pdepend));
+ _metadata->set_provide(f.get(_metadata->eapi->supported->ebuild_metadata_variables->metadata_provide));
+ }
if (0 == prog.exit_status())
ok = true;
diff --git a/paludis/repositories/gentoo/ebuild/builtin_metadata.bash b/paludis/repositories/gentoo/ebuild/builtin_metadata.bash
index 34a61b5..a23ee94 100644
--- a/paludis/repositories/gentoo/ebuild/builtin_metadata.bash
+++ b/paludis/repositories/gentoo/ebuild/builtin_metadata.bash
@@ -24,9 +24,10 @@ ebuild_f_metadata()
{
local key
+ # The list below should include all variables from all EAPIs
for key in DEPEND RDEPEND PDEPEND IUSE SLOT SRC_URI RESTRICT LICENSE \
- KEYWORDS INHERITED PROVIDE EAPI HOMEPAGE DESCRIPTION E_IUSE \
- E_DEPEND E_RDEPEND E_PDEPEND E_KEYWORDS ; do
+ KEYWORDS INHERITED PROVIDE EAPI HOMEPAGE DESCRIPTION DEPENDENCIES \
+ E_IUSE E_DEPEND E_RDEPEND E_PDEPEND E_KEYWORDS ; do
set -o noglob
local k=${!key}
k=${k//\\/\\\\}