Ignore:
Timestamp:
Apr 17, 2007, 4:35:18 PM (11 years ago)
Author:
pipping@…
Message:
  • add functions 'backup' and 'lipo' along with some description to be used for lipo-based universal variants, tested with openssl
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r24100 r24148  
    921921    regsub -- "^\{(.*?)" $body "\{ \n foreach g \[info globals\] \{ \n global \$g \n \} \n \\1" body
    922922    eval "proc $name {} $body"
     923}
     924
     925# backup
     926# Operates on universal_filelist, creates universal_archlist
     927# Save single-architecture files, a temporary location, preserving the original
     928# directory structure.
     929
     930proc backup {arch} {
     931    global universal_archlist universal_filelist workpath
     932    lappend universal_archlist ${arch}
     933    foreach file ${universal_filelist} {
     934        set filedir [file dirname $file]
     935        xinstall -d ${workpath}/${arch}/${filedir}
     936        xinstall ${file} ${workpath}/${arch}/${filedir}
     937    }
     938}
     939
     940# lipo
     941# Operates on universal_filelist, universal_archlist.
     942# Run lipo(1) on a list of single-arch files.
     943
     944proc lipo {} {
     945    global universal_archlist universal_filelist workpath
     946    foreach file ${universal_filelist} {
     947        xinstall -d [file dirname $file]
     948        file delete ${file}
     949        set lipoSources ""
     950        foreach arch $universal_archlist {
     951            append lipoSources "-arch ${arch} ${workpath}/${arch}/${file} "
     952        }
     953        system "lipo ${lipoSources}-create -output ${file}"
     954    }
    923955}
    924956
Note: See TracChangeset for help on using the changeset viewer.