Ticket #41155: Portfile-3.8.1.diff

File Portfile-3.8.1.diff, 6.7 KB (added by seanfarley (Sean Farley), 10 years ago)
  • dports/math/octave/Portfile

    # HG changeset patch
    # User Sean Farley <sean.michael.farley@gmail.com>
    # Date 1404763156 18000
    #      Mon Jul 07 14:59:16 2014 -0500
    # Node ID 5d2c90956c32190b9e4f0a2d45a673f47fcf7dce
    # Parent  032adbe3450af4a8ad9d23d15ca8787e8b30aef9
    octave: update to 3.8.1
    
    diff --git a/dports/math/octave/Portfile b/dports/math/octave/Portfile
    a b PortGroup compilers 1.0 
    99compilers.choose    fc f77 f90
    1010compilers.setup     require_fortran
    1111
    1212name                octave
    1313
    14 version             3.6.4
    15 revision            14
     14version             3.8.1
    1615#conflicts           octave-devel
    1716categories          math science
    1817maintainers         michaelld openmaintainer
    1918license             GPL-3
    2019platforms           darwin
    homepage http://www.gnu.org/s 
    3130dist_subdir         octave
    3231distname            octave-${version}
    3332master_sites        gnu:octave
    3433use_bzip2           yes
    3534
    36 checksums \
    37     rmd160  b0356f0c5d9366b8129d72ac58bbde837fee1a95 \
    38     sha256  fa185df9591f5d740f4d37ff6eaf06db576fdd3e0ddd9d0737365799e5d1c962
    39 
    40 # temporary patches; these are already, or will be, fixed upstream.
    41 
    42 patchfiles-append \
    43     patch-liboctave-eigs-base.cc.diff \
    44     patch-liboctave-regexp.h.diff \
    45     patch-configure.diff \
    46     texinfo5.patch
    47 
    48 if {${os.major} >= 11} {
    49 
    50     # 10.7 and newer requires an extra patch; this patch will
    51     # break the build on 10.6 and prior.
    52 
    53     patchfiles-append patch-src-display.cc.diff
    54 
    55 }
     35checksums           rmd160  a76587b29a964791982bd9c803b0394411b9f874 \
     36                    sha256  d6762ed2ad4a042243a095fb44c7a1d3a91c635b6dca37fcef15a5efdffa9bbd
    5637
    5738depends_build-append \
    5839                    port:bison \
    5940                    port:flex \
    6041                    port:gperf \
    6142                    path:bin/perl:perl5 \
    6243                    port:pkgconfig
    6344
    6445depends_lib-append \
    65                     path:lib/libgcc/libgcc_s.1.dylib:libgcc \
    6646                    port:arpack \
    6747                    port:curl \
    6848                    port:fftw-3 \
    6949                    port:fftw-3-single \
    7050                    port:gawk \
    depends_run-append port:epstool \ 
    8969                    port:pstoedit
    9070
    9171universal_variant   no
    9272
    9373# common configure arguments
    94 
    9574configure.args \
    9675    --disable-dependency-tracking \
    97     --with-umfpack="-lumfpack -lSuiteSparse"
     76    --with-umfpack="-lumfpack -lSuiteSparse" \
     77    --disable-java \
     78    --with-opengl \
     79    --with-framework-opengl
    9880
    9981# octave uses a number of other ports to create sources from template:
    10082# perl, gawk, gsed, flex, bison, texinfo.  Make sure these are the
    10183# MacPorts' versions.  Python is not used if perl is available, so
    10284# clear it out.  grep is checked for in 'configure', but not used
    if {[variant_isset x11]} { 
    208190
    209191    configure.args-append --without-x
    210192
    211193}
    212194
    213 variant fltk description {Enable FLTK as a graphical front-end} {}
     195variant gui description {Enable experimental gui} {}
    214196
    215 if {[variant_isset fltk]} {
     197if {[variant_isset gui]} {
    216198
    217     depends_lib-append path:lib/libfltk.dylib:fltk \
    218                        port:fontconfig \
    219                        port:freetype
    220     configure.args-append --with-opengl
     199    depends_lib-append port:qt4-mac
     200    configure.args-append --enable-gui
    221201
    222202} else {
    223203
    224     configure.args-append --without-opengl
     204    configure.args-append --disable-gui
     205
     206}
     207
     208variant jit description {Enable experimental JIT compiler} {}
     209
     210if {[variant_isset jit]} {
     211
     212    configure.args-append --enable-jit
     213
     214} else {
     215
     216    configure.args-append --disable-jit
    225217
    226218}
    227219
    228220variant metis description {Use SuiteSparse + Metis for graph partitioning} {
    229221    pre-fetch {
    if {[variant_isset metis]} { 
    246238    # make sure SuiteSparse is installed without +metis
    247239    require_active_variants SuiteSparse {} metis
    248240
    249241}
    250242
    251 pre-fetch {
     243# check for +accelerate here as well as in dependent ports;
     244# Apple's VecLib has bugs that cause Octave to crash sometimes,
     245# while Atlas does not have these issues.  Print a warning if this
     246# variant is in use, but do not force the use of +atlas (for now).
    252247
    253     # check for +accelerate here as well as in dependent ports;
    254     # Apple's VecLib has bugs that cause Octave to crash sometimes,
    255     # while Atlas does not have these issues.  Print a warning if this
    256     # variant is in use, but do not force the use of +atlas (for now).
    257 
    258     if {![catch {set result [active_variants arpack accelerate {}]}]} {
    259         if {$result} {
    260             ui_msg "\nWARNING: Dependency 'arpack' is installed with the +accelerate variant, using Apple's Vector Libraries which have known bugs that can cause Octave to crash if using certain functions in arpack.  The +atlas variant does not have these issues with Octave, and is considered by Octave developers a better way to go.\n"
    261         }
    262     }
    263 
    264     if {[variant_isset accelerate]} {
    265         ui_msg "\nWARNING: The +accelerate variant has been selected, using Apple's Vector Libraries which have known bugs that can cause Octave to crash.  The +atlas variant does not have these issues with Octave, and is considered by Octave developers a better way to go.\n"
     248if {![catch {set result [active_variants arpack accelerate {}]}]} {
     249    if {$result} {
     250        notes-append "\nWARNING: Dependency 'arpack' is installed with the +accelerate variant, using Apple's Vector Libraries which have known bugs that can cause Octave to crash if using certain functions in arpack.  The +atlas variant does not have these issues with Octave, and is considered by Octave developers a better way to go.\n"
    266251    }
    267252}
    268253
    269 # https://trac.macports.org/ticket/41582
     254if {[variant_isset accelerate]} {
     255    notes-append "\nWARNING: The +accelerate variant has been selected, using Apple's Vector Libraries which have known bugs that can cause Octave to crash.  The +atlas variant does not have these issues with Octave, and is considered by Octave developers a better way to go.\n"
     256}
    270257
    271 use_parallel_build  no
     258post-destroot {
     259    system "echo 'graphics_toolkit(\"gnuplot\");' >> ${destroot}${prefix}/share/octave/site/m/startup/octaverc"
     260
     261    if {[variant_isset gui]} {
     262        set appdir ${destroot}${applications_dir}/Octave.app
     263        xinstall -d ${appdir}/Contents/MacOS
     264        xinstall -d ${appdir}/Contents/Resources
     265
     266        xinstall -m 644 ${filespath}/Info.plist ${appdir}/Contents/
     267        xinstall -m 644 ${filespath}/Octave.icns ${appdir}/Contents/Resources/
     268        xinstall -m 755 ${filespath}/Octave ${appdir}/Contents/MacOS
     269
     270        reinplace -W ${appdir}/Contents "s,@@VERSION@@,${version},g" Info.plist
     271    }
     272}
    272273
    273274livecheck.type      regex
    274275livecheck.url       http://www.gnu.org/software/octave/download.html
    275276livecheck.regex     GNU Octave (\[\^\ \]*) was