[144150] trunk/dports

mcalhoun at macports.org mcalhoun at macports.org
Sat Jan 2 23:40:59 PST 2016


Revision: 144150
          https://trac.macports.org/changeset/144150
Author:   mcalhoun at macports.org
Date:     2016-01-02 23:40:58 -0800 (Sat, 02 Jan 2016)
Log Message:
-----------
octave-devel, octave_select: new and resurrected ports
*) allows testing of major revisions before transitioning (e.g. 3.8.2 -> 4.0.0, #48622, #47979)
*) allows testing of release candidates
*) allows testing of cutting-edge features

Modified Paths:
--------------
    trunk/dports/math/octave-devel/Portfile

Added Paths:
-----------
    trunk/dports/math/octave-devel/files/
    trunk/dports/math/octave-devel/files/clang-libcxx-fix.patch
    trunk/dports/math/octave-devel/files/octave-bug_41027.patch
    trunk/dports/math/octave-devel/files/octave-clang-classdef.patch
    trunk/dports/math/octave-devel/files/octave-devel
    trunk/dports/math/octave-devel/files/octave-devel-rc
    trunk/dports/math/octave-devel/files/octave-devel-release
    trunk/dports/math/octave-devel/files/osmesa_mac_fix.patch
    trunk/dports/math/octave-devel/files/patch-stdio.in.h.diff
    trunk/dports/sysutils/octave_select/
    trunk/dports/sysutils/octave_select/Portfile
    trunk/dports/sysutils/octave_select/files/
    trunk/dports/sysutils/octave_select/files/base
    trunk/dports/sysutils/octave_select/files/none

Modified: trunk/dports/math/octave-devel/Portfile
===================================================================
--- trunk/dports/math/octave-devel/Portfile	2016-01-03 07:17:55 UTC (rev 144149)
+++ trunk/dports/math/octave-devel/Portfile	2016-01-03 07:40:58 UTC (rev 144150)
@@ -1,35 +1,622 @@
-# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 # $Id$
 
 PortSystem          1.0
+PortGroup           compilers  1.0
+PortGroup           muniversal 1.0
+PortGroup           active_variants 1.1
+PortGroup           select     1.0
 
 name                octave-devel
-version             3.6.4
-revision            11
-
 categories          math science
-maintainers         michaelld openmaintainer
-license             GPL-3
 platforms           darwin
+license             GPL-3+
+maintainers         mcalhoun openmaintainer
+description         a high-level language for numerical computations
+long_description    \
+    GNU Octave is a high-level language, primarily intended for numerical \
+    computations.  It provides a convenient command line interface for \
+    solving linear and nonlinear problems numerically.
 
-description         a Matlab-like environment for numerical analysis
-long_description    Octave provides a convenient command line interface \
-                    for solving linear and nonlinear problems numerically, \
-                    using a language that is mostly compatible with Matlab. \
-                    It is easily extensible and customizable via \
-                    user-defined functions or using dynamically loaded \
-                    modules written in e.g. C++, C or Fortran.
+homepage            http://www.gnu.org/software/octave
 
-homepage            http://www.gnu.org/software/octave/
+#fetch.type          hg
+#hg.url              http://hg.savannah.gnu.org/hgweb/octave/
 
-replaced_by         octave
+set version_release 4.0.0
+set version_rc      4.0.1
+set version_tip     4.1.0+
 
-archive_sites
-distfiles
+#revision           0
 
