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