X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpackage.h;h=2ee932bb8d7e00bb42361327c19164712d4ca2a7;hb=242c55b17e6608b29a77ca17a5b677e202a3ca90;hp=4620cf475f51d3d99b5d251b274a760a92a4fb97;hpb=77461a8c0e2b5686b04cf15f3a9333b215813992;p=builder.git diff --git a/source/package.h b/source/package.h index 4620cf4..2ee932b 100644 --- a/source/package.h +++ b/source/package.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of builder -Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions +Copyright © 2006-2007, 2009 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -37,29 +37,38 @@ public: void require(const std::string &); }; - const std::string &get_name() const { return name; } - Builder &get_builder() const { return builder; } - const PackageList &get_requires() const { return requires; } - PackageList collect_requires(); - const BuildInfo &get_exported_binfo() const { return export_binfo; } +protected: + Builder &builder; - /// Indicates whether or not this package supports pkg-config - bool get_use_pkgconfig() const { return use_pkgconfig; } + std::string name; + + PackageList requires; + BuildInfo export_binfo; + bool conf_done; - void configure(const StringMap &, unsigned); + bool use_pkgconfig; + + Package(Builder &, const std::string &); +public: virtual ~Package() { } -protected: - Builder &builder; - std::string name; + const std::string &get_name() const { return name; } + Builder &get_builder() const { return builder; } + const PackageList &get_requires() const { return requires; } - PackageList requires; - BuildInfo export_binfo; - bool conf_done; + /** Returns a list of all directly and indirectly required packages, + including the package itself. */ + PackageList collect_requires(); - bool use_pkgconfig; + const BuildInfo &get_exported_binfo() const { return export_binfo; } - Package(Builder &, const std::string &); + /// Indicates whether or not this package supports pkg-config + bool get_use_pkgconfig() const { return use_pkgconfig; } + + /** Processes configuration options that were most likely obtained from the + command line. */ + void configure(const StringMap &, unsigned); +protected: virtual void do_configure(const StringMap &, unsigned) { } virtual void create_build_info() { } };