if [ "$CUSTOM_COMPILER" = "yes" ]; then
ARGS="$ARGS --compiler=$COMPILER"
fi
-eval "./builder-stage1 $ARGS"
+eval "./builder-stage1 --package-dir '$LIBPATH' $ARGS"
#include <msp/builder/tool.h>
#include <msp/core/getopt.h>
#include <msp/fs/dir.h>
+#include <msp/io/print.h>
#include "plugins/base/baseplugin.h"
#include "plugins/gnu/gnuplugin.h"
{
string compiler;
string prefix;
+ vector<string> package_path;
GetOpt getopt;
getopt.add_option("compiler", compiler, GetOpt::REQUIRED_ARG).set_help("Use CMD instead of gcc as compiler.", "CMD");
getopt.add_option("prefix", prefix, GetOpt::REQUIRED_ARG).set_help("Install things to DIR.", "DIR");
+ getopt.add_option("package-dir", package_path, GetOpt::REQUIRED_ARG).set_help("Look for source packages in DIR.", "DIR");
getopt(argc, argv);
logger.enable_channel("tasks");
builder.set_logger(&logger);
builder.load_plugins<BasePlugin, GnuPlugin>();
+ for(const string &p: package_path)
+ builder.get_package_manager().append_package_path(p);
+
if(!prefix.empty())
builder.set_prefix(FS::getcwd()/prefix);