Changeset 68235


Ignore:
Timestamp:
May 29, 2010, 7:43:48 PM (10 years ago)
Author:
mcalhoun@…
Message:

qrupdate: Allow 32/64-bit universal build. Build shared libraries.

Location:
trunk/dports/math/qrupdate
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/math/qrupdate/Portfile

    r66061 r68235  
    33
    44PortSystem                      1.0
     5PortGroup           muniversal 1.0
    56
    67name                qrupdate
    78version             1.1.1
     9revision            1
    810categories          math
    911maintainers         nomaintainer
     
    1921                    rmd160  fd63306abe91adcd5d47e408d9cd4af3e1b32b0c
    2022
    21 use_configure       no
    22 build.target        lib
    23 destroot {
    24     xinstall -m 644 ${worksrcpath}/lib${name}.a ${destroot}${prefix}/lib
    25     system "ranlib ${destroot}${prefix}/lib/lib${name}.a"
     23depends_lib-append  port:atlas
     24
     25use_configure       no
     26build.target        lib solib
     27
     28build.args          PREFIX=${prefix} BLAS="-L${prefix}/lib" LAPACK="-L${prefix}/lib -llapack"
     29destroot.args       PREFIX=${prefix} BLAS="-L${prefix}/lib" LAPACK="-L${prefix}/lib -llapack"
     30test.args           PREFIX=${prefix} BLAS="-L${prefix}/lib" LAPACK="-L${prefix}/lib -llapack"
     31
     32patchfiles          patch-Makefile.diff
     33
     34post-patch {
     35    # Mac install program does not support -D flag.
     36    reinplace "s|install -D|install|"  ${worksrcpath}/src/Makefile
     37
     38    # Running ranlib on static libraries make universal builds a little more complicated.
     39    reinplace "s|ar -cr |libtool -o |"  ${worksrcpath}/src/Makefile
    2640}
    2741
    28 variant g95 conflicts gcc43 gcc44 description {build with g95} {
     42# Fortran compilers can not cross-compile
     43if { ${os.arch}=="i386" } {
     44    set universal_archs_supported "i386 x86_64"
     45} else {
     46    set universal_archs_supported "ppc ppc64"
     47}
     48
     49post-configure {
     50    if { ! [variant_isset universal] } {
     51        if { ${build_arch} == "x86_64" || ${build_arch} == "ppc64" } {
     52            reinplace "s|^FFLAGS=|FFLAGS=-m64 |"  ${worksrcpath}/Makeconf
     53        } else {
     54            reinplace "s|^FFLAGS=|FFLAGS=-m32 |"  ${worksrcpath}/Makeconf
     55        }
     56    } else {
     57        foreach arch ${universal_archs_to_use} {
     58            if { ${arch}=="x86_64" || ${arch}=="ppc64" } {
     59                reinplace "s|^FFLAGS=|FFLAGS=-m64 |"  ${worksrcpath}-${arch}/Makeconf
     60            } else {
     61                reinplace "s|^FFLAGS=|FFLAGS=-m32 |"  ${worksrcpath}-${arch}/Makeconf
     62            }
     63        }
     64    }
     65}
     66
     67variant g95 conflicts gcc43 gcc44 universal description {build with g95} {
    2968    depends_build-append    port:g95
    3069    post-patch {
     
    3473}
    3574
    36 variant gcc43 conflicts g95 gcc44 description {build with gcc43 fortran} {
     75variant gcc43 conflicts g95 gcc44 universal description {build with gcc43 fortran} {
    3776    depends_build-append    port:gcc43
    3877    post-patch {
     
    4079    }
    4180}
     81
    4282variant gcc44 conflicts g95 gcc43 description {build with gcc44 fortran} {
    4383    depends_build-append    port:gcc44
     
    4888
    4989if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset g95]} {
    50     default_variants +gcc43
     90    default_variants +gcc44
    5191}
    5292
     93test.run yes
Note: See TracChangeset for help on using the changeset viewer.