1 |
commit: 3613246e32e9e7d129f8b2bb981b816bdc6dd8c4 |
2 |
Author: Jouni Kosonen <jouni.kosonen <AT> tukesoft <DOT> com> |
3 |
AuthorDate: Wed Mar 21 15:51:38 2018 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 21 22:04:45 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3613246e |
7 |
|
8 |
sci-mathematics/octave: version bump to 4.2.2. |
9 |
|
10 |
Closes: https://bugs.gentoo.org/650974 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/7534 |
12 |
|
13 |
sci-mathematics/octave/Manifest | 1 + |
14 |
.../octave-4.2.2-fix-qscintilla-detection.patch | 14 ++ |
15 |
.../files/octave-4.2.2-imagemagick-configure.patch | 16 ++ |
16 |
.../files/octave-4.2.2-ncurses-pkgconfig.patch | 37 ++++ |
17 |
sci-mathematics/octave/octave-4.2.2.ebuild | 187 +++++++++++++++++++++ |
18 |
5 files changed, 255 insertions(+) |
19 |
|
20 |
diff --git a/sci-mathematics/octave/Manifest b/sci-mathematics/octave/Manifest |
21 |
index 071b0414714..7bc14e5915b 100644 |
22 |
--- a/sci-mathematics/octave/Manifest |
23 |
+++ b/sci-mathematics/octave/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST octave-4.2.1.tar.gz 25409651 BLAKE2B c53dd025cbad023d4d343d47ff13051f6f66bc8cfeece6c56eda83a80c92d2256fd1e75d5574ae024e42d707eb22b60420269f91a4930642aec8e3391a17b035 SHA512 c437c57eb145ddea7b97124dc6406d130fd91c9141198b93bc756bb05cb3f7645a7c591443faeb65e69edf6abc2b8d5612e515f7703a04eed27213a2133009b7 |
26 |
+DIST octave-4.2.2.tar.gz 25624087 BLAKE2B c46de90d9a985c2b6b4f87b94b56f2ba4fb648ca0a0aff1f64e9b9d27a6d791e8657c2bff0c4daa3de5ac3622c23b34724e740ec1fe0f1a71d8f416c9f58d88a SHA512 b94edd79adc0e19229bb654037910201b51b6cfa373d63de5e3aa69e9b659b2e2790e2d2b4b5e8d2f12b26846c20ba5c12eae657155c8329e85e970f738d08c2 |
27 |
|
28 |
diff --git a/sci-mathematics/octave/files/octave-4.2.2-fix-qscintilla-detection.patch b/sci-mathematics/octave/files/octave-4.2.2-fix-qscintilla-detection.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..80fc2801323 |
31 |
--- /dev/null |
32 |
+++ b/sci-mathematics/octave/files/octave-4.2.2-fix-qscintilla-detection.patch |
33 |
@@ -0,0 +1,14 @@ |
34 |
+In Gentoo, QScintilla for Qt5 has the same library name |
35 |
+as its Qt4 variant. |
36 |
+ |
37 |
+--- a/m4/acinclude.m4 |
38 |
++++ b/m4/acinclude.m4 |
39 |
+@@ -1460,7 +1460,7 @@ |
40 |
+ ;; |
41 |
+ 5) |
42 |
+ QT_MODULES="Qt5Core Qt5Gui Qt5Network Qt5OpenGL Qt5PrintSupport" |
43 |
+- octave_qscintilla_libnames="qscintilla2-qt5 qscintilla2_qt5 qt5scintilla2" |
44 |
++ octave_qscintilla_libnames="qscintilla2_qt5 qscintilla2" |
45 |
+ ;; |
46 |
+ *) |
47 |
+ AC_MSG_ERROR([Unrecognized Qt version $qt_version]) |
48 |
|
49 |
diff --git a/sci-mathematics/octave/files/octave-4.2.2-imagemagick-configure.patch b/sci-mathematics/octave/files/octave-4.2.2-imagemagick-configure.patch |
50 |
new file mode 100644 |
51 |
index 00000000000..d80c23ec422 |
52 |
--- /dev/null |
53 |
+++ b/sci-mathematics/octave/files/octave-4.2.2-imagemagick-configure.patch |
54 |
@@ -0,0 +1,16 @@ |
55 |
+--- a/configure.ac |
56 |
++++ b/configure.ac |
57 |
+@@ -1560,11 +1560,11 @@ if test $check_magick = yes; then |
58 |
+ MAGICK_LIBS= |
59 |
+ |
60 |
+ PKG_CHECK_EXISTS([$magick++], [ |
61 |
+- ## Make sure we only get -I, -L, and -l flags. Some Graphics/ImageMagick++ |
62 |
++ ## Make sure we only get -I, -D, -L, and -l flags. Some Graphics/ImageMagick++ |
63 |
+ ## packages add extra flags that are useful when building |
64 |
+ ## Graphics/ImageMagick++ extentions. These extra flags break the |
65 |
+ ## Octave build. |
66 |
+- MAGICK_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $magick++ | $SED -e 's/^ *$//')" |
67 |
++ MAGICK_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $magick++ | $SED -e 's/^ *$//' | $SED -e 's/\(-@<:@DI@:>@@<:@^ \t@:>@*\)\|\(-@<:@^ \t@:>@*\)/\1/g')" |
68 |
+ MAGICK_LDFLAGS="$($PKG_CONFIG --libs-only-L $magick++ | $SED -e 's/^ *$//')" |
69 |
+ MAGICK_LIBS="$($PKG_CONFIG --libs-only-l $magick++ | $SED -e 's/^ *$//')" |
70 |
+ |
71 |
|
72 |
diff --git a/sci-mathematics/octave/files/octave-4.2.2-ncurses-pkgconfig.patch b/sci-mathematics/octave/files/octave-4.2.2-ncurses-pkgconfig.patch |
73 |
new file mode 100644 |
74 |
index 00000000000..d20fef5c56e |
75 |
--- /dev/null |
76 |
+++ b/sci-mathematics/octave/files/octave-4.2.2-ncurses-pkgconfig.patch |
77 |
@@ -0,0 +1,37 @@ |
78 |
+--- a/m4/acinclude.m4 |
79 |
++++ b/m4/acinclude.m4 |
80 |
+@@ -1327,32 +1327,8 @@ |
81 |
+ dnl Find a suitable termlib to use. |
82 |
+ dnl |
83 |
+ AC_DEFUN([OCTAVE_CHECK_LIB_TERMLIB], [ |
84 |
+- TERM_LIBS= |
85 |
+- ac_octave_save_LIBS="$LIBS" |
86 |
+- AC_SEARCH_LIBS([tputs], |
87 |
+- [ncurses curses termcap terminfo termlib], |
88 |
+- [], []) |
89 |
+- LIBS="$ac_octave_save_LIBS" |
90 |
+- case "$ac_cv_search_tputs" in |
91 |
+- -l*) |
92 |
+- TERM_LIBS="$ac_cv_search_tputs" |
93 |
+- ;; |
94 |
+- no) |
95 |
+- warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, or -ltermlib!" |
96 |
+- AC_MSG_WARN([$warn_termlibs]) |
97 |
+- ;; |
98 |
+- esac |
99 |
+- |
100 |
+-dnl Old code (9/9/2012). Delete when new code is definitely proven. |
101 |
+-dnl |
102 |
+-dnl for _termlib in ncurses curses termcap terminfo termlib; do |
103 |
+-dnl AC_CHECK_LIB([${_termlib}], [tputs], [ |
104 |
+-dnl TERM_LIBS="-l${termlib}" |
105 |
+-dnl octave_cv_lib_found_termlib=yes |
106 |
+-dnl break]) |
107 |
+-dnl done |
108 |
+- |
109 |
+- AC_SUBST(TERM_LIBS) |
110 |
++ PKG_CHECK_MODULES([TERM], [ncurses]) |
111 |
++ CPPFLAGS="${CPPFLAGS} ${TERM_CFLAGS}" |
112 |
+ ]) |
113 |
+ dnl |
114 |
+ dnl Check for the Qhull version. |
115 |
|
116 |
diff --git a/sci-mathematics/octave/octave-4.2.2.ebuild b/sci-mathematics/octave/octave-4.2.2.ebuild |
117 |
new file mode 100644 |
118 |
index 00000000000..f120643f017 |
119 |
--- /dev/null |
120 |
+++ b/sci-mathematics/octave/octave-4.2.2.ebuild |
121 |
@@ -0,0 +1,187 @@ |
122 |
+# Copyright 1999-2018 Gentoo Foundation |
123 |
+# Distributed under the terms of the GNU General Public License v2 |
124 |
+ |
125 |
+EAPI=6 |
126 |
+ |
127 |
+inherit autotools flag-o-matic fortran-2 java-pkg-opt-2 pax-utils toolchain-funcs xdg-utils |
128 |
+ |
129 |
+DESCRIPTION="High-level interactive language for numerical computations" |
130 |
+LICENSE="GPL-3" |
131 |
+HOMEPAGE="http://www.octave.org/" |
132 |
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" |
133 |
+ |
134 |
+SLOT="0/${PV}" |
135 |
+IUSE="curl doc fftw +glpk gnuplot graphicsmagick gui hdf5 +imagemagick java opengl openssl |
136 |
+ portaudio postscript +qhull +qrupdate readline sndfile +sparse static-libs X zlib" |
137 |
+KEYWORDS="amd64 ~arm hppa ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux" |
138 |
+ |
139 |
+RDEPEND=" |
140 |
+ app-arch/bzip2 |
141 |
+ app-text/ghostscript-gpl |
142 |
+ dev-libs/libpcre:3= |
143 |
+ sys-libs/ncurses:0= |
144 |
+ sys-libs/zlib |
145 |
+ virtual/blas |
146 |
+ virtual/lapack |
147 |
+ curl? ( net-misc/curl:0= ) |
148 |
+ fftw? ( sci-libs/fftw:3.0= ) |
149 |
+ glpk? ( sci-mathematics/glpk:0= ) |
150 |
+ gnuplot? ( sci-visualization/gnuplot ) |
151 |
+ hdf5? ( sci-libs/hdf5:0= ) |
152 |
+ imagemagick? ( |
153 |
+ !graphicsmagick? ( media-gfx/imagemagick:=[cxx] ) |
154 |
+ graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] ) |
155 |
+ ) |
156 |
+ java? ( >=virtual/jre-1.6.0:* ) |
157 |
+ opengl? ( |
158 |
+ media-libs/freetype:2= |
159 |
+ media-libs/fontconfig:1.0= |
160 |
+ >=x11-libs/fltk-1.3:1=[opengl,xft] |
161 |
+ x11-libs/gl2ps:0= |
162 |
+ virtual/glu |
163 |
+ ) |
164 |
+ openssl? ( dev-libs/openssl:0= ) |
165 |
+ portaudio? ( media-libs/portaudio ) |
166 |
+ postscript? ( |
167 |
+ app-text/epstool |
168 |
+ media-gfx/pstoedit |
169 |
+ media-gfx/transfig |
170 |
+ ) |
171 |
+ qhull? ( media-libs/qhull:0= ) |
172 |
+ qrupdate? ( sci-libs/qrupdate:0= ) |
173 |
+ gui? ( |
174 |
+ dev-qt/qtcore:5 |
175 |
+ dev-qt/qtgui:5 |
176 |
+ dev-qt/qtnetwork:5 |
177 |
+ dev-qt/qtopengl:5 |
178 |
+ >=x11-libs/qscintilla-2.9.3-r2:=[qt5(+)] |
179 |
+ ) |
180 |
+ readline? ( sys-libs/readline:0= ) |
181 |
+ sndfile? ( media-libs/libsndfile ) |
182 |
+ sparse? ( |
183 |
+ sci-libs/arpack:0= |
184 |
+ sci-libs/camd:0= |
185 |
+ sci-libs/ccolamd:0= |
186 |
+ sci-libs/cholmod:0= |
187 |
+ sci-libs/colamd:0= |
188 |
+ sci-libs/cxsparse:0= |
189 |
+ sci-libs/umfpack:0= |
190 |
+ ) |
191 |
+ X? ( x11-libs/libX11:0= )" |
192 |
+DEPEND="${RDEPEND} |
193 |
+ gui? ( dev-qt/linguist-tools:5 ) |
194 |
+ qrupdate? ( app-misc/pax-utils ) |
195 |
+ sparse? ( app-misc/pax-utils ) |
196 |
+ java? ( >=virtual/jdk-1.6.0 ) |
197 |
+ doc? ( |
198 |
+ virtual/latex-base |
199 |
+ dev-texlive/texlive-fontsrecommended |
200 |
+ || ( dev-texlive/texlive-plaingeneric dev-texlive/texlive-genericrecommended ) |
201 |
+ dev-texlive/texlive-metapost |
202 |
+ ) |
203 |
+ sys-apps/texinfo |
204 |
+ dev-util/gperf |
205 |
+ virtual/pkgconfig" |
206 |
+ |
207 |
+PATCHES=( |
208 |
+ "${FILESDIR}"/${PN}-4.2.0-texi.patch |
209 |
+ "${FILESDIR}"/${PN}-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch |
210 |
+ "${FILESDIR}"/${P}-imagemagick-configure.patch |
211 |
+ "${FILESDIR}"/${PN}-4.2.0-imagemagick.patch |
212 |
+ "${FILESDIR}"/${PN}-4.2.0-pkgbuilddir.patch |
213 |
+ "${FILESDIR}"/${P}-ncurses-pkgconfig.patch |
214 |
+ "${FILESDIR}"/${PN}-4.2.0-zlib-underlinking.patch |
215 |
+ "${FILESDIR}"/${P}-fix-qscintilla-detection.patch |
216 |
+) |
217 |
+ |
218 |
+src_prepare() { |
219 |
+ # nasty prefix hacks for fltk:1 and qt4 linking |
220 |
+ if use prefix; then |
221 |
+ use opengl && append-ldflags -Wl,-rpath,"${EPREFIX}/usr/$(get_libdir)/fltk-1" |
222 |
+ fi |
223 |
+ |
224 |
+ # occasional fail on install, force regeneration (bug #401189) |
225 |
+ rm doc/interpreter/contributors.texi || die |
226 |
+ |
227 |
+ default |
228 |
+ eautoreconf |
229 |
+} |
230 |
+ |
231 |
+src_configure() { |
232 |
+ # [QA] detect underlinking #593670 |
233 |
+ append-ldflags $(test-flags-CXX -Wl,-z,defs) |
234 |
+ |
235 |
+ # unfortunate dependency on mpi from hdf5 (bug #302621) |
236 |
+ use hdf5 && has_version sci-libs/hdf5[mpi] && \ |
237 |
+ export CXX=mpicxx CC=mpicc FC=mpif77 F77=mpif77 |
238 |
+ |
239 |
+ econf \ |
240 |
+ --localstatedir="${EPREFIX}/var/state/octave" \ |
241 |
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \ |
242 |
+ --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" \ |
243 |
+ --disable-64 \ |
244 |
+ --disable-jit \ |
245 |
+ --enable-shared \ |
246 |
+ --with-z \ |
247 |
+ --with-bz2 \ |
248 |
+ --without-OSMesa \ |
249 |
+ $(use_enable static-libs static) \ |
250 |
+ $(use_enable doc docs) \ |
251 |
+ $(use_enable java) \ |
252 |
+ $(use_enable readline) \ |
253 |
+ $(use_with curl) \ |
254 |
+ $(use_with fftw fftw3) \ |
255 |
+ $(use_with fftw fftw3f) \ |
256 |
+ $(use_enable fftw fftw-threads) \ |
257 |
+ $(use_with glpk) \ |
258 |
+ $(use_with hdf5) \ |
259 |
+ $(use_with imagemagick magick $(usex graphicsmagick GraphicsMagick ImageMagick)) \ |
260 |
+ $(use_with opengl) \ |
261 |
+ $(use_with opengl fltk) \ |
262 |
+ $(use_with openssl) \ |
263 |
+ $(use_with portaudio) \ |
264 |
+ $(use_with qhull) \ |
265 |
+ $(use_with qrupdate) \ |
266 |
+ $(use_with gui qt 5) \ |
267 |
+ $(use_with sndfile) \ |
268 |
+ $(use_with sparse arpack) \ |
269 |
+ $(use_with sparse umfpack) \ |
270 |
+ $(use_with sparse colamd) \ |
271 |
+ $(use_with sparse ccolamd) \ |
272 |
+ $(use_with sparse cholmod) \ |
273 |
+ $(use_with sparse cxsparse) \ |
274 |
+ $(use_with X x) |
275 |
+} |
276 |
+ |
277 |
+src_compile() { |
278 |
+ default |
279 |
+ if use java; then |
280 |
+ pax-mark m "${S}/src/.libs/octave-cli" |
281 |
+ fi |
282 |
+} |
283 |
+ |
284 |
+src_install() { |
285 |
+ default |
286 |
+ if use doc; then |
287 |
+ dodoc $(find doc -name '*.pdf') |
288 |
+ else |
289 |
+ # bug 566134, macros.texi is installed by make install if use doc |
290 |
+ insinto /usr/share/${PN}/${PV}/etc |
291 |
+ doins doc/interpreter/macros.texi |
292 |
+ fi |
293 |
+ [[ -e test/fntests.log ]] && dodoc test/fntests.log |
294 |
+ use java && \ |
295 |
+ java-pkg_regjar "${ED%/}/usr/share/${PN}/${PV}/m/java/octave.jar" |
296 |
+ echo "LDPATH=${EPREFIX}/usr/$(get_libdir)/${PN}/${PV}" > 99octave || die |
297 |
+ doenvd 99octave |
298 |
+} |
299 |
+ |
300 |
+pkg_postinst() { |
301 |
+ xdg_mimeinfo_database_update |
302 |
+ xdg_desktop_database_update |
303 |
+} |
304 |
+ |
305 |
+pkg_postrm() { |
306 |
+ xdg_mimeinfo_database_update |
307 |
+ xdg_desktop_database_update |
308 |
+} |