Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > 57fbdd5102632b7763c985487987fb03 > files > 20

scilab-5.2.2-2mdv2010.1.src.rpm

%define _requires_exceptions libblas.so.3\\|jaxp_parser_impl\\|

Summary:	A high-level language for numerical computations
Name:		scilab
Version:	5.2.2
Release:	%mkrel 2
License:	CeCILL
Group:		Sciences/Mathematics
URL:		http://www.scilab.org/
Source0:	http://www.scilab.org/download/%{version}/%{name}-%{version}-src.tar.xz
Source1:	scilabsymbols.ttf
Source20:	scilab.el
Patch1:		0001-UseStandardXaw.patch
Patch2:		0002-file-menu.patch
# Fixes: scilab broken : missing symlink and error message
# https://qa.mandriva.com/show_bug.cgi?id=40116
Patch3:		0003-scipad.diff
# Fixes: scilab crashed when trying export graph
# https://qa.mandriva.com/show_bug.cgi?id=40910
Patch4:		0004-Xdefaults.patch
Patch5:		%{name}-5.2.0-find-jgoodies-looks.patch
Patch6:		%{name}-5.2.0-find-jhall.patch
Patch7:		%{name}-5.0.3-find-batik.patch
Patch8:		%{name}-5.0.3-find-jeuclid-core.patch
Patch9:		%{name}-5.0.3-adapt-to-newer-jeuclid-core.patch
# Kludge (not fix) build for Tcl 8.6 (interp->result usage, TIP #330)
# - AdamW 2008/12
Patch10:	%{name}-5.1-tcl86.patch
Patch11:	%{name}-5.0.3-jre-path.patch
# (tpg) scilab tries to link against devel library libfftw.so instead of libfftw3.so.3, this patch fixes this
Patch12:	%{name}-5.0.3-link-against-main-libfftw3-library.patch
Patch13:	%{name}-5.0.3-correct-LD_LIBRARY_PATH.patch
Patch14:	%{name}-5.2.2-jhdf_2.6.patch
# (tpg) doc build fails on x86_64 chroot, incerasing java memory heap size should help
Patch15:	%{name}-5.2.2-incerase-java-heap-size.patch
# (tpg) correct LD_PRELOAD
Patch16:	%{name}-5.2.2-fix-ld-preload-paths.patch
# (tpg) add more paths
Patch17:	%{name}-5.2.2-add-more-paths-librarypath.patch
BuildRequires:	tcl-devel >= 8.5
BuildRequires:	tk-devel >= 8.5
BuildRequires:	xaw-devel
BuildRequires:	emacs-nox
BuildRequires:	gcc-gfortran
BuildRequires:	ocaml
BuildRequires:	imagemagick
BuildRequires:	sablotron
BuildRequires:	blas-devel
BuildRequires:	lapack-devel
BuildRequires:	fftw3-devel
BuildRequires:	java-rpmbuild
BuildRequires:	ant
BuildRequires:	flexdock
BuildRequires:	jgoodies-looks
BuildRequires:	umfpack-devel
BuildRequires:	jogl
# jhall == javahelp2
BuildRequires:	javahelp2
BuildRequires:	gluegen
BuildRequires:	jrosetta
BuildRequires:	matio-devel
BuildRequires:	swig
BuildRequires:	ncurses-devel
BuildRequires:	pcre-devel
BuildRequires:	giws
BuildRequires:	docbook-style-xsl
BuildRequires:	batik
BuildRequires:	saxon
BuildRequires:	fop
BuildRequires:	jeuclid-core
BuildRequires:	python-libxml2
BuildRequires:	suitesparse-common-devel
BuildRequires:	xml-commons-jaxp-1.3-apis >= 1.3.04-3.0.4
BuildRequires:	jgraphx
BuildRequires:	jlatexmath
BuildRequires:	antlr
BuildRequires:	jakarta-commons-beanutils
BuildRequires:	chrpath
%if %mdkversion > 201000
BuildRequires:	hdf-java
BuildRequires:	hdf5-devel
%endif
BuildConflicts:	termcap-devel
BuildConflicts:	junit
Requires:	tcl >= 8.5
Requires:	tk >= 8.5
Requires:	ocaml
Requires:	gcc-gfortran
Requires:	flexdock
Requires:	jgoodies-looks
Requires:	jogl
Requires:	jrosetta
Requires:	gluegen
Requires:	javahelp2
Requires:	fop
Requires:	saxon
Requires:	batik
Requires:	jeuclid-core
Requires:	java > 1.5
Requires:	xerces-j2
Requires:	liblapack
Requires:	libblas
Requires:	fftw
Requires:	libmatio
Requires:	libumfpack
Requires:	docbook-style-xsl
Requires:	swig
Requires:	giws
Requires:	sablotron
Requires:	jgraphx
Requires:	jlatexmath
%if %mdkversion > 201000
Requires:	hdf-java
%endif
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%description
Scilab is a high-level language, primarily intended for numerical
computations.  Scilab includes a number of toolboxes and on-line
documentation.

