1 | # $Id$ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | categories-append math |
---|
6 | name atlas |
---|
7 | version 3.8.2 |
---|
8 | |
---|
9 | # additional versions |
---|
10 | set lapackversion 3.1.1 |
---|
11 | set lapackname lapack |
---|
12 | set atlasdist ${name}${version}.tar.bz2 |
---|
13 | set lapackdist ${lapackname}-${lapackversion}.tgz |
---|
14 | |
---|
15 | maintainers nomaintainer |
---|
16 | platforms darwin |
---|
17 | |
---|
18 | description Portable optimal linear algebra software |
---|
19 | long_description The current version provides a complete BLAS and LAPACK API.\ |
---|
20 | For many operations, ATLAS achieves performance on par with\ |
---|
21 | machine-specific tuned libraries. |
---|
22 | |
---|
23 | homepage http://math-atlas.sourceforge.net/ |
---|
24 | |
---|
25 | master_sites sourceforge:math-atlas/${name}${version}.tar.bz2:atlas\ |
---|
26 | http://www.netlib.org/lapack:lapack |
---|
27 | |
---|
28 | distfiles ${atlasdist}:atlas \ |
---|
29 | ${lapackdist}:lapack |
---|
30 | |
---|
31 | checksums ${atlasdist} \ |
---|
32 | md5 dd888f5d066c1fafeaaf2ae6b37e0b85 \ |
---|
33 | sha1 2d1f2f789f57c9e7e8957f275b67c33176a36e0c \ |
---|
34 | rmd160 8160ccb3af7cd7365ba87c77d636fb68b24c62ae \ |
---|
35 | ${lapackdist} \ |
---|
36 | md5 00b21551a899bcfbaa7b8443e1faeef9 \ |
---|
37 | sha1 be1a3d53d761935703a7be88c3dd1164daa79554 \ |
---|
38 | rmd160 ba864e7a2b759ba1337ea9a452e12a7ab5494cdc |
---|
39 | |
---|
40 | extract { |
---|
41 | # extract atlas and move to a consistent working directory name |
---|
42 | system "cd ${workpath} && bunzip2 -dc ${distpath}/${atlasdist} | \ |
---|
43 | gnutar --no-same-owner -xf -" |
---|
44 | system "mv ${workpath}/ATLAS ${workpath}/${name}-${version}" |
---|
45 | |
---|
46 | # extract lapack |
---|
47 | system "cd ${workpath} && gunzip -dc ${distpath}/${lapackdist} | \ |
---|
48 | gnutar --no-same-owner -xf -" |
---|
49 | } |
---|
50 | |
---|
51 | # Set fortran compiler flags |
---|
52 | set myf77 ${prefix}/bin/gfortran-mp-4.3 |
---|
53 | set myfflags "-fomit-frame-pointer -O3" |
---|
54 | |
---|
55 | pre-configure { |
---|
56 | # compile lapack |
---|
57 | system "cd ${workpath}/${lapackname}-${lapackversion} && \ |
---|
58 | cp INSTALL/make.inc.gfortran make.inc" |
---|
59 | reinplace "s|gfortran|${myf77}|" \ |
---|
60 | ${workpath}/${lapackname}-${lapackversion}/make.inc |
---|
61 | reinplace "s|OPTS = -O2|OPTS = ${myfflags}|" \ |
---|
62 | ${workpath}/${lapackname}-${lapackversion}/make.inc |
---|
63 | reinplace "s|PLAT = _LINUX|PLAT = _darwin|" \ |
---|
64 | ${workpath}/${lapackname}-${lapackversion}/make.inc |
---|
65 | system "cd ${workpath}/${lapackname}-${lapackversion} && make lib" |
---|
66 | |
---|
67 | # create a build directory for atlas |
---|
68 | file mkdir ${workpath}/${name}-${version}/build |
---|
69 | } |
---|
70 | |
---|
71 | # we are configuring from the build directory |
---|
72 | configure.dir ${workpath}/${name}-${version}/build |
---|
73 | configure.cmd ../configure |
---|
74 | |
---|
75 | # change the default compilers to those of gcc43 and make into shared library |
---|
76 | configure.args --with-netlib-lapack=${workpath}/${lapackname}-${lapackversion}/lapack_darwin.a \ |
---|
77 | -C xc ${prefix}/bin/gcc-mp-4.3 \ |
---|
78 | -C gc ${prefix}/bin/gcc-mp-4.3 \ |
---|
79 | -C if ${myf77}\ |
---|
80 | -F if '${myfflags}'\ |
---|
81 | -C ic ${prefix}/bin/gcc-mp-4.3 \ |
---|
82 | -C dm ${prefix}/bin/gcc-mp-4.3 \ |
---|
83 | -C sm ${prefix}/bin/gcc-mp-4.3 \ |
---|
84 | -C dk ${prefix}/bin/gcc-mp-4.3 \ |
---|
85 | -C sk ${prefix}/bin/gcc-mp-4.3 |
---|
86 | |
---|
87 | post-configure { |
---|
88 | # recursively remove directories |
---|
89 | reinplace "s|rm -f|rm -rf|g" ${workpath}/${name}-${version}/build/Makefile |
---|
90 | } |
---|
91 | |
---|
92 | use_parallel_build yes |
---|
93 | build.target build |
---|
94 | build.dir ${workpath}/${name}-${version}/build |
---|
95 | |
---|
96 | destroot.dir ${build.dir} |
---|
97 | destroot.destdir DESTDIR=${destroot}${prefix} |
---|
98 | depends_lib-append port:gcc43 |
---|