X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsourcepackage.h;h=bdcba478262a786d5e3a91369787ec2b00632bb7;hb=1c43971ed99fd2f72ae171d6cdafabab74e37f4e;hp=20461fb6187f6f975ef31881f538d1de74b53527;hpb=30aa066f674421268abc6c79bf828e005ac50031;p=builder.git diff --git a/source/sourcepackage.h b/source/sourcepackage.h index 20461fb..bdcba47 100644 --- a/source/sourcepackage.h +++ b/source/sourcepackage.h @@ -4,15 +4,16 @@ #include #include #include "buildinfo.h" +#include "cache.h" #include "component.h" #include "condition.h" #include "config.h" -#include "dependencycache.h" #include "feature.h" #include "package.h" class Builder; class BuildType; +class FileTarget; class bad_expansion: public std::runtime_error { @@ -47,6 +48,7 @@ public: void headers(const std::string &); void if_arch(const std::string &); void if_feature(const std::string &); + void source_tarball(); void tarball(const std::string &); void tar_file(const std::string &); }; @@ -57,20 +59,23 @@ private: std::string version; std::string description; - Msp::FS::Path source; + FileTarget *build_file; + Msp::FS::Path source_dir; const BuildType *build_type; FeatureList features; BuildInfo build_info; ComponentList components; + Component *source_tarball; Config config; - mutable DependencyCache deps_cache; + mutable Cache 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; } + FileTarget &get_build_file() const { return *build_file; } + const Msp::FS::Path &get_source_directory() const { return source_dir; } Msp::FS::Path get_temp_dir() const; Msp::FS::Path get_out_dir() const; const ComponentList &get_components() const { return components; } @@ -79,7 +84,7 @@ public: const BuildInfo &get_build_info() const { return build_info; } Builder &get_builder() const { return builder; } - DependencyCache &get_deps_cache() const { return deps_cache; } + Cache &get_cache() const { return cache; } private: virtual void create_build_info();