%package devel
Summary:	Development files for %{name}
Group:		Development/Other

%description devel
Development files and headers for %{name}.

%prep
%setup -q

#%patch1 -p1 -b .xaw
#%patch2 -p1 -b .filemenu
#%patch3 -p1 -b .scipad
#%patch4 -p1 -b .xdefaults
#%patch5 -p0
#%patch6 -p0
#%patch7 -p0
#%patch8 -p0
#%patch9 -p1
#%patch10 -p1 -b .tcl86
#%patch11 -p0
#%patch12 -p0
#%patch13 -p0
%patch14 -p1
%patch15 -p0
%patch16 -p0
%patch17 -p0

%build
%define _disable_ld_no_undefined 1
%define _disable_ld_as_needed 1
%define Werror_cflags %nil
export JAVA_HOME=%{java_home}

# (tpg) get rid of double shalshes in path
sed -i -e 's#/usr/share/java/#/usr/share/java#g' -e 's#/usr/lib/java/#/usr/lib/java#g' -e 's#xml-apis-ext#xml-commons-jaxp-1.3-apis-ext#g' configure

# (tpg) fix jgraphx version compare logic
sed -i -e 's#mxGraph.VERSION) > 0#mxGraph.VERSION) < 0#g' configure

%configure2_5x \
	--with-tk-library=%{_libdir} \
	--with-tcl-library=%{_libdir} \
	--with-blas-library=%{_libdir} \
	--with-lapack-library=%{_libdir} \
	--with-jdk=%{java_home} \
	--disable-rpath \
	--with-umfpack \
	--enable-shared \
	--disable-static \
	--with-gfortran \
	--with-gcc \
	--with-ocaml \
	--with-fftw \
	--enable-build-localization \
	--enable-build-help \
	--with-docbook="/usr/share/sgml/docbook/xsl-stylesheets-1.73.2" \
	--enable-build-swig \
	--enable-build-giws \
	--without-pvm \
	--with-install-help-xml \
%if %mdkversion > 201000
	--with-hdf5 \
%else
	--without-hdf5 \
%endif
	--without-scicos \
	--enable-relocatable

%make all doc

cp -af %{SOURCE20} .
for i in emacs; do
	$i -batch -q -no-site-file -f batch-byte-compile %{name}.el
	mv %{name}.elc $i-%{name}.elc
done

%install
rm -rf %{buildroot}
%makeinstall_std

# (tpg) delete empty dirs
find %{buildroot}%{_datadir}/%{name} -type d -empty -delete

# Icons
for i in "16x16" "32x32" "48x48"; do
    mkdir -p %{buildroot}%{_iconsdir}/hicolor/$i/apps
    convert icons/%{name}.xpm -geometry $i %{buildroot}%{_iconsdir}/hicolor/$i/apps/%{name}.png ;
done

# (tpg) get rid of this
rm %{buildroot}%{_datadir}/%{name}/README_Windows.txt

