29 | | pre-configure { |
30 | | reinplace "s,METIS_PATH = ../../metis-4.0,METIS_PATH = ${prefix}/include," ${worksrcpath}/UFconfig/UFconfig.mk |
31 | | reinplace "s,METIS = ../../metis-4.0/libmetis.a,METIS = ${prefix}/lib/libmetis.a," ${worksrcpath}/UFconfig/UFconfig.mk |
| 32 | post-patch { |
| 33 | # Metis is included with SuiteSparse, but we want to use |
| 34 | # the MacPorts version |
| 35 | |
| 36 | # -I$(METIS_PATH)/Lib -> -I$(METIS_PATH)/include |
| 37 | reinplace \ |
| 38 | "s|-I\$(METIS_PATH)/Lib|-I\$(METIS_PATH)/include|g" \ |
| 39 | ${worksrcpath}/CHOLMOD/Lib/Makefile |
| 40 | |
| 41 | # #include "metis.h" -> #include <metis/metis.h> |
| 42 | reinplace \ |
| 43 | "s|#include \"metis.h\"|#include <metis/metis.h>|g" \ |
| 44 | ${worksrcpath}/CHOLMOD/Partition/cholmod_metis.c |
34 | | build.target default |
| 47 | post-configure { |
| 48 | # SuiteSparse does not use configure, so the variables must be |
| 49 | # set manually. |
| 50 | # This is done in post-configure so that ${configure.cc} is |
| 51 | # set to its default value. |
| 52 | reinplace -E \ |
| 53 | "s|^CC = .*$|CC = ${configure.cc}|g" \ |
| 54 | ${worksrcpath}/UFconfig/UFconfig.mk |
| 55 | reinplace -E \ |
| 56 | "s|^CFLAGS = .*$|CFLAGS = ${configure.cflags}|g" \ |
| 57 | ${worksrcpath}/UFconfig/UFconfig.mk |
| 58 | reinplace -E \ |
| 59 | "s|^BLAS = .*$|BLAS = -framework Accelerate|g" \ |
| 60 | ${worksrcpath}/UFconfig/UFconfig.mk |
| 61 | reinplace -E \ |
| 62 | "s|^LAPACK = .*$|LAPACK = -framework Accelerate|g" \ |
| 63 | ${worksrcpath}/UFconfig/UFconfig.mk |
| 64 | reinplace -E \ |
| 65 | "s|^METIS_PATH = .*$|METIS_PATH = ${prefix}|g" \ |
| 66 | ${worksrcpath}/UFconfig/UFconfig.mk |
| 67 | reinplace -E \ |
| 68 | "s|^METIS = .*$|METIS = ${prefix}/lib/libmetis.a|g" \ |
| 69 | ${worksrcpath}/UFconfig/UFconfig.mk |
| 70 | } |
37 | | xinstall -m 644 ${worksrcpath}/AMD/Lib/libamd.a ${destroot}${prefix}/lib |
38 | | xinstall -m 644 ${worksrcpath}/BTF/Lib/libbtf.a ${destroot}${prefix}/lib |
39 | | xinstall -m 644 ${worksrcpath}/CAMD/Lib/libcamd.a ${destroot}${prefix}/lib |
40 | | xinstall -m 644 ${worksrcpath}/CCOLAMD/libccolamd.a ${destroot}${prefix}/lib |
41 | | xinstall -m 644 ${worksrcpath}/CHOLMOD/Lib/libcholmod.a ${destroot}${prefix}/lib |
42 | | xinstall -m 644 ${worksrcpath}/COLAMD/libcolamd.a ${destroot}${prefix}/lib |
43 | | xinstall -m 644 ${worksrcpath}/CXSparse/Source/libcxsparse.a ${destroot}${prefix}/lib |
44 | | xinstall -m 644 ${worksrcpath}/KLU/Lib/libklu.a ${destroot}${prefix}/lib |
45 | | xinstall -m 644 ${worksrcpath}/KLU/User/libklu_cholmod.a ${destroot}${prefix}/lib |
46 | | xinstall -m 644 ${worksrcpath}/LDL/libldl.a ${destroot}${prefix}/lib |
47 | | xinstall -m 644 ${worksrcpath}/UFconfig/xerbla/libcerbla.a ${destroot}${prefix}/lib |
48 | | xinstall -m 644 ${worksrcpath}/UMFPACK/Lib/libumfpack.a ${destroot}${prefix}/lib |
49 | | |
| 73 | # SuiteSparse does not support "make install" |
| 74 | |
| 75 | eval xinstall -m 644 \ |
| 76 | [glob ${worksrcpath}/*/Lib/*.a] \ |
| 77 | ${destroot}${prefix}/lib |
| 78 | |
51 | | |
52 | | xinstall -m 644 ${worksrcpath}/AMD/Include/amd.h ${destroot}${prefix}/include/ufsparse |
53 | | xinstall -m 644 ${worksrcpath}/BTF/Include/btf.h ${destroot}${prefix}/include/ufsparse |
54 | | xinstall -m 644 ${worksrcpath}/CAMD/Include/camd.h ${destroot}${prefix}/include/ufsparse |
55 | | xinstall -m 644 ${worksrcpath}/CCOLAMD/ccolamd.h ${destroot}${prefix}/include/ufsparse |
56 | | |
57 | | xinstall -m 644 -W ${worksrcpath}/CHOLMOD/Include \ |
58 | | cholmod.h \ |
59 | | cholmod_blas.h \ |
60 | | cholmod_check.h \ |
61 | | cholmod_cholesky.h \ |
62 | | cholmod_complexity.h \ |
63 | | cholmod_config.h \ |
64 | | cholmod_core.h \ |
65 | | cholmod_internal.h \ |
66 | | cholmod_io64.h \ |
67 | | cholmod_matrixops.h \ |
68 | | cholmod_modify.h \ |
69 | | cholmod_partition.h \ |
70 | | cholmod_supernodal.h \ |
71 | | cholmod_template.h \ |
72 | | ${destroot}${prefix}/include/ufsparse |
73 | | |
74 | | xinstall -m 644 ${worksrcpath}/COLAMD/colamd.h ${destroot}${prefix}/include/ufsparse |
75 | | xinstall -m 644 ${worksrcpath}/CXSparse/Source/cs.h ${destroot}${prefix}/include/ufsparse |
76 | | xinstall -m 644 ${worksrcpath}/KLU/Include/klu.h ${destroot}${prefix}/include/ufsparse |
77 | | xinstall -m 644 ${worksrcpath}/LDL/ldl.h ${destroot}${prefix}/include/ufsparse |
78 | | xinstall -m 644 ${worksrcpath}/UFconfig/UFconfig.h ${destroot}${prefix}/include/ufsparse |
79 | | |
80 | | xinstall -m 644 -W ${worksrcpath}/UMFPACK/Include \ |
81 | | umfpack.h \ |
82 | | umfpack_col_to_triplet.h \ |
83 | | umfpack_defaults.h \ |
84 | | umfpack_free_numeric.h \ |
85 | | umfpack_free_symbolic.h \ |
86 | | umfpack_get_determinant.h \ |
87 | | umfpack_get_lunz.h \ |
88 | | umfpack_get_numeric.h \ |
89 | | umfpack_get_symbolic.h \ |
90 | | umfpack_global.h \ |
91 | | umfpack_load_numeric.h \ |
92 | | umfpack_load_symbolic.h \ |
93 | | umfpack_numeric.h \ |
94 | | umfpack_qsymbolic.h \ |
95 | | umfpack_report_control.h \ |
96 | | umfpack_report_info.h \ |
97 | | umfpack_report_matrix.h \ |
98 | | umfpack_report_numeric.h \ |
99 | | umfpack_report_perm.h \ |
100 | | umfpack_report_status.h \ |
101 | | umfpack_report_symbolic.h \ |
102 | | umfpack_report_triplet.h \ |
103 | | umfpack_report_vector.h \ |
104 | | umfpack_save_numeric.h \ |
105 | | umfpack_save_symbolic.h \ |
106 | | umfpack_scale.h \ |
107 | | umfpack_solve.h \ |
108 | | umfpack_symbolic.h \ |
109 | | umfpack_tictoc.h \ |
110 | | umfpack_timer.h \ |
111 | | umfpack_transpose.h \ |
112 | | umfpack_triplet_to_col.h \ |
113 | | umfpack_wsolve.h \ |
| 80 | eval xinstall -m 644 \ |
| 81 | [glob ${worksrcpath}/*/Include/*.h] \ |
117 | | post-destroot { |
118 | | system "ranlib ${destroot}${prefix}/lib/libamd.a" |
119 | | system "ranlib ${destroot}${prefix}/lib/libbtf.a" |
120 | | system "ranlib ${destroot}${prefix}/lib/libcamd.a" |
121 | | system "ranlib ${destroot}${prefix}/lib/libccolamd.a" |
122 | | system "ranlib ${destroot}${prefix}/lib/libcholmod.a" |
123 | | system "ranlib ${destroot}${prefix}/lib/libcolamd.a" |
124 | | system "ranlib ${destroot}${prefix}/lib/libcxsparse.a" |
125 | | system "ranlib ${destroot}${prefix}/lib/libklu.a" |
126 | | system "ranlib ${destroot}${prefix}/lib/libklu_cholmod.a" |
127 | | system "ranlib ${destroot}${prefix}/lib/libldl.a" |
128 | | system "ranlib ${destroot}${prefix}/lib/libcerbla.a" |
129 | | system "ranlib ${destroot}${prefix}/lib/libumfpack.a" |
130 | | } |
| 90 | livecheck.check regex |
| 91 | livecheck.regex ${name}-(\\d+(\\.\\d+)*)${extract.suffix} |