From: Mikko Rasa Date: Sat, 16 Sep 2006 11:46:47 +0000 (+0000) Subject: Add gmpxx package X-Git-Tag: 0.9~60 X-Git-Url: http://git.tdb.fi/?p=builder.git;a=commitdiff_plain;h=b1a6e6dcdd7e0da272ab0ebbed4e295f83f1165a Add gmpxx package Support custom cflags Use basenames for Install rebuild reasons --- diff --git a/source/component.cpp b/source/component.cpp index 1274a75..1fd6b24 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -12,7 +12,7 @@ Component::Component(Package &p, Type t, const string &n): void Component::create_build_info() { - build_info=pkg.get_build_info(); + build_info.add(pkg.get_build_info()); build_info.unique(); } @@ -22,9 +22,15 @@ Component::Loader::Loader(Component &c): add("source", &Loader::source); add("install", &Component::install); add("install_headers", &Component::install_headers); + add("cflag", &Loader::cflag); } void Component::Loader::source(const string &s) { comp.sources.push_back(comp.pkg.get_source()/s); } + +void Component::Loader::cflag(const string &f) +{ + comp.build_info.cflags.push_back(f); +} diff --git a/source/component.h b/source/component.h index af2fc2f..d0b3cc2 100644 --- a/source/component.h +++ b/source/component.h @@ -21,6 +21,7 @@ public: Component ∁ void source(const std::string &); + void cflag(const std::string &); }; enum Type diff --git a/source/install.cpp b/source/install.cpp index 1ade8b2..658a6fb 100644 --- a/source/install.cpp +++ b/source/install.cpp @@ -1,3 +1,4 @@ +#include #include "builder.h" #include "copy.h" #include "header.h" @@ -5,6 +6,7 @@ #include "package.h" using namespace std; +using namespace Msp; Install::Install(Builder &b, const Package &p, Target &tgt, const string &n): Target(b, &p, n) @@ -21,9 +23,9 @@ void Install::check_rebuild() { Target *dep=depends.front(); if(dep->get_mtime()>mtime) - mark_rebuild(dep->get_name()+" has changed"); + mark_rebuild(Path::basename(dep->get_name())+" has changed"); else if(dep->get_rebuild()) - mark_rebuild(dep->get_name()+" needs rebuilding"); + mark_rebuild(Path::basename(dep->get_name())+" needs rebuilding"); } } diff --git a/source/package.cpp b/source/package.cpp index cb19403..121213f 100644 --- a/source/package.cpp +++ b/source/package.cpp @@ -127,6 +127,8 @@ Package *Package::create(Builder &b, const string &name) info.push_back("-lGL"); else if(name=="pthread") info.push_back("-lpthread"); + else if(name=="gmpxx") + info.push_back("-lgmpxx"); else return 0; }