Ticket #15570: universal_args.diff

File universal_args.diff, 2.8 KB (added by david@…, 16 years ago)

Patch allowing the use of universal arguments in cairo and openssl

  • devel/openssl/Portfile

    diff --unidirectional-new-file -ru -x PortIndex ports.orig/devel/openssl/Portfile ports/devel/openssl/Portfile
    old new  
    5858        }
    5959
    6060        configure {
     61                # Save configure.universal_archs because we modify it before
     62                # each invocation of Configure.
     63                set tmp_universal_archs ${configure.universal_archs}
    6164                foreach arch {i386 ppc} {
     65                        # We configure for one arch at a time.
     66                        configure.universal_archs ${arch}
    6267                        system "cd ${workpath}/${arch} && ./Configure darwin-${arch}-cc ${configure.pre_args} ${configure.args}"
     68                        reinplace "s|^\\(CFLAG=.*\\)|\\1 ${configure.cflags} ${configure.universal_cflags}|" \
     69                                ${workpath}/${arch}/Makefile
     70                        reinplace "s|^\\(SHARED_LDFLAGS=.*\\)|\\1 ${configure.ldflags} ${configure.universal_ldflags}|" \
     71                                ${workpath}/${arch}/Makefile \
     72                                ${workpath}/${arch}/Makefile.shared
    6373                }
     74                # Restore configure.universal_archs.
     75                configure.universal_archs $tmp_universal_archs
    6476#               system "cd ${workpath}/x86_64 && ./Configure darwin64-x86_64-cc ${configure.pre_args} ${configure.args}"
    6577#               system "cd ${workpath}/ppc64 && ./Configure darwin64-ppc-cc ${configure.pre_args} ${configure.args}"
    6678        }
  • graphics/cairo/Portfile

    diff --unidirectional-new-file -ru -x PortIndex ports.orig/graphics/cairo/Portfile ports/graphics/cairo/Portfile
    old new  
    127129    }
    128130   
    129131    configure {
     132        # Save configure.universal_archs because we modify it before each
     133        # invocation of Configure.
     134        set tmp_universal_archs ${configure.universal_archs}
    130135        foreach arch ${my_universal_archs} {
    131             set my_arch_flag "-arch ${arch}"
    132             set my_cflags "${configure.cflags} -isysroot ${sysroot} ${my_arch_flag}"
    133             set my_ldflags "${configure.ldflags} ${my_arch_flag}"
    134             system "cd ${workpath}/${arch} && CFLAGS=\"${my_cflags}\" CXXFLAGS=\"${my_cflags}\" LDFLAGS=\"${my_ldflags}\" ${configure.cmd} ${configure.pre_args} ${configure.args}"
     136            # We configure for one arch at a time.
     137            configure.universal_archs ${arch}
     138            system "cd ${workpath}/${arch} && CPPFLAGS=\"${configure.cppflags} ${configure.universal_cppflags}\" CFLAGS=\"${configure.cflags} ${configure.universal_cflags}\" CXXFLAGS=\"${configure.cflags} ${configure.universal_cxxflags}\" LDFLAGS=\"${configure.ldflags} ${configure.universal_ldflags}\" ${configure.cmd} ${configure.pre_args} ${configure.args} ${configure.universal_args}"
    135139        }
     140        # Restore configure.universal_archs.
     141        configure.universal_archs $tmp_universal_archs
    136142    }
    137143   
    138144    build {