X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbinarypackage.h;h=b96015589e04ea45c164ecbb92fae08fc8c109e4;hb=564160e126f525dda52f27044d29b479088da191;hp=a0b3d0a66dfc1675e165001b98974ebfb37c97d1;hpb=242c55b17e6608b29a77ca17a5b677e202a3ca90;p=builder.git diff --git a/source/binarypackage.h b/source/binarypackage.h index a0b3d0a..b960155 100644 --- a/source/binarypackage.h +++ b/source/binarypackage.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of builder -Copyright © 2007-2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef BINARYPACKAGE_H_ #define BINARYPACKAGE_H_ @@ -17,33 +10,31 @@ Builder. class BinaryPackage: public Package { public: - class Loader: public Package::Loader + class Loader: public Msp::DataFile::DerivedObjectLoader { public: Loader(BinaryPackage &); - BinaryPackage &get_object() { return static_cast(pkg); } private: void build_info(); + void header(const std::string &); }; + using Flags = std::vector; + private: - bool need_path; - Msp::FS::Path path; + Msp::FS::Path base_path; + std::list 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_pkgconfig(Builder &, const 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 &); + void do_prepare() override; }; #endif