view patches/openoffice-solenv-cross.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 a8ead6984601
children
line wrap: on
line source

--- solenv/inc/startup/startup.mk.orig	2008-10-21 09:41:14.000000000 +0200
+++ solenv/inc/startup/startup.mk	2008-10-21 09:52:19.000000000 +0200
@@ -40,9 +40,20 @@ CALLTARGETS=$(MAKETARGETS)
 OS_variable_needed
 .ENDIF
 
-# Customize macro definitions based on seting of OS.
-# This must come before the default macro definitions which follow.
-.INCLUDE .NOINFER : $(INCFILENAME:d)$(OS)$/macros.mk
+# Customize macro definitions based on seting of BUILD_OS, after
+# translation into a third naming scheme (1. config.guess,
+# 2. configure.in) devised in 3. set_soenv.in: $B_OS.
+.IF "$(CROSS_COMPILING)" == "no"
+B_OS = $(OS)
+.ELSE # "$(CROSS_COMPILING)" == "yes"
+.IF "$(BUILD_OS)" == "Linux"
+B_OS = LINUX
+.ELSE # "$(BUILD_OS)" != "Linux"
+.ERROR : ; @echo Work in progress: cross compiling only on Linux
+.ENDIF 
+.ENDIF # "$(CROSS_COMPILING)" != "yes"
+
+.INCLUDE .NOINFER : $(INCFILENAME:d)$(B_OS)$/macros.mk
 
 # ----------------- Default Control Macro definitions -----------------------
 # Select appropriate defaults for basic macros
--- solenv/bin/build.pl.orig	2008-07-22 18:46:59.000000000 +0200
+++ solenv/bin/build.pl	2008-10-21 10:58:44.000000000 +0200
@@ -61,7 +61,7 @@
     my $enable_multiprocessing = 1;
     my $cygwin = 0;
     $cygwin++ if ($^O eq 'cygwin');
