/**
Creates a buildable package.
*/
-SourcePackage::SourcePackage(Builder &b, const string &n, const Path::Path &s):
+SourcePackage::SourcePackage(Builder &b, const string &n, const Path &s):
Package(b, n),
source(s),
config(*this),
tar_files.push_back(source/"Build");
}
-Msp::Path::Path SourcePackage::get_temp_dir() const
+Msp::Path SourcePackage::get_temp_dir() const
{
return source/config.get_option("tempdir").value/config.get_option("profile").value;
}
-Msp::Path::Path SourcePackage::get_out_dir() const
+Msp::Path SourcePackage::get_out_dir() const
{
return source/config.get_option("outdir").value;
}
{
const StringList &reqs=i->get_requires();
for(StringList::const_iterator j=reqs.begin(); j!=reqs.end(); ++j)
- requires.push_back(builder.get_package(*j));
+ if(Package *pkg=builder.get_package(*j))
+ requires.push_back(pkg);
}
base_reqs=requires;
{
BinaryPackage *bpkg=dynamic_cast<BinaryPackage *>(*i);
if(bpkg && bpkg->get_need_path())
- config.add_option(bpkg->get_name()+"_path", "", "Path for "+bpkg->get_name());
+ config.add_option(bpkg->get_name()+"_path", "/usr", "Path for "+bpkg->get_name());
}
}
unsigned flags=get_install_flags();
if(flags&INCLUDE)
- export_binfo.incpath.push_back((Path::Path(config.get_option("prefix").value)/"include").str());
+ export_binfo.incpath.push_back((Path(config.get_option("prefix").value)/"include").str());
if(flags&LIB)
- export_binfo.libpath.push_back((Path::Path(config.get_option("prefix").value)/"lib").str());
+ export_binfo.libpath.push_back((Path(config.get_option("prefix").value)/"lib").str());
string optimize=config.get_option("optimize").value;
if(lexical_cast<unsigned>(optimize))