Ticket #20838: Portfile-config_guess-fix.diff

File Portfile-config_guess-fix.diff, 1.7 KB (added by howarth@…, 15 years ago)
  • Portfile

    old new  
    33PortSystem 1.0
    44
    55name                    gcc44
    6 epoch                   1
     6epoch                   2
    77version                 4.4.1
    88platforms               darwin
    99categories              lang
     
    4242
    4343set major               4.4
    4444
     45patchfiles              gcc44-config.guess.diff
    4546worksrcdir              build
    46 
    47 # the generated compiler doesn't accept -arch
    48 if {[info exists build_arch] && ${os.platform} == "darwin"} {
    49     if {(${os.arch} == "i386" && $build_arch == "i386") || (${os.arch} == "powerpc" && $build_arch == "ppc")} {
    50         configure.env-append CFLAGS_FOR_TARGET="-m32 ${configure.cflags}"
    51     } elseif {(${os.arch} == "i386" && $build_arch == "x86_64") || (${os.arch} == "powerpc" && $build_arch == "ppc64")} {
    52         configure.env-append CFLAGS_FOR_TARGET="-m64 ${configure.cflags}"
    53     } else {
    54         pre-fetch {
    55             return -code error "Cannot build $name for $build_arch"
    56         }
    57     }
    58     configure.env-append CFLAGS_FOR_BUILD="${configure.cc_archflags} ${configure.cflags}"
    59     configure.cc_archflags
    60     configure.cxx_archflags
    61     configure.objc_archflags
     47pre-patch {
     48        file mkdir ${worksrcpath}
    6249}
     50patch.dir               ${workpath}/gcc-${version}
     51
     52configure.env-append CFLAGS_FOR_BUILD="${configure.cflags}"
     53configure.cc_archflags
     54configure.cxx_archflags
     55configure.objc_archflags
    6356
    6457pre-configure {
    6558        file mkdir ${worksrcpath}
     
    7770                --program-suffix=-mp-${major} \
    7871                --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
    7972                --with-gmp=${prefix} \
    80                 --with-mpfr=${prefix}
     73                --with-mpfr=${prefix} 
    8174# do NOT use MacPorts binutils -- they do not work
    8275configure.env-append    AR_FOR_TARGET=/usr/bin/ar \
    8376                        AS_FOR_TARGET=/usr/bin/as \