Ignore:
Timestamp:
Mar 3, 2007, 2:59:44 PM (12 years ago)
Author:
pipping@…
Message:

variant universal: * fix testsuite

  • beautify/shorten code (use loops wherever possible)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/openssl/Portfile

    r22506 r22510  
    7474        }
    7575        set bList apps/openssl
     76        set tList {}
     77        foreach f [glob test/*test] {
     78            lappend tList ${f}
     79        }
     80        lappend tList test/sha256t
     81        lappend tList test/sha512t
    7682
    77         # save the output of the first go in a temporary location
     83        # define a backup procedure to a temporary location
     84        proc backup {bakPath} {
     85            xinstall -d ${bakPath}   
     86            foreach a {l e b t} b {. engines apps test} {
     87                upvar 1 [set a]List [set a]List
     88                xinstall -d ${bakPath}/$b
     89                foreach n [set [set a]List] {
     90                    xinstall ${n} ${bakPath}/${b}
     91                }
     92            }
     93        }
     94        # backup the output of the first run (ppc)
    7895        set ppcPath ${workpath}/ppc
    79         xinstall -d ${ppcPath}
    80         foreach l $lList {
    81             xinstall ${l} ${ppcPath}
    82         }
    83         xinstall -d ${ppcPath}/engines
    84         foreach e $eList {
    85             xinstall ${e} ${ppcPath}/engines
    86         }
    87         xinstall -d ${ppcPath}/apps
    88         foreach b $bList {
    89             xinstall ${b} ${ppcPath}/apps
    90         }
     96        backup ${ppcPath}
    9197
    9298        # cleanup the worksrcdir
     
    105111        system [command build]
    106112
    107         # save the output of the second go in another temporary location
     113        # backup the output of the first run (ppc)
    108114        set i386Path ${workpath}/i386
    109         xinstall -d ${i386Path}
    110         foreach l $lList {
    111            xinstall ${l} ${i386Path}
    112         }
    113         xinstall -d ${i386Path}/engines
    114         foreach e $eList {
    115             xinstall ${e} ${i386Path}/engines
    116         }
    117         xinstall -d ${i386Path}/apps
    118         foreach b $bList {
    119             xinstall ${b} ${i386Path}/apps
    120         }
     115        backup ${i386Path}
    121116
    122117        # run lipo on the output of both runs
    123         foreach l $lList {
    124             delete ${l}
    125             system "lipo \
    126             -arch i386 ${i386Path}/${l} \
    127             -arch  ppc  ${ppcPath}/${l} \
    128             -create -output ${l}"
    129         }
    130         foreach e $eList {
    131             delete ${e}
    132             system "lipo \
    133             -arch i386 ${i386Path}/${e} \
    134             -arch  ppc  ${ppcPath}/${e} \
    135             -create -output ${e}"
    136         }
    137         foreach b $bList {
    138             delete ${b}
    139             system "lipo \
    140             -arch i386 ${i386Path}/${b} \
    141             -arch  ppc  ${ppcPath}/${b} \
    142             -create -output ${b}"
     118        foreach n {l e b t} {
     119            foreach m [set [set n]List] {
     120                delete ${m}
     121                system "lipo \
     122                -arch i386 ${i386Path}/${m} \
     123                -arch  ppc  ${ppcPath}/${m} \
     124                -create -output ${m}"
     125            }
    143126        }
    144127
Note: See TracChangeset for help on using the changeset viewer.