diff options
author | David Seifert <soap@gentoo.org> | 2016-08-21 11:02:05 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2016-08-21 11:03:08 +0200 |
commit | 209273b20054ce83a2aa71c62d256dea7e564cc6 (patch) | |
tree | 034eecd81538bde9fc3387e5e30abe356591eb07 /sci-mathematics/octave/files | |
parent | sys-apps/diffutils: Bump to version 3.5 (diff) | |
download | gentoo-209273b20054ce83a2aa71c62d256dea7e564cc6.tar.gz gentoo-209273b20054ce83a2aa71c62d256dea7e564cc6.tar.bz2 gentoo-209273b20054ce83a2aa71c62d256dea7e564cc6.zip |
sci-mathematics/octave: version bump
Gentoo-bug: 590676, 590792
* EAPI=6
* Make patches -p1 compliant
* Use pkg-config for finding curses flags
Package-Manager: portage-2.3.0
Diffstat (limited to 'sci-mathematics/octave/files')
4 files changed, 185 insertions, 4 deletions
diff --git a/sci-mathematics/octave/files/octave-3.4.3-texi.patch b/sci-mathematics/octave/files/octave-3.4.3-texi.patch index 661ddae4198a..2ce38b2cc30d 100644 --- a/sci-mathematics/octave/files/octave-3.4.3-texi.patch +++ b/sci-mathematics/octave/files/octave-3.4.3-texi.patch @@ -1,5 +1,5 @@ ---- 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 +--- a/doc/interpreter/Makefile.am ++++ b/doc/interpreter/Makefile.am @@ -202,6 +202,8 @@ $(AWK) -f $(srcdir)/mkcontrib.awk $(srcdir)/contributors.in > $@-t mv $@-t $@ diff --git a/sci-mathematics/octave/files/octave-3.8.1-pkgbuilddir.patch b/sci-mathematics/octave/files/octave-3.8.1-pkgbuilddir.patch index 98fe3d5e8eed..5cb278445579 100644 --- a/sci-mathematics/octave/files/octave-3.8.1-pkgbuilddir.patch +++ b/sci-mathematics/octave/files/octave-3.8.1-pkgbuilddir.patch @@ -1,5 +1,5 @@ ---- 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 +--- a/scripts/pkg/private/install.m ++++ b/scripts/pkg/private/install.m @@ -62,7 +62,14 @@ for i = 1:length (files) tgz = files{i}; diff --git a/sci-mathematics/octave/files/octave-4.0.3-imagemagick.patch b/sci-mathematics/octave/files/octave-4.0.3-imagemagick.patch new file mode 100644 index 000000000000..5ad31c29c60c --- /dev/null +++ b/sci-mathematics/octave/files/octave-4.0.3-imagemagick.patch @@ -0,0 +1,139 @@ +--- octave-4.0.3/libinterp/corefcn/__magick_read__.cc ++++ octave-4.0.3/libinterp/corefcn/__magick_read__.cc +@@ -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 = xround (double (*img_fvec) / divisor); ++ using namespace Magick; + Magick::Color c (grey, grey, grey, +- MaxRGB - xround (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 (xround (double (*img_fvec) / divisor), + xround (double (img_fvec[G_offset]) / divisor), + xround (double (img_fvec[B_offset]) / divisor), +- MaxRGB - xround (double (*a_fvec) / divisor)); ++ QuantumRange - (double (*a_fvec) / divisor)); + pix[GM_idx] = c; + img_fvec++; + a_fvec++; +@@ -1290,7 +1313,8 @@ + xround (double (img_fvec[Y_offset]) / divisor), + xround (double (img_fvec[K_offset]) / divisor)); + pix[GM_idx] = c; +- ind[GM_idx] = MaxRGB - xround (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.3-ncurses-pkgconfig.patch b/sci-mathematics/octave/files/octave-4.0.3-ncurses-pkgconfig.patch new file mode 100644 index 000000000000..20342745a281 --- /dev/null +++ b/sci-mathematics/octave/files/octave-4.0.3-ncurses-pkgconfig.patch @@ -0,0 +1,42 @@ +Instead of trying to find obscure termcap libraries, use pkg-config +to detect the proper flags required for curses support. +See also: +https://bugs.gentoo.org/show_bug.cgi?id=590676 + +--- a/m4/acinclude.m4 ++++ b/m4/acinclude.m4 +@@ -1085,32 +1085,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. |