Ticket #29314: ppl-muniversal.diff

File ppl-muniversal.diff, 1.3 KB (added by daitakahashi, 14 years ago)

I checked it for +universal (i386/x86_64) +gcc44 on Snow leopard

  • Portfile

    old new  
    11# $Id: Portfile 77839 2011-04-14 16:39:55Z adfernandes@macports.org $
    22PortSystem        1.0
     3PortGroup         muniversal 1.0
    34
    45name              ppl
    56version           0.11.2
     
    3637
    3738depends_lib       port:gmp port:glpk
    3839
    39 universal_variant   no
    40 
    4140configure.compiler  gcc-4.2
    4241
    4342variant gcc43 conflicts gcc44 gcc45 description "Use GCC 4.3 for compilation of PPL" {
     
    5857    configure.cflags-append     "-ftree-vectorize -O3 -march=native"
    5958}
    6059
     60if { ${os.arch} == "i386" } {
     61    set native_target {i386 x86_64}
     62} else {
     63    set native_target {ppc ppc64}
     64}
     65
     66if { [variant_isset universal] } {
     67    configure.cflags-delete -march=native
     68    configure.args-append   --build=${build_arch}-apple-${os.platform}${os.version}
     69
     70    foreach arch ${universal_archs_supported} {
     71        lappend merger_configure_args($arch)    --host=${arch}-apple-${os.platform}${os.version}
     72    }
     73    foreach arch ${native_target} {
     74        lappend merger_configure_cflags($arch)  -march=native
     75    }
     76}
     77
    6178test.run          yes
    6279test.target       check
    6380