incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1232004 - in /incubator/ooo/trunk/main: configure.in set_soenv.in solenv/bin/build.pl solenv/bin/modules/SourceConfig.pm
Date Mon, 16 Jan 2012 14:18:33 GMT
Author: af
Date: Mon Jan 16 14:18:33 2012
New Revision: 1232004

URL: http://svn.apache.org/viewvc?rev=1232004&view=rev
Log:
118778: Added ADDITIONAL_REPOSITORIES environment variable and its automatic setup in configure.

Modified:
    incubator/ooo/trunk/main/configure.in
    incubator/ooo/trunk/main/set_soenv.in
    incubator/ooo/trunk/main/solenv/bin/build.pl
    incubator/ooo/trunk/main/solenv/bin/modules/SourceConfig.pm

Modified: incubator/ooo/trunk/main/configure.in
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/configure.in?rev=1232004&r1=1232003&r2=1232004&view=diff
==============================================================================
--- incubator/ooo/trunk/main/configure.in (original)
+++ incubator/ooo/trunk/main/configure.in Mon Jan 16 14:18:33 2012
@@ -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

Modified: incubator/ooo/trunk/main/set_soenv.in
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/set_soenv.in?rev=1232004&r1=1232003&r2=1232004&view=diff
==============================================================================
--- incubator/ooo/trunk/main/set_soenv.in (original)
+++ incubator/ooo/trunk/main/set_soenv.in Mon Jan 16 14:18:33 2012
@@ -1871,6 +1871,7 @@ ToFile( "WITHOUT_AFMS",      "@WITHOUT_A
 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" );

Modified: incubator/ooo/trunk/main/solenv/bin/build.pl
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/bin/build.pl?rev=1232004&r1=1232003&r2=1232004&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/bin/build.pl (original)
+++ incubator/ooo/trunk/main/solenv/bin/build.pl Mon Jan 16 14:18:33 2012
@@ -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) {

Modified: incubator/ooo/trunk/main/solenv/bin/modules/SourceConfig.pm
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/bin/modules/SourceConfig.pm?rev=1232004&r1=1232003&r2=1232004&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/bin/modules/SourceConfig.pm (original)
+++ incubator/ooo/trunk/main/solenv/bin/modules/SourceConfig.pm Mon Jan 16 14:18:33 2012
@@ -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);



Mime
View raw message