Ignore:
Timestamp:
Apr 1, 2007, 6:55:34 PM (12 years ago)
Author:
pipping@…
Message:
  • remove traces of a universal variant

an experimental patch to re-add this functionality will be made available at

http://trac.macports.org/projects/macports/wiki/UniversalOpenssl

File:
1 edited

Legend:

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

    r22926 r23465  
    4747livecheck.url   ${master_sites}
    4848livecheck.regex ${name}-(0.9.8\[a-z\])
    49 
    50 variant universal {
    51 
    52     post-configure {
    53         cd ${worksrcpath}
    54 
    55         # prepare building for ppc
    56         if [variant_isset darwin_i386] {
    57             reinplace "s|darwin-i386-cc|darwin-ppc-cc|g" Makefile
    58             reinplace "s| 386||g" Makefile
    59             reinplace "s|DL_ENDIAN|DB_ENDIAN|g" Makefile
    60             reinplace "s|-O3 -fomit-frame-pointer -fno-common|-O3 -DB_ENDIAN|g" Makefile
    61         }
    62         reinplace "s|-O3 -DB_ENDIAN$|-O3 -DB_ENDIAN -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk|" Makefile
    63         reinplace "s|^LDFLAGS=.*|LDFLAGS=-arch ppc|g" Makefile.shared
    64     }
    65 
    66     build {
    67         cd ${worksrcpath}
    68 
    69         # build for ppc
    70         system [command build]
    71 
    72         # determine which files will need to be lipo'ed together
    73         set lList {}
    74         foreach s {0.9.8.dylib a} {
    75             foreach n {crypto ssl} {
    76                 lappend lList lib${n}.${s}
    77             }
    78         }
    79         set eList {}
    80         foreach f [glob engines/*.so] {
    81             lappend eList ${f}
    82         }
    83         set bList apps/openssl
    84         set tList {}
    85         foreach f [glob test/*test] {
    86             lappend tList ${f}
    87         }
    88         lappend tList test/sha256t
    89         lappend tList test/sha512t
    90 
    91         # define a backup procedure to a temporary location
    92         proc backup {bakPath} {
    93             xinstall -d ${bakPath}   
    94             foreach a {l e b t} b {. engines apps test} {
    95                 upvar 1 [set a]List [set a]List
    96                 xinstall -d ${bakPath}/$b
    97                 foreach n [set [set a]List] {
    98                     xinstall ${n} ${bakPath}/${b}
    99                 }
    100             }
    101         }
    102         # backup the output of the first run (ppc)
    103         set ppcPath ${workpath}/ppc
    104         backup ${ppcPath}
    105 
    106         # cleanup the worksrcdir
    107         system "make clean"
    108         foreach f [glob lib*.0.9.8.dylib] {
    109             delete ${f}
    110         }
    111 
    112         # prepare building for i386
    113         reinplace "s|darwin-ppc-cc|darwin-i386-cc|g" ${worksrcpath}/Makefile
    114         reinplace "s|DB_ENDIAN|DL_ENDIAN|g" ${worksrcpath}/Makefile
    115         reinplace "s|-arch ppc|-arch i386|g" ${worksrcpath}/Makefile
    116         reinplace "s|-arch ppc|-arch i386|g" Makefile.shared
    117 
    118         # build for i386
    119         system [command build]
    120 
    121         # backup the output of the second run (i386)
    122         set i386Path ${workpath}/i386
    123         backup ${i386Path}
    124 
    125         # run lipo on the output of both runs
    126         foreach n {l e b t} {
    127             foreach m [set [set n]List] {
    128                 delete ${m}
    129                 system "lipo \
    130                 -arch i386 ${i386Path}/${m} \
    131                 -arch  ppc  ${ppcPath}/${m} \
    132                 -create -output ${m}"
    133             }
    134         }
    135 
    136         # make sure installing won't rebuild
    137         reinplace "s|install: all |install: |g" Makefile
    138     }
    139 
    140     # make sure we don't build a third time
    141     post-build {}
    142 }
    143 
    144 platform darwin i386 {}
Note: See TracChangeset for help on using the changeset viewer.