# Menu
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop << EOF
[Desktop Entry]
Name=Scilab
Comment=High-level language for numerical computations
Exec=scilab
Icon=scilab
Terminal=false
Type=Application
Categories=Science;Math;
EOF

# (X)emacs
for i in emacs; do
	mkdir -p %{buildroot}%{_datadir}/$i/site-lisp/
	mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/
	install -m644 $i-%{name}.elc %{buildroot}%{_datadir}/$i/site-lisp/
	[[ $i = emacs ]] && install -m644 %{name}.el %{buildroot}%{_datadir}/emacs/site-lisp/
done

mkdir -p %{buildroot}/%{_sysconfdir}/emacs/site-start.d
install -m644 %{SOURCE20} %{buildroot}/%{_sysconfdir}/emacs/site-start.d/%{name}.el

# (tpg) correct path for *.so java libraries
sed -i -e 's#/usr/lib/jni/#%{_libdir}#g' %{buildroot}%{_datadir}/%{name}/etc/librarypath.xml

# (tpg) fonts
mkdir -p %{buildroot}%{_datadir}/%{name}/thirdparty/fonts
install -m644 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/thirdparty/fonts/

# (tpg) nuke rpath
for file in %{buildroot}%{_bindir}/{intersci,scilab-bin,scilab-cli-bin}; do \
    chrpath -d $file; \
done

# (tpg) get rid of files with licenses
rm %{buildroot}%{_datadir}/%{name}/modules/*/license.txt
rm %{buildroot}%{_datadir}/%{name}/contrib/toolbox_skeleton/license.txt 
rm %{buildroot}%{_datadir}/%{name}/modules/tclsci/tcl/BWidget-*/LICENSE.txt
rm %{buildroot}%{_datadir}/%{name}/modules/tclsci/tcl/sciGUI/license.txt
rm %{buildroot}%{_datadir}/%{name}/modules/umfpack/TAUCS_license.txt 
rm %{buildroot}%{_datadir}/%{name}/modules/umfpack/UMFPACK_license.txt

%find_lang %{name}

%if %mdkversion < 200900
%post
%{update_menus}
%endif

