aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Danny van Dyk <dvandyk@exherbo.org> 2007-04-27 18:50:19 +0000
committerAvatar Danny van Dyk <dvandyk@exherbo.org> 2007-04-27 18:50:19 +0000
commit645c186a533497ad470f3725aaa88d1de5d2cd27 (patch)
tree6ce79e586b3b7be07ad2cb4ce77ec830a5a9aa78
parent47f5b5eea8d70abe34983f15288fa751a2e26e6c (diff)
downloadpaludis-645c186a533497ad470f3725aaa88d1de5d2cd27.tar.gz
paludis-645c186a533497ad470f3725aaa88d1de5d2cd27.tar.xz
Add --environment option to contrarius.
-rw-r--r--src/clients/contrarius/command_line.cc11
-rw-r--r--src/clients/contrarius/command_line.hh35
-rw-r--r--src/clients/contrarius/contrarius.cc4
3 files changed, 7 insertions, 43 deletions
diff --git a/src/clients/contrarius/command_line.cc b/src/clients/contrarius/command_line.cc
index fd0f8e2..e4ea84d 100644
--- a/src/clients/contrarius/command_line.cc
+++ b/src/clients/contrarius/command_line.cc
@@ -33,6 +33,7 @@ CommandLine::CommandLine() :
"Tweak toolchain creation."),
a_fetch(&build_args, "fetch", 'f', "Only fetch sources; don't install anything"),
a_pretend(&build_args, "pretend", 'p', "Pretend only"),
+ a_environment(&build_args, "environment", 'E', "Environment specification (class:suffix, both parts optional)"),
a_show_reasons(&build_args, "show-reasons", '\0', "Show why packages are being installed",
paludis::args::EnumArg::EnumArgOptions
("none", "Don't show any information")
@@ -58,16 +59,6 @@ CommandLine::CommandLine() :
("internal", "Keep debug information with binaries"),
"none"),
- package_options(this, "Options to adjust package names and versions", ""),
- a_binutils_name(&package_options, "binutils-name", '\0', "Package name for the binutils stage."),
- a_binutils_version(&package_options, "binutils-version", '\0', "Package version for the binutils stage."),
- a_gcc_name(&package_options, "gcc-name", '\0', "Package name for the minima/full stage."),
- a_gcc_version(&package_options, "gcc-version", '\0', "Package version for the system headers stage."),
- a_headers_name(&package_options, "headers-name", '\0', "Package name for the system headers stage."),
- a_headers_version(&package_options, "headers-version", '\0', "Package version for the minima/full stage."),
- a_libc_name(&package_options, "libc-name", '\0', "Package name for the libc stage."),
- a_libc_version(&package_options, "libc-version", '\0', "Package version for the libc stage."),
-
output_options(this, "Options for output verbosity",
""),
a_verbose(&output_options, "verbose", 'v', "Be verbose"),
diff --git a/src/clients/contrarius/command_line.hh b/src/clients/contrarius/command_line.hh
index 2ae53c0..438a2d9 100644
--- a/src/clients/contrarius/command_line.hh
+++ b/src/clients/contrarius/command_line.hh
@@ -57,6 +57,9 @@ class CommandLine :
/// --pretend
paludis::args::SwitchArg a_pretend;
+ /// --environment
+ paludis::args::StringArg a_environment;
+
/// --show-reasons
paludis::args::EnumArg a_show_reasons;
@@ -77,38 +80,6 @@ class CommandLine :
///\}
- ///\name Package options
- ///\{
-
- /// Package options.
- paludis::args::ArgsGroup package_options;
-
- /// Bintuils name
- paludis::args::StringArg a_binutils_name;
-
- /// Binutils version
- paludis::args::StringArg a_binutils_version;
-
- /// Gcc name
- paludis::args::StringArg a_gcc_name;
-
- /// Gcc version
- paludis::args::StringArg a_gcc_version;
-
- /// Headers name
- paludis::args::StringArg a_headers_name;
-
- /// Headers version
- paludis::args::StringArg a_headers_version;
-
- /// Libc name
- paludis::args::StringArg a_libc_name;
-
- /// Libc version
- paludis::args::StringArg a_libc_version;
-
- ///\}
-
///\name Output options
///\{
diff --git a/src/clients/contrarius/contrarius.cc b/src/clients/contrarius/contrarius.cc
index 0c8dbee..c148549 100644
--- a/src/clients/contrarius/contrarius.cc
+++ b/src/clients/contrarius/contrarius.cc
@@ -74,7 +74,8 @@ int main(int argc, char *argv[])
stage = "cxx";
std::tr1::shared_ptr<AdaptedEnvironment> env(
- new AdaptedEnvironment(EnvironmentMaker::get_instance()->make_from_spec("")));
+ new AdaptedEnvironment(EnvironmentMaker::get_instance()->make_from_spec(
+ CommandLine::get_instance()->a_environment.argument())));
StageOptions stage_opts(CommandLine::get_instance()->a_pretend.specified(),
CommandLine::get_instance()->a_fetch.specified(),
@@ -97,6 +98,7 @@ int main(int argc, char *argv[])
if (TargetConfig::get_instance()->headers().empty())
throw DoHelp("--headers specified though CTARGET does not need any headers");
builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new KernelHeadersStage(env)));
+ builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new LibCHeadersStage(env)));
}
builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new MinimalStage(env)));