+ bool match = false;
+ string::size_type equals = cond.find('=');
+ if(equals!=string::npos)
+ {
+ if(equals==0)
+ error("No feature name specified");
+ bool negate = cond[equals-1]=='!';
+ string name = cond.substr(0, equals-negate);
+ string value = obj.config.get_option("with_"+name).value;
+ match = (value==cond.substr(equals+1))!=negate;
+ value = cond.substr(equals+1);
+ }
+ else
+ {
+ bool negate = (cond[0]=='!');
+ string name = cond.substr(negate);
+ string value = obj.config.get_option("with_"+name).value;
+ match = lexical_cast<bool>(value)!=negate;
+ }
+ obj.builder.get_logger().log("configure", format("%s: feature %s %smatched", obj.name, cond, (match ? "" : "not ")));
+ if(match)
+ load_sub_with(*this);
+}
+
+void SourcePackage::Loader::tarball(const string &n)
+{
+ if(n=="@src")
+ {
+ for(ComponentList::iterator i=obj.components.begin(); i!=obj.components.end(); ++i)
+ if(i->get_type()==Component::TARBALL && i->get_name()==n)
+ load_sub(*i);
+ }
+ else
+ {
+ Component trbl(obj, Component::TARBALL, n);
+ load_sub(trbl);
+ }