summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in3
-rw-r--r--set_soenv.in1
-rwxr-xr-xsolenv/bin/build.pl19
-rwxr-xr-xsolenv/bin/modules/SourceConfig.pm7
4 files changed, 29 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index c8f07ada61e4..793a44ebb61c 100644
--- a/configure.in
+++ b/configure.in
@@ -873,6 +873,7 @@ AC_ARG_WITH(arm-target,
],with_arm_target=$withval,with_arm_target=4)
BUILD_TYPE="OOo"
+ADDITIONAL_REPOSITORIES=""
dnl ===================================================================
dnl Message.
@@ -7038,6 +7039,7 @@ if test -z "$WITH_LANG"; then
AC_MSG_RESULT([en-US])
else
AC_MSG_RESULT([$WITH_LANG])
+ ADDITIONAL_REPOSITORIES="$ADDITIONAL_REPOSITORIES;../extras"
fi
AC_SUBST(WITH_LANG)
@@ -7194,6 +7196,7 @@ fi
AC_SUBST(LOCAL_SOLVER)
AC_SUBST(BUILD_TYPE)
+AC_SUBST(ADDITIONAL_REPOSITORIES)
# make sure config.guess is +x; we execute config.guess, so it has to be so;
chmod +x ./config.guess
diff --git a/set_soenv.in b/set_soenv.in
index 2e32307ee747..950733074fa6 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1871,6 +1871,7 @@ ToFile( "WITHOUT_AFMS", "@WITHOUT_AFMS@", "e" );
ToFile( "WITHOUT_PPDS", "@WITHOUT_PPDS@", "e" );
ToFile( "WITH_BINFILTER", "@WITH_BINFILTER@", "e" );
ToFile( "BUILD_TYPE", "$BUILD_TYPE", "e" );
+ToFile( "ADDITIONAL_REPOSITORIES", "@ADDITIONAL_REPOSITORIES@", "e" );
ToFile( "VERBOSE", "@VERBOSE@", "e" );
ToFile( "ENABLE_EVOAB2", "@ENABLE_EVOAB2@", "e" );
ToFile( "GOBJECT_CFLAGS", "@GOBJECT_CFLAGS@", "e" );
diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 63c921fc4409..bc061e870f4a 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -229,7 +229,24 @@
$deliver_env{'L10N_framework'}++;
};
my $workspace_path = get_workspace_path(); # This also sets $initial_module
- my $source_config = SourceConfig -> new($workspace_path);
+ my @additional_repositories = ();
+
+ # Collect additional repository directories from the ADDITIONAL_REPOSITORIES
+ # environment variable (typically set by configure).
+ foreach my $additional_repository (split(";", $ENV{ADDITIONAL_REPOSITORIES}))
+ {
+ next if $additional_repository eq "";
+ # The repository path is expected to be relative to the workspace_path.
+ # For support of absolute paths we need functionality to distinguish between
+ # relative and absolute paths (provided by File::Spec).
+ my $path = Cwd::realpath(correct_path($workspace_path . "/" . $additional_repository));
+ if ( -d $path)
+ {
+ push @additional_repositories, $path;
+ }
+ }
+
+ my $source_config = SourceConfig -> new($workspace_path, @additional_repositories);
check_partial_gnumake_build($initial_module);
if ($html) {
diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm
index e7b526e2cfca..4e59c7c96a35 100755
--- a/solenv/bin/modules/SourceConfig.pm
+++ b/solenv/bin/modules/SourceConfig.pm
@@ -56,6 +56,8 @@ sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $source_root = shift;
+ my @additional_repositories = @_;
+
my $self = {};
$self->{USER_SOURCE_ROOT} = undef;
$self->{SOURCE_CONFIG_FILE} = undef;
@@ -104,6 +106,11 @@ sub new {
if (defined $self->{USER_SOURCE_ROOT}) {
${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT};
};
+ foreach my $additional_repository (@additional_repositories)
+ {
+ ${$self->{REPOSITORIES}}{File::Basename::basename($additional_repository)} = $additional_repository;
+ }
+
read_config_file($self);
get_module_paths($self);
bless($self, $class);