Ticket #50146: Portfile.diff

File Portfile.diff, 1.5 KB (added by khepler, 8 years ago)

use the right compiler (corrected)

  • Portfile

    old new  
    3636}
    3737
    3838configure {
    39     copy -force ${worksrcpath}/makefile.macosx_llvm_64bits ${worksrcpath}/makefile.machine
    40     reinplace "s|^CXX=c++|CXX=${configure.cxx}|g" \
     39    if {${build_arch} eq "x86_64"} {
     40        copy -force ${worksrcpath}/makefile.macosx_llvm_64bits ${worksrcpath}/makefile.machine
     41        reinplace "s|^XX=/usr/bin/llvm-g++|XX=${configure.cxx}|g" \
    4142            ${worksrcpath}/makefile.machine
    42     reinplace "s|^CC=cc|CC=${configure.cc}|g" \
    43             ${worksrcpath}/makefile.machine
    44     reinplace "s|-m32||g" \
     43        reinplace "s|^CC=/usr/bin/llvm-gcc|CC=${configure.cc}|g" \
    4544            ${worksrcpath}/makefile.machine
     45    } else {
     46        if {${build_arch} eq "ppc"} {
     47            copy -force ${worksrcpath}/makefile.macosx_gcc_32bits_ppc ${worksrcpath}/makefile.machine
     48        } elseif {${build_arch} eq "ppc64"} {
     49            copy -force ${worksrcpath}/makefile.macosx_gcc_64bits ${worksrcpath}/makefile.machine
     50        } else {
     51            copy -force ${worksrcpath}/makefile.macosx_gcc_32bits_asm ${worksrcpath}/makefile.machine
     52        }
     53        reinplace "s|^CXX=c++|CXX=${configure.cxx}|g" \
     54                ${worksrcpath}/makefile.machine
     55        reinplace "s|^CC=cc|CC=${configure.cc}|g" \
     56                ${worksrcpath}/makefile.machine
     57    }
    4658    reinplace "s|\$(LOCAL_FLAGS)|[get_canonical_archflags] \$(LOCAL_FLAGS)|g" \
    4759            ${worksrcpath}/makefile.machine
    4860}