summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-11-20 19:23:32 +0100
committerDavid Seifert <soap@gentoo.org>2016-11-20 20:23:50 +0100
commit40582ca0015450d47be3b2ff4a7390cbbb56b7c0 (patch)
tree878a6a086bffc93968535100c990ca0d891b5699 /sci-mathematics
parentkde-base/kstyles -> kde-plasma/kstyles (diff)
downloadgentoo-40582ca0015450d47be3b2ff4a7390cbbb56b7c0.tar.gz
gentoo-40582ca0015450d47be3b2ff4a7390cbbb56b7c0.tar.bz2
gentoo-40582ca0015450d47be3b2ff4a7390cbbb56b7c0.zip
sci-mathematics/octave: Version bump to 4.2.0
Gentoo-bug: 594794 * Add USE="openssl" * Add USE="portaudio" * Add USE="sndfile" * GUI provided with USE="qt5" * Replace EROOT in src_install Package-Manager: portage-2.3.2
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/octave/Manifest1
-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-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
-rw-r--r--sci-mathematics/octave/metadata.xml9
-rw-r--r--sci-mathematics/octave/octave-4.2.0.ebuild176
10 files changed, 445 insertions, 6 deletions
diff --git a/sci-mathematics/octave/Manifest b/sci-mathematics/octave/Manifest
index 3aa2d423fda0..516c99f54a9f 100644
--- a/sci-mathematics/octave/Manifest
+++ b/sci-mathematics/octave/Manifest
@@ -4,3 +4,4 @@ DIST octave-4.0.0.tar.xz 15759196 SHA256 cf6be2fac6796fda68971e249c96d026ce4a1b0
DIST octave-4.0.1.tar.xz 15637340 SHA256 d58f4861f93dbf4c98f3574d6066cfa25001349bd58ce063cf443efba4e1c287 SHA512 7fa22b50c9116c917b2a2bd63d81a8106eba95842a5de736fbf89ee6ea3dbd5542c183ab6229b62f548ad07abbf67514152a8e553e8fbdf86036d44ced669798 WHIRLPOOL 7bcc16a1e01543dc0baab92993a305c6fea7fc9eb9d806004a1b3e11479c34d8a40000de60e2291a27c846d54abc35883a16583bc324681d7897624fa40d98bb
DIST octave-4.0.2.tar.xz 15668728 SHA256 98c11ecead8ea759eb1d010ad6319a63a1c6199d3a7e2abbafe453c753090403 SHA512 e79d43528d47a2b3f0fbc9e43eefd5fb8e199dd3818ffd745c1424c7cfca9397186dab129b6f61ee52f5c5203d613e5290d8dc5e32b318cfdd3d38f7facf63cd WHIRLPOOL bf870ef3b6affb4a157951d99132078f528b52be403f7d01bfd98fd657d4089ebbf5fb78f340ce18e59ae27d5eddb9edbbf76583810bcf2dbd5c9ce8ea3434cd
DIST octave-4.0.3.tar.xz 15697064 SHA256 dc2bec8c68fa5733a5847563634b1729356a84f3a5071008ecdb793293f0aa85 SHA512 bad009235b04be09c051dd27ebef7df2542adec0a0b57c070662deebe33a0cdceb7d6816653f5afc3fc0cc1287ba1ca1a5c50858169004210224039374c9c55d WHIRLPOOL 69546306417c85b65ae371035be906d5968b1af358ba16ff3c979a925766be92b933d386b6b594c70befaf8ddd95cf27fcd94934c03713688d05141e86a92dd0
+DIST octave-4.2.0.tar.gz 25320153 SHA256 443ba73782f3531c94bcf016f2f0362a58e186ddb8269af7dcce973562795567 SHA512 5d16665d4ef8f218320f471704f8702f3a2911cc4a083cae318c1df0f787d50dddbc511dc91e11379314d65cecac6d521abac026860feca19d11ffdb52d3e678 WHIRLPOOL b5973f4e96aa4785436afa7fcc637cce021e4b5e93c3368f61712c808191bc26e3ece9d649f0b99e3df03672cb6df16c28cad931f3317b555f4f3167e4092f34
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-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)
+
diff --git a/sci-mathematics/octave/metadata.xml b/sci-mathematics/octave/metadata.xml
index 885c63396ee3..e787cf9250aa 100644
--- a/sci-mathematics/octave/metadata.xml
+++ b/sci-mathematics/octave/metadata.xml
@@ -6,16 +6,13 @@
<name>Gentoo Mathematics Project</name>
</maintainer>
<longdescription lang="en">
- 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, and for performing
- other numerical experiments. It may also be used as a batch-oriented
- language.
-</longdescription>
+ 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, and for performing other numerical experiments. It may also be used as a batch-oriented language.
+ </longdescription>
<use>
<flag name="glpk">Add support for <pkg>sci-mathematics/glpk</pkg> for linear programming</flag>
<flag name="graphicsmagick">Add support for <pkg>media-gfx/graphicsmagick</pkg></flag>
<flag name="gui">Enable the graphical user interface</flag>
+ <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> for low level hash functions</flag>
<flag name="qhull">Add support for <pkg>media-libs/qhull</pkg>, to allow `delaunay', `convhull', and related functions</flag>
<flag name="qrupdate">Add support for <pkg>sci-libs/qrupdate</pkg>for QR and Cholesky update functions</flag>
<flag name="sparse">Add enhanced support for sparse matrix algebra with SuiteSparse</flag>
diff --git a/sci-mathematics/octave/octave-4.2.0.ebuild b/sci-mathematics/octave/octave-4.2.0.ebuild
new file mode 100644
index 000000000000..ed9861c2af39
--- /dev/null
+++ b/sci-mathematics/octave/octave-4.2.0.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools flag-o-matic fortran-2 java-pkg-opt-2 pax-utils toolchain-funcs
+
+DESCRIPTION="High-level interactive language for numerical computations"
+LICENSE="GPL-3"
+HOMEPAGE="http://www.octave.org/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0/${PV}"
+IUSE="curl doc fftw +glpk gnuplot graphicsmagick hdf5 +imagemagick java opengl openssl
+ portaudio postscript +qhull +qrupdate qt5 readline sndfile +sparse static-libs X zlib"
+REQUIRED_USE="?? ( graphicsmagick imagemagick )"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ app-arch/bzip2
+ app-text/ghostscript-gpl
+ dev-libs/libpcre:3=
+ sys-libs/ncurses:0=
+ sys-libs/zlib
+ virtual/blas
+ virtual/lapack
+ curl? ( net-misc/curl:0= )
+ fftw? ( sci-libs/fftw:3.0= )
+ glpk? ( sci-mathematics/glpk:0= )
+ gnuplot? ( sci-visualization/gnuplot )
+ hdf5? ( sci-libs/hdf5:0= )
+ graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] )
+ imagemagick? ( media-gfx/imagemagick:=[cxx] )
+ java? ( >=virtual/jre-1.6.0:* )
+ opengl? (
+ media-libs/freetype:2=
+ media-libs/fontconfig:1.0=
+ >=x11-libs/fltk-1.3:1=[opengl,xft]
+ x11-libs/gl2ps:0=
+ virtual/glu )
+ openssl? ( dev-libs/openssl:0= )
+ portaudio? ( media-libs/portaudio )
+ postscript? (
+ app-text/epstool
+ media-gfx/pstoedit
+ media-gfx/transfig )
+ qhull? ( media-libs/qhull:0= )
+ qrupdate? ( sci-libs/qrupdate:0= )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5 )
+ readline? ( sys-libs/readline:0= )
+ sndfile? ( media-libs/libsndfile )
+ sparse? (
+ sci-libs/arpack:0=
+ sci-libs/camd:0=
+ sci-libs/ccolamd:0=
+ sci-libs/cholmod:0=
+ sci-libs/colamd:0=
+ sci-libs/cxsparse:0=
+ sci-libs/umfpack:0= )
+ X? ( x11-libs/libX11:0= )"
+
+DEPEND="${RDEPEND}
+ qrupdate? ( app-misc/pax-utils )
+ sparse? ( app-misc/pax-utils )
+ java? ( >=virtual/jdk-1.6.0 )
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-genericrecommended
+ dev-texlive/texlive-metapost )
+ sys-apps/texinfo
+ dev-util/gperf
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.2.0-texi.patch
+ "${FILESDIR}"/${PN}-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch
+ "${FILESDIR}"/${PN}-4.2.0-imagemagick-configure.patch
+ "${FILESDIR}"/${PN}-4.2.0-imagemagick.patch
+ "${FILESDIR}"/${PN}-4.2.0-pkgbuilddir.patch
+ "${FILESDIR}"/${PN}-4.2.0-ncurses-pkgconfig.patch
+ "${FILESDIR}"/${PN}-4.2.0-zlib-underlinking.patch
+)
+
+src_prepare() {
+ # nasty prefix hacks for fltk:1 and qt4 linking
+ if use prefix; then
+ use opengl && append-ldflags -Wl,-rpath,"${EPREFIX}/usr/$(get_libdir)/fltk-1"
+ fi
+
+ # occasional fail on install, force regeneration (bug #401189)
+ rm doc/interpreter/contributors.texi || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # [QA] detect underlinking #593670
+ append-ldflags $(test-flags-CXX -Wl,-z,defs)
+
+ # unfortunate dependency on mpi from hdf5 (bug #302621)
+ use hdf5 && has_version sci-libs/hdf5[mpi] && \
+ export CXX=mpicxx CC=mpicc FC=mpif77 F77=mpif77
+
+ local myconf=()
+ if use graphicsmagick; then
+ myconf+=( --with-magick=GraphicsMagick )
+ elif use imagemagick; then
+ myconf+=( --with-magick=ImageMagick )
+ else
+ myconf+=( --without-magick )
+ fi
+
+ econf "${myconf[@]}" \
+ --localstatedir="${EPREFIX}/var/state/octave" \
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
+ --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" \
+ --disable-64 \
+ --disable-jit \
+ --enable-shared \
+ --with-z \
+ --with-bz2 \
+ --without-OSMesa \
+ $(use_enable static-libs static) \
+ $(use_enable doc docs) \
+ $(use_enable java) \
+ $(use_enable readline) \
+ $(use_with curl) \
+ $(use_with fftw fftw3) \
+ $(use_with fftw fftw3f) \
+ $(use_enable fftw fftw-threads) \
+ $(use_with glpk) \
+ $(use_with hdf5) \
+ $(use_with opengl) \
+ $(use_with opengl fltk) \
+ $(use_with openssl) \
+ $(use_with portaudio) \
+ $(use_with qhull) \
+ $(use_with qrupdate) \
+ $(use_with qt5 qt 5) \
+ $(use_with sndfile) \
+ $(use_with sparse arpack) \
+ $(use_with sparse umfpack) \
+ $(use_with sparse colamd) \
+ $(use_with sparse ccolamd) \
+ $(use_with sparse cholmod) \
+ $(use_with sparse cxsparse) \
+ $(use_with X x)
+}
+
+src_compile() {
+ default
+ if use java; then
+ pax-mark m "${S}/src/.libs/octave-cli"
+ fi
+}
+
+src_install() {
+ default
+ if use doc; then
+ dodoc $(find doc -name '*.pdf')
+ else
+ # bug 566134, macros.texi is installed by make install if use doc
+ insinto /usr/share/${PN}/${PV}/etc
+ doins doc/interpreter/macros.texi
+ fi
+ [[ -e test/fntests.log ]] && dodoc test/fntests.log
+ use java && \
+ java-pkg_regjar "${ED%/}/usr/share/${PN}/${PV}/m/java/octave.jar"
+ echo "LDPATH=${EPREFIX}/usr/$(get_libdir)/${PN}/${PV}" > 99octave || die
+ doenvd 99octave
+}