Gentoo Archives: gentoo-commits

From: Mark Wright <gienah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/octave/files/, sci-mathematics/octave/
Date: Tue, 03 Jul 2018 12:47:25
Message-Id: 1530622001.9bec43136e0fea48bb5e352b0ac9f14b78444690.gienah@gentoo
1 commit: 9bec43136e0fea48bb5e352b0ac9f14b78444690
2 Author: Mark Wright <gienah <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 3 12:46:41 2018 +0000
4 Commit: Mark Wright <gienah <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 3 12:46:41 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bec4313
7
8 sci-mathematics/octave: Bump to 4.4.0, thanks Fabio Rossi
9
10 for providing a 4.4.0 ebuild and patches, thanks to Anton Kochkov for
11 reporting 655308.
12
13 Rename openssl USE flag to ssl, add support for USE libressl (not tested
14 with libressl), thanks to Alessandro Barbieri for reporting 620864.
15
16 Closes: https://bugs.gentoo.org/655308
17 Closes: https://bugs.gentoo.org/620864
18 Package-Manager: Portage-2.3.41, Repoman-2.3.9
19
20 sci-mathematics/octave/Manifest | 1 +
21 .../files/octave-4.4.0-imagemagick-configure.patch | 16 ++
22 .../octave/files/octave-4.4.0-imagemagick.patch | 16 ++
23 .../octave/files/octave-4.4.0-qt-5.11.patch | 10 ++
24 .../octave/files/octave-4.4.0-texi.patch | 11 ++
25 sci-mathematics/octave/octave-4.4.0.ebuild | 192 +++++++++++++++++++++
26 6 files changed, 246 insertions(+)
27
28 diff --git a/sci-mathematics/octave/Manifest b/sci-mathematics/octave/Manifest
29 index 5a47e212d7a..3280adb74dd 100644
30 --- a/sci-mathematics/octave/Manifest
31 +++ b/sci-mathematics/octave/Manifest
32 @@ -1 +1,2 @@
33 DIST octave-4.2.2.tar.gz 25624087 BLAKE2B c46de90d9a985c2b6b4f87b94b56f2ba4fb648ca0a0aff1f64e9b9d27a6d791e8657c2bff0c4daa3de5ac3622c23b34724e740ec1fe0f1a71d8f416c9f58d88a SHA512 b94edd79adc0e19229bb654037910201b51b6cfa373d63de5e3aa69e9b659b2e2790e2d2b4b5e8d2f12b26846c20ba5c12eae657155c8329e85e970f738d08c2
34 +DIST octave-4.4.0.tar.gz 29009355 BLAKE2B 3f7b4a6e1262cd0009f8649a570749acc2dc8b42aa1f88a6ce69b9c6bb99a95390f5a153c391a60ac118dc1e87f15596c7225764634c6076bb1ab3dfa4e09bcc SHA512 6a167a4a6a2f6ae70511f13b14feea0ce3efcc964227c93f3195adb3a1f1f28dda56f86a2e1c7c5e9f54891d2846fb96972092387e3da41f2e04cb700606ffc2
35
36 diff --git a/sci-mathematics/octave/files/octave-4.4.0-imagemagick-configure.patch b/sci-mathematics/octave/files/octave-4.4.0-imagemagick-configure.patch
37 new file mode 100644
38 index 00000000000..ce81b801d99
39 --- /dev/null
40 +++ b/sci-mathematics/octave/files/octave-4.4.0-imagemagick-configure.patch
41 @@ -0,0 +1,16 @@
42 +--- a/configure.ac 2018-04-30 19:03:56.000000000 +0200
43 ++++ a/configure.ac.new 2018-05-22 12:23:30.371174341 +0200
44 +@@ -1946,11 +1946,11 @@
45 + MAGICK_LIBS=
46 +
47 + PKG_CHECK_EXISTS([$magick++], [
48 +- dnl Make sure we only get -I, -L, and -l flags.
49 ++ dnl Make sure we only get -I, -D, -L, and -l flags.
50 + dnl Some Graphics/ImageMagick++ dnl packages add extra flags that are
51 + dnl useful when building Graphics/ImageMagick++ extentions. These extra
52 + dnl flags break the Octave build.
53 +- MAGICK_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $magick++ | $SED -e 's/^ *$//')"
54 ++ MAGICK_CPPFLAGS=`$PKG_CONFIG --cflags $magick++ | sed -e 's/\(-@<:@DI@:>@@<:@^ \t@:>@*\)\|\(-@<:@^ \t@:>@*\)/\1/g'`
55 + MAGICK_LDFLAGS="$($PKG_CONFIG --libs-only-L $magick++ | $SED -e 's/^ *$//')"
56 + MAGICK_LIBS="$($PKG_CONFIG --libs-only-l $magick++ | $SED -e 's/^ *$//')"
57 +
58
59 diff --git a/sci-mathematics/octave/files/octave-4.4.0-imagemagick.patch b/sci-mathematics/octave/files/octave-4.4.0-imagemagick.patch
60 new file mode 100644
61 index 00000000000..2f651e0995e
62 --- /dev/null
63 +++ b/sci-mathematics/octave/files/octave-4.4.0-imagemagick.patch
64 @@ -0,0 +1,16 @@
65 +--- a/libinterp/corefcn/__magick_read__.cc 2018-05-22 12:25:37.688173855 +0200
66 ++++ a/libinterp/corefcn/__magick_read__.cc.new 2018-05-22 12:32:51.475172200 +0200
67 +@@ -817,10 +817,11 @@
68 + // depth is 8, there's a good chance that we will be limited. It
69 + // is also the GraphicsMagick recommended setting and the default
70 + // for ImageMagick.
71 +- if (QuantumDepth < 16)
72 ++ using namespace Magick;
73 ++ if (MAGICKCORE_QUANTUM_DEPTH < 16)
74 + warning_with_id ("Octave:GraphicsMagick-Quantum-Depth",
75 + "your version of %s limits images to %d bits per pixel\n",
76 +- MagickPackageName, QuantumDepth);
77 ++ MagickPackageName, MAGICKCORE_QUANTUM_DEPTH);
78 +
79 + initialized = true;
80 + }
81
82 diff --git a/sci-mathematics/octave/files/octave-4.4.0-qt-5.11.patch b/sci-mathematics/octave/files/octave-4.4.0-qt-5.11.patch
83 new file mode 100644
84 index 00000000000..70ffbb47199
85 --- /dev/null
86 +++ b/sci-mathematics/octave/files/octave-4.4.0-qt-5.11.patch
87 @@ -0,0 +1,10 @@
88 +--- octave-4.4.0-orig/libgui/src/settings-dialog.cc 2018-05-01 03:03:56.000000000 +1000
89 ++++ octave-4.4.0/libgui/src/settings-dialog.cc 2018-07-03 19:35:41.865149269 +1000
90 +@@ -41,6 +41,7 @@
91 + #include <QHash>
92 + #include <QMessageBox>
93 + #include <QTextCodec>
94 ++#include <QButtonGroup>
95 +
96 + #if defined (HAVE_QSCINTILLA)
97 + # include "octave-qscintilla.h"
98
99 diff --git a/sci-mathematics/octave/files/octave-4.4.0-texi.patch b/sci-mathematics/octave/files/octave-4.4.0-texi.patch
100 new file mode 100644
101 index 00000000000..90ffa5361bf
102 --- /dev/null
103 +++ b/sci-mathematics/octave/files/octave-4.4.0-texi.patch
104 @@ -0,0 +1,11 @@
105 +--- a/doc/interpreter/module.mk 2018-04-30 19:03:56.000000000 +0200
106 ++++ a/doc/interpreter/module.mk.new 2018-05-22 12:17:03.587175816 +0200
107 +@@ -368,6 +368,8 @@
108 + $(AWK) -f $(srcdir)/%reldir%/mkcontrib.awk $(srcdir)/%reldir%/contributors.in > $@-t && \
109 + mv $@-t $@
110 +
111 ++%reldir%/preface.texi: %reldir%/contributors.texi
112 ++
113 + AUTHORS: %reldir%/preface.texi %reldir%/contributors.texi | %reldir%/$(octave_dirstamp)
114 + $(AM_V_MAKEINFO)rm -f $@-t $@ && \
115 + if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/%reldir%/contributors.texi ] && [ ! -f %reldir%/contributors.texi ]; then \
116
117 diff --git a/sci-mathematics/octave/octave-4.4.0.ebuild b/sci-mathematics/octave/octave-4.4.0.ebuild
118 new file mode 100644
119 index 00000000000..54e929a545b
120 --- /dev/null
121 +++ b/sci-mathematics/octave/octave-4.4.0.ebuild
122 @@ -0,0 +1,192 @@
123 +# Copyright 1999-2018 Gentoo Foundation
124 +# Distributed under the terms of the GNU General Public License v2
125 +
126 +EAPI=6
127 +
128 +inherit autotools flag-o-matic fortran-2 gnome2-utils java-pkg-opt-2 pax-utils toolchain-funcs xdg-utils
129 +
130 +DESCRIPTION="High-level interactive language for numerical computations"
131 +LICENSE="GPL-3"
132 +HOMEPAGE="https://www.gnu.org/software/octave/"
133 +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
134 +
135 +SLOT="0/${PV}"
136 +IUSE="curl doc fftw +glpk gnuplot graphicsmagick gui hdf5 +imagemagick java libressl opengl
137 + portaudio postscript +qhull +qrupdate readline sndfile +sparse ssl static-libs X zlib"
138 +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
139 +
140 +RDEPEND="
141 + app-arch/bzip2
142 + app-text/ghostscript-gpl
143 + dev-libs/libpcre:3=
144 + sys-libs/ncurses:0=
145 + sys-libs/zlib
146 + virtual/blas
147 + virtual/lapack
148 + curl? ( net-misc/curl:0= )
149 + fftw? ( sci-libs/fftw:3.0= )
150 + glpk? ( sci-mathematics/glpk:0= )
151 + gnuplot? ( sci-visualization/gnuplot )
152 + gui? (
153 + dev-qt/qtcore:5
154 + dev-qt/qtgui:5
155 + dev-qt/qtnetwork:5
156 + dev-qt/qtopengl:5
157 + x11-libs/qscintilla:=
158 + )
159 + hdf5? ( sci-libs/hdf5:0= )
160 + imagemagick? (
161 + !graphicsmagick? ( media-gfx/imagemagick:=[cxx] )
162 + graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] )
163 + )
164 + java? ( >=virtual/jre-1.6.0:* )
165 + opengl? (
166 + media-libs/freetype:2=
167 + media-libs/fontconfig:1.0=
168 + virtual/glu
169 + >=x11-libs/fltk-1.3:1=[opengl,xft]
170 + x11-libs/gl2ps:0=
171 + )
172 + ssl? (
173 + !libressl? ( dev-libs/openssl:0= )
174 + libressl? ( dev-libs/libressl:0= )
175 + )
176 + portaudio? ( media-libs/portaudio )
177 + postscript? (
178 + app-text/epstool
179 + media-gfx/pstoedit
180 + media-gfx/transfig
181 + )
182 + qhull? ( media-libs/qhull:0= )
183 + qrupdate? ( sci-libs/qrupdate:0= )
184 + readline? ( sys-libs/readline:0= )
185 + sndfile? ( media-libs/libsndfile )
186 + sparse? (
187 + sci-libs/arpack:0=
188 + sci-libs/camd:0=
189 + sci-libs/ccolamd:0=
190 + sci-libs/cholmod:0=
191 + sci-libs/colamd:0=
192 + sci-libs/cxsparse:0=
193 + sci-libs/umfpack:0=
194 + )
195 + X? ( x11-libs/libX11:0= )"
196 +DEPEND="${RDEPEND}
197 + dev-util/gperf
198 + sys-apps/texinfo
199 + virtual/pkgconfig
200 + doc? (
201 + dev-texlive/texlive-fontsrecommended
202 + || ( dev-texlive/texlive-plaingeneric dev-texlive/texlive-genericrecommended )
203 + dev-texlive/texlive-metapost
204 + virtual/latex-base
205 + )
206 + gui? ( dev-qt/linguist-tools:5 )
207 + java? ( >=virtual/jdk-1.6.0 )
208 + qrupdate? ( app-misc/pax-utils )
209 + sparse? ( app-misc/pax-utils )"
210 +
211 +PATCHES=(
212 + "${FILESDIR}"/${PN}-4.4.0-texi.patch
213 + "${FILESDIR}"/${PN}-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch
214 + "${FILESDIR}"/${PN}-4.4.0-imagemagick-configure.patch
215 + "${FILESDIR}"/${PN}-4.4.0-imagemagick.patch
216 + "${FILESDIR}"/${PN}-4.2.0-pkgbuilddir.patch
217 + "${FILESDIR}"/${PN}-4.2.2-ncurses-pkgconfig.patch
218 + "${FILESDIR}"/${PN}-4.2.0-zlib-underlinking.patch
219 + "${FILESDIR}"/${PN}-4.4.0-qt-5.11.patch
220 +)
221 +
222 +src_prepare() {
223 + # nasty prefix hacks for fltk:1 linking
224 + if use prefix; then
225 + use opengl && append-ldflags -Wl,-rpath,"${EPREFIX}/usr/$(get_libdir)/fltk-1"
226 + fi
227 +
228 + # occasional fail on install, force regeneration (bug #401189)
229 + rm doc/interpreter/contributors.texi || die
230 +
231 + default
232 + eautoreconf
233 +}
234 +
235 +src_configure() {
236 + # [QA] detect underlinking #593670
237 + append-ldflags $(test-flags-CXX -Wl,-z,defs)
238 +
239 + # unfortunate dependency on mpi from hdf5 (bug #302621)
240 + use hdf5 && has_version sci-libs/hdf5[mpi] && \
241 + export CXX=mpicxx CC=mpicc FC=mpif77 F77=mpif77
242 +
243 + econf \
244 + --localstatedir="${EPREFIX}/var/state/octave" \
245 + --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
246 + --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" \
247 + --disable-64 \
248 + --disable-jit \
249 + --enable-shared \
250 + --with-z \
251 + --with-bz2 \
252 + --without-OSMesa \
253 + $(use_enable static-libs static) \
254 + $(use_enable doc docs) \
255 + $(use_enable java) \
256 + $(use_enable readline) \
257 + $(use_with curl) \
258 + $(use_with fftw fftw3) \
259 + $(use_with fftw fftw3f) \
260 + $(use_enable fftw fftw-threads) \
261 + $(use_with glpk) \
262 + $(use_with hdf5) \
263 + $(use_with imagemagick magick $(usex graphicsmagick GraphicsMagick ImageMagick)) \
264 + $(use_with opengl) \
265 + $(use_with opengl fltk) \
266 + $(use_with ssl openssl) \
267 + $(use_with portaudio) \
268 + $(use_with qhull) \
269 + $(use_with qrupdate) \
270 + $(use_with gui qt 5) \
271 + $(use_with sndfile) \
272 + $(use_with sparse arpack) \
273 + $(use_with sparse umfpack) \
274 + $(use_with sparse colamd) \
275 + $(use_with sparse ccolamd) \
276 + $(use_with sparse cholmod) \
277 + $(use_with sparse cxsparse) \
278 + $(use_with X x)
279 +}
280 +
281 +src_compile() {
282 + default
283 + if use java; then
284 + pax-mark m "${S}/src/.libs/octave-cli"
285 + fi
286 +}
287 +
288 +src_install() {
289 + default
290 + if use doc; then
291 + dodoc $(find doc -name '*.pdf')
292 + else
293 + # bug 566134, macros.texi is installed by make install if use doc
294 + insinto /usr/share/${PN}/${PV}/etc
295 + doins doc/interpreter/macros.texi
296 + fi
297 + [[ -e test/fntests.log ]] && dodoc test/fntests.log
298 + use java && \
299 + java-pkg_regjar "${ED%/}/usr/share/${PN}/${PV}/m/java/octave.jar"
300 + echo "LDPATH=${EPREFIX}/usr/$(get_libdir)/${PN}/${PV}" > 99octave || die
301 + doenvd 99octave
302 +}
303 +
304 +pkg_postinst() {
305 + gnome2_icon_cache_update
306 + xdg_mimeinfo_database_update
307 + xdg_desktop_database_update
308 +}
309 +
310 +pkg_postrm() {
311 + gnome2_icon_cache_update
312 + xdg_mimeinfo_database_update
313 + xdg_desktop_database_update
314 +}