Ticket #28274: Portfile.diff

File Portfile.diff, 7.1 KB (added by Veence (Vincent), 13 years ago)

New diff file

  • Portfile

    old new  
    55
    66categories          math
    77name                atlas
    8 version             3.8.3
    9 revision            4
     8version             3.9.33
     9#revision            4
    1010
    1111# additional versions
    12 set lapackversion   3.2.2
     12set lapackversion   3.3.0
    1313set lapackname      lapack
    1414set atlasdist       ${name}${version}.tar.bz2
    1515set lapackdist      ${lapackname}-${lapackversion}.tgz
     
    3030distfiles           ${atlasdist}:atlas \
    3131                    ${lapackdist}:lapack
    3232
    33 patchfiles          patch-ATL_AVgcc-fix.diff \
    34                     patch-archinfo_freebsd.c.diff \
    35                     patch-SpewMakeInc.c.diff
    36 
    37 checksums           $atlasdist \
    38                     md5     6c13be94a87178e7582111c08e9503bc \
    39                     sha1    c7546210df4796457d9e96a00444adc4c0f2e77f \
    40                     rmd160  0425e630d9d0c5b7aae81427a41b7eaa18447e90 \
    41                     $lapackdist \
    42                     md5     10832891c9e8100f81108c1ec7da0da4 \
    43                     sha1    a434c45932f6affb654b3abde21dd669f5751633 \
    44                     rmd160  62426f2f360b2c438853ee6230da08f1f23dfd5b
     33patchfiles          patch-SpewMakeInc.c.diff
     34
     35checksums                       atlas3.9.33.tar.bz2 \
     36                                md5     8f518f386b69bdfd1f5061704aa196f9 \
     37                    sha1    8dbc6015318458ff7abd178964d90350a18ce9fa \
     38                    rmd160  810033a9f81c11994a5221dc268e3da84e2367d7 \
     39                        lapack-3.3.0.tgz \
     40                    md5     84213fca70936cc5f1b59a7b1bf71697 \
     41                    sha1    4f0b103da52110e7f60d1d7676727103aca9785e \
     42                        rmd160  cc72e7c93ab13464fd892d684b00b910cbbd3b3e
    4543
    4644
    4745use_parallel_build  no
     
    9997                    -C dk ${configure.cc} \
    10098                    -C sk ${configure.cc} \
    10199                    --cc=${configure.cc} \
     100                    --with-netlib-lapack-tarfile=${distpath}/${lapackdist} \
     101                    -O 12 \
    102102                    -b ${my_arch} \
    103103                    -Fa alg -fPIC
    104104
    105105if { [variant_isset universal] } {
    106106    configure.universal_args-delete --disable-dependency-tracking
    107     configure.args-delete -b ${my_arch}
    108     lappend merger_configure_args(ppc)     -b 32
    109     lappend merger_configure_args(ppc64)   -b 64
    110     lappend merger_configure_args(i386)    -b 32
    111     lappend merger_configure_args(x86_64)  -b 64
     107    configure.args-delete       --cc=${configure.cc} \
     108                                                -b ${my_arch} \
     109                                                -Fa alg -fPIC
     110                   
     111    lappend merger_configure_args(ppc)          --cc='${configure.cc} -m32' \
     112                                                                                -b 32 \
     113                                                                                -s gas_ppc \
     114                                                                                -Fa alg '-fPIC -m32'
     115    lappend merger_configure_args(ppc64)        --cc='${configure.cc} -m64' \
     116                                                                                -b 64 \
     117                                                                                -s gas_ppc \
     118                                                                                -Fa alg '-fPIC -m64'
     119    lappend merger_configure_args(i386)         --cc='${configure.cc} -m32' \
     120                                                                                -b 32 \
     121                                                                                -s gas_x86_32 \
     122                                                                                -Fa alg '-fPIC -m32'
     123    lappend merger_configure_args(x86_64)       --cc='${configure.cc} -m64' \
     124                                                                                -b 64 \
     125                                                                                -s gas_x86_64 \
     126                                                                                -Fa alg '-fPIC -m64'
    112127} else {
    113128    lappend merger_configure_args(ppc)
    114129    lappend merger_configure_args(ppc64)
     
    118133
    119134build.env-append    "CC=${configure.cc} CXX=${configure.cxx}"
    120135
    121 
    122136# we are configuring from the build directory
    123137configure.dir       ${workpath}/${name}-${version}/build
    124138configure.cmd       ../configure
     
    130144    system "cd ${workpath} && bunzip2 -dc ${distpath}/${atlasdist} | \
    131145         gnutar --no-same-owner -xf -"
    132146    system "mv ${workpath}/ATLAS ${workpath}/${name}-${version}"
    133 
    134     # extract lapack
    135     system "cd ${workpath} && gunzip -dc ${distpath}/${lapackdist} | \
    136          gnutar --no-same-owner -xf -"
    137147}
    138148
    139149post-patch {
    140     reinplace "s|__MACPORTS_GCC__|${configure.cc}|g" ${workpath}/${name}-${version}/CONFIG/src/SpewMakeInc.c
     150        reinplace "s|__MACPORTS_GCC__|${configure.cc}|g" \
     151                ${workpath}/${name}-${version}/CONFIG/src/SpewMakeInc.c
    141152}
    142153
    143154pre-configure {
    144155    if { [variant_isset universal] } {
    145156        foreach arch ${universal_archs_to_use} {
    146157            copy ${workpath}/${name}-${version} ${workpath}/${name}-${version}-${arch}
    147             copy ${workpath}/${lapackname}-${lapackversion} ${workpath}/${lapackname}-${lapackversion}-${arch}
    148158        }
    149159    }
    150160
     
    169179
    170180    foreach arch ${archs} {
    171181
    172     # first do a 'fake configure' of atlas so we get optimized lapack libraries
    173     ui_debug "performing fake configure of atlas for optimized lapack"
    174     # atlas docs: 3.1.2
    175     if { ! [variant_isset universal] } {
     182        if { ! [variant_isset universal] } {
    176183        set atlas_path  ${workpath}/${name}-${version}
    177         set lapack_path ${workpath}/${lapackname}-${lapackversion}
    178     } else {
     184        } else {
    179185        set atlas_path ${workpath}/${name}-${version}-${arch}
    180         set lapack_path ${workpath}/${lapackname}-${lapackversion}-${arch}
    181     }
    182     ui_debug "Clean out old temp directory if exists"
    183     file delete -force ${atlas_path}/temp
    184     file mkdir ${atlas_path}/temp
    185     ui_debug "Assembled Command: '${configure.cmd} ${configure.args} $merger_configure_args(${arch})"
    186     system "cd ${atlas_path}/temp && \
    187             ${configure.cmd} ${configure.args} $merger_configure_args(${arch})"
    188 
    189     # Get the F77FLAGS
    190     set atlas_f77    [join [lrange [split [exec grep "F77 = " $atlas_path/temp/Make.inc     ] =] 1 end] =]
    191     ui_debug "Found atlas F77: ${atlas_f77}"
    192 
    193     set atlas_fflags [join [lrange [split [exec grep "F77FLAGS = " $atlas_path/temp/Make.inc] =] 1 end] =]
    194     ui_debug "Found atlas F77FLAGS: ${atlas_fflags}"
    195 
    196     ui_debug "Remove the old test configure directory"
    197     file delete -force ${atlas_path}/temp
    198 
    199     # compile lapack
    200     system "cd ${lapack_path} && \
    201             cp INSTALL/make.inc.gfortran make.inc"
    202     reinplace "s|gfortran|${atlas_f77}|" \
    203            ${lapack_path}/make.inc
    204     reinplace "s|OPTS     = -O2|OPTS = ${atlas_fflags}|" \
    205            ${lapack_path}/make.inc
    206 
    207     if { ! [variant_isset universal] } {
    208         reinplace "s|NOOPT    = -O0|NOOPT = -O2 -m${my_arch}|" \
    209                ${lapack_path}/make.inc
    210     } else {
    211         if { ${arch}=="i386" || ${arch}=="ppc" } {
    212             reinplace "s|NOOPT    = -O0|NOOPT = -O2 -m32|" \
    213                    ${lapack_path}/make.inc
    214         } else {
    215             reinplace "s|NOOPT    = -O0|NOOPT = -O2 -m64|" \
    216                    ${lapack_path}/make.inc
    217         }
    218     }
    219 
    220     reinplace "s|PLAT = _LINUX|PLAT = _darwin|" \
    221            ${lapack_path}/make.inc
    222 
    223     reinplace "s|LOADOPTS =|LOADOPTS = ${atlas_fflags}|" \
    224            ${lapack_path}/make.inc
    225 
    226     system "cd ${lapack_path} && make lib"
    227 
    228     # create a build directory for atlas
    229     file mkdir ${atlas_path}/build
    230 
    231     if { ! [variant_isset universal] } {
    232         configure.args-append --with-netlib-lapack=${lapack_path}/lapack_darwin.a
    233     } else {
    234         lappend merger_configure_args(${arch}) --with-netlib-lapack=${lapack_path}/lapack_darwin.a
    235     }
    236 }
     186        }
     187       
     188        file mkdir ${atlas_path}/build
     189        }
    237190}
    238191
    239192post-configure {