6 #include <msp/datafile/objectloader.h>
13 typedef std::list<Package *> PackageList;
16 A package is a distributable piece of software. Package information may be
17 obtained in several ways: Build files of source packages, pkg-config for binary
18 packages and the builderrc file for binary packages with no pkg-config support.
23 class Loader: public Msp::DataFile::ObjectLoader<Package>
28 void require(const std::string &);
37 BuildInfo export_binfo;
42 Package(Builder &, const std::string &);
44 virtual ~Package() { }
46 const std::string &get_name() const { return name; }
47 Builder &get_builder() const { return builder; }
48 const PackageList &get_requires() const { return requires; }
50 const BuildInfo &get_exported_binfo() const { return export_binfo; }
52 /// Indicates whether or not this package supports pkg-config
53 bool get_use_pkgconfig() const { return use_pkgconfig; }
55 /** Prepares the package for building. Recursively prepares all required
56 packages, populates build info and creates targets. */
59 bool is_prepared() const { return prepared; }
61 virtual void create_build_info() { }
63 virtual void create_targets() { }
66 virtual void save_caches() { }