summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-mathematics/octave/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-mathematics/octave/files')
-rw-r--r--sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch44
-rw-r--r--sci-mathematics/octave/files/octave-3.4.3-texi.patch11
-rw-r--r--sci-mathematics/octave/files/octave-3.6.3-legendtext.patch13
-rw-r--r--sci-mathematics/octave/files/octave-3.6.4-gcc-4.8.patch34
-rw-r--r--sci-mathematics/octave/files/octave-3.6.4-texinfo.patch378
-rw-r--r--sci-mathematics/octave/files/octave-3.8.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch11
-rw-r--r--sci-mathematics/octave/files/octave-3.8.0-fix-compile.patch11
-rw-r--r--sci-mathematics/octave/files/octave-3.8.0-imagemagick-configure.patch16
-rw-r--r--sci-mathematics/octave/files/octave-3.8.0-llvm-3.4.patch63
-rw-r--r--sci-mathematics/octave/files/octave-3.8.0-llvm-configure.patch12
-rw-r--r--sci-mathematics/octave/files/octave-3.8.0-pkgbuilddir.patch40
-rw-r--r--sci-mathematics/octave/files/octave-3.8.1-imagemagick.patch138
-rw-r--r--sci-mathematics/octave/files/octave-3.8.1-pkgbuilddir.patch41
-rw-r--r--sci-mathematics/octave/files/octave-4.0.0-imagemagick-configure.patch16
-rw-r--r--sci-mathematics/octave/files/octave-4.0.0-imagemagick.patch139
-rw-r--r--sci-mathematics/octave/files/octave-4.0.0-llvm-3.5-gnulib-hg.patch19
-rw-r--r--sci-mathematics/octave/files/octave-4.0.0-llvm-3.5.patch130
17 files changed, 1116 insertions, 0 deletions
diff --git a/sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch b/sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch
new file mode 100644
index 000000000000..5340c9a19b92
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch
@@ -0,0 +1,44 @@
+Description: Allow installation of already extracted packages with pkg.m
+Forwarded: not-needed
+Author: Thomas Weber <tweber@debian.org>
+--- scripts/pkg/pkg.m.orig 2011-02-08 03:00:51.000000000 -0700
++++ scripts/pkg/pkg.m 2011-03-18 09:31:24.670165643 -0600
+@@ -644,7 +644,14 @@
+ for i = 1:length (files)
+ tgz = files{i};
+
+- if (exist (tgz, "file"))
++ ## The filename pointed to an uncompressed package to begin with.
++ if (exist (tgz, "dir"))
++ if (tgz(1) == '/')
++ packdir = tgz;
++ else
++ packdir = fullfile (pwd(), tgz);
++ endif
++ elseif (exist (tgz, "file"))
+ ## Create a temporary directory.
+ tmpdir = tmpnam ();
+ tmpdirs{end+1} = tmpdir;
+@@ -671,20 +678,12 @@
+ if (length (dirlist) > 3)
+ error ("bundles of packages are not allowed");
+ endif
+- endif
+
+- ## The filename pointed to an uncompressed package to begin with.
+- if (exist (tgz, "dir"))
+- dirlist = {".", "..", tgz};
++ ## The two first entries of dirlist are "." and "..".
++ packdir = fullfile (tmpdir, dirlist{3});
+ endif
+
+ if (exist (tgz, "file") || exist (tgz, "dir"))
+- ## The two first entries of dirlist are "." and "..".
+- if (exist (tgz, "file"))
+- packdir = fullfile (tmpdir, dirlist{3});
+- else
+- packdir = fullfile (pwd(), dirlist{3});
+- endif
+ packdirs{end+1} = packdir;
+
+ ## Make sure the package contains necessary files.
diff --git a/sci-mathematics/octave/files/octave-3.4.3-texi.patch b/sci-mathematics/octave/files/octave-3.4.3-texi.patch
new file mode 100644
index 000000000000..661ddae4198a
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.4.3-texi.patch
@@ -0,0 +1,11 @@
+--- doc/interpreter/Makefile.am.orig 2012-01-31 17:47:52.000000000 +0000
++++ doc/interpreter/Makefile.am 2012-01-31 17:49:37.000000000 +0000
+@@ -202,6 +202,8 @@
+ $(AWK) -f $(srcdir)/mkcontrib.awk $(srcdir)/contributors.in > $@-t
+ mv $@-t $@
+
++preface.texi: contributors.texi
++
+ ../../AUTHORS: preface.texi contributors.texi
+ rm -f AUTHORS
+ -$(MAKEINFO) -D AUTHORSONLY \
diff --git a/sci-mathematics/octave/files/octave-3.6.3-legendtext.patch b/sci-mathematics/octave/files/octave-3.6.3-legendtext.patch
new file mode 100644
index 000000000000..046c721fdb22
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.6.3-legendtext.patch
@@ -0,0 +1,13 @@
+should be fixed in octave-3.8 and above
+
+--- src/gl2ps-renderer.cc.orig 2012-05-31 03:43:29.000000000 +0200
++++ src/gl2ps-renderer.cc 2012-10-10 18:41:10.526639551 +0200
+@@ -223,7 +223,7 @@
+
+ // FIXME: handle margin and surrounding box
+
+- glRasterPos3d (pos(0), pos(1), pos(2));
++ glRasterPos3d (pos(0), pos(1), pos.numel() > 2 ? pos(2) : 0.0);
+
+ octave_value string_prop = props.get_string ();
+
diff --git a/sci-mathematics/octave/files/octave-3.6.4-gcc-4.8.patch b/sci-mathematics/octave/files/octave-3.6.4-gcc-4.8.patch
new file mode 100644
index 000000000000..1e13ebce38e2
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.6.4-gcc-4.8.patch
@@ -0,0 +1,34 @@
+Description: Fix compilation of C++ MEX files with GCC 4.8
+ The header mex.h was including mexproto.h within an extern "C" block. In turn,
+ mexproto.h includes cstdlib.
+ .
+ Apparently, including cstdlib within an extern "C" block was working with GCC
+ 4.7, but this is no longer the case with GCC 4.8.
+ .
+ The fix consists in including mexproto.h outside of the extern "C" block.
+Author: Sébastien Villemot <sebastien@debian.org>
+Bug: https://savannah.gnu.org/bugs/index.php?38746
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705485
+Last-Update: 2013-05-29
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/mex.h
++++ b/src/mex.h
+@@ -64,6 +64,8 @@
+
+ #define mxMAXNAME 64
+
++#include "mexproto.h"
++
+ #if defined (__cplusplus)
+ extern "C" {
+ #endif
+@@ -74,8 +76,6 @@
+ void mexFunction (int nlhs, mxArray* plhs[], int nrhs, const mxArray *prhs[]);
+ #endif
+
+-#include "mexproto.h"
+-
+ /* V4 floating point routines renamed in V5. */
+ #define mexIsNaN mxIsNaN
+ #define mexIsFinite mxIsFinite
diff --git a/sci-mathematics/octave/files/octave-3.6.4-texinfo.patch b/sci-mathematics/octave/files/octave-3.6.4-texinfo.patch
new file mode 100644
index 000000000000..67f876f7bc42
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.6.4-texinfo.patch
@@ -0,0 +1,378 @@
+diff -Nur octave-3.6.4.orig/doc/interpreter/audio.texi octave-3.6.4/doc/interpreter/audio.texi
+--- octave-3.6.4.orig/doc/interpreter/audio.texi 2013-02-21 12:37:50.000000000 -0800
++++ octave-3.6.4/doc/interpreter/audio.texi 2013-06-19 08:52:43.259790240 -0700
+@@ -146,18 +146,18 @@
+ Load the RIFF/WAVE sound file @var{filename}, and return the samples
+ in vector @var{y}. If the file contains multichannel data, then
+ @var{y} is a matrix with the channels represented as columns.
+-
+-@deftypefnx {Function File} {[@var{y}, @var{Fs}, @var{bps}] =} wavread (@var{filename})
++@end deftypefn
++@deftypefn {Function File} {[@var{y}, @var{Fs}, @var{bps}] =} wavread (@var{filename})
+ Additionally return the sample rate (@var{fs}) in Hz and the number of bits
+ per sample (@var{bps}).
+-
+-@deftypefnx {Function File} {[@dots{}] =} wavread (@var{filename}, @var{n})
++@end deftypefn
++@deftypefn {Function File} {[@dots{}] =} wavread (@var{filename}, @var{n})
+ Read only the first @var{n} samples from each channel.
+-
+-@deftypefnx {Function File} {[@dots{}] =} wavread (@var{filename}, @var{n1} @var{n2})
++@end deftypefn
++@deftypefn {Function File} {[@dots{}] =} wavread (@var{filename}, @var{n1} @var{n2})
+ Read only samples @var{n1} through @var{n2} from each channel.
+-
+-@deftypefnx {Function File} {[@var{samples}, @var{channels}] =} wavread (@var{filename}, "size")
++@end deftypefn
++@deftypefn {Function File} {[@var{samples}, @var{channels}] =} wavread (@var{filename}, "size")
+ Return the number of samples (@var{n}) and channels (@var{ch})
+ instead of the audio data.
+ @seealso{@ref{doc-wavwrite,,wavwrite}}
+diff -Nur octave-3.6.4.orig/doc/interpreter/io.texi octave-3.6.4/doc/interpreter/io.texi
+--- octave-3.6.4.orig/doc/interpreter/io.texi 2013-02-21 12:37:51.000000000 -0800
++++ octave-3.6.4/doc/interpreter/io.texi 2013-06-19 08:52:43.259790240 -0700
+@@ -1391,22 +1391,22 @@
+ for the file. Valid values for @var{arch} are:
+
+ @table @asis
+-@samp{native}
++@item @samp{native}
+ The format of the current machine (this is the default).
+
+-@samp{ieee-be}
++@item @samp{ieee-be}
+ IEEE big endian format.
+
+-@samp{ieee-le}
++@item @samp{ieee-le}
+ IEEE little endian format.
+
+-@samp{vaxd}
++@item @samp{vaxd}
+ VAX D floating format.
+
+-@samp{vaxg}
++@item @samp{vaxg}
+ VAX G floating format.
+
+-@samp{cray}
++@item @samp{cray}
+ Cray floating format.
+ @end table
+
+diff -Nur octave-3.6.4.orig/doc/interpreter/octave.texi octave-3.6.4/doc/interpreter/octave.texi
+--- octave-3.6.4.orig/doc/interpreter/octave.texi 2013-02-21 12:19:23.000000000 -0800
++++ octave-3.6.4/doc/interpreter/octave.texi 2013-06-19 08:52:43.259790240 -0700
+@@ -129,7 +129,9 @@
+ @sp 2
+ @multitable @columnfractions 0.4 0.025 0.65
+ @item
+-@flushright @image{octave_logo,2.1in} @end flushright
++@flushright
++@image{octave_logo,2.1in}
++@end flushright
+ @tab
+ @c this is a spacer column
+ @tab
+diff -Nur octave-3.6.4.orig/doc/interpreter/plot.texi octave-3.6.4/doc/interpreter/plot.texi
+--- octave-3.6.4.orig/doc/interpreter/plot.texi 2013-02-21 12:37:52.000000000 -0800
++++ octave-3.6.4/doc/interpreter/plot.texi 2013-06-19 08:52:43.260790204 -0700
+@@ -2707,21 +2707,20 @@
+ Set the data aspect ratio of the current axes. The aspect ratio is
+ a normalized 3-element vector representing the span of the x, y, and
+ z-axes limits.
+-
+-@deftypefnx {Function File} {@var{data_aspect_ratio} =} daspect ( )
++@end deftypefn
++@deftypefn {Function File} {@var{data_aspect_ratio} =} daspect ( )
+ Return the data aspect ratio of the current axes.
+-
+-@deftypefnx {Function File} {} daspect (@var{mode})
++@end deftypefn
++@deftypefn {Function File} {} daspect (@var{mode})
+ Set the data aspect ratio mode of the current axes.
+-
+-@deftypefnx {Function File} {@var{data_aspect_ratio_mode} =} daspect ("mode")
++@end deftypefn
++@deftypefn {Function File} {@var{data_aspect_ratio_mode} =} daspect ("mode")
+ Return the data aspect ratio mode of the current axes.
+-
+-@deftypefnx {Function File} {} daspect (@var{hax}, @dots{})
++@end deftypefn
++@deftypefn {Function File} {} daspect (@var{hax}, @dots{})
+ Use the axes, with handle @var{hax}, instead of the current axes.
+-
+-@seealso{@ref{doc-axis,,axis}, @ref{doc-pbaspect,,pbaspect}, @ref{doc-xlim,,xlim}, @ref{doc-ylim,,ylim}, @ref{doc-zlim,,zlim}}
+ @end deftypefn
++@seealso{@ref{doc-axis,,axis}, @ref{doc-pbaspect,,pbaspect}, @ref{doc-xlim,,xlim}, @ref{doc-ylim,,ylim}, @ref{doc-zlim,,zlim}}
+
+
+ @c pbaspect scripts/plot/pbaspect.m
+@@ -2730,21 +2729,20 @@
+ Set the plot box aspect ratio of the current axes. The aspect ratio
+ is a normalized 3-element vector representing the rendered lengths of
+ the x, y, and z-axes.
+-
+-@deftypefnx {Function File} {@var{plot_box_aspect_ratio} =} pbaspect ( )
++@end deftypefn
++@deftypefn {Function File} {@var{plot_box_aspect_ratio} =} pbaspect ( )
+ Return the plot box aspect ratio of the current axes.
+-
+-@deftypefnx {Function File} {} pbaspect (@var{mode})
++@end deftypefn
++@deftypefn {Function File} {} pbaspect (@var{mode})
+ Set the plot box aspect ratio mode of the current axes.
+-
+-@deftypefnx {Function File} {@var{plot_box_aspect_ratio_mode} =} pbaspect ("mode")
++@end deftypefn
++@deftypefn {Function File} {@var{plot_box_aspect_ratio_mode} =} pbaspect ("mode")
+ Return the plot box aspect ratio mode of the current axes.
+-
+-@deftypefnx {Function File} {} pbaspect (@var{hax}, @dots{})
++@end deftypefn
++@deftypefn {Function File} {} pbaspect (@var{hax}, @dots{})
+ Use the axes, with handle @var{hax}, instead of the current axes.
+-
+-@seealso{@ref{doc-axis,,axis}, @ref{doc-daspect,,daspect}, @ref{doc-xlim,,xlim}, @ref{doc-ylim,,ylim}, @ref{doc-zlim,,zlim}}
+ @end deftypefn
++@seealso{@ref{doc-axis,,axis}, @ref{doc-daspect,,daspect}, @ref{doc-xlim,,xlim}, @ref{doc-ylim,,ylim}, @ref{doc-zlim,,zlim}}
+
+
+ @node Three-dimensional Function Plotting
+@@ -3147,7 +3145,7 @@
+ @item "hide"
+ Hide legend on the plot
+
+-@itemx "toggle"
++@item "toggle"
+ Toggles between "hide" and "show"
+
+ @item "boxon"
+@@ -3162,7 +3160,7 @@
+ @item "right"
+ Place text to the right of the keys
+
+-@itemx "off"
++@item "off"
+ Delete the legend object
+ @end table
+ @end deftypefn
+@@ -4139,11 +4137,11 @@
+ is sent to a file the size is determined by the plot box defined by
+ the figure's "paperposition" property.
+
+-@itemx -append
++@item -append
+ Appends the PS, or PDF output to a pre-existing file of the
+ same type.
+
+-@itemx -r@var{NUM}
++@item -r@var{NUM}
+ Resolution of bitmaps in pixels per inch. For both metafiles and
+ SVG the default is the screen resolution, for other it is 150 dpi.
+ To specify screen resolution, use "-r0".
+@@ -6296,15 +6294,15 @@
+ A character indicating a plot marker to be place at each data point, or
+ @code{"none"}, meaning no markers should be displayed.
+
+-@itemx markeredgecolor
++@item markeredgecolor
+ The color of the edge around the marker, or @code{"auto"}, meaning that
+ the edge color is the same as the face color. @xref{Colors}.
+
+-@itemx markerfacecolor
++@item markerfacecolor
+ The color of the marker, or @code{"none"} to indicate that the marker
+ should not be filled. @xref{Colors}.
+
+-@itemx markersize
++@item markersize
+ A number specifying the size of the marker. The default is 1. A value
+ of 2 is twice as large as the default, etc.
+ @end table
+@@ -6442,7 +6440,8 @@
+ @deftypefn {Function File} {@var{value} =} getappdata (@var{h}, @var{name})
+ Return the @var{value} for named application data for the object(s) with
+ handle(s) @var{h}.
+-@deftypefnx {Function File} {@var{appdata} =} getappdata (@var{h})
++@end deftypefn
++@deftypefn {Function File} {@var{appdata} =} getappdata (@var{h})
+ Return a structure, @var{appdata}, whose fields correspond to the appdata
+ properties.
+ @end deftypefn
+diff -Nur octave-3.6.4.orig/doc/interpreter/poly.texi octave-3.6.4/doc/interpreter/poly.texi
+--- octave-3.6.4.orig/doc/interpreter/poly.texi 2013-02-21 12:37:52.000000000 -0800
++++ octave-3.6.4/doc/interpreter/poly.texi 2013-06-19 08:52:43.260790204 -0700
+@@ -82,8 +82,8 @@
+ (@var{x}-@var{mu}(1))/@var{mu}(2).
+ If @var{x} is a vector or matrix, the polynomial is evaluated for each of
+ the elements of @var{x}.
+-
+-@deftypefnx {Function File} {[@var{y}, @var{dy}] =} polyval (@var{p}, @var{x}, @var{s})
++@end deftypefn
++@deftypefn {Function File} {[@var{y}, @var{dy}] =} polyval (@var{p}, @var{x}, @var{s})
+ @deftypefnx {Function File} {[@var{y}, @var{dy}] =} polyval (@var{p}, @var{x}, @var{s}, @var{mu})
+ In addition to evaluating the polynomial, the second output
+ represents the prediction interval, @var{y} +/- @var{dy}, which
+diff -Nur octave-3.6.4.orig/doc/interpreter/set.texi octave-3.6.4/doc/interpreter/set.texi
+--- octave-3.6.4.orig/doc/interpreter/set.texi 2013-02-21 12:37:52.000000000 -0800
++++ octave-3.6.4/doc/interpreter/set.texi 2013-06-19 08:52:43.260790204 -0700
+@@ -150,8 +150,9 @@
+ 3 4
+ @end group
+ @end example
++@end deftypefn
+
+-@deftypefnx {Function File} {[@var{c}, @var{ia}, @var{ib}] =} union (@var{a}, @var{b})
++@deftypefn {Function File} {[@var{c}, @var{ia}, @var{ib}] =} union (@var{a}, @var{b})
+
+ Return index vectors @var{ia} and @var{ib} such that @code{a(ia)} and
+ @code{b(ib)} are disjoint sets whose union is @var{c}.
+diff -Nur octave-3.6.4.orig/doc/interpreter/signal.texi octave-3.6.4/doc/interpreter/signal.texi
+--- octave-3.6.4.orig/doc/interpreter/signal.texi 2013-02-21 12:37:52.000000000 -0800
++++ octave-3.6.4/doc/interpreter/signal.texi 2013-06-19 08:52:43.261790169 -0700
+@@ -454,17 +454,17 @@
+
+ For fastest computation, @var{n} should factor into a small number of
+ small primes.
+-
+-@deftypefnx {Function File} {@var{h} =} freqz (@var{b}, @var{a}, @var{w})
++@end deftypefn
++@deftypefn {Function File} {@var{h} =} freqz (@var{b}, @var{a}, @var{w})
+ Evaluate the response at the specific frequencies in the vector @var{w}.
+ The values for @var{w} are measured in radians.
+-
+-@deftypefnx {Function File} {[@dots{}] =} freqz (@dots{}, @var{Fs})
++@end deftypefn
++@deftypefn {Function File} {[@dots{}] =} freqz (@dots{}, @var{Fs})
+ Return frequencies in Hz instead of radians assuming a sampling rate
+ @var{Fs}. If you are evaluating the response at specific frequencies
+ @var{w}, those frequencies should be requested in Hz rather than radians.
+-
+-@deftypefnx {Function File} {} freqz (@dots{})
++@end deftypefn
++@deftypefn {Function File} {} freqz (@dots{})
+ Plot the pass band, stop band and phase response of @var{h} rather
+ than returning them.
+ @end deftypefn
+diff -Nur octave-3.6.4.orig/doc/interpreter/strings.texi octave-3.6.4/doc/interpreter/strings.texi
+--- octave-3.6.4.orig/doc/interpreter/strings.texi 2013-02-21 12:37:52.000000000 -0800
++++ octave-3.6.4/doc/interpreter/strings.texi 2013-06-19 08:52:43.261790169 -0700
+@@ -1136,7 +1136,7 @@
+ @item %s
+ The word is parsed as a string.
+
+-@itemx %f
++@item %f
+ @itemx %n
+ The word is parsed as a number and converted to double.
+
+diff -Nur octave-3.6.4.orig/doc/interpreter/system.texi octave-3.6.4/doc/interpreter/system.texi
+--- octave-3.6.4.orig/doc/interpreter/system.texi 2013-02-21 12:37:52.000000000 -0800
++++ octave-3.6.4/doc/interpreter/system.texi 2013-06-19 08:52:43.261790169 -0700
+@@ -839,7 +839,7 @@
+ @deftypefnx {Function File} {} datetick (@var{axis}, @var{form})
+ @deftypefnx {Function File} {} datetick (@dots{}, "keeplimits")
+ @deftypefnx {Function File} {} datetick (@dots{}, "keepticks")
+-@deftypefnx {Function File} {} datetick (@dots{ax}, @dots{})
++@comment @deftypefnx {Function File} {} datetick (@dots{ax}, @dots{})
+ Add date formatted tick labels to an axis. The axis the apply the
+ ticks to is determined by @var{axis} that can take the values "x",
+ "y" or "z". The default value is "x". The formatting of the labels is
+@@ -1261,9 +1261,10 @@
+ interpreted as filename globbing patterns (as they are used by Unix shells).
+ Within a pattern
+ @table @code
+-@itemx *
++
++@item *
+ matches any string, including the null string,
+-@itemx ?
++@item ?
+ matches any single character, and
+
+ @item [@dots{}]
+@@ -2789,8 +2790,8 @@
+ Display a header containing the current Octave version number, license
+ string and operating system, followed by the installed package names,
+ versions, and installation directories.
+-
+-@deftypefnx {Function File} {v =} ver ()
++@end deftypefn
++@deftypefn {Function File} {v =} ver ()
+ Return a vector of structures, respecting Octave and each installed package.
+ The structure includes the following fields.
+
+@@ -2807,11 +2808,11 @@
+ @item Date
+ Date respecting the version/revision.
+ @end table
+-
+-@deftypefnx {Function File} {v =} ver ("Octave")
++@end deftypefn
++@deftypefn {Function File} {v =} ver ("Octave")
+ Return version information for Octave only.
+-
+-@deftypefnx {Function File} {v =} ver (@var{package})
++@end deftypefn
++@deftypefn {Function File} {v =} ver (@var{package})
+ Return version information for @var{package}.
+
+ @seealso{@ref{doc-version,,version}, @ref{doc-octave_config_info,,octave_config_info}}
+@@ -2878,19 +2879,19 @@
+ @anchor{doc-license}
+ @deftypefn {Function File} {} license
+ Display the license of Octave.
+-
+-@deftypefnx {Function File} {} license ("inuse")
++@end deftypefn
++@deftypefn {Function File} {} license ("inuse")
+ Display a list of packages currently being used.
+-
+-@deftypefnx {Function File} {@var{retval} =} license ("inuse")
++@end deftypefn
++@deftypefn {Function File} {@var{retval} =} license ("inuse")
+ Return a structure containing the fields @code{feature} and @code{user}.
+-
+-@deftypefnx {Function File} {@var{retval} =} license ("test", @var{feature})
++@end deftypefn
++@deftypefn {Function File} {@var{retval} =} license ("test", @var{feature})
+ Return 1 if a license exists for the product identified by the string
+ @var{feature} and 0 otherwise. The argument @var{feature} is case
+ insensitive and only the first 27 characters are checked.
+-
+-@deftypefnx {Function File} {} license ("test", @var{feature}, @var{toggle})
++@end deftypefn
++@deftypefn {Function File} {} license ("test", @var{feature}, @var{toggle})
+ Enable or disable license testing for @var{feature}, depending on
+ @var{toggle}, which may be one of:
+
+@@ -2902,8 +2903,8 @@
+ @item "disable"
+ Future tests for the specified license of @var{feature} return 0.
+ @end table
+-
+-@deftypefnx {Function File} {@var{retval} =} license ("checkout", @var{feature})
++@end deftypefn
++@deftypefn {Function File} {@var{retval} =} license ("checkout", @var{feature})
+ Check out a license for @var{feature}, returning 1 on success and 0
+ on failure.
+
+diff -Nur octave-3.6.4.orig/doc/liboctave/liboctave.texi octave-3.6.4/doc/liboctave/liboctave.texi
+--- octave-3.6.4.orig/doc/liboctave/liboctave.texi 2013-02-21 12:19:23.000000000 -0800
++++ octave-3.6.4/doc/liboctave/liboctave.texi 2013-06-19 08:54:27.914379692 -0700
+@@ -80,10 +80,10 @@
+ @end ifnottex
+
+ @titlepage
+-@title{Octave C++ Classes}
+-@subtitle{Edition 1.0 for Octave version @value{VERSION}}
+-@subtitle{September 1993}
+-@author{John W. Eaton}
++@title@{Octave C++ Classes@}
++@subtitle@{Edition 1.0 for Octave version @value{VERSION}@}
++@subtitle@{September 1993@}
++@author@{John W. Eaton@}
+ @page
+ @vskip 0pt plus 1filll
+ Copyright @copyright{} 1996, 1997 John W. Eaton.
diff --git a/sci-mathematics/octave/files/octave-3.8.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch b/sci-mathematics/octave/files/octave-3.8.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch
new file mode 100644
index 000000000000..135330d2f45a
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.8.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch
@@ -0,0 +1,11 @@
+--- octave-3.8.0-orig/m4/getcwd.m4 2013-12-28 09:00:39.000000000 +1100
++++ octave-3.8.0/m4/getcwd.m4 2014-02-15 13:11:06.783512435 +1100
+@@ -108,7 +108,7 @@
+
+ gl_abort_bug=no
+ case "$host_os" in
+- mingw*)
++ *-gnu* | gnu* | mingw*)
+ gl_cv_func_getcwd_path_max=yes
+ ;;
+ *)
diff --git a/sci-mathematics/octave/files/octave-3.8.0-fix-compile.patch b/sci-mathematics/octave/files/octave-3.8.0-fix-compile.patch
new file mode 100644
index 000000000000..72931ee66283
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.8.0-fix-compile.patch
@@ -0,0 +1,11 @@
+--- octave-3.8.0-orig/libinterp/corefcn/jit-typeinfo.cc 2013-12-28 08:57:41.000000000 +1100
++++ octave-3.8.0/libinterp/corefcn/jit-typeinfo.cc 2014-02-14 15:45:47.388031654 +1100
+@@ -872,7 +872,7 @@
+ jit_operation::to_idx (const std::vector<jit_type*>& types) const
+ {
+ octave_idx_type numel = types.size ();
+- numel = std::max (2, numel);
++ numel = std::max (static_cast<octave_idx_type>(2), numel);
+
+ Array<octave_idx_type> idx (dim_vector (1, numel));
+ for (octave_idx_type i = 0; i < static_cast<octave_idx_type> (types.size ());
diff --git a/sci-mathematics/octave/files/octave-3.8.0-imagemagick-configure.patch b/sci-mathematics/octave/files/octave-3.8.0-imagemagick-configure.patch
new file mode 100644
index 000000000000..1406237fea44
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.8.0-imagemagick-configure.patch
@@ -0,0 +1,16 @@
+--- octave-3.8.0-orig/configure.ac 2013-12-28 08:58:28.000000000 +1100
++++ octave-3.8.0/configure.ac 2014-02-15 20:11:53.821172574 +1100
+@@ -995,11 +995,11 @@
+ MAGICK_LIBS=
+
+ PKG_CHECK_EXISTS([$magick++], [
+- ## Make sure we only get -I, -L, and -l flags. Some Graphics/ImageMagick++
++ ## Make sure we only get -I, -D, -L, and -l flags. Some Graphics/ImageMagick++
+ ## packages add extra flags that are useful when building
+ ## Graphics/ImageMagick++ extentions. These extra flags break the
+ ## Octave build.
+- MAGICK_CPPFLAGS=`$PKG_CONFIG --cflags-only-I $magick++`
++ MAGICK_CPPFLAGS=`$PKG_CONFIG --cflags $magick++ | sed -e 's/\(-@<:@DI@:>@@<:@^ \t@:>@*\)\|\(-@<:@^ \t@:>@*\)/\1/g'`
+ MAGICK_LDFLAGS=`$PKG_CONFIG --libs-only-L $magick++`
+ MAGICK_LIBS=`$PKG_CONFIG --libs-only-l $magick++`
+
diff --git a/sci-mathematics/octave/files/octave-3.8.0-llvm-3.4.patch b/sci-mathematics/octave/files/octave-3.8.0-llvm-3.4.patch
new file mode 100644
index 000000000000..63c5303d13c7
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.8.0-llvm-3.4.patch
@@ -0,0 +1,63 @@
+diff -aur octave-3.8.0/libinterp/corefcn/jit-util.h octave-3.8.0.fix/libinterp/corefcn/jit-util.h
+--- octave-3.8.0/libinterp/corefcn/jit-util.h 2013-12-27 15:57:41.000000000 -0600
++++ octave-3.8.0.fix/libinterp/corefcn/jit-util.h 2014-01-16 17:06:47.512782643 -0600
+@@ -42,8 +42,10 @@
+ {
+ class Value;
+ class Module;
+- class FunctionPassManager;
+- class PassManager;
++ namespace legacy {
++ class FunctionPassManager;
++ class PassManager;
++ }
+ class ExecutionEngine;
+ class Function;
+ class BasicBlock;
+diff -aur octave-3.8.0/libinterp/corefcn/pt-jit.cc octave-3.8.0.fix/libinterp/corefcn/pt-jit.cc
+--- octave-3.8.0/libinterp/corefcn/pt-jit.cc 2013-12-27 15:58:17.000000000 -0600
++++ octave-3.8.0.fix/libinterp/corefcn/pt-jit.cc 2014-01-16 17:08:28.030924785 -0600
+@@ -52,7 +52,7 @@
+ #include <llvm/Bitcode/ReaderWriter.h>
+ #include <llvm/ExecutionEngine/ExecutionEngine.h>
+ #include <llvm/ExecutionEngine/JIT.h>
+-#include <llvm/PassManager.h>
++#include <llvm/IR/LegacyPassManager.h>
+
+ #ifdef HAVE_LLVM_IR_FUNCTION_H
+ #include <llvm/IR/LLVMContext.h>
+@@ -1888,10 +1888,10 @@
+ if (! engine)
+ return false;
+
+- module_pass_manager = new llvm::PassManager ();
++ module_pass_manager = new llvm::legacy::PassManager ();
+ module_pass_manager->add (llvm::createAlwaysInlinerPass ());
+
+- pass_manager = new llvm::FunctionPassManager (module);
++ pass_manager = new llvm::legacy::FunctionPassManager (module);
+ #ifdef HAVE_LLVM_DATALAYOUT
+ pass_manager->add (new llvm::DataLayout (*engine->getDataLayout ()));
+ #else
+@@ -2007,7 +2007,7 @@
+ {
+ std::string error;
+ llvm::raw_fd_ostream fout ("test.bc", error,
+- llvm::raw_fd_ostream::F_Binary);
++ llvm::sys::fs::F_Binary);
+ llvm::WriteBitcodeToFile (module, fout);
+ }
+ }
+diff -aur octave-3.8.0/libinterp/corefcn/pt-jit.h octave-3.8.0.fix/libinterp/corefcn/pt-jit.h
+--- octave-3.8.0/libinterp/corefcn/pt-jit.h 2013-12-27 15:58:17.000000000 -0600
++++ octave-3.8.0.fix/libinterp/corefcn/pt-jit.h 2014-01-16 17:05:08.224619116 -0600
+@@ -384,8 +384,8 @@
+ size_t trip_count (const octave_value& bounds) const;
+
+ llvm::Module *module;
+- llvm::PassManager *module_pass_manager;
+- llvm::FunctionPassManager *pass_manager;
++ llvm::legacy::PassManager *module_pass_manager;
++ llvm::legacy::FunctionPassManager *pass_manager;
+ llvm::ExecutionEngine *engine;
+ };
diff --git a/sci-mathematics/octave/files/octave-3.8.0-llvm-configure.patch b/sci-mathematics/octave/files/octave-3.8.0-llvm-configure.patch
new file mode 100644
index 000000000000..82c6c1458093
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.8.0-llvm-configure.patch
@@ -0,0 +1,12 @@
+--- octave-3.8.0-orig/configure.ac 2013-12-28 08:58:28.000000000 +1100
++++ octave-3.8.0/configure.ac 2014-02-15 20:51:21.431570121 +1100
+@@ -805,7 +805,8 @@
+ dnl Use -isystem so we don't get warnings from llvm headers
+ LLVM_CPPFLAGS="$LLVM_INCLUDE_FLAG `$LLVM_CONFIG --includedir`"
+ LLVM_CXXFLAGS=
+- LLVM_LDFLAGS="-L`$LLVM_CONFIG --libdir`"
++ dnl If llvm-config --ldflags has -L ending with /llvm then specify this directory with -R
++ LLVM_LDFLAGS="`$LLVM_CONFIG --ldflags | sed -e 's/-L\(@<:@^ \t@:>@*\/llvm\)/-L\1 -R\1/' -e 's/-@<:@^LR@:>@.*@<:@ \t@:>@//g'`"
+
+
+ LDFLAGS="$LDFLAGS $LLVM_LDFLAGS"
diff --git a/sci-mathematics/octave/files/octave-3.8.0-pkgbuilddir.patch b/sci-mathematics/octave/files/octave-3.8.0-pkgbuilddir.patch
new file mode 100644
index 000000000000..983f6b54ac57
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.8.0-pkgbuilddir.patch
@@ -0,0 +1,40 @@
+--- octave-3.8.0-orig/scripts/pkg/private/install.m 2013-12-28 08:57:42.000000000 +1100
++++ octave-3.8.0/scripts/pkg/private/install.m 2014-02-10 00:59:40.747194765 +1100
+@@ -63,6 +63,14 @@
+ tgz = files{i};
+
+ if (exist (tgz, "file"))
++ ## The filename pointed to an uncompressed package to begin with.
++ if (exist (tgz, "dir"))
++ if (tgz(1) == '/')
++ packdir = tgz;
++ else
++ packdir = fullfile (pwd(), tgz);
++ endif
++ elseif (exist (tgz, "file"))
+ ## Create a temporary directory.
+ tmpdir = tmpnam ();
+ tmpdirs{end+1} = tmpdir;
+@@ -89,20 +97,12 @@
+ if (length (dirlist) > 3)
+ error ("bundles of packages are not allowed");
+ endif
+- endif
+
+- ## The filename pointed to an uncompressed package to begin with.
+- if (exist (tgz, "dir"))
+- dirlist = {".", "..", tgz};
++ ## The two first entries of dirlist are "." and "..".
++ packdir = fullfile (tmpdir, dirlist{3});
+ endif
+
+ if (exist (tgz, "file") || exist (tgz, "dir"))
+- ## The two first entries of dirlist are "." and "..".
+- if (exist (tgz, "file"))
+- packdir = fullfile (tmpdir, dirlist{3});
+- else
+- packdir = fullfile (pwd (), dirlist{3});
+- endif
+ packdirs{end+1} = packdir;
+
+ ## Make sure the package contains necessary files.
diff --git a/sci-mathematics/octave/files/octave-3.8.1-imagemagick.patch b/sci-mathematics/octave/files/octave-3.8.1-imagemagick.patch
new file mode 100644
index 000000000000..f3415505dffb
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.8.1-imagemagick.patch
@@ -0,0 +1,138 @@
+--- octave-3.8.1-orig/libinterp/dldfcn/__magick_read__.cc 2014-03-07 06:37:51.000000000 +1100
++++ octave-3.8.1/libinterp/dldfcn/__magick_read__.cc 2014-03-09 00:18:04.593088077 +1100
+@@ -38,8 +38,15 @@
+ #include "gripes.h"
+
+ #ifdef HAVE_MAGICK
+-
++#define MAGICKCORE_EXCLUDE_DEPRECATED 1
+ #include <Magick++.h>
++#if !defined(QuantumRange) && defined(MaxRGB)
++#define QuantumRange MaxRGB
++#endif
++#if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(QuantumDepth)
++#define MAGICKCORE_QUANTUM_DEPTH QuantumDepth
++#endif
++
+ #include <clocale>
+
+ // In theory, it should be enough to check the class:
+@@ -104,12 +111,18 @@
+ get_depth (Magick::Image& img)
+ {
+ octave_idx_type depth = img.depth ();
++#if defined(MagickLibVersion) && (MagickLibVersion <= 0x686)
++#define Magick MagickCore
++#endif
+ if (depth == 8
+ && img.channelDepth (Magick::RedChannel) == 1
+ && img.channelDepth (Magick::CyanChannel) == 1
+ && img.channelDepth (Magick::OpacityChannel) == 1
+ && img.channelDepth (Magick::GrayChannel) == 1)
+ depth = 1;
++#if defined(MagickLibVersion) && (MagickLibVersion <= 0x686)
++#undef Magick
++#endif
+
+ return depth;
+ }
+@@ -332,7 +345,10 @@
+ if (imvec[def_elem].depth () == 32)
+ divisor = std::numeric_limits<uint32_t>::max ();
+ else
+- divisor = MaxRGB / ((uint64_t (1) << imvec[def_elem].depth ()) - 1);
++ {
++ using namespace Magick;
++ divisor = QuantumRange / ((uint64_t (1) << imvec[def_elem].depth ()) - 1);
++ }
+
+ // FIXME: this workaround should probably be fixed in GM by creating a
+ // new ImageType BilevelMatteType
+@@ -464,7 +480,8 @@
+ for (octave_idx_type row = 0; row < nRows; row++)
+ {
+ img_fvec[idx] = pix->red / divisor;
+- a_fvec[idx] = (MaxRGB - pix->opacity) / divisor;
++ using namespace Magick;
++ a_fvec[idx] = (QuantumRange - pix->opacity) / divisor;
+ pix += row_shift;
+ idx++;
+ }
+@@ -541,7 +558,8 @@
+ rbuf[idx] = pix->red / divisor;
+ gbuf[idx] = pix->green / divisor;
+ bbuf[idx] = pix->blue / divisor;
+- a_fvec[a_idx++] = (MaxRGB - pix->opacity) / divisor;
++ using namespace Magick;
++ a_fvec[a_idx++] = (QuantumRange - pix->opacity) / divisor;
+ pix += row_shift;
+ idx++;
+ }
+@@ -626,7 +644,8 @@
+ mbuf[idx] = pix->green / divisor;
+ ybuf[idx] = pix->blue / divisor;
+ kbuf[idx] = pix->opacity / divisor;
+- a_fvec[a_idx++] = (MaxRGB - *apix) / divisor;
++ using namespace Magick;
++ a_fvec[a_idx++] = (QuantumRange - *apix) / divisor;
+ pix += row_shift;
+ idx++;
+ }
+@@ -685,9 +704,10 @@
+ // Restore locale from before GraphicsMagick initialisation
+ setlocale (LC_ALL, locale.c_str ());
+
+- if (QuantumDepth < 32)
++ using namespace Magick;
++ if (MAGICKCORE_QUANTUM_DEPTH < 32)
+ warning ("your version of %s limits images to %d bits per pixel",
+- MagickPackageName, QuantumDepth);
++ MagickPackageName, MAGICKCORE_QUANTUM_DEPTH);
+
+ initialized = true;
+ }
+@@ -1060,8 +1080,9 @@
+ // From GM documentation:
+ // Color arguments are must be scaled to fit the Quantum size according to
+ // the range of MaxRGB
++ using namespace Magick;
+ const double divisor = static_cast<double>((uint64_t (1) << bitdepth) - 1)
+- / MaxRGB;
++ / QuantumRange;
+
+ const P *img_fvec = img.fortran_vec ();
+ const P *a_fvec = alpha.fortran_vec ();
+@@ -1111,8 +1132,9 @@
+ for (octave_idx_type row = 0; row < nRows; row++)
+ {
+ double grey = double (*img_fvec) / divisor;
++ using namespace Magick;
+ Magick::Color c (grey, grey, grey,
+- MaxRGB - (double (*a_fvec) / divisor));
++ QuantumRange - (double (*a_fvec) / divisor));
+ pix[GM_idx] = c;
+ img_fvec++;
+ a_fvec++;
+@@ -1178,10 +1200,11 @@
+ {
+ for (octave_idx_type row = 0; row < nRows; row++)
+ {
++ using namespace Magick;
+ Magick::Color c (double (*img_fvec) / divisor,
+ double (img_fvec[G_offset]) / divisor,
+ double (img_fvec[B_offset]) / divisor,
+- MaxRGB - (double (*a_fvec) / divisor));
++ QuantumRange - (double (*a_fvec) / divisor));
+ pix[GM_idx] = c;
+ img_fvec++;
+ a_fvec++;
+@@ -1257,7 +1280,8 @@
+ double (img_fvec[Y_offset]) / divisor,
+ double (img_fvec[K_offset]) / divisor);
+ pix[GM_idx] = c;
+- ind[GM_idx] = MaxRGB - (double (*a_fvec) / divisor);
++ using namespace Magick;
++ ind[GM_idx] = QuantumRange - (double (*a_fvec) / divisor);
+ img_fvec++;
+ a_fvec++;
+ GM_idx += nCols;
diff --git a/sci-mathematics/octave/files/octave-3.8.1-pkgbuilddir.patch b/sci-mathematics/octave/files/octave-3.8.1-pkgbuilddir.patch
new file mode 100644
index 000000000000..98fe3d5e8eed
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.8.1-pkgbuilddir.patch
@@ -0,0 +1,41 @@
+--- scripts/pkg/private/install.m.orig 2014-04-15 08:45:55.487258887 -0700
++++ scripts/pkg/private/install.m 2014-04-15 12:12:40.985606248 -0700
+@@ -62,7 +62,14 @@
+ for i = 1:length (files)
+ tgz = files{i};
+
+- if (exist (tgz, "file"))
++ ## The filename pointed to an uncompressed package to begin with.
++ if (exist (tgz, "dir"))
++ if (tgz(1) == '/')
++ packdir = tgz;
++ else
++ packdir = fullfile (pwd(), tgz);
++ endif
++ elseif (exist (tgz, "file"))
+ ## Create a temporary directory.
+ tmpdir = tmpnam ();
+ tmpdirs{end+1} = tmpdir;
+@@ -89,20 +96,12 @@
+ if (length (dirlist) > 3)
+ error ("bundles of packages are not allowed");
+ endif
+- endif
+
+- ## The filename pointed to an uncompressed package to begin with.
+- if (exist (tgz, "dir"))
+- dirlist = {".", "..", tgz};
++ ## The two first entries of dirlist are "." and "..".
++ packdir = fullfile (tmpdir, dirlist{3});
+ endif
+
+ if (exist (tgz, "file") || exist (tgz, "dir"))
+- ## The two first entries of dirlist are "." and "..".
+- if (exist (tgz, "file"))
+- packdir = fullfile (tmpdir, dirlist{3});
+- else
+- packdir = fullfile (pwd (), dirlist{3});
+- endif
+ packdirs{end+1} = packdir;
+
+ ## Make sure the package contains necessary files.
diff --git a/sci-mathematics/octave/files/octave-4.0.0-imagemagick-configure.patch b/sci-mathematics/octave/files/octave-4.0.0-imagemagick-configure.patch
new file mode 100644
index 000000000000..4e88ac07b13a
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.0.0-imagemagick-configure.patch
@@ -0,0 +1,16 @@
+--- octave-4.0.0-orig/configure.ac 2015-05-27 02:16:39.000000000 +1000
++++ octave-4.0.0/configure.ac 2015-07-06 18:11:43.461136517 +1000
+@@ -1086,11 +1086,11 @@
+ MAGICK_LIBS=
+
+ PKG_CHECK_EXISTS([$magick++], [
+- ## Make sure we only get -I, -L, and -l flags. Some Graphics/ImageMagick++
++ ## Make sure we only get -I, -D, -L, and -l flags. Some Graphics/ImageMagick++
+ ## packages add extra flags that are useful when building
+ ## Graphics/ImageMagick++ extentions. These extra flags break the
+ ## Octave build.
+- MAGICK_CPPFLAGS=`$PKG_CONFIG --cflags-only-I $magick++`
++ MAGICK_CPPFLAGS=`$PKG_CONFIG --cflags $magick++ | sed -e 's/\(-@<:@DI@:>@@<:@^ \t@:>@*\)\|\(-@<:@^ \t@:>@*\)/\1/g'`
+ MAGICK_LDFLAGS=`$PKG_CONFIG --libs-only-L $magick++`
+ MAGICK_LIBS=`$PKG_CONFIG --libs-only-l $magick++`
+
diff --git a/sci-mathematics/octave/files/octave-4.0.0-imagemagick.patch b/sci-mathematics/octave/files/octave-4.0.0-imagemagick.patch
new file mode 100644
index 000000000000..9e3689176cbd
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.0.0-imagemagick.patch
@@ -0,0 +1,139 @@
+--- octave-4.0.0-orig/libinterp/dldfcn/__magick_read__.cc 2015-05-24 00:21:53.000000000 +1000
++++ octave-4.0.0/libinterp/dldfcn/__magick_read__.cc 2015-07-06 18:17:52.263146804 +1000
+@@ -38,8 +38,15 @@
+ #include "gripes.h"
+
+ #ifdef HAVE_MAGICK
+-
++#define MAGICKCORE_EXCLUDE_DEPRECATED 1
+ #include <Magick++.h>
++#if !defined(QuantumRange) && defined(MaxRGB)
++#define QuantumRange MaxRGB
++#endif
++#if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(QuantumDepth)
++#define MAGICKCORE_QUANTUM_DEPTH QuantumDepth
++#endif
++
+ #include <clocale>
+
+ // In theory, it should be enough to check the class:
+@@ -121,12 +128,18 @@
+ get_depth (Magick::Image& img)
+ {
+ octave_idx_type depth = img.depth ();
++#if defined(MagickLibVersion) && (MagickLibVersion <= 0x686)
++#define Magick MagickCore
++#endif
+ if (depth == 8
+ && img.channelDepth (Magick::RedChannel) == 1
+ && img.channelDepth (Magick::CyanChannel) == 1
+ && img.channelDepth (Magick::OpacityChannel) == 1
+ && img.channelDepth (Magick::GrayChannel) == 1)
+ depth = 1;
++#if defined(MagickLibVersion) && (MagickLibVersion <= 0x686)
++#undef Magick
++#endif
+
+ return depth;
+ }
+@@ -350,7 +363,10 @@
+ if (imvec[def_elem].depth () == 32)
+ divisor = std::numeric_limits<uint32_t>::max ();
+ else
+- divisor = MaxRGB / ((uint64_t (1) << imvec[def_elem].depth ()) - 1);
++ {
++ using namespace Magick;
++ divisor = QuantumRange / ((uint64_t (1) << imvec[def_elem].depth ()) - 1);
++ }
+
+ // FIXME: this workaround should probably be fixed in GM by creating a
+ // new ImageType BilevelMatteType
+@@ -484,7 +500,8 @@
+ for (octave_idx_type row = 0; row < nRows; row++)
+ {
+ img_fvec[idx] = pix->red / divisor;
+- a_fvec[idx] = (MaxRGB - pix->opacity) / divisor;
++ using namespace Magick;
++ a_fvec[idx] = (QuantumRange - pix->opacity) / divisor;
+ pix += row_shift;
+ idx++;
+ }
+@@ -563,7 +580,8 @@
+ rbuf[idx] = pix->red / divisor;
+ gbuf[idx] = pix->green / divisor;
+ bbuf[idx] = pix->blue / divisor;
+- a_fvec[a_idx++] = (MaxRGB - pix->opacity) / divisor;
++ using namespace Magick;
++ a_fvec[a_idx++] = (QuantumRange - pix->opacity) / divisor;
+ pix += row_shift;
+ idx++;
+ }
+@@ -650,7 +668,8 @@
+ mbuf[idx] = pix->green / divisor;
+ ybuf[idx] = pix->blue / divisor;
+ kbuf[idx] = pix->opacity / divisor;
+- a_fvec[a_idx++] = (MaxRGB - *apix) / divisor;
++ using namespace Magick;
++ a_fvec[a_idx++] = (QuantumRange - *apix) / divisor;
+ pix += row_shift;
+ idx++;
+ }
+@@ -709,10 +728,11 @@
+ // Restore locale from before GraphicsMagick initialisation
+ setlocale (LC_ALL, locale.c_str ());
+
+- if (QuantumDepth < 32)
++ using namespace Magick;
++ if (MAGICKCORE_QUANTUM_DEPTH < 32)
+ warning_with_id ("Octave:GraphicsMagic-Quantum-Depth",
+ "your version of %s limits images to %d bits per pixel",
+- MagickPackageName, QuantumDepth);
++ MagickPackageName, MAGICKCORE_QUANTUM_DEPTH);
+
+ initialized = true;
+ }
+@@ -1087,8 +1107,9 @@
+ // From GM documentation:
+ // Color arguments are must be scaled to fit the Quantum size according to
+ // the range of MaxRGB
++ using namespace Magick;
+ const double divisor = static_cast<double>((uint64_t (1) << bitdepth) - 1)
+- / MaxRGB;
++ / QuantumRange;
+
+ const P *img_fvec = img.fortran_vec ();
+ const P *a_fvec = alpha.fortran_vec ();
+@@ -1140,8 +1161,9 @@
+ for (octave_idx_type row = 0; row < nRows; row++)
+ {
+ double grey = double (*img_fvec) / divisor;
++ using namespace Magick;
+ Magick::Color c (grey, grey, grey,
+- MaxRGB - (double (*a_fvec) / divisor));
++ QuantumRange - (double (*a_fvec) / divisor));
+ pix[GM_idx] = c;
+ img_fvec++;
+ a_fvec++;
+@@ -1209,10 +1231,11 @@
+ {
+ for (octave_idx_type row = 0; row < nRows; row++)
+ {
++ using namespace Magick;
+ Magick::Color c (double (*img_fvec) / divisor,
+ double (img_fvec[G_offset]) / divisor,
+ double (img_fvec[B_offset]) / divisor,
+- MaxRGB - (double (*a_fvec) / divisor));
++ QuantumRange - (double (*a_fvec) / divisor));
+ pix[GM_idx] = c;
+ img_fvec++;
+ a_fvec++;
+@@ -1290,7 +1313,8 @@
+ double (img_fvec[Y_offset]) / divisor,
+ double (img_fvec[K_offset]) / divisor);
+ pix[GM_idx] = c;
+- ind[GM_idx] = MaxRGB - (double (*a_fvec) / divisor);
++ using namespace Magick;
++ ind[GM_idx] = QuantumRange - (double (*a_fvec) / divisor);
+ img_fvec++;
+ a_fvec++;
+ GM_idx += nCols;
diff --git a/sci-mathematics/octave/files/octave-4.0.0-llvm-3.5-gnulib-hg.patch b/sci-mathematics/octave/files/octave-4.0.0-llvm-3.5-gnulib-hg.patch
new file mode 100644
index 000000000000..e74d123b6418
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.0.0-llvm-3.5-gnulib-hg.patch
@@ -0,0 +1,19 @@
+diff -r 7f19e7f2afa2 lib/stddef.in.h
+--- a/libgnu/stddef.in.h Sat Feb 21 06:19:32 2015 -0800
++++ b/libgnu/stddef.in.h Fri May 01 06:01:06 2015 +0200
+@@ -82,6 +82,7 @@
+ #endif
+
+ /* Some platforms lack max_align_t. */
++#ifndef _GCC_MAX_ALIGN_T
+ #if !@HAVE_MAX_ALIGN_T@
+ typedef union
+ {
+@@ -91,6 +92,7 @@
+ long int __i;
+ } max_align_t;
+ #endif
++#endif
+
+ # endif /* _@GUARD_PREFIX@_STDDEF_H */
+ # endif /* _@GUARD_PREFIX@_STDDEF_H */
diff --git a/sci-mathematics/octave/files/octave-4.0.0-llvm-3.5.patch b/sci-mathematics/octave/files/octave-4.0.0-llvm-3.5.patch
new file mode 100644
index 000000000000..31b1bed74e2d
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.0.0-llvm-3.5.patch
@@ -0,0 +1,130 @@
+diff -r 3797df921988 configure.ac
+--- a/configure.ac Wed Apr 29 17:09:24 2015 -0700
++++ b/configure.ac Sun May 03 22:48:56 2015 +0200
+@@ -815,8 +815,13 @@
+ AC_MSG_NOTICE([using -isystem for LLVM headers])])
+
+ dnl Use -isystem so we don't get warnings from llvm headers
+- LLVM_CPPFLAGS="$LLVM_INCLUDE_FLAG `$LLVM_CONFIG --includedir`"
+- LLVM_CXXFLAGS=
++ AX_CHECK_COMPILE_FLAG([-std=c++11],[
++ LLVM_CPPFLAGS="-std=c++11 $LLVM_INCLUDE_FLAG `$LLVM_CONFIG --includedir`"
++ LLVM_CXXFLAGS="-std=c++11"
++ ],[
++ LLVM_CPPFLAGS="$LLVM_INCLUDE_FLAG `$LLVM_CONFIG --includedir`"
++ LLVM_CXXFLAGS=
++ ])
+ LLVM_LDFLAGS="-L`$LLVM_CONFIG --libdir`"
+
+
+@@ -860,6 +865,8 @@
+ OCTAVE_LLVM_CALLINST_ADDATTRIBUTE_API
+ OCTAVE_LLVM_RAW_FD_OSTREAM_API
+ OCTAVE_LLVM_LEGACY_PASSMANAGER_API
++ OCTAVE_LLVM_DATALAYOUTPASS_API
++
+ AC_LANG_POP(C++)
+ CPPFLAGS="$save_CPPFLAGS"
+ CXXFLAGS="$save_CXXFLAGS"
+diff -r 3797df921988 libinterp/corefcn/jit-typeinfo.cc
+--- a/libinterp/corefcn/jit-typeinfo.cc Wed Apr 29 17:09:24 2015 -0700
++++ b/libinterp/corefcn/jit-typeinfo.cc Sun May 03 22:48:56 2015 +0200
+@@ -1208,7 +1208,7 @@
+ for (int op = 0; op < octave_value::num_binary_ops; ++op)
+ {
+ llvm::Twine fn_name ("octave_jit_binary_any_any_");
+- fn_name = fn_name + llvm::Twine (op);
++ fn_name.concat( llvm::Twine (op) );
+
+ fn = create_internal (fn_name, any, any, any);
+ fn.mark_can_error ();
+diff -r 3797df921988 libinterp/corefcn/pt-jit.cc
+--- a/libinterp/corefcn/pt-jit.cc Wed Apr 29 17:09:24 2015 -0700
++++ b/libinterp/corefcn/pt-jit.cc Sun May 03 22:48:56 2015 +0200
+@@ -59,6 +59,7 @@
+
+ #include <llvm/Bitcode/ReaderWriter.h>
+ #include <llvm/ExecutionEngine/ExecutionEngine.h>
++#include <llvm/ExecutionEngine/MCJIT.h>
+ #include <llvm/ExecutionEngine/JIT.h>
+
+ #ifdef LEGACY_PASSMANAGER
+@@ -83,6 +84,7 @@
+ #include <llvm/IRBuilder.h>
+ #endif
+
++#include <llvm/Support/FileSystem.h>
+ #include <llvm/Support/raw_os_ostream.h>
+ #include <llvm/Support/TargetSelect.h>
+
+@@ -2077,7 +2079,11 @@
+ module_pass_manager->add (llvm::createAlwaysInlinerPass ());
+
+ #ifdef HAVE_LLVM_DATALAYOUT
++#ifdef HAVE_LLVM_DATALAYOUTPASS
++ pass_manager->add (new llvm::DataLayoutPass (*engine->getDataLayout ()));
++#else
+ pass_manager->add (new llvm::DataLayout (*engine->getDataLayout ()));
++#endif
+ #else
+ pass_manager->add (new llvm::TargetData (*engine->getTargetData ()));
+ #endif
+@@ -2192,7 +2198,7 @@
+ std::string error;
+ #ifdef RAW_FD_OSTREAM_ARG_IS_LLVM_SYS_FS
+ llvm::raw_fd_ostream fout ("test.bc", error,
+- llvm::sys::fs::F_Binary);
++ llvm::sys::fs::F_Text);
+ #else
+ llvm::raw_fd_ostream fout ("test.bc", error,
+ llvm::raw_fd_ostream::F_Binary);
+diff -r 3797df921988 m4/acinclude.m4
+--- a/m4/acinclude.m4 Wed Apr 29 17:09:24 2015 -0700
++++ b/m4/acinclude.m4 Sun May 03 22:48:56 2015 +0200
+@@ -1784,10 +1784,11 @@
+ [AC_LANG_PUSH(C++)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
++ #include <llvm/Support/FileSystem.h>
+ #include <llvm/Support/raw_os_ostream.h>
+ ]], [[
+ std::string str;
+- llvm::raw_fd_ostream fout ("", str, llvm::sys::fs::F_Binary);
++ llvm::raw_fd_ostream fout ("", str, llvm::sys::fs::F_Text);
+ ]])],
+ octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs=yes,
+ octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs=no)
+@@ -1828,6 +1829,33 @@
+ fi
+ ])
+ dnl
++dnl Check for llvm::DataLayoutPass API
++dnl
++AC_DEFUN([OCTAVE_LLVM_DATALAYOUTPASS_API], [
++ AC_CACHE_CHECK([check for LLVM::DataLayoutPass],
++ [octave_cv_datalayoutpass],
++ [AC_LANG_PUSH(C++)
++ save_LIBS="$LIBS"
++ LIBS="$LLVM_LIBS $LIBS"
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[
++ #include <llvm/IR/DataLayout.h>
++ ]], [[
++ llvm::Module *module;
++ llvm::DataLayoutPass *datalayoutpass;
++ datalayoutpass = new llvm::DataLayoutPass (module)
++ ]])],
++ octave_cv_datalayoutpass=yes,
++ octave_cv_datalayoutpass=no)
++ LIBS="$save_LIBS"
++ AC_LANG_POP(C++)
++ ])
++ if test $octave_cv_datalayoutpass = yes; then
++ AC_DEFINE(HAVE_LLVM_DATALAYOUTPASS, 1,
++ [Define to 1 if LLVM::DataLayoutPass exists.])
++ fi
++])
++dnl
+ dnl Check for ar.
+ dnl
+ AC_DEFUN([OCTAVE_PROG_AR], [