]> git.tdb.fi Git - builder.git/blobdiff - source/component.cpp
Add gmpxx package
[builder.git] / source / component.cpp
index bab7ba1e264a3e80e6ebfba74133e2c3fd7a843f..1fd6b24bfc89676324cd80eb7fe3469c6263b86a 100644 (file)
@@ -6,18 +6,31 @@ using namespace std;
 Component::Component(Package &p, Type t, const string &n):
        pkg(p),
        type(t),
-       name(n)
+       name(n),
+       install(false)
 { }
 
+void Component::create_build_info()
+{
+       build_info.add(pkg.get_build_info());
+       build_info.unique();
+}
+
 Component::Loader::Loader(Component &c):
        comp(c)
 {
        add("source",          &Loader::source);
        add("install",         &Component::install);
        add("install_headers", &Component::install_headers);
+       add("cflag",           &Loader::cflag);
 }
 
 void Component::Loader::source(const string &s)
 {
-       comp.source=comp.pkg.get_source()/s;
+       comp.sources.push_back(comp.pkg.get_source()/s);
+}
+
+void Component::Loader::cflag(const string &f)
+{
+       comp.build_info.cflags.push_back(f);
 }