%if %mdkversion < 200900
%postun
%{clean_menus}
%endif

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
%doc ACKNOWLEDGEMENTS CHANGES_5.2.X license.txt RELEASE_NOTES README_Unix
%{_bindir}/*
%{_libdir}/scilab
%{_iconsdir}/hicolor/*/*/%{name}.png
%config(noreplace) /etc/emacs/site-start.d/%{name}.el
%{_datadir}/*/site-lisp/*el*
%{_datadir}/applications/*.desktop
%{_datadir}/%{name}

%files devel
%defattr(-,root,root)
%{_includedir}/%{name}
%{_libdir}/pkgconfig/*.pc


%changelog
* Tue May 18 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 5.2.2-2mdv2010.1
+ Revision: 545244
- Patch16: fix LD_PRELOAD paths
- Patch17: add more paths into the librarypath.xml file
- add requires on hdf-java for mdv > 2010.0

* Mon May 17 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 5.2.2-1mdv2010.1
+ Revision: 545046
- Patch15: incerase java heap memory size
- enable build documentation, source 2 and 3 are not needed now (mdvbz #57481)
- nuke rpath from binaries
- get rid of empty directories and files with licenses
- fix jgraphx version compare logic in cofigure script
- add buildconflicts on junit
- use enable-relocatable
- Patch14: fix build against java-hdf
- add buildrequires on hdf5-devel
- enable hdf5 support for mdv release greater than 2010.0 (mdvbz #57308)
- update to new version 5.2.2
- diable patches 5 and 6 (not needed anymore)

* Sun Jan 31 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 5.2.0-1mdv2010.1
+ Revision: 498894
- add buildconflicts on termcap-devel
- add buildrequires on jakarta-commons-beanutils and antlr
- add requires on jgraphx and jlatexmath
- rediff patches 5 and 6
- disable patches 7 and 10 (probably not needed anymore)
- nuke rpath
- update to new version 5.2.0

* Sun Sep 27 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 5.1.1-2mdv2010.0
+ Revision: 449910
- final rebuild

* Sun Jun 21 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 5.1.1-1mdv2010.0
+ Revision: 387632
- add buildrequires on xml-commons-jaxp-1.3-apis
- use mandriva specific name of xml-commons-jaxp-1.3-apis-ext jar file
- remove GiwsException files, workaround
- update to new version 5.1.1

* Wed Mar 04 2009 Paulo Andrade <pcpa@mandriva.com.br> 5.1-3mdv2009.1
+ Revision: 348617
- Update patch based on upstream correction to the libxml2
  problem. Only difference in this patch is that it doesn't call
  xmlCleanupParser() in modules/core/src/c/TerminateCore.c
  (it is already exiting), and also removes the call in
  modules/localization/src/c/loadhashtableslocalization.c

* Tue Mar 03 2009 Paulo Andrade <pcpa@mandriva.com.br> 5.1-2mdv2009.1
+ Revision: 348171
- Don't call xmlCleanupParser() if not done using libxml. It appears the
  call was done to "pair" with the call to xmlParseFile(filename_xml_conf),
  what is wrong, as xmlCleanupParser() should be called (only once?) when
  it is known that libxml functions will no longer be called again.
  See also: http://mail.gnome.org/archives/xml/2003-January/msg00155.html

* Wed Feb 18 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 5.1-1mdv2009.1
+ Revision: 342618
- disable patches 8,9 and 11-13, further investigate which one need to be drop
- Patch10: rediff
- remove few hacks, not needed
- update to new version 5.1

* Wed Feb 11 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 5.0.3-12mdv2009.1
+ Revision: 339352
- Patch10: add one more fix against tcl-8.6

* Tue Dec 16 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.0.3-11mdv2009.1
+ Revision: 314959
- disable -Werror=format-security cflag for now, need time and effort to fix all issues caused by this
- Patch13: correct LD_LIBRARY_PATH

* Sun Dec 14 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.0.3-10mdv2009.1
+ Revision: 314342
- Patch12: link against libfftw3.so.3
- add fonts, and help jar files
- correct patch for loading java *.so libraries
- install xml help files
- add requires on libmatio, libumfpack, swig, giws, sablotron and docbook-style-xsl

* Sat Dec 13 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.0.3-9mdv2009.1
+ Revision: 313929
- add requires on fop, saxon, batik and jeuclid-core

* Sat Dec 13 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.0.3-8mdv2009.1
+ Revision: 313862
- add requires on fftw
- Patch11: add path to mdv jre
- get rid of duplicated shlashes for java modules path

* Sat Dec 06 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.0.3-7mdv2009.1
+ Revision: 311170
- do not directly require libblas.so.3, as there are two libraries which provides this
- somehow requires on xerces-j2 was removed

* Fri Dec 05 2008 Adam Williamson <awilliamson@mandriva.org> 5.0.3-6mdv2009.1
+ Revision: 310838
- add tcl86.patch: kludge build for tcl 8.6

  + Tomasz Pawel Gajc <tpg@mandriva.org>
    - use verionate requires on java

* Wed Dec 03 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.0.3-5mdv2009.1
+ Revision: 309814
- add requires on libblas and liblapack
- add requires on xerces-j2

* Tue Dec 02 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.0.3-4mdv2009.1
+ Revision: 309497
- Patch9: fix build for latest jeuclid-core (from upstream svn)
- enable build help, since jeuclid-core is in repos
- Patch8: find jeuclid-core jar file
- fix categories in desktop file
- do not require pvm

* Tue Dec 02 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.0.3-3mdv2009.1
+ Revision: 309379
- rebuild for umfpack and amd libraries

* Sat Nov 22 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.0.3-2mdv2009.1
+ Revision: 305916
- disable build help, as it needs updated maven2
- add buildrequires on python-libxml2
- regenerate C/C++ => Java wrappers produces by giws
- enable building of help and all the docs
- add missing buildrequires on docbook-style-xsl, batik, saxon, fop
- Patch7: fix detectin of batik jar file
- regenerate Java => C wrappers produces by Swig
- use macro for configure script (thanks to Nicolas Vigier for providing a hack)
- add missing buildrequires on swig, nvurses-devel and pcre-devel
- drop not needed buildrequires
- use _disable_ld_no_undefined and _disable_ld_as_needed

* Thu Nov 20 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.0.3-1mdv2009.1
+ Revision: 305346
- license has changed to CeCILL, which is compiliant with GPL
- don't use macr for configure script, as it breaks compilation
- introduce devel subpackage
- fix file list
- remove hopefully useless hacks form spec file
- spec file clean
- adjust requires on java stuff
- add buildrequires on matio-devel
- disable ld no udefined(lot of missing links)
- add buildrequires on javahelp2, gluegen and jrosetta
- Patch: fix detection of jhall (javahelp2)
- Patch5: fix detecting of jgoodies-looks
- add buildrequires on jogl and umfpack-devel
- spec file clean
- add buildrequires on jgoodies-looks and flexdock
- export JAVA_HOME
- update to new version 5.0.3
- add missing buildrequires on blas-devel, lapack-devel, fftw3-devel, java-rpmbuild, ant
- disable all patches

* Wed Aug 06 2008 Paulo Andrade <pcpa@mandriva.com.br> 4.1.2-9mdv2009.0
+ Revision: 264889
- Force install directory to %%{_libdir}/%%{name}-%%{version}, for
  coherence. But the package should conflict with, possibly installed,
  32 binaries on x86_64.
- Always explicitly state tcl/tk libraries path (only "really" required
  when %%_libdir != /usr/lib) and properly specify pvm library path.
- Correct (not logged in last commit) change to also build on
  64 bit architectures.
- Fix #40910 scilab crashed when trying export graph
  Explicitly link with Xaw7, so it doesn't depend on Xprint
  Also, besides fixing #40910, add a better layout and correct some
  problems in the export list that would not display all alternatives.

  + Pixel <pixel@mandriva.com>
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas

* Tue Apr 22 2008 Paulo Andrade <pcpa@mandriva.com.br> 4.1.2-5mdv2009.0
+ Revision: 196684
+ rebuild (emptylog)

* Tue Apr 22 2008 Paulo Andrade <pcpa@mandriva.com.br> 4.1.2-4mdv2009.0
+ Revision: 196644
+ rebuild (emptylog)

* Tue Apr 22 2008 Paulo Andrade <pcpa@mandriva.com.br> 4.1.2-3mdv2009.0
+ Revision: 196636
- Correct a problem where scilab's scipad would not work correctly
  if a configuration file did not already exist in the user's home
  directory, and a problem where scipad would try to link with files
  from devel packages, printing unnecessary warning messages.

* Thu Jan 31 2008 Paulo Andrade <pcpa@mandriva.com.br> 4.1.2-2mdv2008.1
+ Revision: 160802
- Update to compile in cooker and change to use gfortran instead of g77.

  + Thierry Vignaud <tv@mandriva.org>
    - drop old menu
    - kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Fri Oct 26 2007 Paulo Andrade <pcpa@mandriva.com.br> 4.1.2-1mdv2008.1
+ Revision: 102397
- Oops, messed in previous commit and added requires to atlas, that should have been removed.
- Update to version 4.1.2, fix Tk 8.5 dependency and add ocaml dependency.
  Minor cosmetic changes to Xaw file dialog.

* Fri Sep 28 2007 Olivier Blin <oblin@mandriva.com> 4.1.1-1mdv2008.0
+ Revision: 93801
- build on ix86 only (x86_64 build fails because configure does not
  look for tcl and tk libraries in lib64, and use g77 with invalid
  -march=athlon64 option)

  + Paulo Andrade <pcpa@mandriva.com.br>
    - Requires tcl >= 8.5. Hopefully this should fix the build problems.
    - After some "fighting" with java/ocaml support to try to add support for either
      gtk or gtk2 I give up and just add BuildRequires to xaw-devel, due to all kinds
      of errors of either duplicated or missing symbols.
    - import scilab