X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbinarypackage.cpp;h=f804da08394c31fc3489109a46b1abf9eb9ef5fd;hb=51d5a0f618faabfce9a0a5d5dd64b0b0d52b97cb;hp=f63bff882439c3f8174479d7ff18232e6110f5b2;hpb=a2adbd9c0a8d7a7567848c4c6bdbf0de6ba32bb1;p=builder.git diff --git a/source/binarypackage.cpp b/source/binarypackage.cpp index f63bff8..f804da0 100644 --- a/source/binarypackage.cpp +++ b/source/binarypackage.cpp @@ -1,11 +1,4 @@ -/* $Id$ - -This file is part of builder -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#include +#include #include #include "binarypackage.h" #include "builder.h" @@ -17,50 +10,34 @@ BinaryPackage::BinaryPackage(Builder &b, const string &n): Package(b, n), need_path(false) { - use_pkgconfig=false; + use_pkgconfig = false; } -/** -Sets the path where the package files were installed. This is only useful if -the package doesn't use pkg-config. -*/ -void BinaryPackage::set_path(const Msp::FS::Path &p) +void BinaryPackage::set_path(const FS::Path &p) { - path=builder.get_cwd()/p; + path = builder.get_cwd()/p; } void BinaryPackage::create_build_info() { for(StringList::iterator i=export_binfo.incpath.begin(); i!=export_binfo.incpath.end(); ++i) if((*i)[0]=='@') - *i=(path/i->substr(1)).str(); + *i = (path/i->substr(1)).str(); for(StringList::iterator i=export_binfo.libpath.begin(); i!=export_binfo.libpath.end(); ++i) if((*i)[0]=='@') - *i=(path/i->substr(1)).str(); + *i = (path/i->substr(1)).str(); } BinaryPackage *BinaryPackage::from_pkgconfig(Builder &builder, const string &name) { - list argv; - argv.push_back("pkg-config"); - argv.push_back("--silence-errors"); - argv.push_back("--cflags"); - argv.push_back("--libs"); - argv.push_back(name); - if(builder.get_verbose()>=4) - cout<<"Running "<use_pkgconfig=true; - BuildInfo &binfo=pkg->export_binfo; + BinaryPackage *pkg = new BinaryPackage(builder, name); + pkg->use_pkgconfig = true; + BuildInfo &binfo = pkg->export_binfo; - vector flags=split(info); + vector flags = split(info); for(vector::const_iterator i=flags.begin(); i!=flags.end(); ++i) { if(!i->compare(0, 2, "-I"))