6 #include <msp/datafile/loader.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::Loader
26 Package &get_object() { return pkg; }
30 void require(const std::string &);
39 BuildInfo export_binfo;
44 Package(Builder &, const std::string &);
46 virtual ~Package() { }
48 const std::string &get_name() const { return name; }
49 Builder &get_builder() const { return builder; }
50 const PackageList &get_requires() const { return requires; }
52 const BuildInfo &get_exported_binfo() const { return export_binfo; }
54 /// Indicates whether or not this package supports pkg-config
55 bool get_use_pkgconfig() const { return use_pkgconfig; }
57 /** Processes configuration options that were most likely obtained from the
59 void configure(const StringMap &, unsigned);
61 bool is_configured() const { return conf_done; }
63 virtual void do_configure(const StringMap &, unsigned) { }
64 virtual void create_build_info() { }
67 virtual void create_targets() { }