summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-10-10 10:33:37 -0500
committerAndras Timar <andras.timar@collabora.com>2014-10-23 08:10:19 +0000
commit3104fba6051328cb827042272fc6bccf05ccf5fb (patch)
treeb4653342d6f0811f3f4d9abee0d981ff38830b4c /solenv
parent2e363d1135ede20e2560df4eff27c080bc7e782e (diff)
kill OUTPATH
Change-Id: I91806c3a55905dfd1ae90a10bc890cc526ff3270 Reviewed-on: https://gerrit.libreoffice.org/11908 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/modules/installer.pm4
-rw-r--r--solenv/bin/modules/installer/control.pm2
-rw-r--r--solenv/bin/modules/installer/download.pm31
-rw-r--r--solenv/bin/modules/installer/environment.pm5
-rw-r--r--solenv/bin/modules/installer/epmfile.pm45
-rw-r--r--solenv/bin/modules/installer/globals.pm2
-rw-r--r--solenv/bin/modules/installer/parameter.pm59
-rw-r--r--solenv/bin/modules/installer/setupscript.pm2
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm2
-rw-r--r--solenv/bin/modules/installer/ziplist.pm11
-rw-r--r--solenv/bin/modules/par2script/systemactions.pm2
-rw-r--r--solenv/bin/modules/pre2par/systemactions.pm2
12 files changed, 86 insertions, 81 deletions
diff --git a/solenv/bin/modules/installer.pm b/solenv/bin/modules/installer.pm
index 487bba820fb2..605aec25e663 100644
--- a/solenv/bin/modules/installer.pm
+++ b/solenv/bin/modules/installer.pm
@@ -1272,7 +1272,7 @@ sub run {
#####################################################################
# ... creating idt files ...
- # Only for Windows builds ($installer::globals::compiler is wntmsci)
+ # Only for Windows builds
#####################################################################
if ( $installer::globals::iswindowsbuild )
@@ -1285,7 +1285,7 @@ sub run {
# 1. copy all files that need to be stripped locally
# 2. strip all these files
- if ( $installer::globals::compiler =~ /wntgcci/ || $installer::globals::compiler =~ /wntgccx/ )
+ if ( $installer::globals::com eq 'GCC')
{
installer::windows::strip::strip_binaries($filesinproductlanguageresolvedarrayref, $languagestringref);
}
diff --git a/solenv/bin/modules/installer/control.pm b/solenv/bin/modules/installer/control.pm
index 0cdb532acb52..061cbcad7f53 100644
--- a/solenv/bin/modules/installer/control.pm
+++ b/solenv/bin/modules/installer/control.pm
@@ -270,7 +270,7 @@ sub check_system_environment
CPUNAME
OS
COM
- OUTPATH
+ PLATFORMID
LOCAL_OUT
LOCAL_COMMON_OUT
WORKDIR
diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm
index 0fee1c7dc4d5..d9b3d46f09e5 100644
--- a/solenv/bin/modules/installer/download.pm
+++ b/solenv/bin/modules/installer/download.pm
@@ -356,7 +356,7 @@ sub get_download_platformname
}
else
{
- $platformname = $installer::globals::compiler;
+ $platformname = $installer::globals::os;
}
return $platformname;
@@ -370,19 +370,7 @@ sub get_download_architecture
{
my $arch = "";
- if ( $installer::globals::compiler =~ /unxlngi/ )
- {
- $arch = "x86";
- }
- elsif ( $installer::globals::compiler =~ /unxlngppc/ )
- {
- $arch = "PPC";
- }
- elsif ( $installer::globals::compiler =~ /unxlngx/ )
- {
- $arch = "x86-64";
- }
- elsif ( $installer::globals::issolarissparcbuild )
+ if ( $installer::globals::issolarissparcbuild )
{
$arch = "Sparc";
}
@@ -401,11 +389,19 @@ sub get_download_architecture
$arch = "x86";
}
}
- elsif ( $installer::globals::compiler =~ /^unxmacxi/ )
+ elsif ( $installer::globals::cpuname eq 'INTEL' )
{
$arch = "x86";
}
- elsif ( $installer::globals::compiler =~ /^unxmacxx/ )
+ elsif ( $installer::globals::cpuname eq 'POWERPC' )
+ {
+ $arch = "PPC";
+ }
+ elsif ( $installer::globals::cpuname eq 'POWERPC64' )
+ {
+ $arch = "PPC";
+ }
+ elsif ( $installer::globals::cpuname eq 'X86_64' )
{
$arch = "x86-64";
}
@@ -584,8 +580,7 @@ sub resolve_variables_in_downloadname
elsif ( $installer::globals::issolarissparcbuild ) { $os = "solsparc"; }
elsif ( $installer::globals::issolarisx86build ) { $os = "solia"; }
elsif ( $installer::globals::islinuxbuild ) { $os = "linux"; }
- elsif ( $installer::globals::compiler =~ /unxmacxi/ ) { $os = "macosxi"; }
- elsif ( $installer::globals::compiler =~ /unxmacxx/ ) { $os = "macosxx"; }
+ elsif ( $installer::globals::platformid eq 'macosx_x86_64' ) { $os = "macosxx"; }
else { $os = ""; }
$downloadname =~ s/\{os\}/$os/;
diff --git a/solenv/bin/modules/installer/environment.pm b/solenv/bin/modules/installer/environment.pm
index af9e4e263d12..8e5f61e1d052 100644
--- a/solenv/bin/modules/installer/environment.pm
+++ b/solenv/bin/modules/installer/environment.pm
@@ -47,9 +47,6 @@ sub create_pathvariables
my $localcommonpath = $environment->{'LOCAL_COMMON_OUT'};
$variables{'localcommonpath'} = $localcommonpath;
- my $platformname = $environment->{'OUTPATH'};
- $variables{'platformname'} = $platformname;
-
my $installscriptdir = $environment->{'WORKDIR'} . $installer::globals::separator . "InstallScriptTarget";
$variables{'installscriptdir'} = $installscriptdir;
@@ -106,10 +103,10 @@ sub set_global_environment_variables
my ( $environment ) = @_;
$installer::globals::build = $environment->{'LIBO_VERSION_MAJOR'}.$environment->{'LIBO_VERSION_MINOR'}."0";
- $installer::globals::compiler = $environment->{'OUTPATH'};
$installer::globals::os = $environment->{'OS'};
$installer::globals::com = $environment->{'COM'};
$installer::globals::cpuname = $environment->{'CPUNAME'};
+ $installer::globals::platformid = $environment->{'PLATFORMID'};
if ( $ENV{'LAST_MINOR'} ) { $installer::globals::lastminor = $ENV{'LAST_MINOR'}; }
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index b33aad152bd1..3ee2ca0db107 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -2026,9 +2026,18 @@ sub create_packages_without_epm
my $rpmversion = determine_rpm_version();
my $target = "";
- if ( $installer::globals::compiler =~ /unxlngi/) { $target = "i586"; }
- elsif ( $installer::globals::compiler =~ /unxaigppc/) { $target = "ppc"; }
- elsif ( $installer::globals::compiler =~ /unxlng/) {$target = (POSIX::uname())[4]; }
+ if ( $installer::globals::platformid eq 'linux_x86')
+ {
+ $target = "i586";
+ }
+ elsif ( $installer::globals::platformid eq 'aix_powerpc')
+ {
+ $target = "ppc";
+ }
+ elsif ( $installer::globals::os eq 'LINUX')
+ {
+ $target = (POSIX::uname())[4];
+ }
# rpm 4.6 ignores buildroot tag in spec file
@@ -2233,18 +2242,24 @@ sub create_new_directory_structure
{
my $rpmdir;
my $machine = "";
- if ( $installer::globals::compiler =~ /unxlngi/) {
- $rpmdir = "$installer::globals::epmoutpath/RPMS/i586";
- }
- elsif ( $installer::globals::compiler =~ /unxaigppc/) {
- $machine = "ppc";
- $rpmdir = "$installer::globals::epmoutpath/RPMS/$machine";
- }
- elsif ( $installer::globals::compiler =~ /unxlng/) {
- $machine = (POSIX::uname())[4];
- $rpmdir = "$installer::globals::epmoutpath/RPMS/$machine";
- }
- else { installer::exiter::exit_program("ERROR: rpmdir undefined !", "create_new_directory_structure"); }
+ if ( $installer::globals::platformid eq 'linux_x86')
+ {
+ $rpmdir = "$installer::globals::epmoutpath/RPMS/i586";
+ }
+ elsif ( $installer::globals::platformid eq 'aix_powerpc')
+ {
+ $machine = "ppc";
+ $rpmdir = "$installer::globals::epmoutpath/RPMS/$machine";
+ }
+ elsif ( $installer::globals::os eq 'LINUX')
+ {
+ $machine = (POSIX::uname())[4];
+ $rpmdir = "$installer::globals::epmoutpath/RPMS/$machine";
+ }
+ else
+ {
+ installer::exiter::exit_program("ERROR: rpmdir undefined !", "create_new_directory_structure");
+ }
my $systemcall = "mv $rpmdir/* $newdir"; # moving the rpms into the directory "RPMS"
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 8ceb563165b2..163486e2fbf5 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -39,10 +39,10 @@ BEGIN
$build = "";
$minor = "";
$lastminor = "";
- $compiler = "";
$os = "";
$cpuname = "";
$com = "";
+ $platformid = "";
$pro = 0;
$dounzip = 1;
$languages_defined_in_productlist = 0;
diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm
index 7a7487d0cc75..d32df73b8b6e 100644
--- a/solenv/bin/modules/installer/parameter.pm
+++ b/solenv/bin/modules/installer/parameter.pm
@@ -44,7 +44,6 @@ The following parameter are needed:
-b: Build, e.g. srx645 (optional)
-m: Minor, e.g. m10 (optional)
-simple: Path to do a simple install to
--c: Compiler, e.g. wntmsci8, unxlngi5, unxsols4, ... (optional)
-u: Path, in which zipfiles are unpacked (optional)
-msitemplate: Source of the msi file templates (Windows compiler only)
-msilanguage: Source of the msi file templates (Windows compiler only)
@@ -117,7 +116,6 @@ sub getparameter
elsif ($param eq "-b") { $installer::globals::build = shift(@ARGV); }
elsif ($param eq "-m") { $installer::globals::minor = shift(@ARGV); }
elsif ($param eq "-dontunzip") { $installer::globals::dounzip = 0; }
- elsif ($param eq "-c") { $installer::globals::compiler = shift(@ARGV); }
elsif ($param eq "-pro") { $installer::globals::pro = 1; }
elsif ($param eq "-format") { $installer::globals::packageformat = shift(@ARGV); }
elsif ($param eq "-quiet") { $installer::globals::quiet = 1; }
@@ -245,19 +243,21 @@ sub setglobalvariables
# makefile calling the perl program.
$installer::globals::installertypedir = $installer::globals::packageformat;
- if ( $installer::globals::compiler =~ /wnt(msc|gcc)i/ )
+ if ( $installer::globals::os eq 'WNT' )
{
- $installer::globals::iswindowsbuild = 1;
- $installer::globals::iswin64build = 0;
- }
-
- if ( $installer::globals::compiler =~ /wnt(msc|gcc)x/ )
- {
- $installer::globals::iswindowsbuild = 1;
- $installer::globals::iswin64build = 1;
+ if ( $installer::globals::cpuname eq 'INTEL')
+ {
+ $installer::globals::iswindowsbuild = 1;
+ $installer::globals::iswin64build = 0;
+ }
+ else
+ {
+ $installer::globals::iswindowsbuild = 1;
+ $installer::globals::iswin64build = 1;
+ }
}
- if ( $installer::globals::compiler =~ /unxso[lg][siux]/ )
+ if ( $installer::globals::os eq 'SOLARIS')
{
$installer::globals::issolarisbuild = 1;
if ( $installer::globals::packageformat eq "pkg" )
@@ -265,9 +265,17 @@ sub setglobalvariables
$installer::globals::issolarispkgbuild = 1;
$installer::globals::epmoutpath = "packages";
}
+ if ( $installer::globals::cpuname eq 'INTEL')
+ {
+ $installer::globals::issolarisx86build = 1;
+ }
+ else
+ {
+ $installer::globals::issolarissparcbuild = 1;
+ }
}
- if ( $installer::globals::compiler =~ /unxmacx/ )
+ if ( $installer::globals::platformid eq 'macosx_x86_64')
{
$installer::globals::ismacbuild = 1;
@@ -277,12 +285,12 @@ sub setglobalvariables
}
}
- if ( $installer::globals::compiler =~ /unxobsd/ )
+ if ( $installer::globals::os eq 'OPENBSD')
{
$installer::globals::epmoutpath = "openbsd";
}
- if ( $installer::globals::compiler =~ /unxfbsd/ )
+ if ( $installer::globals::os eq 'FREEBSD')
{
$installer::globals::isfreebsdbuild = 1;
@@ -293,11 +301,7 @@ sub setglobalvariables
}
}
- if ( $installer::globals::compiler =~ /unxso[lg]s/ ) { $installer::globals::issolarissparcbuild = 1; }
-
- if ( $installer::globals::compiler =~ /unxso[lg]i/ ) { $installer::globals::issolarisx86build = 1; }
-
- if ($ENV{OS} eq 'AIX')
+ if ($installer::globals::os eq 'AIX')
{
if ( $installer::globals::packageformat eq "rpm" )
{
@@ -307,7 +311,7 @@ sub setglobalvariables
if ( $installer::globals::rpm eq "" ) { installer::exiter::exit_program("ERROR: Environment variable \"\$RPM\" has to be defined!", "setglobalvariables"); }
}
- if ($ENV{OS} eq 'LINUX')
+ if ($installer::globals::os eq 'LINUX')
{
$installer::globals::islinuxbuild = 1;
if ( $installer::globals::packageformat eq "rpm" )
@@ -374,7 +378,7 @@ sub setglobalvariables
my $dirsave = $installer::globals::temppath;
- if ( $installer::globals::compiler =~ /^unxmac/ )
+ if ( $installer::globals::platformid eq 'maosx_x86_64')
{
chmod 0777, $installer::globals::temppath;
}
@@ -385,7 +389,7 @@ sub setglobalvariables
if ( ! -d $installer::globals::temppath ) { installer::exiter::exit_program("ERROR: Failed to create directory $installer::globals::temppath ! Possible reason: Wrong privileges in directory $dirsave .", "setglobalvariables"); }
- $installer::globals::temppath = $installer::globals::temppath . $installer::globals::separator . $installer::globals::compiler;
+ $installer::globals::temppath = $installer::globals::temppath . $installer::globals::separator . $installer::globals::platformid;
installer::systemactions::create_directory($installer::globals::temppath);
if ( $^O =~ /cygwin/i )
{
@@ -415,7 +419,7 @@ sub control_required_parameter
if (!($installer::globals::is_copy_only_project))
{
##############################################################################################
- # idt template path. Only required for Windows build ($installer::globals::compiler =~ /wntmsci/)
+ # idt template path. Only required for Windows build
# for the creation of the msi database.
##############################################################################################
@@ -427,7 +431,7 @@ sub control_required_parameter
}
##############################################################################################
- # idt language path. Only required for Windows build ($installer::globals::compiler =~ /wntmsci/)
+ # idt language path. Only required for Windows build
# for the creation of the msi database.
##############################################################################################
@@ -512,7 +516,10 @@ sub outputparameter
push(@output, "Taking setup script from workdir\n");
}
push(@output, "Unpackpath: $installer::globals::unpackpath\n");
- push(@output, "Compiler: $installer::globals::compiler\n");
+ push(@output, "PLATFORMID: $installer::globals::platformid\n");
+ push(@output, "OS: $installer::globals::os\n");
+ push(@output, "CPUNAME: $installer::globals::cpuname\n");
+ push(@output, "COM: $installer::globals::com\n");
push(@output, "Product: $installer::globals::product\n");
push(@output, "BuildID: $installer::globals::buildid\n");
push(@output, "Build: $installer::globals::build\n");
diff --git a/solenv/bin/modules/installer/setupscript.pm b/solenv/bin/modules/installer/setupscript.pm
index e47f0bd8336a..9cf5e920fca1 100644
--- a/solenv/bin/modules/installer/setupscript.pm
+++ b/solenv/bin/modules/installer/setupscript.pm
@@ -57,7 +57,7 @@ sub set_setupscript_name
installer::exiter::exit_program("ERROR: Setup script not defined on command line (-l) and not in product list!", "set_setupscript_name");
}
- if ( $installer::globals::compiler =~ /wnt/ )
+ if ( $installer::globals::os eq 'WNT')
{
$scriptname .= ".inf";
}
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index 118d420ff074..6d77e4143653 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -665,7 +665,7 @@ sub create_simple_package
my $extensionfolder = get_extensions_dir($subfolderdir);
installer::systemactions::remove_empty_dirs_in_folder($extensionfolder);
- if ( $installer::globals::compiler =~ /^unxmacx/ )
+ if ( $installer::globals::platformid eq 'macosx_x86_64' )
{
installer::worker::put_scpactions_into_installset("$installdir/$packagename");
}
diff --git a/solenv/bin/modules/installer/ziplist.pm b/solenv/bin/modules/installer/ziplist.pm
index ea4c20990380..b4867a83a510 100644
--- a/solenv/bin/modules/installer/ziplist.pm
+++ b/solenv/bin/modules/installer/ziplist.pm
@@ -153,10 +153,6 @@ sub getproductblock
{
installer::exiter::exit_program("ERROR: Product $installer::globals::product not defined in $installer::globals::ziplistname", "getproductblock");
}
- elsif ($search eq $installer::globals::compiler )
- {
- installer::exiter::exit_program("ERROR: Compiler $installer::globals::compiler not defined in $installer::globals::pathfilename", "getproductblock");
- }
else # this is not possible
{
installer::exiter::exit_program("ERROR: Unknown value for $search in getproductblock()", "getproductblock");
@@ -175,18 +171,14 @@ sub analyze_settings_block
my ($blockref) = @_;
my @newsettingsblock = ();
- my $compilerstring = "";
my $record = 1;
my $counter = 0;
# Allowed values in settings block:
# "Settings", "Variables", "unix" (for destination path and logfile)
- # Furthermore allowed values are $installer::globals::build (srx645) and $installer::globals::compiler (pro and nonpro (unxsols4.pro))
# Comment line in settings block begin with "#" or ";"
- $compilerstring = $installer::globals::compiler;
-
for ( my $i = 0; $i <= $#{$blockref}; $i++ )
{
my $line = ${$blockref}[$i];
@@ -203,8 +195,7 @@ sub analyze_settings_block
# complete blocks of unknows strings are not recorded
- if ((!($line =~ /^\s*\Q$compilerstring\E\s*$/i)) &&
- (!($line =~ /^\s*\Q$installer::globals::build\E\s*$/i)) &&
+ if ((!($line =~ /^\s*\Q$installer::globals::build\E\s*$/i)) &&
(!($line =~ /^\s*\bSettings\b\s*$/i)) &&
(!($line =~ /^\s*\bVariables\b\s*$/i)) &&
(!($line =~ /^\s*\bunix\b\s*$/i)) &&
diff --git a/solenv/bin/modules/par2script/systemactions.pm b/solenv/bin/modules/par2script/systemactions.pm
index 47839272a9af..7c9ecbe90fbb 100644
--- a/solenv/bin/modules/par2script/systemactions.pm
+++ b/solenv/bin/modules/par2script/systemactions.pm
@@ -78,7 +78,7 @@ sub create_directories
}
else
{
- $path = $path . $par2script::globals::compiler . $par2script::globals::separator;
+ $path = $path . $par2script::globals::platformid . $par2script::globals::separator;
create_directory($path);
$path = $path . $par2script::globals::product . $par2script::globals::separator;
diff --git a/solenv/bin/modules/pre2par/systemactions.pm b/solenv/bin/modules/pre2par/systemactions.pm
index 2cf3bdf43034..11d5c259c607 100644
--- a/solenv/bin/modules/pre2par/systemactions.pm
+++ b/solenv/bin/modules/pre2par/systemactions.pm
@@ -101,7 +101,7 @@ sub create_directories
}
else
{
- $path = $path . $pre2par::globals::compiler . $pre2par::globals::separator;
+ $path = $path . $pre2par::globals::platformid . $pre2par::globals::separator;
create_directory($path);
$path = $path . $pre2par::globals::product . $pre2par::globals::separator;