view patches/openoffice-solenv-mingw-installer.patch @ 6512:ccc20ae889ca default tip guix

mingw::guile-2.0.7 builds.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Thu, 24 Mar 2016 08:03:39 +0100
parents 0fcf64ee698f
children
line wrap: on
line source

--- solenv/bin/modules/installer/parameter.pm.pristine	2008-11-12 15:42:24.000000000 +0100
+++ solenv/bin/modules/installer/parameter.pm	2008-11-12 15:38:58.000000000 +0100
@@ -307,8 +307,11 @@ sub setglobalvariables
 	
 	if ( $installer::globals::compiler =~ /unxso[lg]i/ ) { $installer::globals::issolarisx86build = 1; }
 
-	if ($ENV{OS} eq 'LINUX')
+	if ($ENV{OS} eq 'LINUX'
+	    || ($ENV{BUILD_OS} == 'Linux' && $ENV{CROSS_COMPILING} eq 'yes'))
 	{
+		$installer::globals::installertypedir = "";
+		$installer::globals::iswindowsbuild = 0;
 		$installer::globals::islinuxbuild = 1;
 		if ( $installer::globals::packageformat eq "rpm" )
 		{
--- solenv/bin/modules/installer/servicesfile.pm.pristine	2008-11-27 13:28:48.000000000 +0100
+++ solenv/bin/modules/installer/servicesfile.pm	2008-11-27 13:28:09.000000000 +0100
@@ -942,13 +942,13 @@ sub create_services_rdb
 		
 				my $searchname;
 		
-				if ($installer::globals::isunix) { $searchname = "regcomp"; }
+				if ($installer::globals::isunix && $ENV{CROSS_COMPILING} ne 'yes') { $searchname = "regcomp"; }
 				else { $searchname = "regcomp.exe"; } 
 	
 				$regcompfileref = get_source_path_cygwin_safe($searchname, $includepatharrayref, 1);
 				if ( $$regcompfileref eq "" ) { installer::exiter::exit_program("ERROR: Could not find file $searchname for registering uno components!", "create_services_rdb"); }
 
-		if ($installer::globals::isunix) { $searchname = "regmerge"; }
+		if ($installer::globals::isunix && $ENV{CROSS_COMPILING} ne 'yes') { $searchname = "regmerge"; }
 		else { $searchname = "regmerge.exe"; } 
 	
 		$regmergefileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$searchname, $includepatharrayref, 1);
--- solenv/bin/modules/installer/worker.pm.pristine	2009-04-06 18:25:00.471497381 +0200
+++ solenv/bin/modules/installer/worker.pm	2009-04-07 21:00:26.915994121 +0200
@@ -32,7 +32,9 @@
 package installer::worker;
 
 use Cwd;
+use File::Basename;
 use File::Copy;
+use File::Path;
 use File::stat;
 use File::Temp qw(tmpnam);
 use installer::control;
@@ -808,7 +810,8 @@ sub install_simple ($$$$$$)
 
 		push @lines, "$destination\n";
 		# printf "cp $sourcepath $destdir$destination\n";
-		copy ("$sourcepath", "$destdir$destination") || die "Can't copy file: $sourcepath -> $destdir$destination $!";
+		mkpath dirname $destdir.$destination;
+		copy ("$sourcepath", "$destdir$destination") || die "Can't copy file: $sourcepath -> $destdir$destination $!";
 		my $sourcestat = stat($sourcepath);
 		utime ($sourcestat->atime, $sourcestat->mtime, "$destdir$destination");
 		chmod (oct($unixrights), "$destdir$destination") || die "Can't change permissions: $!";
@@ -822,7 +825,8 @@ sub install_simple ($$$$$$)
 		my $destinationfile = $onelink->{'destinationfile'};
 	
 		# print "link $destinationfile -> $destdir$destination\n";
-		symlink ("$destinationfile", "$destdir$destination") || die "Can't create symlink: $!";
+		mkpath dirname $destdir.$destination;
+		symlink ("$destinationfile", "$destdir$destination") || die "Can't create symlink: $destinationfile -> $destdir$destination $!";
 		push @lines, "$destination\n";
 	}