-    if ($ENV{GUI} eq 'WNT' && !$cygwin) {
+    if ($ENV{BUILD_OS} eq 'WNT' && !$cygwin) {
         eval { require Win32::Process; import Win32::Process; };
         $enable_multiprocessing = 0 if ($@);
     };
@@ -812,7 +838,7 @@ sub CorrectPath {
 sub check_dmake {
 #print "Checking dmake...";
 #    my $dmake_batch = CorrectPath("$tmp_dir/dmake.bat");
-    if ($QuantityToBuild && ($ENV{GUI} eq 'WNT') && ($ENV{USE_SHELL} eq '4nt')) {
+    if ($QuantityToBuild && ($ENV{BUILD_OS} eq 'WNT') && ($ENV{USE_SHELL} eq '4nt')) {
         if (open(DMAKEVERSION, "where dmake |")) {
             my @output = <DMAKEVERSION>;
             close DMAKEVERSION;
@@ -857,7 +883,7 @@ sub get_commands {
     while ($arg = pop(@dmake_args)) {
         $dmake .= ' '.$arg;
     };
-#    if (($ENV{GUI} eq 'WNT') && $QuantityToBuild) {
+#    if (($ENV{BUILD_OS} eq 'WNT') && $QuantityToBuild) {
 #        print_error("There is no such executable $_4nt_exe") if (!-e $_4nt_exe);
 #        $dmake_batch = generate_4nt_batch();
 #    };
@@ -873,7 +899,7 @@ sub get_commands {
 #                 ($ENV{GUI} eq 'MACOSX')) &&
 #                ($Dir eq '/')) {
 #        return 1;
-#    } elsif (    (($ENV{GUI} eq 'WNT') ||
+#    } elsif (    (($ENV{BUILD_OS} eq 'WNT') ||
 #                 ($ENV{GUI} eq 'WIN') ||
 #                 ($ENV{GUI} eq 'OS2')) &&
 #                ($Dir =~ /\S:\/$/)) {
@@ -933,7 +959,7 @@ sub CheckPlatform {
     return 1 if (($ENV{GUI} eq 'WIN') && ($Platform eq 'w'));
     return 1 if (($ENV{GUI} eq 'UNX') && ($Platform eq 'u'));
     return 1 if (($ENV{GUI} eq 'OS2') && ($Platform eq 'p'));
-    return 1 if (($ENV{GUI} eq 'WNT') &&
+    return 1 if ((($ENV{TARGET_OS} eq 'WNT') || ($ENV{TARGET_OS} eq 'MinGW')) &&
                  (($Platform eq 'w') || ($Platform eq 'n')));
     return 0;
 };
@@ -1378,7 +1409,7 @@ sub cancel_build {
         };
         print "\nAttention: if you build and deliver the above module(s) you may prolongue your the build issuing command \"build --from @broken_modules_names\"\n";
     } else {
-#        if ($ENV{GUI} eq 'WNT') {
+#        if ($ENV{BUILD_OS} eq 'WNT') {
             while (children_number()) {
                 handle_dead_children(1);
             }
@@ -1400,7 +1431,7 @@ sub store_error {
     my ($pid, $error_code) = @_;
     return 0 if (!$error_code);
     my $child_nick = $processes_hash{$pid};
-    if ($ENV{GUI} eq 'WNT') {
+    if ($ENV{BUILD_OS} eq 'WNT') {
         if (!defined $had_error{$child_nick}) {
             $had_error{$child_nick}++;
             return 1;
@@ -1429,7 +1460,7 @@ sub handle_dead_children {
     my $try_once_more = 0;
     do {
         my $pid = 0;
-        if ($ENV{GUI} eq 'WNT' && !$cygwin) {
+        if ($ENV{BUILD_OS} eq 'WNT' && !$cygwin) {
             foreach $pid (keys %processes_hash) {
                 my $exit_code  = undef;
                 my $proc_obj = $windows_procs{$pid};
@@ -1552,7 +1583,7 @@ sub start_child {
 #        html_store_job_info($dependencies_hash, $job_dir, $error_code);
 #        if ($error_code) {
 #            # give windows (4nt) one more chance 
-#            if ($ENV{GUI} eq 'WNT' && !$cygwin) {
+#            if ($ENV{BUILD_OS} eq 'WNT' && !$cygwin) {
 #                $error_code = do_post_job($`, $post_job, $dependencies_hash);
 #            };
 #            if ($error_code) {
@@ -1569,7 +1600,7 @@ sub start_child {
     my $children_running;
     my $oldfh = select STDOUT;
     $| = 1;
-    if ($ENV{GUI} eq 'WNT' && !$cygwin) {
+    if ($ENV{BUILD_OS} eq 'WNT' && !$cygwin) {
         print "$job_dir\n";
         my $process_obj = undef;
         my $rc = Win32::Process::Create($process_obj, $dmake_bin,
@@ -1725,7 +1756,7 @@ sub do_custom_job {
         $error_code = run_job($job, CorrectPath($StandDir.$module), $module_job);
         if ($error_code) {
             # give windows (4nt) one more chance 
-            if ($ENV{GUI} eq 'WNT' && !$cygwin) {
+            if ($ENV{BUILD_OS} eq 'WNT' && !$cygwin) {
                 $error_code = run_job($job, CorrectPath($StandDir.$module), $module_job);
             };
         };
@@ -3180,7 +3211,7 @@ sub html_store_job_info {
 
 sub start_server_on_port {
     my $port = shift;
-    if ($ENV{GUI} eq 'WNT') {
+    if ($ENV{BUILD_OS} eq 'WNT') {
         $socket_obj = new IO::Socket::INET (#LocalAddr => hostname(),
                                   LocalPort => $port,
                                   Proto     => 'tcp',
--- solenv/bin/deliver.pl.orig	2008-10-21 10:52:30.000000000 +0200
+++ solenv/bin/deliver.pl	2008-10-21 10:58:49.000000000 +0200
@@ -140,7 +140,7 @@ parse_options();
 print "$script_name -- version: $script_rev\n" if !$opt_silent;
 
 if ( ! $opt_delete ) {
-    if ( $ENV{GUI} eq 'WNT' ) {
+    if ( $ENV{BUILD_OS} eq 'WNT' ) {
         if ($ENV{COM} eq 'GCC') {
             initialize_strip() ;
         };
@@ -411,7 +411,7 @@ sub parse_options 
         $arg =~ /^-delete$/     and $opt_delete = 1  and next;
         $arg =~ /^-dontdeletecommon$/ and $dontdeletecommon = 1 and next;
         $arg =~ /^-help$/       and $opt_help   = 1  and $arg = '';
-        $arg =~ /^-link$/       and $ENV{GUI} ne 'WNT' and $opt_link = 1 and next;
+        $arg =~ /^-link$/       and $ENV{BUILD_OS} ne 'WNT' and $opt_link = 1 and next;
         $arg =~ /^-deloutput$/  and $opt_deloutput = 1 and next;
         $arg =~ /^-debug$/      and $is_debug   = 1  and next;
         $arg =~ /^-checkdlst$/  and $opt_checkdlst = 1 and next;
@@ -711,7 +711,7 @@ sub is_unstripped {
         # OS X file command doesn't know if a file is stripped or not
         if (($file_type =~ /not stripped/o) || ($file_type =~ /Mach-O/o) || 
             (($file_type =~ /PE/o) && ($ENV{GUI} eq 'WNT') &&
-             ($nm_output = `nm $file_name 2>&1`) && $nm_output &&
+             ($nm_output = `$(NM) $file_name 2>&1`) && $nm_output &&
              !($nm_output =~ /no symbols/i) && !($nm_output =~ /not recognized/i))) {
             return '1' if ($file_name =~ /\.bin$/o);
             return '1' if ($file_name =~ /\.so\.*/o);
@@ -1485,7 +1485,7 @@ sub usage 
     print STDERR "  -force       copy even if not newer\n";
     print STDERR "  -dontdeletecommon do not delete common files (for -delete option)\n";
     print STDERR "  -help        print this message\n";
-    if ( !defined($ENV{GUI}) || $ENV{GUI} ne 'WNT' ) {
+    if ( !defined($ENV{BUILD_OS}) || $ENV{BUILD_OS} ne 'WNT' ) {
         print STDERR "  -link        hard link files into the solver to save disk space\n";
     }
     print STDERR "  -minor       deliver into minor (milestone)\n";
--- solenv/inc/unitools.mk.pristine	2008-10-21 11:31:04.000000000 +0200
+++ solenv/inc/unitools.mk	2008-10-21 13:54:42.000000000 +0200
@@ -39,7 +39,7 @@ XSLTPROC*=xsltproc
 
 ULFCONV*=ulfconv
 
-MAKEDEPEND*=$(SOLARBINDIR)$/makedepend
+MAKEDEPEND*=$(TOOLS_DIR)/makedepend
 
 SCP_CHECK_TOOL:=checkscp$E
 
--- solenv/inc/settings.mk.pristine	2008-10-29 08:42:08.000000000 +0100
+++ solenv/inc/settings.mk	2008-10-30 10:01:59.000000000 +0100
@@ -752,7 +752,7 @@ COMMONBIN=$(LOCAL_COMMON_OUT)$/bin
 INC=$(PRJ)$/inc
 INCPCH=$(PRJ)$/inc$/pch
 INCLOCAL=..$/inc
-INCGUI=$(PRJ)$/$(GUIBASE)$/inc
+INCGUI=$(PRJ)$/$(GUIBASE:l)$/inc
 INCCOM=$(OUT)$/inc
 INCCOMX=$(OUT)$/inc
 INCUNOIDL=$(INCCOM)$/$(PRJNAME)
@@ -1050,7 +1050,11 @@ JAVA*:=$(JAVAINTERPRETER)
 SCPCOMP=$(PERL) $(SOLARENV)$/bin$/pre2par.pl
 SCPLINK=$(PERL) $(SOLARENV)$/bin$/par2script.pl
 LZIP*=lzip
+.IF "$(GUI)" == "UNX" || "$(BUILD_OS)" != "WNT"
+CPPLCC*=cpp.lcc
+.ELSE
 CPPLCC*=cpplcc
+.ENDIF
 
 .IF "$(DISABLE_ENHANCED_COMID)"==""
 .INCLUDE : tg_compv.mk