Ticket #20106: Portfile-atlas-gcc.diff
File Portfile-atlas-gcc.diff, 3.7 KB (added by max@…, 15 years ago) |
---|
-
math/atlas/Portfile
old new 37 37 sha1 c75223fdef3258c461370af5d2b889d580d7f38a \ 38 38 rmd160 e8fabba2fdd944afbc02a83599cf45a0d721030d 39 39 40 41 40 # the following patch corrects extension conventions for osx's dynamic libs 42 41 set make_patch patch-build-Make.top.diff 43 42 use_parallel_build no … … 46 45 47 46 destroot.dir ${build.dir} 48 47 destroot.destdir DESTDIR=${destroot}${prefix} 49 depends_lib port:gcc43 \ 50 port:bzip2 \ 48 depends_lib port:bzip2 \ 51 49 port:gzip 52 50 53 # Set fortran compiler flags 54 set myf77 ${prefix}/bin/gfortran-mp-4.3 51 variant gcc42 conflicts gcc43 gcc44 description "Use gcc-4.2 as compiler" { 52 depends_lib-append port:gcc42 53 configure.compiler macports-gcc-4.2 54 } 55 55 56 configure.args -C xc ${prefix}/bin/gcc-mp-4.3 \ 57 -C gc ${prefix}/bin/gcc-mp-4.3 \ 58 -C if ${myf77} \ 59 -C ic ${prefix}/bin/gcc-mp-4.3 \ 60 -C dm ${prefix}/bin/gcc-mp-4.3 \ 61 -C sm ${prefix}/bin/gcc-mp-4.3 \ 62 -C dk ${prefix}/bin/gcc-mp-4.3 \ 63 -C sk ${prefix}/bin/gcc-mp-4.3 \ 64 --cc=${prefix}/bin/gcc-mp-4.3 \ 65 -b 32 \ 66 -Fa alg -fPIC 67 68 configure.compiler macports-gcc-4.3 56 variant gcc43 conflicts gcc42 gcc44 description "Use gcc-4.3 as compiler" { 57 depends_lib-append port:gcc43 58 configure.compiler macports-gcc-4.3 59 } 69 60 70 61 variant gcc44 conflicts gcc42 gcc43 description "Use gcc4.4 as compiler" { 62 depends_lib-append port:gcc44 63 configure.compiler macports-gcc-4.4 64 } 71 65 66 if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] } { 67 default_variants +gcc43 68 } 69 70 if {[variant_isset gcc42]} { 71 set myf77 ${prefix}/bin/gfortran-mp-4.2 72 set mygcc ${prefix}/bin/gcc-mp-4.2 73 set gcc_libdir gcc42 74 } elseif {[variant_isset gcc43]} { 75 set myf77 ${prefix}/bin/gfortran-mp-4.3 76 set mygcc ${prefix}/bin/gcc-mp-4.3 77 set gcc_libdir gcc43 78 } elseif {[variant_isset gcc44]} { 79 set myf77 ${prefix}/bin/gfortran-mp-4.4 80 set mygcc ${prefix}/bin/gcc-mp-4.4 81 set gcc_libdir gcc44 82 } 83 84 configure.args -C xc ${mygcc} \ 85 -C gc ${mygcc} \ 86 -C if ${myf77} \ 87 -C ic ${mygcc} \ 88 -C dm ${mygcc} \ 89 -C sm ${mygcc} \ 90 -C dk ${mygcc} \ 91 -C sk ${mygcc} \ 92 --cc=${mygcc} \ 93 -b 32 \ 94 -Fa alg -fPIC 95 72 96 # we are configuring from the build directory 73 97 configure.dir ${workpath}/${name}-${version}/build 74 98 configure.cmd ../configure 75 99 76 # change the default compilers to those of gcc43 and make into shared library77 78 100 extract { 79 101 # extract atlas and move to a consistent working directory name 80 102 system "cd ${workpath} && bunzip2 -dc ${distpath}/${atlasdist} | \ … … 86 108 gnutar --no-same-owner -xf -" 87 109 } 88 110 89 90 91 111 pre-configure { 92 112 # Get some system specific variables for maximum optimization 93 113 set cpufreq [expr {[exec sysctl -n hw.cpufrequency]/1000000}] … … 160 180 } 161 181 162 182 set ld "ld -arch ${myarch} -dynamic -dylib -single_module -dead_strip -x \ 163 -all_load -L. -L${prefix}/lib/ gcc43-ldylib1.o -dylib_install_name"183 -all_load -L. -L${prefix}/lib/${gcc_libdir} -ldylib1.o -dylib_install_name" 164 184 165 185 system "cd ${workpath}/${name}-${version}/build/lib && \ 166 186 ${ld} ${prefix}/lib/libatlas.dylib libatlas.a -o libatlas.dylib \