1 |
%define enable_clisp 1 |
2 |
%define enable_gcl 0 |
3 |
%define enable_sbcl 1 |
4 |
%define enable_ecl 0 |
5 |
%define defaultlisp clisp |
6 |
|
7 |
%if %enable_clisp |
8 |
%define clisp_flags --enable-clisp |
9 |
%else |
10 |
%define clisp_flags --disable-clisp |
11 |
%endif |
12 |
|
13 |
%if %enable_gcl |
14 |
%define gcl_flags --enable-gcl |
15 |
%else |
16 |
%define gcl_flags --disable-gcl |
17 |
%endif |
18 |
|
19 |
%if %enable_sbcl |
20 |
%define sbcl_flags --enable-sbcl |
21 |
%else |
22 |
%define sbcl_flags --disable-sbcl |
23 |
%endif |
24 |
|
25 |
%if %enable_ecl |
26 |
%define ecl_flags --enable-ecl |
27 |
%else |
28 |
%define ecl_flags --disable-ecl |
29 |
%endif |
30 |
|
31 |
%define subrel 1 |
32 |
|
33 |
Name: maxima |
34 |
Version: 5.26.0 |
35 |
Release: %mkrel 0 |
36 |
Summary: Symbolic Computation Program |
37 |
License: GPLv2 |
38 |
Group: Sciences/Mathematics |
39 |
URL: http://maxima.sourceforge.net |
40 |
Source0: http://prdownloads.sourceforge.net/maxima/%{name}-%{version}.tar.gz |
41 |
Source1: icons-%{name}.tar.bz2 |
42 |
Patch0: %{name}-5.22.0-xdg-utils.patch |
43 |
Patch1: %{name}-5.14.0-missed-extract-categories.patch |
44 |
Patch2: %{name}-fix-contrib-docs.patch |
45 |
Patch3: %{name}-5.23.0-clisp-noreadline.patch |
46 |
Patch4: %{name}-5.22.0-ecl-ldflags.patch |
47 |
BuildRequires: texinfo |
48 |
BuildRequires: texlive |
49 |
BuildRequires: python |
50 |
BuildRequires: time |
51 |
BuildRequires: desktop-file-utils |
52 |
BuildRequires: tk |
53 |
Suggests: tk |
54 |
Suggests: tcl |
55 |
Requires: %{name}-runtime |
56 |
Requires: gnuplot |
57 |
%if %{enable_clisp} |
58 |
BuildRequires: clisp |
59 |
%endif |
60 |
%if %{enable_gcl} |
61 |
BuildRequires: gcl |
62 |
%endif |
63 |
%if %{enable_sbcl} |
64 |
BuildRequires: sbcl |
65 |
%endif |
66 |
%if %{enable_ecl} |
67 |
BuildRequires: ecl |
68 |
%endif |
69 |
|
70 |
%description |
71 |
Maxima is a full symbolic computation program. It is full featured doing |
72 |
symbolic manipulation of polynomials, matrices, rational functions, |
73 |
integration, Todd-coxeter, graphing, bigfloats. It has a symbolic debugger |
74 |
source level debugger for maxima code. Maxima is based on the original Macsyma |
75 |
developed at MIT in the 1970's. It is quite reliable, and has good garbage |
76 |
collection, and no memory leaks. It comes with hundreds of self tests. |
77 |
|
78 |
|
79 |
#-------------------------------------------------------------------- |
80 |
|
81 |
%package gui |
82 |
Summary: Tcl/Tk GUI interface to Maxima |
83 |
Group: Sciences/Mathematics |
84 |
Requires: %{name} |
85 |
Requires: tk |
86 |
Provides: x%{name} = %{version}-%{release} |
87 |
|
88 |
%description gui |
89 |
Tcl/Tk GUI interface to Maxima. |
90 |
|
91 |
|
92 |
%files gui |
93 |
%{_bindir}/x%{name} |
94 |
%{_datadir}/applications/mageia-%{name}.desktop |
95 |
%{_iconsdir}/hicolor/*/apps/*.png |
96 |
|
97 |
#-------------------------------------------------------------------- |
98 |
|
99 |
%if %{enable_clisp} |
100 |
%package runtime-clisp |
101 |
Summary: Maxima compiled with clisp |
102 |
Group: Sciences/Mathematics |
103 |
Requires: clisp |
104 |
Requires: %{name} = %{version}-%{release} |
105 |
Provides: %{name}-runtime = %{version}-%{release} |
106 |
|
107 |
%description runtime-clisp |
108 |
Maxima compiled with clisp. |
109 |
|
110 |
|
111 |
%files runtime-clisp |
112 |
%dir %{_libdir}/%{name}/%{version}/binary-clisp |
113 |
%{_libdir}/%{name}/%{version}/binary-clisp/* |
114 |
%endif |
115 |
|
116 |
#-------------------------------------------------------------------- |
117 |
|
118 |
%if %{enable_gcl} |
119 |
%package runtime-gcl |
120 |
Summary: Maxima compiled with GCL |
121 |
Group: Sciences/Mathematics |
122 |
Requires: %{name} = %{version}-%{release} |
123 |
Suggests: rlwrap |
124 |
Provides: %{name}-runtime = %{version}-%{release} |
125 |
|
126 |
%description runtime-gcl |
127 |
Maxima compiled with Gnu Common Lisp. |
128 |
|
129 |
|
130 |
%files runtime-gcl |
131 |
%{_bindir}/r%{name} |
132 |
%dir %{_libdir}/%{name}/%{version}/binary-gcl |
133 |
%{_libdir}/%{name}/%{version}/binary-gcl/* |
134 |
%endif |
135 |
|
136 |
#-------------------------------------------------------------------- |
137 |
%if %{enable_sbcl} |
138 |
%package runtime-sbcl |
139 |
Summary: Maxima compiled with SBCL |
140 |
Group: Sciences/Mathematics |
141 |
Requires: sbcl = 1.0.45 |
142 |
Requires: %{name} = %{version}-%{release} |
143 |
Provides: %{name}-runtime = %{version}-%{release} |
144 |
|
145 |
%description runtime-sbcl |
146 |
Maxima compiled with SBCL. |
147 |
|
148 |
|
149 |
%files runtime-sbcl |
150 |
%dir %{_libdir}/%{name}/%{version}/binary-sbcl |
151 |
%{_libdir}/%{name}/%{version}/binary-sbcl/* |
152 |
%endif |
153 |
|
154 |
%if %{enable_ecl} |
155 |
%package runtime-ecl |
156 |
Summary: Maxima compiled with ECL |
157 |
Group: Sciences/Mathematics |
158 |
Requires: %{name} = %{version}-%{release} |
159 |
Provides: %{name}-runtime = %{version}-%{release} |
160 |
|
161 |
%description runtime-ecl |
162 |
Maxima compiled with ECL. |
163 |
|
164 |
|
165 |
%files runtime-ecl |
166 |
%dir %{_libdir}/%{name}/%{version}/binary-ecl |
167 |
%{_libdir}/%{name}/%{version}/binary-ecl/* |
168 |
%endif |
169 |
|
170 |
#-------------------------------------------------------------------- |
171 |
|
172 |
%prep |
173 |
%setup -q -n %{name}-%{version} |
174 |
%patch0 -p1 |
175 |
%patch1 -p1 |
176 |
%patch2 -p1 |
177 |
%patch3 -p1 |
178 |
%patch4 -p1 |
179 |
|
180 |
%build |
181 |
export GCL_ANSI=y |
182 |
%if %{enable_sbcl} |
183 |
export SBCL_HOME=%{_libdir}/sbcl |
184 |
%endif |
185 |
CFLAGS="%optflags -fno-fast-math" \ |
186 |
CXXFLAGS="%optflags -fno-fast-math" \ |
187 |
%configure2_5x \ |
188 |
%{clisp_flags} \ |
189 |
%{gcl_flags} \ |
190 |
%{sbcl_flags} \ |
191 |
%{ecl_flags} \ |
192 |
--with-default-lisp=%{defaultlisp} |
193 |
|
194 |
make |
195 |
#make check |
196 |
|
197 |
(cd doc/info |
198 |
texi2dvi -p -t @afourpaper -t @finalout %{name}.texi |
199 |
) |
200 |
|
201 |
%install |
202 |
%makeinstall |
203 |
rm -f %{buildroot}%{_infodir}/dir |
204 |
|
205 |
# menu |
206 |
mkdir -p %{buildroot}%{_datadir}/applications |
207 |
cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF |
208 |
[Desktop Entry] |
209 |
Name=Maxima |
210 |
Comment=Tcl/Tk interface to Maxima |
211 |
Exec=%{_bindir}/x%{name} |
212 |
Icon=%{name} |
213 |
Terminal=false |
214 |
Type=Application |
215 |
Categories=Science;Math; |
216 |
EOF |
217 |
|
218 |
# icons |
219 |
mkdir -p %{buildroot}%{_iconsdir} |
220 |
tar xjf %{SOURCE1} -C %{buildroot}%{_iconsdir} |
221 |
|
222 |
%post |
223 |
%_install_info %{name}.info |
224 |
%update_icon_cache hicolor |
225 |
|
226 |
%postun |
227 |
%_remove_install_info %{name}.info |
228 |
%clean_icon_cache hicolor |
229 |
|
230 |
%files |
231 |
%doc AUTHORS COPYING README README.lisps |
232 |
%doc doc/info/%{name}.pdf |
233 |
%{_bindir}/%{name} |
234 |
%{_bindir}/r%{name} |
235 |
%{_libdir}/%{name}/%{version}/mgnuplot |
236 |
%{_datadir}/%{name}/%{version}/* |
237 |
%{_infodir}/*.info* |
238 |
%{_infodir}/%{name}-index.lisp* |
239 |
%{_mandir}/man1/%{name}.* |