Ticket #34374: Portfile.diff

File Portfile.diff, 1.5 KB (added by adfernandes (Andrew Fernandes), 12 years ago)
  • Portfile

     
    4040depends_build       port:m4
    4141depends_lib         port:gmp port:glpk
    4242
     43# The 'gcc-4.0' compiler cannot build 'ppl', so
     44# use 'gcc-4.2' on Leopard, and use 'apple-gcc42' on Tiger and earlier.
     45if { ${configure.compiler} == "gcc-4.0" } {   
     46    if {"darwin" == ${os.platform} && 8 >= ${os.major}} {
     47        depends_build-append port:apple-gcc42
     48        configure.compiler   apple-gcc42
     49    } else {
     50        configure.compiler gcc-4.2
     51    }
     52}
     53
    4354if { [string match "*clang*" ${configure.compiler}] || [string match "*llvm*" ${configure.compiler}] } {
    4455    # As of 'ppl-0.12.1', we need to be careful about use of the '--enable-fpmath' flag!
    4556    # Newer versions of 'clang' will error about '-frounding-math' being unsupported due to '-Werror'.
     
    5465    reinplace "s|glpk/glpk.h|glpk.h|" ${worksrcpath}/configure
    5566}
    5667
    57 if { ${os.arch} == "i386" } {
    58     set native_target {i386 x86_64}
    59 } else {
    60     set native_target {ppc ppc64}
    61 }
    62 
    63 if { [variant_isset universal] } {
    64 
    65     configure.cflags-delete -march=native
    66     configure.args-append   --build=${build_arch}-apple-${os.platform}${os.version}
    67 
    68     foreach arch ${universal_archs_supported} {
    69         lappend merger_configure_args($arch)    --host=${arch}-apple-${os.platform}${os.version}
    70     }
    71 
    72 }
    73 
    7468test.run            yes
    7569test.target         check
    7670