Ticket #36850: Portfile-02-universal.patch

File Portfile-02-universal.patch, 949 bytes (added by devernay (Frédéric Devernay), 12 years ago)
  • Portfile

    old new  
    150150configure.universal_args-delete --disable-dependency-tracking
    151151
    152152if {[variant_isset universal]} {
     153    # the following is inspired by the icu Portfile
     154    # if we can't run executables for the target arch, mark it as a cross-compile
     155    foreach arch ${configure.universal_archs} {
     156        if {((${os.major} < 9 || [sysctl hw.cpu64bit_capable] == 0) && ($arch == "x86_64" || $arch == "ppc64"))
     157            || (${os.arch} == "powerpc" && ($arch == "x86_64" || $arch == "i386"))
     158            || (${os.arch} == "i386" && ($arch == "ppc" || $arch == "ppc64"))} {
     159            set merger_configure_args($arch) "--enable-cross-compile --target-os=${os.platform}"
     160        }
     161    }
    153162    foreach arch ${configure.universal_archs} {
    154163        set merger_host($arch) ""
    155164        lappend merger_configure_args($arch) --arch=${arch}