Ticket #21152: Portfile_metis.diff

File Portfile_metis.diff, 995 bytes (added by Veence (Vincent), 15 years ago)

Metis portfile with correct universal variant handling

  • Portfile

    old new  
    3535
    3636configure {
    3737        # ensure that the correct compiler and compiler options are used.
     38        set optflags ${configure.cflags}
     39        set ldflags ${configure.ldflags}
     40       
     41        if {[variant_isset universal]} {
     42                append optflags " " ${configure.universal_cflags}
     43                append ldflags " " ${configure.universal_ldflags}
     44        }
     45       
    3846        reinplace "s|CC = .*|CC = ${configure.cc}|" ${worksrcpath}/Makefile.in
    39         reinplace "s|OPTFLAGS = .*|OPTFLAGS = ${configure.cflags}|" ${worksrcpath}/Makefile.in
    40         if { [info exists configure.ldflags] } {
    41                 reinplace "s|LDOPTIONS = .*|LDOPTIONS = ${configure.ldflags}|" ${worksrcpath}/Makefile.in
     47        reinplace "s|OPTFLAGS = .*|OPTFLAGS = ${optflags}|" ${worksrcpath}/Makefile.in
     48        if { [info exists ldflags] } {
     49                reinplace "s|LDOPTIONS = .*|LDOPTIONS = ${ldflags}|" ${worksrcpath}/Makefile.in
    4250        }
    4351
    4452        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/Makefile