summaryrefslogtreecommitdiff
path: root/sci-mathematics/octave/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-mathematics/octave/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-mathematics/octave/files')
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch11
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-fix-qscintilla-detection.patch14
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-imagemagick-configure.patch16
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-imagemagick.patch139
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-ncurses-pkgconfig.patch37
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-pkgbuilddir.patch41
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-texi.patch11
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-zlib-underlinking.patch10
8 files changed, 279 insertions, 0 deletions
diff --git a/sci-mathematics/octave/files/octave-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch b/sci-mathematics/octave/files/octave-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch
new file mode 100644
index 000000000000..f6fa7be3b28f
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch
@@ -0,0 +1,11 @@
+--- a/m4/getcwd.m4
++++ b/m4/getcwd.m4
+@@ -110,7 +110,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-4.2.0-fix-qscintilla-detection.patch b/sci-mathematics/octave/files/octave-4.2.0-fix-qscintilla-detection.patch
new file mode 100644
index 000000000000..ea714ecbfbbf
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-fix-qscintilla-detection.patch
@@ -0,0 +1,14 @@
+In Gentoo, QScintilla for Qt5 has the same library name
+as its Qt4 variant.
+
+--- a/m4/acinclude.m4
++++ b/m4/acinclude.m4
+@@ -1327,7 +1327,7 @@
+ ;;
+ 5)
+ QT_MODULES="Qt5Core Qt5Gui Qt5Network Qt5OpenGL Qt5PrintSupport"
+- octave_qscintilla_libnames="qscintilla2-qt5 qt5scintilla2"
++ octave_qscintilla_libnames="qscintilla2_qt5 qscintilla2"
+ ;;
+ *)
+ AC_MSG_ERROR([Unrecognized Qt version $qt_version])
diff --git a/sci-mathematics/octave/files/octave-4.2.0-imagemagick-configure.patch b/sci-mathematics/octave/files/octave-4.2.0-imagemagick-configure.patch
new file mode 100644
index 000000000000..d5b2870185bb
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-imagemagick-configure.patch
@@ -0,0 +1,16 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1560,11 +1560,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.2.0-imagemagick.patch b/sci-mathematics/octave/files/octave-4.2.0-imagemagick.patch
new file mode 100644
index 000000000000..8fb786964c20
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-imagemagick.patch
@@ -0,0 +1,139 @@
+--- a/libinterp/corefcn/__magick_read__.cc
++++ b/libinterp/corefcn/__magick_read__.cc
+@@ -39,7 +39,15 @@
+
+ #if defined (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,6 +129,9 @@
+ 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::GreenChannel) == 1
+@@ -132,6 +143,9 @@
+ && img.channelDepth (Magick::OpacityChannel) == 1
+ && img.channelDepth (Magick::GrayChannel) == 1)
+ depth = 1;
++#if defined(MagickLibVersion) && (MagickLibVersion <= 0x686)
++#undef Magick
++#endif
+
+ return depth;
+ }
+@@ -355,7 +369,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
+@@ -489,7 +506,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++;
+ }
+@@ -568,7 +586,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++;
+ }
+@@ -655,7 +674,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++;
+ }
+@@ -732,10 +752,11 @@
+ // depth is 8, there's a good chance that we will be limited. It
+ // is also the GraphicsMagick recommended setting and the default
+ // for ImageMagick.
+- if (QuantumDepth < 16)
++ using namespace Magick;
++ if (MAGICKCORE_QUANTUM_DEPTH < 16)
+ warning_with_id ("Octave:GraphicsMagic-Quantum-Depth",
+ "your version of %s limits images to %d bits per pixel\n",
+- MagickPackageName, QuantumDepth);
++ MagickPackageName, MAGICKCORE_QUANTUM_DEPTH);
+
+ initialized = true;
+ }
+@@ -1094,8 +1115,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 ();
+@@ -1147,8 +1169,9 @@
+ for (octave_idx_type row = 0; row < nRows; row++)
+ {
+ double grey = octave::math::round (double (*img_fvec) / divisor);
++ using namespace Magick;
+ Magick::Color c (grey, grey, grey,
+- MaxRGB - octave::math::round (double (*a_fvec) / divisor));
++ QuantumRange - octave::math::round (double (*a_fvec) / divisor));
+ pix[GM_idx] = c;
+ img_fvec++;
+ a_fvec++;
+@@ -1216,10 +1239,11 @@
+ {
+ for (octave_idx_type row = 0; row < nRows; row++)
+ {
++ using namespace Magick;
+ Magick::Color c (octave::math::round (double (*img_fvec) / divisor),
+ octave::math::round (double (img_fvec[G_offset]) / divisor),
+ octave::math::round (double (img_fvec[B_offset]) / divisor),
+- MaxRGB - octave::math::round (double (*a_fvec) / divisor));
++ QuantumRange - octave::math::round (double (*a_fvec) / divisor));
+ pix[GM_idx] = c;
+ img_fvec++;
+ a_fvec++;
+@@ -1297,7 +1321,8 @@
+ octave::math::round (double (img_fvec[Y_offset]) / divisor),
+ octave::math::round (double (img_fvec[K_offset]) / divisor));
+ pix[GM_idx] = c;
+- ind[GM_idx] = MaxRGB - octave::math::round (double (*a_fvec) / divisor);
++ using namespace Magick;
++ ind[GM_idx] = QuantumRange - octave::math::round (double (*a_fvec) / divisor);
+ img_fvec++;
+ a_fvec++;
+ GM_idx += nCols;
diff --git a/sci-mathematics/octave/files/octave-4.2.0-ncurses-pkgconfig.patch b/sci-mathematics/octave/files/octave-4.2.0-ncurses-pkgconfig.patch
new file mode 100644
index 000000000000..89f6f6e7014d
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-ncurses-pkgconfig.patch
@@ -0,0 +1,37 @@
+--- a/m4/acinclude.m4
++++ b/m4/acinclude.m4
+@@ -1194,32 +1194,8 @@
+ dnl Find a suitable termlib to use.
+ dnl
+ AC_DEFUN([OCTAVE_CHECK_LIB_TERMLIB], [
+- TERM_LIBS=
+- ac_octave_save_LIBS="$LIBS"
+- AC_SEARCH_LIBS([tputs],
+- [ncurses curses termcap terminfo termlib],
+- [], [])
+- LIBS="$ac_octave_save_LIBS"
+- case "$ac_cv_search_tputs" in
+- -l*)
+- TERM_LIBS="$ac_cv_search_tputs"
+- ;;
+- no)
+- warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, or -ltermlib!"
+- AC_MSG_WARN([$warn_termlibs])
+- ;;
+- esac
+-
+-dnl Old code (9/9/2012). Delete when new code is definitely proven.
+-dnl
+-dnl for _termlib in ncurses curses termcap terminfo termlib; do
+-dnl AC_CHECK_LIB([${_termlib}], [tputs], [
+-dnl TERM_LIBS="-l${termlib}"
+-dnl octave_cv_lib_found_termlib=yes
+-dnl break])
+-dnl done
+-
+- AC_SUBST(TERM_LIBS)
++ PKG_CHECK_MODULES([TERM], [ncurses])
++ CPPFLAGS="${CPPFLAGS} ${TERM_CFLAGS}"
+ ])
+ dnl
+ dnl Check for the Qhull version.
diff --git a/sci-mathematics/octave/files/octave-4.2.0-pkgbuilddir.patch b/sci-mathematics/octave/files/octave-4.2.0-pkgbuilddir.patch
new file mode 100644
index 000000000000..a72ac97c0a15
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-pkgbuilddir.patch
@@ -0,0 +1,41 @@
+--- a/scripts/pkg/private/install.m
++++ b/scripts/pkg/private/install.m
+@@ -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 = tempname ();
+ 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.2.0-texi.patch b/sci-mathematics/octave/files/octave-4.2.0-texi.patch
new file mode 100644
index 000000000000..1352ff5a1f75
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-texi.patch
@@ -0,0 +1,11 @@
+--- a/doc/interpreter/module.mk
++++ b/doc/interpreter/module.mk
+@@ -298,6 +298,8 @@
+ $(AWK) -f $(srcdir)/doc/interpreter/mkcontrib.awk $(srcdir)/doc/interpreter/contributors.in > $@-t && \
+ mv $@-t $@
+
++doc/interpreter/preface.texi: doc/interpreter/contributors.texi
++
+ AUTHORS: doc/interpreter/preface.texi doc/interpreter/contributors.texi | doc/interpreter/$(octave_dirstamp)
+ $(AM_V_MAKEINFO)rm -f $@-t $@ && \
+ if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/doc/interpreter/contributors.texi ] && [ ! -f doc/interpreter/contributors.texi ]; then \
diff --git a/sci-mathematics/octave/files/octave-4.2.0-zlib-underlinking.patch b/sci-mathematics/octave/files/octave-4.2.0-zlib-underlinking.patch
new file mode 100644
index 000000000000..0c8736069d8e
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-zlib-underlinking.patch
@@ -0,0 +1,10 @@
+--- a/libinterp/corefcn/module.mk
++++ b/libinterp/corefcn/module.mk
+@@ -318,6 +318,7 @@
+ $(HDF5_CPPFLAGS) \
+ $(LLVM_CPPFLAGS) \
+ $(Z_CPPFLAGS)
++libinterp_corefcn_libcorefcn_la_LIBADD = $(Z_LIBS)
+
+ libinterp_corefcn_libcorefcn_la_CFLAGS = $(AM_CFLAGS) $(WARN_CFLAGS)
+