Ticket #23349: atlas-mp-23349.diff
File atlas-mp-23349.diff, 5.1 KB (added by mklein-de (Michael Klein), 15 years ago) |
---|
-
files/patch-build-Make.top.diff
1 --- Make.top.old 2009-01-24 15:06:37.000000000 -08002 +++ Make.top 2009-01-24 15:08:49.000000000 -08003 @@ -289,14 +289,11 @@4 cp $(INCAdir)/* $(INSTdir)/atlas/.5 - chmod 0644 $(INSTdir)/atlas/*6 install_lib:7 - cp $(LIBdir)/libatlas.a $(INSTdir)/.8 - cp $(LIBdir)/libcblas.a $(INSTdir)/.9 - cp $(LIBdir)/liblapack.a $(INSTdir)/.10 - chmod 0644 $(INSTdir)/libatlas.a $(INSTdir)/liblapack.a \11 - $(INSTdir)/libcblas.a12 - - cp $(LIBdir)/libf77blas.a $(INSTdir)/.13 - - chmod 0644 $(INSTdir)/libf77blas.a14 - - cp $(LIBdir)/libptcblas.a $(INSTdir)/.15 - - cp $(LIBdir)/libptf77blas.a $(INSTdir)/.16 - - chmod 0644 $(INSTdir)/libptcblas.a $(INSTdir)/libptf77blas.a17 + cp $(LIBdir)/libatlas.dylib $(INSTdir)/.18 + cp $(LIBdir)/libptcblas.dylib $(INSTdir)/.19 + cp $(LIBdir)/liblapack.dylib $(INSTdir)/.20 + chmod 0644 $(INSTdir)/libatlas.dylib $(INSTdir)/liblapack.dylib \21 + $(INSTdir)/libptcblas.dylib22 + - cp $(LIBdir)/libptf77blas.dylib $(INSTdir)/.23 + - chmod 0644 $(INSTdir)/libptf77blas.dylib24 -
Portfile
42 42 rmd160 e8fabba2fdd944afbc02a83599cf45a0d721030d 43 43 44 44 45 # the following patch corrects extension conventions for osx's dynamic libs46 set make_patch patch-build-Make.top.diff47 45 use_parallel_build no 48 build.target build46 build.target build 49 47 build.dir ${workpath}/${name}-${version}/build 50 48 51 49 destroot.dir ${build.dir} … … 167 165 # recursively remove directories 168 166 ui_debug "reinplace for make to recursively remove directories on clean" 169 167 reinplace "s|rm -f|rm -rf|g" ${workpath}/${name}-${version}/build/Makefile 168 } 170 169 171 ui_debug "patch ${name}-${version}/build/Make.top to install dynamic libs" 172 system "cd ${worksrcpath}/build/ && \ 173 patch -p0 < ${filespath}/${make_patch}" 170 proc make_dylib { lib libs } { 171 global destroot prefix myarch 172 system "cd ${destroot}/${prefix}/lib && \ 173 ( test ! -e ${lib}.a || 174 ld -arch ${myarch} -dynamic -dylib -single_module -dead_strip \ 175 -x -all_load -L. -L${prefix}/lib/gcc43 -ldylib1.o \ 176 -dylib_install_name ${prefix}/lib/${lib}.dylib \ 177 ${lib}.a -o ${lib}.dylib ${libs} && rm -f ${lib}.a)" 174 178 } 175 179 176 pre-destroot { 180 181 post-destroot { 177 182 # We have to manually create the dylib shared libs as the default build does not do this 183 global myarch 184 178 185 if {[string equal "${os.arch}" "powerpc"]} { 179 186 if {${my_arch} == "64" } { 180 187 set myarch "ppc64" 181 188 } else { 182 189 set myarch "ppc" 183 190 } 191 } else { 192 if {${my_arch} == "64" } { 193 set myarch "x86_64" 184 194 } else { 185 if {${my_arch} == "64" } { 186 set myarch "x86_64" 187 } else { 188 set myarch "i386" 189 } 195 set myarch "i386" 190 196 } 197 } 191 198 192 set ld "ld -arch ${myarch} -dynamic -dylib -single_module -dead_strip -x \ 193 -all_load -L. -L${prefix}/lib/gcc43 -ldylib1.o -dylib_install_name" 199 set ncpu [exec sysctl -n hw.ncpu] 194 200 195 system "cd ${workpath}/${name}-${version}/build/lib && \ 196 ${ld} ${prefix}/lib/libatlas.dylib libatlas.a -o libatlas.dylib \ 197 -lSystem" 201 make_dylib libatlas { -lSystem } 198 202 199 system "cd ${workpath}/${name}-${version}/build/lib && \ 200 ${ld} ${prefix}/lib/libptcblas.dylib libptcblas.a -o \ 201 libptcblas.dylib -latlas \ 202 -lSystem" 203 if {${ncpu} == "1" } { 204 # there are no threaded libraries (libpt*) on single-core machines 205 make_dylib libcblas { -latlas -lSystem } 206 make_dylib libf77blas { -lgfortran -latlas -lSystem } 207 } else { 208 make_dylib libptcblas { -latlas -lSystem } 209 make_dylib libptf77blas { -lgfortran -latlas -lSystem } 203 210 204 system "cd ${workpath}/${name}-${version}/build/lib && \205 ${ld} ${prefix}/lib/libptf77blas.dylib\206 libptf77blas.a -o libptf77blas.dylib\207 -lgfortran -latlas -lSystem"211 # we make soft links to the parallel built libs 212 system "cd ${destroot}${prefix}/lib && \ 213 ln -s ./libptcblas.dylib libcblas.dylib && \ 214 ln -s ./libptf77blas.dylib libf77blas.dylib" 208 215 209 system "cd ${workpath}/${name}-${version}/build/lib && \210 ${ld} ${prefix}/lib/liblapack.dylib liblapack.a -o liblapack.dylib \211 -lptf77blas -lgfortran -lptcblas -latlas -lgcc_s.1 -lSystem"216 file delete ${destroot}/${prefix}/lib/libcblas.a 217 file delete ${destroot}/${prefix}/lib/libf77blas.a 218 } 212 219 220 make_dylib liblapack { -lf77blas -lcblas -latlas -lgfortran -lgcc_s.1 -lSystem } 213 221 } 214 222 215 post-destroot {216 # we make soft links to the parallel built libs217 system "cd ${destroot}${prefix}/lib && \218 ln -sf ./libptcblas.dylib libcblas.dylib && \219 ln -sf ./libptf77blas.dylib libf77blas.dylib"220 }221 222 223 livecheck.name math-atlas 223 224 livecheck.distname Stable