X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flib%2Fcomponent.h;h=2901f1b1fc53f3ba2c0e6deddbcca98f8143637b;hb=f4de41c810319d3ecc8bb5084de06a953037b7b7;hp=816d2c11803c1eb947fb6244590548b71f5fcd84;hpb=2c42374a95a76dcb28eaf3e5d85d321fafe62b38;p=builder.git diff --git a/source/lib/component.h b/source/lib/component.h index 816d2c1..2901f1b 100644 --- a/source/lib/component.h +++ b/source/lib/component.h @@ -7,6 +7,7 @@ #include "buildinfo.h" #include "conditionalloader.h" #include "installmap.h" +#include "libbuilder_api.h" #include "package.h" class SourcePackage; @@ -17,10 +18,10 @@ may also build none), as well as install a bunch of headers. Components inherit dependencies and build info from the package they belong to, and may also add their own. */ -class Component +class LIBBUILDER_API Component { public: - class Loader: public Msp::DataFile::ObjectLoader, public ConditionalLoader + class LIBBUILDER_API Loader: public Msp::DataFile::ObjectLoader, public ConditionalLoader { public: Loader(Component &); @@ -36,10 +37,11 @@ protected: SourcePackage &package; std::string name; std::vector sources; + Msp::FS::Path source_base_path; std::vector overlays; bool install = false; BuildInfo build_info; - Package::Requirements requires; + Package::Requirements required_pkgs; bool deflt = true; InstallMap install_map; bool broken = false; @@ -65,7 +67,7 @@ protected: public: bool get_install() const { return install; } const InstallMap &get_install_map() const { return install_map; } - const Package::Requirements &get_required_packages() const { return requires; } + const Package::Requirements &get_required_packages() const { return required_pkgs; } bool is_default() const { return deflt; } bool is_broken() const { return broken; } const std::vector &get_problems() const { return problems; } @@ -73,6 +75,9 @@ public: /** Prepares any required packages. */ void prepare(); + Msp::FS::Path get_temp_directory() const; + std::string flatten_source_path(const Msp::FS::Path &) const; + /** Prepares the build information for building. Pulls build info from the parent and dependency packages, and adds any component-specific flags. */ virtual void create_build_info();