Ticket #31777: macports.openjade.noclang.universal.diff

File macports.openjade.noclang.universal.diff, 1.3 KB (added by fgp (Florian G. Pflug), 13 years ago)

Use llvm-gcc-4.2 instead of clang, and patch libtool to make +universal work

  • Portfile

     
    3131depends_lib     port:opensp
    3232depends_run     port:xmlcatmgr
    3333
     34# XCode 4.2's clang doesn't like openjade, but llvm-gcc-4.2 builds it just fine
     35if {${configure.compiler} == "clang"} {
     36    configure.compiler llvm-gcc-4.2
     37}
     38
    3439# xmlcatmgr as installed by MacPorts defaults to using
    3540# ${prefix}/etc/sgml/catalog (for XML) and ${prefix}/etc/sgml/catalog (for
    3641# SGML). For historic reasons, openjade expects the catalog to be in
     
    6065    reinplace "s|^#pragma interface||g" ${worksrcpath}/grove/Node.h
    6166    reinplace "s|^#pragma interface||g" ${worksrcpath}/msggen.pl
    6267    reinplace "s|^#pragma interface||g" ${worksrcpath}/spgrove/GroveApp.h
    63     reinplace "s|CXX=|CXX=${configure.cxx}|g" ${worksrcpath}/libtool
     68
     69    # To make universal builds work, libtool needs to pass the required
     70    # "-arch ... " flags to gcc/g++. configure, however, doesn't know
     71    # that, so we patch the generated libtool script after configure has
     72    # run
     73    reinplace "s|^CXX=.*$|CXX='${configure.cxx} [get_canonical_archflags]'|g" ${worksrcpath}/libtool
     74    reinplace "s|^CC=.*$|CC='${configure.cc} [get_canonical_archflags]'|g" ${worksrcpath}/libtool
    6475}
    6576
    6677destroot.target install install-man