]> git.tdb.fi Git - builder.git/blobdiff - source/sourcepackage.h
Evaluate conditions at load time to allow more flexibility
[builder.git] / source / sourcepackage.h
index 755bdfcb024a57aab643eb6687aab43a7ae5e207..9327f17c4eccc619cfa9e1b2dd5226d93c8ed701 100644 (file)
@@ -30,11 +30,14 @@ public:
        class Loader: public Msp::DataFile::DerivedObjectLoader<SourcePackage, Package>
        {
        private:
+               const Config::InputOptions *options;
                std::map<std::string, std::string> install_map;
 
        public:
                Loader(SourcePackage &);
+               Loader(SourcePackage &, const Config::InputOptions &);
        private:
+               void init(const Config::InputOptions *);
                virtual void finish();
                void feature(const std::string &, const std::string &);
                template<Component::Type>
@@ -42,6 +45,8 @@ public:
                void condition(const std::string &);
                void build_info();
                void headers(const std::string &);
+               void if_arch(const std::string &);
+               void if_feature(const std::string &);
                void tarball(const std::string &);
                void tar_file(const std::string &);
        };
@@ -54,7 +59,6 @@ private:
        const BuildType *build_type;
        FeatureList features;
        BuildInfo build_info;
-       ConditionList conditions;
        ComponentList components;
        Config config;
        mutable DependencyCache deps_cache;