]> git.tdb.fi Git - builder.git/blobdiff - source/binarypackage.h
Deal with static build flags for binary packages
[builder.git] / source / binarypackage.h
index 8c0d0e9ec39c7a741c94fe908a8f92aa08d74803..b8c29de772e45610d9078de5ea0225c8ce961349 100644 (file)
@@ -10,33 +10,33 @@ Builder.
 class BinaryPackage: public Package
 {
 public:
-       class Loader: public Package::Loader
+       class Loader: public Msp::DataFile::DerivedObjectLoader<BinaryPackage, Package::Loader>
        {
        public:
                Loader(BinaryPackage &);
-               BinaryPackage &get_object() { return static_cast<BinaryPackage &>(pkg); }
        private:
                void build_info();
+               void header(const std::string &);
        };
 
+       typedef std::vector<std::string> Flags;
+
 private:
-       bool need_path;
-       Msp::FS::Path path;
+       typedef std::list<std::string> HeaderList;
+
+       Msp::FS::Path base_path;
+       HeaderList headers;
+       BuildInfo static_binfo;
 
 public:
        BinaryPackage(Builder &, const std::string &);
 
-       /**
-       Sets the path where the package's files were installed.  This is only useful
-       if the package doesn't use pkg-config.
-       */
-       void set_path(const Msp::FS::Path &);
-
-       bool get_need_path() const { return need_path; }
+       const BuildInfo &get_static_build_info() const { return static_binfo; }
 
-       static BinaryPackage *from_flags(Builder &, const std::string &, const std::vector<std::string> &);
+       static BinaryPackage *from_flags(Builder &, const std::string &, const Flags &, const Flags & = Flags());
 private:
-       virtual void create_build_info();
+       static void process_flags(const Flags &, BuildInfo &);
+       virtual void do_prepare();
 };
 
 #endif