Changeset 144292


Ignore:
Timestamp:
Jan 6, 2016, 1:13:36 AM (4 years ago)
Author:
sean@…
Message:

sprng: add new port for petsc variant

Location:
trunk/dports/math/sprng
Files:
4 added
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/dports/math/sprng/Portfile

    r144291 r144292  
    33
    44PortSystem          1.0
     5PortGroup           mpi 1.0
    56
    6 name                superlu
    7 version             5.1
     7name                sprng
     8version             1.0
    89categories          math
    9 license             BSD
     10license             CC-BY-SA-4
    1011platforms           darwin
    1112maintainers         sean openmaintainer
    12 description         A package for solving linear equations
    13 long_description    SuperLU is a general purpose library for the direct \
    14                     solution of large, sparse, nonsymmetric systems of \
    15                     linear equations on high performance machines.
     13description         Scalable Parallel Random Number Generators
     14long_description    ${description}
    1615
    17 homepage            http://crd.lbl.gov/~xiaoye/SuperLU
    18 master_sites        ${homepage}
     16homepage            http://www.sprng.org
     17master_sites        http://ftp.mcs.anl.gov/pub/petsc/externalpackages
    1918
    20 checksums           rmd160  9f68b41731a5c63781a7f6ce4a7fd8d8394ade1a \
    21                     sha256  307ef10edef4cebc6c7f672cd931ae6682db4c4f5f93a44c78e9544a520e2db1
     19checksums           rmd160  56869960903151ca58be796713f47a73d2d426c1 \
     20                    sha256  a305343059fa8d42e4479e9e54a9e25e45bc3fb9094e457839fb457230da65e7
    2221
    23 distname            ${name}_${version}
    24 worksrcdir          SuperLU_${version}
     22# petsc expects this to be built with mpi
     23mpi.setup           require
    2524
    2625use_configure       no
    2726use_parallel_build  no
    2827
     28patch.pre_args      -p1
     29patchfiles-append   patch-makefile.diff patch-shared.diff
     30
    2931configure.cflags    -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -O3 -mtune=native
    3032
    31 build.target        lib
    32 build.args          LAAUX="" SLASRC="" DLASRC="" CLASRC="" ZLASRC="" SCLAUX="" DZLAUX=""
     33build.pre_args      -C SRC
    3334
    34 post-extract {
    35     reinplace "s|^SuperLUroot.*$|SuperLUroot = ${worksrcpath}|" ${worksrcpath}/make.inc
    36     reinplace "s|^SUPERLULIB.*$|SUPERLULIB = \$(SuperLUroot)/lib/libsuperlu_${version}.a|" ${worksrcpath}/make.inc
    37     reinplace "s|^BLASLIB.*$|BLASLIB = -framework Accelerate|" ${worksrcpath}/make.inc
    38     reinplace "s|^CC.*$|CC = ${configure.cc}|" ${worksrcpath}/make.inc
    39     reinplace "s|^LOADER.*$|LOADER = ${configure.cc}|" ${worksrcpath}/make.inc
    40     reinplace "s|^CFLAGS.*$|CFLAGS = ${configure.cflags}|" ${worksrcpath}/make.inc
    41     reinplace "s|^MATLAB.*$||" ${worksrcpath}/make.inc
    42     reinplace "s|^PLAT.*$||" ${worksrcpath}/make.inc
    43     reinplace "s|^RANLIB.*$|RANLIB = ranlib -c|" ${worksrcpath}/make.inc
    44     reinplace "s|^TMGLIB.*$|TMGLIB = tmglib.a|" ${worksrcpath}/make.inc
    45 
    46     # Prefixing a namespace so that colamd doesn't conflict with itself (used in
    47     # other packages
    48     reinplace "s|^#include \"colamd\.h\"|#include \"slu_colamd\.h\"|" ${worksrcpath}/SRC/colamd.c
    49     reinplace "s|^#include \"colamd\.h\"|#include \"slu_colamd\.h\"|" ${worksrcpath}/SRC/get_perm_c.c
    50     move ${worksrcpath}/SRC/colamd.h ${worksrcpath}/SRC/slu_colamd.h
     35post-patch {
     36    reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/SRC/make.PETSC
     37    reinplace "s|@@CC@@|${configure.cc}|" ${worksrcpath}/SRC/make.PETSC
     38    reinplace "s|@@FC@@|${configure.fc}|" ${worksrcpath}/SRC/make.PETSC
     39    reinplace "s|@@CPP@@|${configure.cpp}|" ${worksrcpath}/SRC/make.PETSC
     40    reinplace "s|@@CFLAGS@@|${configure.cflags}|" ${worksrcpath}/SRC/make.PETSC
     41    reinplace "s|@@FFLAGS@@|${configure.fflags}|" ${worksrcpath}/SRC/make.PETSC
     42    reinplace "s|@@MPICC@@|${mpi.cc}|" ${worksrcpath}/SRC/make.PETSC
     43    reinplace "s|@@MPIFC@@|${mpi.fc}|" ${worksrcpath}/SRC/make.PETSC
     44    reinplace "s|@@SHAREDFLAGS@@|-dynamiclib -Wl,-headerpad_max_install_names,-multiply_defined,suppress,-commons,use_dylibs,-search_paths_first|" ${worksrcpath}/SRC/make.PETSC
    5145}
    5246
    5347destroot {
    54     # make shared libraries
    55     system -W ${worksrcpath}/SRC "${configure.cc} *.o -framework Accelerate -dynamiclib -Wl,-headerpad_max_install_names,-multiply_defined,suppress,-commons,use_dylibs,-search_paths_first -install_name ${prefix}/lib/lib${distname}.dylib -o lib${distname}.dylib"
    56 
    57     xinstall -W ${worksrcpath}/SRC -m 644 slu_colamd.h slu_Cnames.h slu_dcomplex.h slu_scomplex.h superlu_enum_consts.h \
    58         slu_util.h supermatrix.h html_mainpage.h slu_cdefs.h slu_ddefs.h slu_sdefs.h slu_zdefs.h \
    59         ${destroot}${prefix}/include
    60     xinstall -m 644 ${worksrcpath}/SRC/libsuperlu_${version}.dylib ${destroot}${prefix}/lib
     48    xinstall -m 644 {*}[glob ${worksrcpath}/include/*.h] ${destroot}${prefix}/include
     49    xinstall -m 644 {*}[glob ${worksrcpath}/lib/*.a] ${destroot}${prefix}/lib
     50    xinstall -m 644 {*}[glob ${worksrcpath}/lib/*.dylib] ${destroot}${prefix}/lib
    6151}
    6252
Note: See TracChangeset for help on using the changeset viewer.