%define enable_clisp 1 %define enable_gcl 0 %define enable_sbcl 0 %define enable_ecl 0 %define defaultlisp clisp %if %enable_clisp %define clisp_flags --enable-clisp %else %define clisp_flags --disable-clisp %endif %if %enable_gcl %define gcl_flags --enable-gcl %else %define gcl_flags --disable-gcl %endif %if %enable_sbcl %define sbcl_flags --enable-sbcl %else %define sbcl_flags --disable-sbcl %endif %if %enable_ecl %define ecl_flags --enable-ecl %else %define ecl_flags --disable-ecl %endif Name: maxima Version: 5.26.0 Release: %mkrel 0 Summary: Symbolic Computation Program License: GPLv2 Group: Sciences/Mathematics URL: http://maxima.sourceforge.net Source0: http://prdownloads.sourceforge.net/maxima/%{name}-%{version}.tar.gz Source1: icons-%{name}.tar.bz2 Patch0: %{name}-5.22.0-xdg-utils.patch Patch1: %{name}-5.14.0-missed-extract-categories.patch Patch2: %{name}-fix-contrib-docs.patch Patch3: %{name}-5.23.0-clisp-noreadline.patch Patch4: %{name}-5.22.0-ecl-ldflags.patch BuildRequires: texinfo BuildRequires: texlive BuildRequires: python BuildRequires: time BuildRequires: desktop-file-utils BuildRequires: tk Suggests: tk Suggests: tcl Requires: %{name}-runtime Requires: gnuplot %if %{enable_clisp} BuildRequires: clisp %endif %if %{enable_gcl} BuildRequires: gcl %endif %if %{enable_sbcl} BuildRequires: sbcl %endif %if %{enable_ecl} BuildRequires: ecl %endif %description Maxima is a full symbolic computation program. It is full featured doing symbolic manipulation of polynomials, matrices, rational functions, integration, Todd-coxeter, graphing, bigfloats. It has a symbolic debugger source level debugger for maxima code. Maxima is based on the original Macsyma developed at MIT in the 1970's. It is quite reliable, and has good garbage collection, and no memory leaks. It comes with hundreds of self tests. #-------------------------------------------------------------------- %package gui Summary: Tcl/Tk GUI interface to Maxima Group: Sciences/Mathematics Requires: %{name} Requires: tk Provides: x%{name} = %{version}-%{release} %description gui Tcl/Tk GUI interface to Maxima. %files gui %{_bindir}/x%{name} %{_datadir}/applications/mageia-%{name}.desktop %{_iconsdir}/hicolor/*/apps/*.png #-------------------------------------------------------------------- %if %{enable_clisp} %package runtime-clisp Summary: Maxima compiled with clisp Group: Sciences/Mathematics Requires: clisp Requires: %{name} = %{version}-%{release} Provides: %{name}-runtime = %{version}-%{release} %description runtime-clisp Maxima compiled with clisp. %files runtime-clisp %dir %{_libdir}/%{name}/%{version}/binary-clisp %{_libdir}/%{name}/%{version}/binary-clisp/* %endif #-------------------------------------------------------------------- %if %{enable_gcl} %package runtime-gcl Summary: Maxima compiled with GCL Group: Sciences/Mathematics Requires: %{name} = %{version}-%{release} Suggests: rlwrap Provides: %{name}-runtime = %{version}-%{release} %description runtime-gcl Maxima compiled with Gnu Common Lisp. %files runtime-gcl %{_bindir}/r%{name} %dir %{_libdir}/%{name}/%{version}/binary-gcl %{_libdir}/%{name}/%{version}/binary-gcl/* %endif #-------------------------------------------------------------------- %if %{enable_sbcl} %package runtime-sbcl Summary: Maxima compiled with SBCL Group: Sciences/Mathematics Requires: sbcl = 1.0.45 Requires: %{name} = %{version}-%{release} Provides: %{name}-runtime = %{version}-%{release} %description runtime-sbcl Maxima compiled with SBCL. %files runtime-sbcl %dir %{_libdir}/%{name}/%{version}/binary-sbcl %{_libdir}/%{name}/%{version}/binary-sbcl/* %endif %if %{enable_ecl} %package runtime-ecl Summary: Maxima compiled with ECL Group: Sciences/Mathematics Requires: %{name} = %{version}-%{release} Provides: %{name}-runtime = %{version}-%{release} %description runtime-ecl Maxima compiled with ECL. %files runtime-ecl %dir %{_libdir}/%{name}/%{version}/binary-ecl %{_libdir}/%{name}/%{version}/binary-ecl/* %endif #-------------------------------------------------------------------- %prep %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %build export GCL_ANSI=y %if %{enable_sbcl} export SBCL_HOME=%{_libdir}/sbcl %endif CFLAGS="%optflags -fno-fast-math" \ CXXFLAGS="%optflags -fno-fast-math" \ %configure2_5x \ %{clisp_flags} \ %{gcl_flags} \ %{sbcl_flags} \ %{ecl_flags} \ --with-default-lisp=%{defaultlisp} make #make check (cd doc/info texi2dvi -p -t @afourpaper -t @finalout %{name}.texi ) %install %makeinstall rm -f %{buildroot}%{_infodir}/dir # menu mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF [Desktop Entry] Name=Maxima Comment=Tcl/Tk interface to Maxima Exec=%{_bindir}/x%{name} Icon=%{name} Terminal=false Type=Application Categories=Science;Math; EOF # icons mkdir -p %{buildroot}%{_iconsdir} tar xjf %{SOURCE1} -C %{buildroot}%{_iconsdir} # don't compress info pages export EXCLUDE_FROM_COMPRESS=info %post %_install_info %{name}.info %update_icon_cache hicolor %postun %_remove_install_info %{name}.info %clean_icon_cache hicolor %files %doc AUTHORS COPYING README README.lisps %doc doc/info/%{name}.pdf %{_bindir}/%{name} %{_bindir}/r%{name} %{_libdir}/%{name}/%{version}/mgnuplot %{_datadir}/%{name}/%{version}/* %{_infodir}/*.info* %{_infodir}/%{name}-index.lisp* %{_mandir}/man1/%{name}.*