New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 79660


Ignore:
Timestamp:
06/22/11 13:11:46 (4 years ago)
Author:
jmr@…
Message:

icu: satisfy the rather inconvenient requirements for cross compiling (#29904)

File:
1 edited

Legend:

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

    r77195 r79660  
    3838if {[variant_isset universal]} { 
    3939    patchfiles-append   patch-universal.diff 
    40     set merger_must_run_binaries yes 
     40 
     41    # weirdly, icu needs a separate source dir built for the build 
     42    # machine in order to cross-compile 
     43    pre-configure { 
     44        global merger_configure_args 
     45        set cross 0 
     46        set 32bit 0 
     47        set crosspath ${worksrcpath}-cross 
     48        if {${os.major} < 9 || [sysctl hw.cpu64bit_capable] == 0} { 
     49            set 32bit 1 
     50        } 
     51        foreach a $universal_archs_to_use { 
     52            if {($32bit && ($a == "x86_64" || $a == "ppc64"))  
     53                || (${os.arch} == "powerpc" && ($a == "x86_64" || $a == "i386")) 
     54                || (${os.arch} == "i386" && ($a == "ppc" || $a == "ppc64"))} { 
     55                set cross 1 
     56                set merger_configure_args($a) --with-cross-build=${crosspath} 
     57            } 
     58        } 
     59        if {$cross} { 
     60            copy ${worksrcpath} ${crosspath} 
     61            set configure_dir_save  ${configure.dir} 
     62            configure.dir ${crosspath} 
     63            portconfigure::configure_main 
     64            configure.dir $configure_dir_save 
     65            system "cd ${crosspath} && ${build.cmd}[portbuild::build_getjobsarg]" 
     66        } 
     67    } 
    4168} 
    4269 
Note: See TracChangeset for help on using the changeset viewer.