6 #include <msp/datafile/objectloader.h>
12 typedef std::list<Package *> PackageList;
15 A package is a distributable piece of software. Package information may be
16 obtained in several ways: Build files of source packages, pkg-config for binary
17 packages and the builderrc file for binary packages with no pkg-config support.
22 class Loader: public Msp::DataFile::ObjectLoader<Package>
27 void require(const std::string &);
36 BuildInfo export_binfo;
41 Package(Builder &, const std::string &);
43 virtual ~Package() { }
45 const std::string &get_name() const { return name; }
46 Builder &get_builder() const { return builder; }
47 const PackageList &get_requires() const { return requires; }
49 const BuildInfo &get_exported_binfo() const { return export_binfo; }
51 /// Indicates whether or not this package supports pkg-config
52 bool get_use_pkgconfig() const { return use_pkgconfig; }
54 /** Processes configuration options that were most likely obtained from the
56 void configure(const StringMap &, unsigned);
58 bool is_configured() const { return conf_done; }
60 virtual void do_configure(const StringMap &, unsigned) { }
61 virtual void create_build_info() { }
64 virtual void create_targets() { }