Ticket #8838: win32-packager-depfixes.diff

File win32-packager-depfixes.diff, 3.3 KB (added by mythtv@…, 14 years ago)
  • win32-packager.pl

    old new  
    254254#  stop the run, useful for script debugging                         [stop]
    255255#  pause the run, await a enter                                      [pause]
    256256#  always execute the action  (try to minimise the use of this!)     [always]
     257#  execute a shell command and perform an action based on the result [shell]
    257258
    258259#build actions (events) are:
    259260#  fetch a file from the web (to a location)                         [fetch]
     
    373374[ file    => $mingw.'/bin/reimp.exe',
    374375  extract => [$sources.'mingw-utils-0.3.tar', $mingw],
    375376  comment => 'Now we can finish all the mingw and msys addons:' ],
    376 [ file    => $mingw.'/share/info/binutils.info',
     377[ shell   => 'ld --version | grep -qw "2.20"',
    377378  extract => [$sources.'binutils-2.20-1-mingw32-bin.tar', $mingw] ],
    378379[ grep    => ['__MINGW32_VERSION           3.17', $mingw.'include/_mingw.h'],
    379380  extract => [$sources.'mingwrt-3.17-mingw32-dev.tar', $mingw] ],
     
    381382  extract => [$sources.'mingwrt-3.17-mingw32-dll.tar', $mingw] ],
    382383[ dir     => $sources.'coreutils-5.97',
    383384  extract => [$sources.'coreutils-5.97-MSYS-1.0.11-snapshot.tar'] ],
    384 [ file    => $msys.'bin/pr.exe',
     385[ shell   => 'pr --version | grep -qw "5.97"',
    385386  shell   => ["cd ".$unixsources."coreutils-5.97","cp -r * / "] ],
    386 [ file    => $msys.'bin/mktemp.exe',
     387[ shell   => 'mktemp -V | grep -qw "1.5"',
    387388  extract => [$sources.'mktemp-1.5-MSYS.tar', $msys] ],
    388 [ always  => ['No unique file to check'],
     389[ shell   => 'patch --version | grep -qw "2.5.9"',
    389390  extract => [$sources.'patch-2.5.9-1-msys-1.0.11-bin.tar', $msys] ],
    390 [ always  => ['Make sure we overwrite old msys-z lib files'],
     391[ grep    => ['version 1.2.3,', $msys.'include/zlib.h'],
    391392  extract => [$sources.'libz-1.2.3-1-mingw32-dev.tar', $msys] ],
    392 [ file    => $msys.'bin/libz-1.dll',
     393[ grep    => ['1.2.3', $msys.'bin/libz-1.dll'],
    393394  extract => [$sources.'libz-1.2.3-1-mingw32-dll-1.tar', $msys] ],
    394395
    395396[ dir     => $msys."lib" ,  mkdirs => $msys.'lib' ],
     
    18411842    } elsif ( $causetype eq 'pause' ){
    18421843        comment("PAUSED! : ".$cause);
    18431844        my $temp = getc() unless $continuous;
    1844     } else {
     1845    } elsif ( $causetype eq 'shell' ) {
     1846        print "Executing '$cause[0]'...\n" if $NOISY >0;
     1847        if ( system_shell($cause[0] ) ) {
     1848            effect($effecttype,@nocheckeffectparams);
     1849        } else
     1850                {
     1851                    print "shell command: $cause[0] succeeded, no action required\n" ;
     1852                }
     1853        } else {
    18451854        die " unknown causetype $causetype \n";
    18461855    }
    18471856}
     
    20892098}
    20902099
    20912100#------------------------------------------------------------------------------
     2101# like shell() above, this function executes a sequence of commands in a
     2102# bash shell. It uses the system()
     2103# function to run the command so that we can accurately capture
     2104# exit status
     2105sub system_shell {
     2106    my @cmds = @_;
     2107    my $cmd = $dosmsys.'bin\bash.exe -c "( export PATH=/bin:/mingw/bin:$PATH;'.
     2108              join(';',@cmds).') 2>&1 "';
     2109    print "system_shell:$cmd\n";
     2110    return(system($cmd)) ;
     2111}
     2112
     2113#------------------------------------------------------------------------------
    20922114# recursively make folders, requires perl-compatible folder separators
    20932115# (ie forward slashes)
    20942116#