]> git.tdb.fi Git - builder.git/blobdiff - source/condition.cpp
Reorder class members
[builder.git] / source / condition.cpp
index 4b45dca51f2eeaf06a13880d2c214b3fe557d594..e0068e02ec8c56eee29b3127ae0d99db9f42571b 100644 (file)
@@ -1,11 +1,12 @@
 /* $Id$
 
 This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
 #include <msp/strings/utils.h>
+#include "builder.h"
 #include "condition.h"
 #include "sourcepackage.h"
 
@@ -44,7 +45,13 @@ bool Condition::eval()
                if(i->second[1]=='=')
                        ++start;
 
-               if((conf.get_option(i->first).value==i->second.substr(start))==neg)
+               string value;
+               if(conf.is_option(i->first))
+                       value=conf.get_option(i->first).value;
+               else if(i->first=="arch")
+                       value=pkg.get_builder().get_current_arch().get_name();
+
+               if((value==i->second.substr(start))==neg)
                        result=false;
        }