3 This file is part of builder
4 Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
13 #include <msp/datafile/loader.h>
14 #include "buildinfo.h"
19 typedef std::list<Package *> PackageList;
22 A package is a distributable piece of software. Package information may be
23 obtained in several ways: Build files of source packages, pkg-config for binary
24 packages and the builderrc file for binary packages with no pkg-config support.
29 class Loader: public Msp::DataFile::Loader
33 Package &get_object() { return pkg; }
37 void require(const std::string &);
40 const std::string &get_name() const { return name; }
41 Builder &get_builder() const { return builder; }
42 const PackageList &get_requires() const { return requires; }
43 PackageList collect_requires();
44 const BuildInfo &get_exported_binfo() const { return export_binfo; }
46 /// Indicates whether or not this package supports pkg-config
47 bool get_use_pkgconfig() const { return use_pkgconfig; }
49 void configure(const StringMap &, unsigned);
50 virtual ~Package() { }
57 BuildInfo export_binfo;
62 Package(Builder &, const std::string &);
63 virtual void do_configure(const StringMap &, unsigned) { }
64 virtual void create_build_info() { }