Ticket #20675: suitesparse.diff

File suitesparse.diff, 1.5 KB (added by tenomoto (Takeshi Enomoto), 14 years ago)
  • Portfile

     
    3131                    sha1    6de027d48a573659b40ddf57c10e32b39ab034c6 \
    3232                    rmd160  77ff7376691d2bc8581de6ae89f246cb289b2708
    3333
     34variant universal {}
     35if {[variant_isset universal]} {
     36    append configure.cflags " " ${configure.universal_cflags}
     37} else {
     38    append configure.cflags " " ${configure.cc_archflags}
     39}
    3440post-patch {
    3541        # Metis is included with SuiteSparse, but we want to use
    3642        #   the MacPorts version
     
    5258        reinplace -E \
    5359                "s|(\[^a-zA-Z\])Imag(\[^a-zA-Z\])|\\1ImagPart\\2|g" \
    5460                ${worksrcpath}/KLU/Include/klu_version.h
     61        # ranlib after ar
     62        reinplace "s|ccolamd_global\.o|ccolamd_global.o\\
     63        - \$(RANLIB) libccolamd.a|" ${worksrcpath}/CCOLAMD/Lib/Makefile
     64        reinplace "s|colamd_global\.o|colamd_global.o\\
     65        - \$(RANLIB) libcolamd.a|" ${worksrcpath}/COLAMD/Lib/Makefile
    5566}
    5667
    5768post-configure  {
     
    7182                "s|^CFLAGS = .*$|CFLAGS = ${configure.cflags}|g" \
    7283                ${worksrcpath}/UFconfig/UFconfig.mk
    7384        reinplace -E \
    74                 "s|^CFLAGS = -O|CFLAGS = -O3|g" \
     85                "s|^CFLAGS = -O|CFLAGS = ${configure.cflags}|g" \
    7586                ${worksrcpath}/CSparse/Demo/Makefile \
    7687                ${worksrcpath}/CSparse/Lib/Makefile
    7788        reinplace -E \
     
    8697        reinplace -E \
    8798                "s|^METIS = .*$|METIS = ${prefix}/lib/libmetis.a|g" \
    8899                ${worksrcpath}/UFconfig/UFconfig.mk
     100        reinplace "s|(CC)|(CC) \$(CFLAGS)|" ${worksrcpath}/CXSparse/Demo/Makefile
    89101}
    90102
    91103destroot        {