1 |
commit: 4ebeb746bd66d1e4a85d8e8d9304a8542a4a1dd0 |
2 |
Author: Guillaume Horel <guillaume.horel <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Oct 25 13:02:25 2013 +0000 |
4 |
Commit: Guillaume Horel <guillaume.horel <AT> gmail <DOT> com> |
5 |
CommitDate: Mon Oct 28 04:17:27 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=4ebeb746 |
7 |
|
8 |
sci-mathematics/scilab new release |
9 |
|
10 |
--- |
11 |
.../scilab-5.5.0-always-use-dynamic-stack.patch | 33 +++ |
12 |
.../scilab-5.5.0-fix-random-runtime-failure.patch | 12 + |
13 |
.../scilab/files/scilab-5.5.0-followlinks.patch | 12 + |
14 |
.../scilab/files/scilab-5.5.0-gluegen.patch | 12 + |
15 |
.../scilab/files/scilab-5.5.0-java-heap.patch | 13 ++ |
16 |
sci-mathematics/scilab/scilab-5.5.0.ebuild | 249 +++++++++++++++++++++ |
17 |
6 files changed, 331 insertions(+) |
18 |
|
19 |
diff --git a/sci-mathematics/scilab/files/scilab-5.5.0-always-use-dynamic-stack.patch b/sci-mathematics/scilab/files/scilab-5.5.0-always-use-dynamic-stack.patch |
20 |
new file mode 100644 |
21 |
index 0000000..309e45c |
22 |
--- /dev/null |
23 |
+++ b/sci-mathematics/scilab/files/scilab-5.5.0-always-use-dynamic-stack.patch |
24 |
@@ -0,0 +1,33 @@ |
25 |
+See https://bugzilla.redhat.com/show_bug.cgi?id=964307 |
26 |
+and http://bugzilla.scilab.org/show_bug.cgi?id=12625 |
27 |
+--- configure.ac.orig 2013-10-24 23:55:14.530698970 -0400 |
28 |
++++ configure.ac 2013-10-25 00:03:25.597684590 -0400 |
29 |
+@@ -698,15 +698,10 @@ |
30 |
+ SCILIBS_CXXFLAGS='' |
31 |
+ SCILIBS_FFLAGS='' |
32 |
+ |
33 |
+-if test $IS_64_BITS_CPU = true -o "$MACOSX" = "1"; then |
34 |
+- if test $f90compatible = false; then |
35 |
+- AC_MSG_ERROR([64 bits support needs a fortran 90 compiler (try --with-gfortran).]) |
36 |
+- fi |
37 |
+ AC_DEFINE([USE_DYNAMIC_STACK], [], [If we are building a 64 bits version]) |
38 |
+-fi |
39 |
+ |
40 |
+ AM_CONDITIONAL(IS_64_BITS_CPU, test $IS_64_BITS_CPU = true) |
41 |
+-AM_CONDITIONAL(USE_DYNAMIC_STACK, test $IS_64_BITS_CPU = true -o "$MACOSX" = "1") |
42 |
++AM_CONDITIONAL(USE_DYNAMIC_STACK, true) |
43 |
+ |
44 |
+ ################ |
45 |
+ ## SSE |
46 |
+@@ -1958,11 +1953,7 @@ |
47 |
+ AC_CONFIG_COMMANDS_POST([chmod +x $SCI_SRCDIR_FULL/modules/scicos_blocks/src/scripts/GenBlocks.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/scicompile.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/compilerDetection.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/configure]) |
48 |
+ |
49 |
+ # Generate stack.h |
50 |
+-if test "$IS_64_BITS_CPU" = true -o "$MACOSX" = "1"; then |
51 |
+ stack_h_cpp_flags=-DUSE_DYNAMIC_STACK |
52 |
+-else |
53 |
+- stack_h_cpp_flags= |
54 |
+-fi |
55 |
+ |
56 |
+ AC_CONFIG_COMMANDS([modules/core/includes/stack.h], |
57 |
+ [if ! $CPP $stack_h_cpp_flags - < $srcdir/modules/core/includes/stack.h.in |\ |
58 |
|
59 |
diff --git a/sci-mathematics/scilab/files/scilab-5.5.0-fix-random-runtime-failure.patch b/sci-mathematics/scilab/files/scilab-5.5.0-fix-random-runtime-failure.patch |
60 |
new file mode 100644 |
61 |
index 0000000..92ac453 |
62 |
--- /dev/null |
63 |
+++ b/sci-mathematics/scilab/files/scilab-5.5.0-fix-random-runtime-failure.patch |
64 |
@@ -0,0 +1,12 @@ |
65 |
+diff -urN scilab-orig/modules/api_scilab/src/cpp/api_double.cpp scilab/modules/api_scilab/src/cpp/api_double.cpp |
66 |
+--- scilab-orig/modules/api_scilab/src/cpp/api_double.cpp 2012-08-06 23:26:31.342617365 -0400 |
67 |
++++ scilab/modules/api_scilab/src/cpp/api_double.cpp 2012-08-06 23:27:34.838621420 -0400 |
68 |
+@@ -497,7 +497,7 @@ |
69 |
+ /*--------------------------------------------------------------------------*/ |
70 |
+ int createScalarDouble(void* _pvCtx, int _iVar, double _dblReal) |
71 |
+ { |
72 |
+- return createCommonScalarDouble(_pvCtx, _iVar, 0, _dblReal, NULL); |
73 |
++ return createCommonScalarDouble(_pvCtx, _iVar, 0, _dblReal, 0); |
74 |
+ } |
75 |
+ /*--------------------------------------------------------------------------*/ |
76 |
+ int createScalarComplexDouble(void* _pvCtx, int _iVar, double _dblReal, double _dblImg) |
77 |
|
78 |
diff --git a/sci-mathematics/scilab/files/scilab-5.5.0-followlinks.patch b/sci-mathematics/scilab/files/scilab-5.5.0-followlinks.patch |
79 |
new file mode 100644 |
80 |
index 0000000..118df3b |
81 |
--- /dev/null |
82 |
+++ b/sci-mathematics/scilab/files/scilab-5.5.0-followlinks.patch |
83 |
@@ -0,0 +1,12 @@ |
84 |
+diff -urN scilab-orig/m4/java.m4 scilab/m4/java.m4 |
85 |
+--- scilab-orig/m4/java.m4 2012-07-07 18:39:39.036716695 -0400 |
86 |
++++ scilab/m4/java.m4 2012-07-07 18:40:54.479721514 -0400 |
87 |
+@@ -846,7 +846,7 @@ |
88 |
+ for jar in "$jardir/$1.jar" "$jardir/lib$1.jar" "$jardir/lib$1-java.jar" "$jardir/$1*.jar"; do |
89 |
+ |
90 |
+ # TODO check the behaviour when spaces |
91 |
+- jars_resolved=`ls $jar 2>/dev/null` |
92 |
++ jars_resolved=$(realpath $(ls $jar 2>/dev/null) 2>/dev/null) |
93 |
+ for jar_resolved in $jars_resolved; do # If several jars matches |
94 |
+ if test -e "$jar_resolved"; then |
95 |
+ export ac_java_classpath="$jar_resolved:$ac_java_classpath" |
96 |
|
97 |
diff --git a/sci-mathematics/scilab/files/scilab-5.5.0-gluegen.patch b/sci-mathematics/scilab/files/scilab-5.5.0-gluegen.patch |
98 |
new file mode 100644 |
99 |
index 0000000..64717a7 |
100 |
--- /dev/null |
101 |
+++ b/sci-mathematics/scilab/files/scilab-5.5.0-gluegen.patch |
102 |
@@ -0,0 +1,12 @@ |
103 |
+diff -urN scilab-orig/modules/gui/src/java/org/scilab/modules/gui/bridge/canvas/SwingScilabCanvas.java scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/canvas/SwingScilabCanvas.java |
104 |
+--- scilab-orig/modules/gui/src/java/org/scilab/modules/gui/bridge/canvas/SwingScilabCanvas.java 2012-07-09 23:14:03.261245376 -0400 |
105 |
++++ scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/canvas/SwingScilabCanvas.java 2012-07-09 23:17:38.226239081 -0400 |
106 |
+@@ -73,7 +73,7 @@ |
107 |
+ |
108 |
+ static { |
109 |
+ try { |
110 |
+- System.loadLibrary("gluegen2-rt"); |
111 |
++ System.loadLibrary("gluegen-rt"); |
112 |
+ } catch (Exception e) { |
113 |
+ System.err.println(e); |
114 |
+ } |
115 |
|
116 |
diff --git a/sci-mathematics/scilab/files/scilab-5.5.0-java-heap.patch b/sci-mathematics/scilab/files/scilab-5.5.0-java-heap.patch |
117 |
new file mode 100644 |
118 |
index 0000000..990f967 |
119 |
--- /dev/null |
120 |
+++ b/sci-mathematics/scilab/files/scilab-5.5.0-java-heap.patch |
121 |
@@ -0,0 +1,13 @@ |
122 |
+--- etc/jvm_options.xml.orig 2013-07-08 22:46:24.092981137 -0400 |
123 |
++++ etc/jvm_options.xml 2013-07-08 22:50:23.788974118 -0400 |
124 |
+@@ -21,8 +21,8 @@ |
125 |
+ <option value="-Djava.util.logging.config.file=$SCILAB/etc/logging.properties"/> |
126 |
+ <!-- ENABLE Just In Time java compiler --> |
127 |
+ <option value="-Djava.compiler=JIT"/> |
128 |
+- <!-- Set Java Heap space to 256mb --> |
129 |
+- <option value="-Xmx256m"/> |
130 |
++ <!-- Set Java Heap space to 512mb --> |
131 |
++ <option value="-Xmx512m"/> |
132 |
+ |
133 |
+ <!-- Set Java space for direct buffer allocation --> |
134 |
+ <!-- |
135 |
|
136 |
diff --git a/sci-mathematics/scilab/scilab-5.5.0.ebuild b/sci-mathematics/scilab/scilab-5.5.0.ebuild |
137 |
new file mode 100644 |
138 |
index 0000000..7e69261 |
139 |
--- /dev/null |
140 |
+++ b/sci-mathematics/scilab/scilab-5.5.0.ebuild |
141 |
@@ -0,0 +1,249 @@ |
142 |
+# Copyright 1999-2013 Gentoo Foundation |
143 |
+# Distributed under the terms of the GNU General Public License v2 |
144 |
+# $Header: $ |
145 |
+ |
146 |
+EAPI=5 |
147 |
+ |
148 |
+JAVA_PKG_OPT_USE="gui" |
149 |
+VIRTUALX_REQUIRED="manual" |
150 |
+ |
151 |
+inherit eutils autotools bash-completion-r1 check-reqs fdo-mime flag-o-matic \ |
152 |
+ fortran-2 java-pkg-opt-2 toolchain-funcs virtualx |
153 |
+ |
154 |
+MY_PV="${PV}"-beta-1 |
155 |
+MY_P="$PN"-"$MY_PV" |
156 |
+ |
157 |
+# Things that don't work: |
158 |
+# - tests |
159 |
+# - can't build without docs (-doc) |
160 |
+ |
161 |
+DESCRIPTION="Scientific software package for numerical computations" |
162 |
+HOMEPAGE="http://www.scilab.org/" |
163 |
+SRC_URI="http://www.scilab.org/download/${MY_PV}/${MY_P}-src.tar.gz" |
164 |
+ |
165 |
+LICENSE="CeCILL-2.1" |
166 |
+SLOT="0" |
167 |
+KEYWORDS="~amd64 ~x86" |
168 |
+IUSE="bash-completion debug +doc fftw +gui +matio nls openmp |
169 |
+ static-libs test tk +umfpack +xcos" |
170 |
+REQUIRED_USE="xcos? ( gui ) doc? ( gui )" |
171 |
+ |
172 |
+# ALL_LINGUAS variable defined in configure.ac |
173 |
+LINGUAS="fr_FR zh_CN zh_TW ca_ES es_ES pt_BR" |
174 |
+for l in ${LINGUAS}; do |
175 |
+ IUSE="${IUSE} linguas_${l}" |
176 |
+done |
177 |
+LINGUASLONG="de_DE ja_JP it_IT uk_UA pl_PL ru_RU" |
178 |
+for l in ${LINGUASLONG}; do |
179 |
+ IUSE="${IUSE} linguas_${l%_*}" |
180 |
+done |
181 |
+ |
182 |
+CDEPEND="dev-libs/libpcre |
183 |
+ dev-libs/libxml2:2 |
184 |
+ sci-libs/hdf5 |
185 |
+ >=sci-libs/arpack-3 |
186 |
+ sys-devel/gettext |
187 |
+ sys-libs/ncurses |
188 |
+ sys-libs/readline |
189 |
+ virtual/lapack |
190 |
+ fftw? ( sci-libs/fftw:3.0 ) |
191 |
+ gui? ( |
192 |
+ dev-java/avalon-framework:4.2 |
193 |
+ dev-java/batik:1.7 |
194 |
+ dev-java/commons-io:1 |
195 |
+ >=dev-java/flexdock-1.2.3:0 |
196 |
+ dev-java/fop:0 |
197 |
+ dev-java/gluegen:2 |
198 |
+ dev-java/javahelp:0 |
199 |
+ dev-java/jeuclid-core:0 |
200 |
+ dev-java/jgoodies-looks:2.0 |
201 |
+ dev-java/jgraphx:2.1 |
202 |
+ dev-java/jlatexmath:1 |
203 |
+ dev-java/jogl:2 |
204 |
+ >=dev-java/jrosetta-1.0.4:0 |
205 |
+ dev-java/skinlf:0 |
206 |
+ dev-java/xmlgraphics-commons:1.5 |
207 |
+ virtual/opengl |
208 |
+ doc? ( dev-java/saxon:9 ) |
209 |
+ xcos? ( dev-java/commons-logging:0 ) ) |
210 |
+ matio? ( <sci-libs/matio-1.5 ) |
211 |
+ tk? ( dev-lang/tk ) |
212 |
+ umfpack? ( sci-libs/umfpack )" |
213 |
+ |
214 |
+RDEPEND="${CDEPEND} |
215 |
+ gui? ( >=virtual/jre-1.5 )" |
216 |
+ |
217 |
+DEPEND="${CDEPEND} |
218 |
+ virtual/pkgconfig |
219 |
+ debug? ( dev-util/lcov ) |
220 |
+ gui? ( |
221 |
+ >=virtual/jdk-1.5 |
222 |
+ doc? ( app-text/docbook-xsl-stylesheets |
223 |
+ dev-java/xml-commons-external:1.4 |
224 |
+ dev-java/jlatexmath-fop:1 ) |
225 |
+ xcos? ( dev-lang/ocaml ) ) |
226 |
+ test? ( |
227 |
+ dev-java/junit:4 |
228 |
+ gui? ( ${VIRTUALX_DEPEND} ) )" |
229 |
+ |
230 |
+DOCS=( "ACKNOWLEDGEMENTS" "README_Unix" "Readme_Visual.txt" ) |
231 |
+ |
232 |
+S="${WORKDIR}"/"${MY_P}" |
233 |
+ |
234 |
+pkg_pretend() { |
235 |
+ use doc && CHECKREQS_MEMORY="512M" check-reqs_pkg_pretend |
236 |
+} |
237 |
+ |
238 |
+pkg_setup() { |
239 |
+ if use openmp; then |
240 |
+ if [[ $(tc-getCC) == *gcc* ]] && ! tc-has-openmp; then |
241 |
+ ewarn "You are using a gcc without OpenMP capabilities" |
242 |
+ die "Need an OpenMP capable compiler" |
243 |
+ fi |
244 |
+ FORTRAN_NEED_OPENMP=1 |
245 |
+ fi |
246 |
+ FORTRAN_STANDARD="77 90" |
247 |
+ fortran-2_pkg_setup |
248 |
+ java-pkg-opt-2_pkg_setup |
249 |
+ |
250 |
+ ALL_LINGUAS="en_US" |
251 |
+ for l in ${LINGUAS}; do |
252 |
+ use linguas_${l} && ALL_LINGUAS="${ALL_LINGUAS} ${l}" |
253 |
+ done |
254 |
+ for l in ${LINGUASLONG}; do |
255 |
+ use linguas_${l%_*} && ALL_LINGUAS="${ALL_LINGUAS} ${l}" |
256 |
+ done |
257 |
+ export ALL_LINGUAS ALL_LINGUAS_DOC=$ALL_LINGUAS |
258 |
+} |
259 |
+ |
260 |
+src_prepare() { |
261 |
+ epatch \ |
262 |
+ "${FILESDIR}/${P}-followlinks.patch" \ |
263 |
+ "${FILESDIR}/${P}-gluegen.patch" \ |
264 |
+ "${FILESDIR}/${P}-fix-random-runtime-failure.patch" \ |
265 |
+ "${FILESDIR}/${P}-always-use-dynamic-stack.patch" |
266 |
+ |
267 |
+ append-ldflags $(no-as-needed) |
268 |
+ |
269 |
+ # increases java heap to 512M when building docs (sync with cheqreqs above) |
270 |
+ use doc && epatch "${FILESDIR}/${P}-java-heap.patch" |
271 |
+ |
272 |
+ # use the LINGUAS variable that we set |
273 |
+ sed -i -e "/^ALL_LINGUAS=/d" -e "/^ALL_LINGUAS_DOC=/d" -i configure.ac ||die |
274 |
+ |
275 |
+ # make sure the DOCBOOK_ROOT variable is set |
276 |
+ sed -i -e "s/xsl-stylesheets-\*/xsl-stylesheets/g" bin/scilab* || die |
277 |
+ |
278 |
+ #add specific gentoo java directories |
279 |
+ if use gui; then |
280 |
+ sed -i -e "s|/usr/lib/jogl2|/usr/lib/jogl-2|" \ |
281 |
+ -e "s|/usr/lib64/jogl2|/usr/lib64/jogl-2|" configure.ac || die |
282 |
+ sed -i -e "s|/usr/lib/gluegen2|/usr/lib/gluegen-2|" \ |
283 |
+ -e "s|/usr/lib64/gluegen2|/usr/lib64/gluegen-2|" \ |
284 |
+ -e "s|AC_CHECK_LIB(\[gluegen2-rt|AC_CHECK_LIB([gluegen-rt|" \ |
285 |
+ configure.ac || die |
286 |
+ |
287 |
+ sed -i -e "s/jogl2/jogl-2/" -e "s/gluegen2/gluegen-2/" \ |
288 |
+ etc/librarypath.xml || die |
289 |
+ fi |
290 |
+ |
291 |
+ mkdir jar || die |
292 |
+ pushd jar |
293 |
+ java-pkg_jar-from jgraphx-2.1,jlatexmath-1,flexdock,skinlf |
294 |
+ java-pkg_jar-from jgoodies-looks-2.0,jrosetta,scirenderer-1 |
295 |
+ java-pkg_jar-from avalon-framework-4.2,jeuclid-core |
296 |
+ java-pkg_jar-from xmlgraphics-commons-1.5,commons-io-1 |
297 |
+ java-pkg_jar-from jogl-2 jogl-all.jar jogl2.jar |
298 |
+ java-pkg_jar-from gluegen-2 gluegen-rt.jar gluegen2-rt.jar |
299 |
+ java-pkg_jar-from batik-1.7 batik-all.jar |
300 |
+ java-pkg_jar-from fop fop.jar |
301 |
+ java-pkg_jar-from javahelp jhall.jar |
302 |
+ if use xcos; then |
303 |
+ java-pkg_jar-from commons-logging |
304 |
+ fi |
305 |
+ if use doc; then |
306 |
+ java-pkg_jar-from saxon-9 saxon.jar saxon9he.jar |
307 |
+ java-pkg_jar-from jlatexmath-fop-1 |
308 |
+ java-pkg_jar-from xml-commons-external-1.4 xml-apis-ext.jar |
309 |
+ fi |
310 |
+ if use test; then |
311 |
+ java-pkg_jar-from junit-4 junit.jar junit4.jar |
312 |
+ fi |
313 |
+ popd |
314 |
+ |
315 |
+ java-pkg-opt-2_src_prepare |
316 |
+ eautoconf |
317 |
+} |
318 |
+ |
319 |
+src_configure() { |
320 |
+ if use gui; then |
321 |
+ export JAVA_HOME="$(java-config -O)" |
322 |
+ else |
323 |
+ unset JAVAC |
324 |
+ fi |
325 |
+ |
326 |
+ export BLAS_LIBS="$($(tc-getPKG_CONFIG) --libs blas)" |
327 |
+ export LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)" |
328 |
+ export F77_LDFLAGS="${LDFLAGS}" |
329 |
+ # gentoo bug #302621 |
330 |
+ has_version sci-libs/hdf5[mpi] && \ |
331 |
+ export CXX=mpicxx CC=mpicc |
332 |
+ |
333 |
+ econf \ |
334 |
+ --enable-relocatable \ |
335 |
+ --disable-rpath \ |
336 |
+ --with-docbook="${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets" \ |
337 |
+ --disable-static-system-lib \ |
338 |
+ $(use_enable debug) \ |
339 |
+ $(use_enable debug code-coverage) \ |
340 |
+ $(use_enable debug debug-C) \ |
341 |
+ $(use_enable debug debug-CXX) \ |
342 |
+ $(use_enable debug debug-fortran) \ |
343 |
+ $(use_enable debug debug-java) \ |
344 |
+ $(use_enable debug debug-linker) \ |
345 |
+ $(use_enable doc build-help) \ |
346 |
+ $(use_enable nls) \ |
347 |
+ $(use_enable nls build-localization) \ |
348 |
+ $(use_enable static-libs static) \ |
349 |
+ $(use_enable test compilation-tests) \ |
350 |
+ $(use_with fftw) \ |
351 |
+ $(use_with gui) \ |
352 |
+ $(use_with gui javasci) \ |
353 |
+ $(use_with matio) \ |
354 |
+ $(use_with openmp) \ |
355 |
+ $(use_with tk) \ |
356 |
+ $(use_with umfpack) \ |
357 |
+ $(use_with xcos) \ |
358 |
+ $(use_with xcos modelica) |
359 |
+} |
360 |
+ |
361 |
+src_compile() { |
362 |
+ emake |
363 |
+ use doc && emake doc |
364 |
+} |
365 |
+ |
366 |
+src_test() { |
367 |
+ if use gui; then |
368 |
+ Xemake check |
369 |
+ else |
370 |
+ emake check |
371 |
+ fi |
372 |
+} |
373 |
+ |
374 |
+src_install() { |
375 |
+ default |
376 |
+ prune_libtool_files --all |
377 |
+ rm -rf "${D}"/usr/share/scilab/modules/*/tests ||die |
378 |
+ use bash-completion && dobashcomp "${FILESDIR}"/${PN}.bash_completion |
379 |
+ echo "SEARCH_DIRS_MASK=${EPREFIX}/usr/$(get_libdir)/scilab" \ |
380 |
+ > 50-"${PN}" |
381 |
+ insinto /etc/revdep-rebuild && doins "50-${PN}" |
382 |
+} |
383 |
+ |
384 |
+pkg_postinst() { |
385 |
+ fdo-mime_mime_database_update |
386 |
+} |
387 |
+ |
388 |
+pkg_postrm() { |
389 |
+ fdo-mime_mime_database_update |
390 |
+} |