]> git.tdb.fi Git - builder.git/blobdiff - source/sourcepackage.h
Target::prepare shouldn't be virtual
[builder.git] / source / sourcepackage.h
index 755bdfcb024a57aab643eb6687aab43a7ae5e207..20461fb6187f6f975ef31881f538d1de74b53527 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,10 +45,14 @@ 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 &);
        };
 
+       typedef std::list<Component> ComponentList;
+
 private:
        std::string version;
        std::string description;
@@ -54,13 +61,13 @@ private:
        const BuildType *build_type;
        FeatureList features;
        BuildInfo build_info;
-       ConditionList conditions;
        ComponentList components;
        Config config;
        mutable DependencyCache deps_cache;
 
 public:
        SourcePackage(Builder &, const std::string &, const Msp::FS::Path &);
+
        const std::string &get_version() const { return version; }
        const std::string &get_description() const { return description; }
        const Msp::FS::Path &get_source() const { return source; }
@@ -73,15 +80,7 @@ public:
        Builder &get_builder() const { return builder; }
 
        DependencyCache &get_deps_cache() const { return deps_cache; }
-       std::string expand_string(const std::string &) const;
 private:
-       virtual void do_configure(const StringMap &, unsigned);
-
-       /** Initializes configuration options. */
-       void init_config();
-
-       /** Fills in build info based on configuration.  All required packages must be
-       configured when this is called. */
        virtual void create_build_info();
 
        virtual void create_targets();