-pre-fetch {
-    ui_error "${subport} has been temporarily replaced by the port 'octave'. Please install octave instead."
-    return -code error "obsolete port"
+if { ${name} eq ${subport} } {
+    version         ${version_tip}
+    #incr revision  0
+    hg.tag          5a340d8458d6
+
+    checksums-append               \
+        ${hg.tag}${extract.suffix} \
+        rmd160  9fc8bf87a82331ed644f68b31bb8a2cd7f2ec539 \
+        sha256  152b316872d20eca275433a9dd2d339ce7e475b5be36d37d1637601ccd3cd898
+
+    livecheck.regex   "<a href=\"/hgweb/octave/rev/(\[a-zA-Z0-9.\]+)\">\ntip"
 }
 
-livecheck.type      none
+subport octave-devel-rc {
+    version         ${version_rc}
+    #incr revision  0
+    hg.tag          20b17dda0e0c
+
+    if {${version_rc} eq ${version_release}} {
+        conflicts-append octave-devel-release
+    }
+
+    checksums-append               \
+        ${hg.tag}${extract.suffix} \
+        rmd160  bc42b7b3b2a4fca3b1264203bad4cbc3e941206e \
+        sha256  9ab6b66f698e7bd187d462844edd59dc5911e341f1bcdaa8f98f7de4f9950aae
+
+    livecheck.regex   "<a href=\"/hgweb/octave/rev/(\[a-zA-Z0-9.\]+)\">\nrc-"
+}
+
+subport octave-devel-release {
+    version         ${version_release}
+    #incr revision  0
+    hg.tag          3ccc2d02e64b
+
+    if {${version_release} eq ${version_rc}} {
+        conflicts-append octave-devel-release
+    }
+
+    # see http://savannah.gnu.org/bugs/?41178
+    patchfiles-append \
+        octave-clang-classdef.patch
+
+    checksums-append               \
+        ${hg.tag}${extract.suffix} \
+        rmd160  4bbcc004ffdde859b0735e602aac2d01388d0b2c \
+        sha256  2a4017a03ca80c280b5d39cf88af8954c7bfdbf1b3b40b9f09d3bd4bd1dd6040
+
+    livecheck.regex   "<a href=\"/hgweb/octave/rev/(\[a-zA-Z0-9.\]+)\">\nrelease-"
+}
+
+select.group octave
+select.file  ${filespath}/${subport}
+
+# check http://hg.savannah.gnu.org/hgweb/octave/gnulib-hg/rev for latest version
+set hg_gnu_tag      7f19e7f2afa2
+
+checksums-append \
+    ${hg_gnu_tag}${extract.suffix} \
+    rmd160  9d906212fdb4201f8592da10524606dadb3f50e3 \
+    sha256  85add8ce0c53e8868d903c28c407d864ca54bd42e8d472e09b1a1bb4b105b741
+
+master_sites        http://hg.savannah.gnu.org/hgweb/octave/archive:octave \
+                    http://hg.savannah.gnu.org/hgweb/octave/gnulib-hg/archive:gnulib \
+use_bzip2           yes
+
+distfiles           \
+    ${hg.tag}${extract.suffix}:octave \
+    ${hg_gnu_tag}${extract.suffix}:gnulib
+
+worksrcdir          octave-${hg.tag}
+
+#depends_extract-append port:git
+post-extract {
+    # command from bootstrap script file
+    #system -W ${worksrcpath} "${prefix}/bin/git clone --depth 2 git://git.sv.gnu.org/gnulib gnulib-hg"
+    move ${worksrcpath}/../gnulib-hg-${hg_gnu_tag} ${worksrcpath}/gnulib-hg
+}
+
+# allow osmesa support to at least compile
+patchfiles-append   \
+    osmesa_mac_fix.patch
+
+# see http://savannah.gnu.org/bugs/?41027
+patchfiles-append   \
+    octave-bug_41027.patch
+
+# see http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stdio.in.h?id=d6176702c3ffb6c56e6620397470e1b3bd540b10
+patchfiles-append   \
+    patch-stdio.in.h.diff
+
+pre-patch {
+    # code located in pre-patch because variants from PortGroup compilers must
+    #    be evaluated before it can be determined if clang is being used
+
+    # see http://trac.macports.org/ticket/45011
+    # see http://savannah.gnu.org/bugs/?43298
+    set libcxxbug no
+    if { ${configure.cc} eq "/usr/bin/clang" && [lindex [split ${xcodeversion} .] 0] eq 6 } {
+        set libcxxbug yes
+    } elseif { [variant_exists clang35] && [variant_isset clang35] } {
+        set libcxxbug yes
+    }
+    if { ${libcxxbug} } {
+        patchfiles-append   \
+            clang-libcxx-fix.patch
+    }
+}
+
+# need for autoconf
+depends_build-append \
+    port:autoconf    \
+    port:automake    \
+    port:libtool
+
+use_autoconf         yes
+autoconf.cmd         ./bootstrap
+autoconf.args
+
+# avoid depends_build-append port:coreutils
+configure.env-append MKDIR_P="/bin/mkdir -p"
+
+# avoid depends_build-append port:cctools
+configure.env-append RANLIB=/usr/bin/ranlib
+
+# main octave port lists as a depends_lib
+# configure.ac list it among the "[p]rograms used in Makefiles"
+depends_build-append port:gawk
+configure.awk ${prefix}/bin/gawk
+
+# in configure.ac, said to be "[p]rograms used to generate icons file formats
+depends_build-append \
+    port:icoutils    \
+    port:librsvg
+configure.env-append              \
+    ICOTOOL=${prefix}/bin/icotool \
+    RSVG_CONVERT=${prefix}/bin/rsvg-convert
+
+# main octave port lists as a depends_lib
+# configure.ac list it among the "[p]rograms used in Makefiles"
+depends_build-append port:grep
+configure.env-append  GREP=${prefix}/bin/grep
+configure.env-append EGREP=${prefix}/bin/egrep
+configure.env-append FGREP=${prefix}/bin/fgrep
+
+# configure.ac list it among the "[p]rograms used in Makefiles"
+depends_build-append port:findutils
+configure.env-append FIND=${prefix}/bin/gfind
+
+# main octave port lists as a depends_lib
+# configure.ac list it among the "[p]rograms used in Makefiles"
+depends_build-append port:gsed
+configure.env-append SED=${prefix}/bin/gsed
+
+depends_build-append port:flex
+configure.env-append LEX=${prefix}/bin/flex
+
+depends_build-append port:bison
+configure.env-append YACC="${prefix}/bin/bison -y"
+
+depends_build-append port:gperf
+configure.env-append GPERF=/usr/bin/gperf
+
+# configure.ac list it among the "[p]rograms used in Makefiles"
+depends_build-append port:perl5
+configure.perl ${prefix}/bin/perl5
+
+# avoid depends_build-append port:desktop-file-utils
+#configure.env-append DESKTOP_FILE_INSTALL=""
+configure.env-append ac_cv_prog_DESKTOP_FILE_INSTALL=""
+
+depends_build-append \
+    port:pkgconfig
+
+compilers.choose    fc f77 f90 cc cxx
+
+# for now, limit the number of variants
+# some of these compilers may work fine
+compilers.setup     \
+    require_fortran \
+    -dragonegg      \
+    -gcc49          \
+    -gcc48          \
+    -gcc46          \
+    -gcc45          \
+    -gcc44          \
+    -g95            \
+    -llvm           \
+    -gcc47          \
+    -gcc46          \
+    -gcc45          \
+    -gcc44          \
+    -clang36        \
+    -clang35        \
+    -clang34        \
+    -clang33
+
+# offscreen rendering with OpenGL via osmesa would be nice to have, but the following
+#    causes a segmentation fault:
+#    h = figure ("visible", "off"); fn = tempname (); sombrero (); __osmesa_print__ (h, fn, "svg");
+#
+# solution is ???
+#
+#depends_lib-append port:mesa
+configure.args-append       \
+    --without-OSMesa
+
+#configure.args-append --with-shell=???
+
+configure.args-append       \
+    --with-framework-opengl \
+    --with-framework-carbon \
+    --without-x             \
+    --enable-static
+
+configure.args-append       \
+    --disable-openmp
+
+configure.args-append       \
+    --disable-java          \
+    --disable-gui           \
+    --without-fltk          \
+    --disable-jit           \
+    --without-sndfile       \
+    --without-portaudio     \
+    --without-magick
+
+# in configure.ac, listed as one of "[p]rograms used when running Octave"
+depends_lib-append port:python27
+configure.python ${prefix}/bin/python2.7
+
+# in configure.ac, listed as one of "[p]rograms used when running Octave"
+depends_lib-append port:ghostscript
+configure.env-append GHOSTSCRIPT=${prefix}/bin/gs
+
+# in configure.ac, listed as one of "[p]rograms used when running Octave"
+depends_lib-append port:gnuplot
+configure.env-append GNUPLOT=${prefix}/bin/gnuplot
+
+# in configure.ac, listed as one of "[p]rograms used when running Octave"
+depends_lib-append port:less
+configure.env-append DEFAULT_PAGER=${prefix}/bin/less
+
+depends_lib-append   port:ncurses
+depends_lib-append   port:readline
+depends_lib-append   port:fontconfig
+depends_lib-append   port:pcre
+
+#--disable-docs
+depends_lib-append port:texinfo
+configure.env-append                \
+    MAKEINFO=${prefix}/bin/makeinfo \
+    TEXI2DVI=${prefix}/bin/texi2dvi \
+    TEXI2PDF=${prefix}/bin/texi2pdf
+
+#--without-amd
+#--without-camd
+#--without-colamd
+#--without-cholmod
+#--without-cxsparse
+#--without-umfpack
+depends_lib-append  port:SuiteSparse
+foreach lib {amd camd colamd cholmod cxsparse umfpack} {
+    configure.args-append \
+        --with-${lib}="-l${lib} -lsuitesparseconfig"
+}
+
+#--without-qhull
+depends_lib-append  port:qhull
+
+#--without-z
+depends_lib-append  port:zlib
+
+#--without-hdf5
+depends_lib-append  port:hdf5
+
+#--disable-fftw-threads
+#--without-fftw3
+#--without-fftw3f
+depends_lib-append  port:fftw-3
+depends_lib-append  port:fftw-3-single
+
+#--without-glpk
+depends_lib-append  port:glpk
+
+#--without-curl
+depends_lib-append  port:curl
+
+#--without-qrupdate
+depends_lib-append port:qrupdate
+
+#--without-arpack
+depends_lib-append port:arpack
+
+#--without-openssl
+depends_lib-append port:openssl
+
+# fortran arch flag is not set automatically
+if {![variant_isset universal]} {
+    if {${build_arch} eq "x86_64" || ${build_arch} eq "ppc64"} {
+        configure.fflags-append -m64
+    } else {
+        configure.fflags-append -m32
+    }
+}
+
+# see etc/README.MacOS
+depends_run-append   \
+    port:epstool     \
+    port:ghostscript \
+    port:transfig    \
+    port:pstoedit
+
+depends_run-append port:octave_select
+
+variant accelerate description {use BLAS from Apple's Accelerate.framework} conflicts atlas openblas {
+    depends_lib-append port:vecLibFort
+
+    # dependents must be built with same BLAS and LAPACK
+    #require_active_variants port:arpack      accelerate
+    #require_active_variants port:SuiteSparse accelerate
+    #require_active_variants port:qrupdate    accelerate
+
+    configure.args-append        \
+        --with-blas=-lvecLibFort \
+        --with-lapack=""
+}
+
+variant openblas description {use BLAS from MacPorts' openblas port} conflicts atlas accelerate {
+
+    depends_lib-append path:lib/libopenblas.dylib:OpenBLAS
+    # LAPACK required
+    require_active_variants path:lib/libopenblas.dylib:OpenBLAS lapack
+
+    # dependents must be built with same BLAS and LAPACK
+    #require_active_variants port:arpack      openblas
+    #require_active_variants port:SuiteSparse openblas
+    #require_active_variants port:qrupdate    openblas
+
+    # replicate default values if configure script finds openblas on its own
+    configure.args-append        \
+        --with-blas=-lopenblas   \
+        --with-lapack=""
+}
+
+variant atlas description {use BLAS from MacPorts' atlas port} conflicts accelerate openblas {
+    depends_lib-append port:atlas
+
+    # dependents must be built with same BLAS and LAPACK
+    #require_active_variants port:arpack      atlas
+    #require_active_variants port:SuiteSparse atlas
+    #require_active_variants port:qrupdate    atlas
+
+    # replicate default values if configure script finds atlas on its own
+    configure.args-append        \
+        --with-blas="-lcblas -lf77blas -latlas" \
+        --with-lapack=-llapack
+}
+
+if {![variant_isset accelerate] && ![variant_isset openblas] && ![variant_isset atlas] } {
+    default_variants-append +accelerate
+}
+
+if {![variant_isset accelerate] && ![variant_isset openblas] && ![variant_isset atlas] } {
+    ui_error "\n\nYou must select either the +accelerate, +atlas, or +openblas variant.\n"
+    return -code error "Invalid variant selection"
+}
+
+variant java description {enable Java interface} {
+    PortGroup java 1.0
+    configure.args-replace --disable-java --enable-java
+}
+default_variants-append +java
+
+variant qt4gui description {build the GUI using Qt4} {
+    PortGroup qt4 1.0
+    depends_lib-append  port:qscintilla
+    configure.args-replace --disable-gui --enable-gui
+}
+default_variants-append +qt4gui
+
+variant fltk description {enable fltk as a graphics toolkit for plotting} {
+    depends_lib-append path:lib/libfltk.dylib:fltk
+
+    # as of version 4.1.0 revision 0:
+    #    without fltk, configure script turns off "native_graphics," and
+    #       does not look for either freetype or gl2ps
+    #    it still looks for and links against fontconfig, however
+    depends_lib-append \
+        port:freetype  \
+        port:gl2ps
+
+    configure.args-replace --without-fltk --with-fltk
+}
+default_variants-append +fltk
+
+variant jit description {enable JIT compiler (EXPERIMENTAL)} {
+    # JIT requires LLVM, so select a version to use
+    set llvm_ver 3.7
+
+    # prevent multiple versions of llvm being required
+    # if clangXY compiler is requested, use llvm-X.Y
+    foreach clang ${compilers.clang_variants} {
+        if { [variant_exists ${clang}] && [variant_isset ${clang}] } {
+            set llvm_ver [string index ${clang} end-1].[string index ${clang} end]
+        }
+    }
+
+    depends_lib-append port:llvm-${llvm_ver}
+    configure.args-replace --disable-jit --enable-jit
+    configure.env-append LLVM_CONFIG=${prefix}/bin/llvm-config-mp-${llvm_ver}
+    configure.cxxflags-append -std=c++11
+}
+
+if {[variant_isset fltk] && [variant_isset qt4gui]} {
+    notes-append "unless octave is run with --no-gui-libs, graphics_toolkit(\"fltk\") will cause a crash"
+}
+
+variant sound description {enable audio support (file I/O and playback)} {
+    depends_lib-append port:libsndfile
+    depends_lib-append port:portaudio
+
+    configure.args-replace --without-sndfile   --with-sndfile
+    configure.args-replace --without-portaudio --with-portaudio
+}
+default_variants-append +sound
+
+variant app description {} {
+    depends_build-append port:ImageMagick
+
+    global appName
+    set appName Octave_${version}.app
+
+    post-build {
+        xinstall -d -p -m 0755 ${worksrcpath}/${appName}/Contents
+        xinstall -d -p -m 0755 ${worksrcpath}/${appName}/Contents/Resources
+        xinstall -d -p -m 0755 ${worksrcpath}/${appName}/Contents/MacOS
+
+        set script [open "${worksrcpath}/${appName}/Contents/MacOS/Octave" w 0755]
+        puts ${script} "#!/bin/sh"
+        puts ${script} ""
+        if { [variant_isset qt4gui] } {
+            puts ${script} "${prefix}/bin/octave-${version} --force-gui"
+        } else {
+            puts ${script} "/usr/bin/osascript -e 'tell application \"Terminal\" to do script \"${prefix}/bin/octave-${version}  --no-gui-libs; exit\"'"
+        }
+        close ${script}
+
+        #NSHumanReadableCopyright      ''
+        #LSUIElement                   1
+        set values "
+            CFBundleDevelopmentRegion     English
+            CFBundleExecutable            Octave
+            CFBundleIconFile              Octave.icns
+            CFBundleDocumentTypes         {-array \'{\"CFBundleTypeExtensions\" = (\"m\"); \"CFBundleTypeOSTypes\" = (\"Mfile\"); \"CFBundleTypeRole\" = \"Editor\";}\'}
+            CFBundleIdentifier            org.octave.Octave
+            CFBundleInfoDictionaryVersion 6.0
+            CFBundleSignature             Octave
+            CFBundleVersion               ${version}
+            CFBundleShortVersionString    ${version}
+        "
+        foreach {key value} ${values} {
+            system "/usr/bin/defaults write ${worksrcpath}/${appName}/Contents/Info ${key} ${value}"
+        }
+
+        # have Info.plist be human readable
+        system "/usr/bin/plutil -convert xml1 ${worksrcpath}/${appName}/Contents/Info.plist"
+
+        # conversion by plutil set verys limited permission
+        system "/bin/chmod 0644 ${worksrcpath}/${appName}/Contents/Info.plist"
+
+        xinstall -d -m 0755 ${worksrcpath}/Octave.iconset
+
+        # values from original SVG file
+        set svg    etc/icons/octave-logo.svg
+        set width  283.28912
+        set height 283.28833
+        set dpi    90
+
+        foreach res {16 32 128 256 512} {
+
+            set hres [expr 2*${res}]
+
+            # find new density so that converted PNG files do not look pixelated
+            set denw  [expr ${dpi}*${res}/${width}]
+            set denh  [expr ${dpi}*${res}/${height}]
+
+            set hdenw [expr 2*${denw}]
+            set hdenh [expr 2*${denh}]
+
+            system -W ${worksrcpath} "${prefix}/bin/convert -background transparent -resize ${res}x${res}   -density ${denw}x${denh}   ${svg}  Octave.iconset/icon_${res}x${res}.png"
+            system -W ${worksrcpath} "${prefix}/bin/convert -background transparent -resize ${hres}x${hres} -density ${hdenw}x${hdenh} ${svg} Octave.iconset/icon_${res}x${res}@2x.png"
+        }
+
+        system -W ${worksrcpath} "/usr/bin/iconutil -c icns -o ${appName}/Contents/Resources/Octave.icns Octave.iconset"
+    }
+
+    post-destroot {
+        copy ${worksrcpath}/${appName} ${destroot}${applications_dir}
+    }
+}
+default_variants-append +app
+
+# GraphicsMagick and octave need to be built with the same C++ standard library
+# or else undefined symbols:
+#    "Magick::Image::ping(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)"
+set magickConflict {}
+set magickDefault yes
+if {${configure.cxx_stdlib} ne "libstdc++"} {
+    foreach gccVar ${compilers.gcc_variants} {
+        if {[variant_exists ${gccVar}] } {
+            lappend magickConflict ${gccVar}
+
+            if {[variant_isset ${gccVar}] } {
+                set magickDefault no
+            }
+        }
+    }
+}
+eval "variant graphicsmagick description {use GraphicsMagick for image I/O} conflicts ${magickConflict} {
+    depends_lib-append port:GraphicsMagick
+    configure.args-replace --without-magick --with-magick=GraphicsMagick
+}"
+if {${magickDefault}} {
+    default_variants-append +graphicsmagick
+}
+
+# remove architecture flags from header file
+if { [variant_exists universal] && [variant_isset universal] } {
+    merger-post-destroot {
+        foreach arch ${universal_archs_to_use} {
+            set hfile ${destroot}-${arch}${prefix}/include/octave-${version}/octave/oct-conf.h
+            reinplace "s:-arch ${arch}::g"   ${hfile}
+            reinplace {s:-m32::g}            ${hfile}
+            reinplace {s:-m64::g}            ${hfile}
+        }
+    }
+} else {
+    post-destroot {
+        set hfile ${destroot}${prefix}/include/octave-${version}/octave/oct-conf.h
+        reinplace "s:-arch ${build_arch}::g" ${hfile}
+        reinplace {s:-m32::g}                ${hfile}
+        reinplace {s:-m64::g}                ${hfile}
+    }
+}
+
+# remove or rename conflicting files
+post-destroot {
+    foreach bin {mkoctfile octave octave-cli octave-config} {
+        # delete since just a link to versioned name
+        file delete ${destroot}${prefix}/bin/${bin}
+
+        # put version number in man file
+        move ${destroot}${prefix}/share/man/man1/${bin}.1 ${destroot}${prefix}/share/man/man1/${bin}-${version}.1
+    }
+
+    # put version nubmer in info files
+    foreach name {liboctave octave} {
+        move ${destroot}${prefix}/share/info/${name}.info  ${destroot}${prefix}/share/info/${name}-${version}.info
+    }
+    foreach suffix {1 2 3 4 5 6 7 8 9} {
+        move ${destroot}${prefix}/share/info/octave.info-${suffix}  ${destroot}${prefix}/share/info/octave-${version}.info-${suffix}
+    }
+
+    # put any startup commands in ${destroot}${prefix}/share/octave/${version}/m/startup/octaverc
+    # see https://www.gnu.org/software/octave/doc/interpreter/Startup-Files.html
+    file delete ${destroot}${prefix}/share/octave/site/m/startup/octaverc
+
+    # move appdata and icons into a versioned directory
+    xinstall -d -m 0755 ${destroot}${prefix}/share/octave/${version}/appdata
+    move \
+        ${destroot}${prefix}/share/appdata/www.octave.org-octave.appdata.xml \
+        ${destroot}${prefix}/share/octave/${version}/appdata/
+    foreach num {16 22 24 32 48 64 128 256 512} {
+        xinstall -d -m 0755 -p ${destroot}${prefix}/share/octave/${version}/icons/hicolor/${num}x${num}/apps
+        move \
+            ${destroot}${prefix}/share/icons/hicolor/${num}x${num}/apps/octave.png \
+            ${destroot}${prefix}/share/octave/${version}/icons/hicolor/${num}x${num}/apps/octave.png
+    }
+    xinstall -d -m 0755 -p ${destroot}${prefix}/share/octave/${version}/icons/hicolor/scalable/apps
+    move \
+        ${destroot}${prefix}/share/icons/hicolor/scalable/apps/octave.svg \
+        ${destroot}${prefix}/share/octave/${version}/icons/hicolor/scalable/apps/octave.svg
+}
+
+test.run    yes
+test.target check
+
+livecheck.type    regexm
+livecheck.url     http://hg.savannah.gnu.org/hgweb/octave/tags
+livecheck.version ${hg.tag}

Added: trunk/dports/math/octave-devel/files/clang-libcxx-fix.patch
===================================================================
--- trunk/dports/math/octave-devel/files/clang-libcxx-fix.patch	                        (rev 0)
+++ trunk/dports/math/octave-devel/files/clang-libcxx-fix.patch	2016-01-03 07:40:58 UTC (rev 144150)
@@ -0,0 +1,105 @@
+# HG changeset patch
+# User Kefu Chai <tchaikov at gmail.com>
+# Date 1413043255 -28800
+#      Sun Oct 12 00:00:55 2014 +0800
+# Node ID 1433cd4f7b7bda0b0e0a04f990b55ffc3cbaf701
+# Parent  91a6f06c505220d269de3a0dab8cc898d03d91a0
+fix the build error on clang 3.5 and libc++ (bug #43298)
+
+* liboctave/operators/mx-inlines.cc:
+use the workaround if libc++ with this issue is detected.
+
+* liboctave/operators/libcxx-fix.cc:
+add a workaround for http://llvm.org/bugs/show_bug.cgi?id=21083, so that only
+the arithmetic types are accepted for the function template "libcxx_fix::pow()".
+
+diff -r 91a6f06c5052 -r 1433cd4f7b7b liboctave/operators/libcxx-fix.h
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ liboctave/operators/libcxx-fix.h	Sun Oct 12 00:00:55 2014 +0800
+@@ -0,0 +1,69 @@
++#ifndef _LIBCPP_VERSION
++#error "for libc++ only"
++#endif
++
++namespace libcxx_fix {
++
++using std::is_integral;
++using std::is_same;
++using std::enable_if;
++
++template <class _Tp, class _Tn = void>
++struct numeric_type
++{
++    typedef void type;
++    static const bool value = false;
++};
++
++template <class _Tp>
++struct numeric_type<_Tp, typename enable_if<is_integral<_Tp>::value ||
++                                            is_same<_Tp, double>::value>::type>
++{
++    typedef double type;
++    static const bool value = true;
++};
++
++template <class _Tp>
++struct numeric_type<_Tp, typename enable_if<is_same<_Tp, long double>::value ||
++                                            is_same<_Tp, float>::value>::type>
++{
++    typedef _Tp type;
++    static const bool value = true;
++};
++
++template <>
++struct numeric_type<void, void>
++{
++    static const bool value = true;
++};
++
++template <class _A1, class _A2,
++          bool = numeric_type<_A1>::value &&
++                 numeric_type<_A2>::value>
++class promote
++{};
++
++template <class _A1, class _A2>
++class promote<_A1, _A2, true>
++{
++private:
++    typedef typename numeric_type<_A1>::type __type1;
++    typedef typename numeric_type<_A2>::type __type2;
++public:
++    typedef decltype(__type1() + __type2()) type;
++};
++
++template <class _A1, class _A2>
++inline _LIBCPP_INLINE_VISIBILITY
++typename promote<_A1, _A2>::type
++pow(_A1 __x, _A2 __y) _NOEXCEPT
++{
++    typedef typename promote<_A1, _A2>::type __result_type;
++#if _LIBCPP_STD_VER > 11
++    static_assert((!(is_same<_A1, __result_type>::value &&
++                     is_same<_A2, __result_type>::value)), "");
++#endif
++    return ::pow(static_cast<__result_type>(__x), static_cast<__result_type>(__y));
++}
++
++}
+diff -r 91a6f06c5052 -r 1433cd4f7b7b liboctave/operators/mx-inlines.cc
+--- a/liboctave/operators/mx-inlines.cc	Thu Oct 09 20:38:04 2014 -0700
++++ liboctave/operators/mx-inlines.cc	Sun Oct 12 00:00:55 2014 +0800
+@@ -307,7 +307,13 @@
+ 
+ // Let the compiler decide which pow to use, whichever best matches the
+ // arguments provided.
++#if defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION >= 1101)
++// Workaround http://llvm.org/bugs/show_bug.cgi?id=21083
++#include "libcxx-fix.h"
++using libcxx_fix::pow;
++#else
+ using std::pow;
++#endif
+ DEFMXMAPPER2X (mx_inline_pow, pow)
+ 
+ // Arbitrary function appliers. The function is a template parameter to enable

Added: trunk/dports/math/octave-devel/files/octave-bug_41027.patch
===================================================================
--- trunk/dports/math/octave-devel/files/octave-bug_41027.patch	                        (rev 0)
+++ trunk/dports/math/octave-devel/files/octave-bug_41027.patch	2016-01-03 07:40:58 UTC (rev 144150)
@@ -0,0 +1,24 @@
+diff -r 900b524d9072 libinterp/corefcn/comment-list.h
+--- a/libinterp/corefcn/comment-list.h	Sat Apr 19 09:28:20 2014 -0700
++++ libinterp/corefcn/comment-list.h	Sun May 18 18:09:05 2014 +0200
+@@ -25,7 +25,7 @@
+ 
+ #include <string>
+ 
+-#include <base-list.h>
++#include "base-list.h"
+ 
+ extern std::string get_comment_text (void);
+ 
+diff -r 900b524d9072 libinterp/corefcn/oct.h
+--- a/libinterp/corefcn/oct.h	Sat Apr 19 09:28:20 2014 -0700
++++ libinterp/corefcn/oct.h	Sun May 18 18:09:05 2014 +0200
+@@ -28,7 +28,7 @@
+ // config.h needs to be first because it includes #defines that can */
+ // affect other header files.
+ 
+-#include <config.h>
++#include "config.h"
+ 
+ #include "Matrix.h"
+ 

Added: trunk/dports/math/octave-devel/files/octave-clang-classdef.patch
===================================================================
--- trunk/dports/math/octave-devel/files/octave-clang-classdef.patch	                        (rev 0)
+++ trunk/dports/math/octave-devel/files/octave-clang-classdef.patch	2016-01-03 07:40:58 UTC (rev 144150)
@@ -0,0 +1,40 @@
+# HG changeset patch
+# User akira noda <you.akira.noda at gmail.com>
+# Date 1440176752 14400
+#      Fri Aug 21 13:05:52 2015 -0400
+# Node ID 03a20edfe1c7f147e7adcface83025351b8f31c9
+# Parent  0fe7133da8ceb02744b3288841927f586b9a514c
+Fix compilation of classdef with the clang compiler (bug #41178)
+
+* ov-classdef.cc, ov-classdef.h (cdef_object_scalar::mark_as_constructed):
+Move function definition out of header file to avoid dependency on incomplete
+type, compilation error with clang.
+
+diff --git a/libinterp/octave-value/ov-classdef.cc b/libinterp/octave-value/ov-classdef.cc
+--- a/libinterp/octave-value/ov-classdef.cc
++++ libinterp/octave-value/ov-classdef.cc
+@@ -1946,6 +1946,12 @@ cdef_object_scalar::is_partially_constru
+   return true;
+ }
+ 
++void
++cdef_object_scalar::mark_as_constructed (const cdef_class& cls)
++{
++  ctor_list.erase (cls);
++}
++
+ handle_cdef_object::~handle_cdef_object (void)
+ {
+ #if DEBUG_TRACE
+diff --git a/libinterp/octave-value/ov-classdef.h b/libinterp/octave-value/ov-classdef.h
+--- a/libinterp/octave-value/ov-classdef.h
++++ libinterp/octave-value/ov-classdef.h
+@@ -438,7 +438,7 @@ public:
+ 
+   void mark_as_constructed (void) { ctor_list.clear (); }
+ 
+-  void mark_as_constructed (const cdef_class& cls) { ctor_list.erase (cls); }
++  void mark_as_constructed (const cdef_class& cls);
+ 
+   bool is_constructed (void) const { return ctor_list.empty (); }
+ 

Added: trunk/dports/math/octave-devel/files/octave-devel
===================================================================
--- trunk/dports/math/octave-devel/files/octave-devel	                        (rev 0)
+++ trunk/dports/math/octave-devel/files/octave-devel	2016-01-03 07:40:58 UTC (rev 144150)
@@ -0,0 +1,30 @@
+bin/mkoctfile-4.1.0+
+bin/octave-4.1.0+
+bin/octave-cli-4.1.0+
+bin/octave-config-4.1.0+
+share/man/man1/mkoctfile-4.1.0+.1.gz
+share/man/man1/octave-cli-4.1.0+.1.gz
+share/man/man1/octave-config-4.1.0+.1.gz
+share/man/man1/octave-4.1.0+.1.gz
+share/info/liboctave-4.1.0+.info
+share/info/octave-4.1.0+.info
+share/info/octave-4.1.0+.info-1
+share/info/octave-4.1.0+.info-2
+share/info/octave-4.1.0+.info-3
+share/info/octave-4.1.0+.info-4
+share/info/octave-4.1.0+.info-5
+share/info/octave-4.1.0+.info-6
+share/info/octave-4.1.0+.info-7
+share/info/octave-4.1.0+.info-8
+share/info/octave-4.1.0+.info-9
+share/octave/4.1.0+/appdata/www.octave.org-octave.appdata.xml
+share/octave/4.1.0+/icons/hicolor/16x16/apps/octave.png
+share/octave/4.1.0+/icons/hicolor/22x22/apps/octave.png
+share/octave/4.1.0+/icons/hicolor/24x24/apps/octave.png
+share/octave/4.1.0+/icons/hicolor/32x32/apps/octave.png
+share/octave/4.1.0+/icons/hicolor/48x48/apps/octave.png
+share/octave/4.1.0+/icons/hicolor/64x64/apps/octave.png
+share/octave/4.1.0+/icons/hicolor/128x128/apps/octave.png
+share/octave/4.1.0+/icons/hicolor/256x256/apps/octave.png
+share/octave/4.1.0+/icons/hicolor/512x512/apps/octave.png
+share/octave/4.1.0+/icons/hicolor/scalable/apps/octave.svg

Added: trunk/dports/math/octave-devel/files/octave-devel-rc
===================================================================
--- trunk/dports/math/octave-devel/files/octave-devel-rc	                        (rev 0)
+++ trunk/dports/math/octave-devel/files/octave-devel-rc	2016-01-03 07:40:58 UTC (rev 144150)
@@ -0,0 +1,30 @@
+bin/mkoctfile-4.0.1
+bin/octave-4.0.1
+bin/octave-cli-4.0.1
+bin/octave-config-4.0.1
+share/man/man1/mkoctfile-4.0.1.1.gz
+share/man/man1/octave-cli-4.0.1.1.gz
+share/man/man1/octave-config-4.0.1.1.gz
+share/man/man1/octave-4.0.1.1.gz
+share/info/liboctave-4.0.1.info
+share/info/octave-4.0.1.info
+share/info/octave-4.0.1.info-1
+share/info/octave-4.0.1.info-2
+share/info/octave-4.0.1.info-3
+share/info/octave-4.0.1.info-4
+share/info/octave-4.0.1.info-5
+share/info/octave-4.0.1.info-6
+share/info/octave-4.0.1.info-7
+share/info/octave-4.0.1.info-8
+share/info/octave-4.0.1.info-9
+share/octave/4.0.1/appdata/www.octave.org-octave.appdata.xml
+share/octave/4.0.1/icons/hicolor/16x16/apps/octave.png
+share/octave/4.0.1/icons/hicolor/22x22/apps/octave.png
+share/octave/4.0.1/icons/hicolor/24x24/apps/octave.png
+share/octave/4.0.1/icons/hicolor/32x32/apps/octave.png
+share/octave/4.0.1/icons/hicolor/48x48/apps/octave.png
+share/octave/4.0.1/icons/hicolor/64x64/apps/octave.png
+share/octave/4.0.1/icons/hicolor/128x128/apps/octave.png
+share/octave/4.0.1/icons/hicolor/256x256/apps/octave.png
+share/octave/4.0.1/icons/hicolor/512x512/apps/octave.png
+share/octave/4.0.1/icons/hicolor/scalable/apps/octave.svg

Added: trunk/dports/math/octave-devel/files/octave-devel-release
===================================================================
--- trunk/dports/math/octave-devel/files/octave-devel-release	                        (rev 0)
+++ trunk/dports/math/octave-devel/files/octave-devel-release	2016-01-03 07:40:58 UTC (rev 144150)
@@ -0,0 +1,30 @@
+bin/mkoctfile-4.0.0
+bin/octave-4.0.0
+bin/octave-cli-4.0.0
+bin/octave-config-4.0.0
+share/man/man1/mkoctfile-4.0.0.1.gz
+share/man/man1/octave-cli-4.0.0.1.gz
+share/man/man1/octave-config-4.0.0.1.gz
+share/man/man1/octave-4.0.0.1.gz
+share/info/liboctave-4.0.0.info
+share/info/octave-4.0.0.info
+share/info/octave-4.0.0.info-1
+share/info/octave-4.0.0.info-2
+share/info/octave-4.0.0.info-3
+share/info/octave-4.0.0.info-4
+share/info/octave-4.0.0.info-5
+share/info/octave-4.0.0.info-6
+share/info/octave-4.0.0.info-7
+share/info/octave-4.0.0.info-8
+share/info/octave-4.0.0.info-9
+share/octave/4.0.0/appdata/www.octave.org-octave.appdata.xml
+share/octave/4.0.0/icons/hicolor/16x16/apps/octave.png
+share/octave/4.0.0/icons/hicolor/22x22/apps/octave.png
+share/octave/4.0.0/icons/hicolor/24x24/apps/octave.png
+share/octave/4.0.0/icons/hicolor/32x32/apps/octave.png
+share/octave/4.0.0/icons/hicolor/48x48/apps/octave.png
+share/octave/4.0.0/icons/hicolor/64x64/apps/octave.png
+share/octave/4.0.0/icons/hicolor/128x128/apps/octave.png
+share/octave/4.0.0/icons/hicolor/256x256/apps/octave.png
+share/octave/4.0.0/icons/hicolor/512x512/apps/octave.png
+share/octave/4.0.0/icons/hicolor/scalable/apps/octave.svg

Added: trunk/dports/math/octave-devel/files/osmesa_mac_fix.patch
===================================================================
--- trunk/dports/math/octave-devel/files/osmesa_mac_fix.patch	                        (rev 0)
+++ trunk/dports/math/octave-devel/files/osmesa_mac_fix.patch	2016-01-03 07:40:58 UTC (rev 144150)
@@ -0,0 +1,29 @@
+diff -Naur a/libinterp/dldfcn/__osmesa_print__.cc b/libinterp/dldfcn/__osmesa_print__.cc
+--- libinterp/dldfcn/__osmesa_print__.cc	2015-05-23 16:21:53.000000000 +0200
++++ libinterp/dldfcn/__osmesa_print__.cc	2015-10-05 21:08:50.000000000 +0200
+@@ -27,6 +27,12 @@
+ #include <config.h>
+ #endif
+ 
++#if defined (HAVE_OSMESA_H)
++#include "osmesa.h"
++#elif defined (HAVE_GL_OSMESA_H)
++#include "GL/osmesa.h"
++#endif
++
+ #include "oct-locbuf.h"
+ #include "unwind-prot.h"
+ 
+@@ -36,12 +42,6 @@
+ #include "graphics.h"
+ #include "gripes.h"
+ 
+-#if defined (HAVE_OSMESA_H)
+-#include "osmesa.h"
+-#elif defined (HAVE_GL_OSMESA_H)
+-#include "GL/osmesa.h"
+-#endif
+-
+ #if defined (HAVE_OSMESA) && defined (HAVE_OPENGL)
+ static void
+ close_fcn (FILE *f)

Added: trunk/dports/math/octave-devel/files/patch-stdio.in.h.diff
===================================================================
--- trunk/dports/math/octave-devel/files/patch-stdio.in.h.diff	                        (rev 0)
+++ trunk/dports/math/octave-devel/files/patch-stdio.in.h.diff	2016-01-03 07:40:58 UTC (rev 144150)
@@ -0,0 +1,53 @@
+From d6176702c3ffb6c56e6620397470e1b3bd540b10 Mon Sep 17 00:00:00 2001
+From: Jonathan Perkin <jperkin at joyent.com>
+Date: Thu, 04 Jun 2015 11:10:34 +0000
+Subject: stdio: Don't redefine gets when using C++
+
+We've hit this failure a few times in pkgsrc with packages which embed gnulib,
+an example being the latest gnutls:
+
+  ../../src/gl/stdio.h:1034:1: error: 'char* gets(char*)' conflicts with a previous declaration
+   _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+   ^
+
+  /opt/tools/gcc49/lib/gcc/x86_64-sun-solaris2.11/4.9.2/include-fixed/iso/stdio_iso.h:259:14: note: previous declaration 'char* std::gets(char*)'
+   extern char *gets(char *);
+                ^
+
+Full build log is here:
+
+  http://us-east.manta.joyent.com/pkgsrc/public/reports/upstream-trunk32/20150602.2233/gnutls-3.3.15/build.log
+
+We've fixed it a few different ways over time:
+
+  https://github.com/joyent/pkgsrc/blob/joyent/release/2015Q1/devel/m4/patches/patch-lib_stdio.in.h
+  https://github.com/joyent/pkgsrc/blob/joyent/release/2015Q1/math/octave/patches/patch-libgnu_stdio.in.h
+  https://github.com/joyent/pkgsrc/blob/joyent/release/2015Q1/security/gnutls/patches/patch-gl_stdio.in.h
+
+but the cleanest fix appears to be the last, so I am proposing it here for
+inclusion upstream.
+
+Message-Id: <20150604111034.GG66573 at joyent.com>
+Signed-off-by: Eric Blake <eblake at redhat.com>
+---
+(limited to 'lib/stdio.in.h')
+
+diff --git a/lib/stdio.in.h b/lib/stdio.in.h
+index fa6b595..476dee1 100644
+--- a/lib/stdio.in.h
++++ gnulib-hg/lib/stdio.in.h
+@@ -723,11 +723,10 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
+    so any use of gets warrants an unconditional warning; besides, C11
+    removed it.  */
+ #undef gets
+-#if HAVE_RAW_DECL_GETS
++#if HAVE_RAW_DECL_GETS && !defined __cplusplus
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+ 
+-
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
+ struct obstack;
+ /* Grow an obstack with formatted output.  Return the number of
+--
+cgit v0.9.0.2

Added: trunk/dports/sysutils/octave_select/Portfile
===================================================================
--- trunk/dports/sysutils/octave_select/Portfile	                        (rev 0)
+++ trunk/dports/sysutils/octave_select/Portfile	2016-01-03 07:40:58 UTC (rev 144150)
@@ -0,0 +1,46 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           select 1.0
+
+name                octave_select
+version             1.0
+
+categories          sysutils math
+platforms           darwin
+maintainers         mcalhoun openmaintainer
+license             BSD
+supported_archs     noarch
+
+description         common files for selecting default octave version
+long_description    octave_select installs files that allow 'port select' to \
+                    switch between octave versions
+
+homepage            http://www.gnu.org/software/octave
+distfiles
+
+destroot.keepdirs-append                \
+    ${destroot}${prefix}/bin            \
+    ${destroot}${prefix}/share/man/man1 \
+    ${destroot}${prefix}/share/info/    \
+    ${destroot}${prefix}/share/appdata
+
+foreach sz {16 22 24 32 48 64 128 256 512} {
+    destroot.keepdirs-append \
+        ${destroot}${prefix}/share/icons/hicolor/${sz}x${sz}/apps
+}
+
+destroot.keepdirs-append \
+    ${destroot}${prefix}/share/icons/hicolor/scalable/apps
+
+use_configure       no
+
+build               {}
+
+destroot {
+    select::install octave ${filespath}/base
+    select::install octave ${filespath}/none
+}
+
+livecheck.type      none


Property changes on: trunk/dports/sysutils/octave_select/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/sysutils/octave_select/files/base
===================================================================
--- trunk/dports/sysutils/octave_select/files/base	                        (rev 0)
+++ trunk/dports/sysutils/octave_select/files/base	2016-01-03 07:40:58 UTC (rev 144150)
@@ -0,0 +1,30 @@
+bin/mkoctfile
+bin/octave
+bin/octave-cli
+bin/octave-config
+share/man/man1/mkoctfile.1.gz
+share/man/man1/octave-cli.1.gz
+share/man/man1/octave-config.1.gz
+share/man/man1/octave.1.gz
+share/info/liboctave.info
+share/info/octave.info
+share/info/octave.info-1
+share/info/octave.info-2
+share/info/octave.info-3
+share/info/octave.info-4
+share/info/octave.info-5
+share/info/octave.info-6
+share/info/octave.info-7
+share/info/octave.info-8
+share/info/octave.info-9
+share/appdata/www.octave.org-octave.appdata.xml
+share/icons/hicolor/16x16/apps/octave.png
+share/icons/hicolor/22x22/apps/octave.png
+share/icons/hicolor/24x24/apps/octave.png
+share/icons/hicolor/32x32/apps/octave.png
+share/icons/hicolor/48x48/apps/octave.png
+share/icons/hicolor/64x64/apps/octave.png
+share/icons/hicolor/128x128/apps/octave.png
+share/icons/hicolor/256x256/apps/octave.png
+share/icons/hicolor/512x512/apps/octave.png
+share/icons/hicolor/scalable/apps/octave.svg

Added: trunk/dports/sysutils/octave_select/files/none
===================================================================
--- trunk/dports/sysutils/octave_select/files/none	                        (rev 0)
+++ trunk/dports/sysutils/octave_select/files/none	2016-01-03 07:40:58 UTC (rev 144150)
@@ -0,0 +1,30 @@
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160102/280f6a0f/attachment-0001.html>


More information about the macports-changes mailing list