]> git.pld-linux.org Git - packages/parigp.git/blob - parigp.spec
- try with pari 2.13.1
[packages/parigp.git] / parigp.spec
1 #
2 # Conditional build:
3 %bcond_without  tex     # TeX documentation
4 #
5 # note: latest perl Math::Pari (2.030518) doesn't know of pari >= 2.12
6 # 2.13.1 with updated Math-Pari diff patch + Math-Pari 2.030518 with update patch:
7 # Failed 19/243 test programs. 176/1476 subtests failed.
8 # compared to 2.11.4 with Math-Pari 2.11-diff-all patch:
9 # Failed 20/229 test programs. 173/1477 subtests failed.
10 %define         pari_version            2.13.1
11 %define         gp2c_version            0.0.12
12 # because of previous 2.x versions with 8 minor digits, keep trailing zeros in package Version
13 %define         math_pari_version       2.03051800
14 %define         math_pari_fversion      2.030518
15 Summary:        Number Theory-oriented Computer Algebra System
16 Summary(pl.UTF-8):      Komputerowy system obliczeń algebraicznych zorientowany na metody teorii liczb
17 Name:           parigp
18 Version:        %{pari_version}
19 Release:        20
20 License:        GPL v2+
21 Group:          Applications/Math
22 Source0:        http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%{pari_version}.tar.gz
23 # Source0-md5:  826064cf75af268be8a482ade6e27501
24 Source1:        http://pari.math.u-bordeaux.fr/pub/pari/packages/galdata.tgz
25 # Source1-md5:  f9f61b2930757a785b568e5d307a7d75
26 Source2:        http://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-%{gp2c_version}.tar.gz
27 # Source2-md5:  ab29c383985d1b7d339189ecff31d40a
28 Source3:        http://www.cpan.org/modules/by-module/Math/Math-Pari-%{math_pari_fversion}.zip
29 # Source3-md5:  f0d1d9f803c92abff0d6349869a82699
30 Source4:        %{name}.desktop
31 Source5:        %{name}.png
32 Patch0:         %{name}-target_arch.patch
33 Patch2:         %{name}-arch.patch
34 Patch3:         perl-Math-Pari-crash-workaround.patch
35 Patch4:         perl-Math-Pari-noproccpuinfo.patch
36 Patch5:         %{name}-noproccpuinfo.patch
37 Patch6:         gmp-version.patch
38 Patch7:         Math-Pari-escape-left-braces-in-regex.patch
39 Patch8:         perl-Math-Pari-update.patch
40 # based on Math-Pari-%{math_pari_fversion}/patches/diff-2.11.0-all
41 Patch10:        pari-Math-Pari-diff.patch
42 URL:            http://pari.math.u-bordeaux.fr/
43 BuildRequires:  autoconf
44 BuildRequires:  ctags
45 BuildRequires:  gmp-devel
46 BuildRequires:  perl-devel >= 1:5.8.0
47 BuildRequires:  readline-devel >= 4.2
48 BuildRequires:  rpm-perlprov >= 3.0.3-16
49 BuildRequires:  rpmbuild(macros) >= 1.745
50 %if %{with tex}
51 BuildRequires:  texlive
52 BuildRequires:  texlive-amstex
53 BuildRequires:  texlive-csplain
54 BuildRequires:  texlive-dvips
55 BuildRequires:  texlive-fonts-cm
56 BuildRequires:  texlive-format-pdflatex
57 BuildRequires:  texlive-plain
58 BuildRequires:  texlive-pdftex
59 BuildRequires:  texlive-tex-babel
60 BuildRequires:  texlive-tex-ruhyphen
61 %endif
62 BuildRequires:  xorg-lib-libX11-devel
63 BuildRequires:  xorg-util-imake
64 Requires:       pari = %{pari_version}-%{release}
65 Requires:       xdvi
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %description
69 PARI/GP is a package which is aimed at efficient computations in
70 number theory, but also contains a large number of other useful
71 functions. It is somewhat related to a Computer Algebra System, but is
72 not really one since it treats symbolic expressions as mathematical
73 entities such as matrices, polynomials, series, etc..., and not as
74 expressions per se. However it is often much faster than other CAS,
75 and contains a large number of specific functions not found elsewhere,
76 essentially for use in number theory.
77
78 %description -l pl.UTF-8
79 System PARI/GP jest przeznaczony do wydajnych obliczeń z zakresu
80 teorii liczb, ale zawiera również inne przydatne funkcje. Jest nieco
81 spokrewniony z Komputerowymi Systemami Algebraicznymi, ale nie
82 identyczny, ponieważ traktuje wyrażenia symboliczne jako obiekty
83 matematyczne (macierze, wielomiany, szeregi itp.) a nie jako wyrażenia
84 same w sobie. Jest jednak często znacznie szybszy od innych KSA-ów a
85 ponadto zawiera wiele innych funkcji nie spotykanych gdzie indziej, a
86 przydatnych zwłaszcza w teorii liczb.
87
88 %package -n pari
89 Summary:        Shared PARI library (required by the parigp package)
90 Summary(pl.UTF-8):      Biblioteka współdzielona PARI (wymagana przez pakiet parigp)
91 Group:          Libraries
92
93 %description -n pari
94 Shared PARI library. You need it to run PARI/GP.
95
96 %description -n pari -l pl.UTF-8
97 Biblioteka współdzielona PARI. Potrzebujesz jej do uruchomienia
98 PARI/GP.
99
100 %package -n pari-devel
101 Summary:        Include files for PARI shared library
102 Summary(pl.UTF-8):      Pliki nagłówkowe do biblioteki współdzielonej PARI
103 Group:          Development/Libraries
104 Requires:       pari = %{pari_version}-%{release}
105
106 %description -n pari-devel
107 Include files for shared PARI library. You need them to use PARI
108 routines in you own programs.
109
110 %description -n pari-devel -l pl.UTF-8
111 Pliki nagłówkowe biblioteki współdzielonej PARI. Będziesz ich
112 potrzebował, jeżeli będziesz chciał wykorzystywać procedury PARI w
113 swoich programach.
114
115 %package -n pari-static
116 Summary:        Static PARI library
117 Summary(pl.UTF-8):      Statyczna biblioteka PARI
118 Group:          Development/Libraries
119 Requires:       pari-devel = %{pari_version}-%{release}
120
121 %description -n pari-static
122 Static PARI library. You need it to statically link your programs with
123 PARI.
124
125 %description -n pari-static -l pl.UTF-8
126 Biblioteka statyczna PARI. Potrzebujesz jej do konsolidowania
127 statycznego swoich programów korzystających z biblioteki PARI.
128
129 %package demos
130 Summary:        Example PARI/GP scripts
131 Summary(pl.UTF-8):      Przykładowe skrypty pisane w języku PARI/GP
132 Group:          Applications/Math
133 Requires:       %{name} = %{pari_version}-%{release}
134
135 %description demos
136 Example PARI/GP scripts. You can write such programs on your own.
137
138 %description demos -l pl.UTF-8
139 Przykładowe skrypty pisane w języku PARI/GP. Sam możesz takie napisać.
140
141 %package galdata
142 Summary:        Galois data resolvents for PARI/GP
143 Summary(pl.UTF-8):      Reprezentacje danych Galois fla PARI/GP
144 Group:          Applications/Math
145 Requires:       %{name} = %{pari_version}-%{release}
146
147 %description galdata
148 Galois data resolvents for PARI/GP.
149
150 %description galdata -l pl.UTF-8
151 Reprezentacje danych Galois do PARI/GP.
152
153 %package gp2c
154 Summary:        PARI/GP to C translator
155 Summary(pl.UTF-8):      Konwerter skryptów PARI/GP do języka C
156 Version:        %{gp2c_version}
157 Epoch:          1
158 Group:          Development/Tools
159 Requires:       pari-devel = %{pari_version}-%{release}
160 Requires:       %{name} = %{pari_version}-%{release}
161
162 %description gp2c
163 PARI/GP to C translator. Use it to compile your own C programs which
164 use pari library, without necessarily being a C programmer. Note: use
165 gp2c-run to run your programs inside the PARI/GP environment.
166
167 %description gp2c -l pl.UTF-8
168 Konwerter skryptów PARI/GP do języka C. Można nim tworzyć własne
169 programy w C korzystające z biblioteki pari. Znajomość języka C nie
170 jest wymagana. Uwaga: do uruchamiania programów w środowisku PARI/GP
171 należy używać gp2c-run.
172
173 %package -n perl-Math-Pari
174 Summary:        Math-Pari perl module
175 Summary(pl.UTF-8):      Moduł perla Math-Pari
176 Version:        %{math_pari_version}
177 Group:          Development/Languages/Perl
178
179 %description -n perl-Math-Pari
180 The Perl interface to the PARI part of GP/PARI.
181
182 %description -n perl-Math-Pari -l pl.UTF-8
183 Interfejs Perla do biblioteki PARI.
184
185 %prep
186 %setup -q -n pari-%{pari_version} -a 2 -a 3
187 %patch10 -p1
188 %patch0 -p1
189 %patch2 -p1
190 %patch5 -p1
191 %patch6 -p1
192 cd Math-Pari-%{math_pari_fversion}
193 %patch3 -p1
194 %patch4 -p1
195 %patch7 -p0
196 %patch8 -p1
197
198 %build
199 # pari & parigp
200 ./Configure \
201         --target=%{_target_cpu} \
202         --prefix=%{_prefix} \
203         --libdir=%{_libdir} \
204         --sysdatadir=%{_libdir}/parigp \
205         --datadir=%{_datadir}/parigp \
206         --share-prefix=%{_datadir} \
207         --with-readline-lib=%{_libdir} \
208         --with-ncurses-lib=%{_libdir} \
209         --with-gmp-lib=%{_libdir}
210
211 %{__make} -C Olinux-%{_target_cpu} all \
212         CC="%{__cc}" \
213         CFLAGS="%{rpmcflags} -fno-strict-aliasing -fomit-frame-pointer -fPIC"
214
215 %{__make} ctags
216
217 %{?with_tex:%{__make} -j1 -C doc docpdf}
218 %ifarch x32
219 ln -s Olinux-%{_target_cpu} Olinux-x86_64
220 %endif
221 %ifarch %{ix86}
222 ln -s Olinux-%{_target_cpu} Olinux-ix86
223 %endif
224 %ifarch sparc sparc64
225 # allow building sparc package on sparc64
226 ln -s Olinux-sparc Olinux-sparc64
227 %endif
228
229 # gp2c
230 cd gp2c-%{gp2c_version}
231
232 ln -sf .. pari
233 %{__autoconf}
234 %configure \
235         --datadir=%{_datadir}/parigp
236
237 %{__make}
238 %{?with_tex:%{__make} -j1 -C doc docall}
239
240 cd ..
241
242 # math-pari
243 cd Math-Pari-%{math_pari_fversion}
244 cp -f ../Olinux-%{_target_cpu}/paricfg.h libPARI/paricfg.h
245 echo '#define DL_DFLT_NAME NULL' >>libPARI/paricfg.h
246
247 %{__perl} Makefile.PL \
248         INSTALLDIRS=vendor
249
250 %{__make} \
251         OPTIMIZE="%{rpmcflags} -I$(pwd)/../Olinux-%{_target_cpu}"
252
253 # %{__make} test
254
255 %install
256 rm -rf $RPM_BUILD_ROOT
257 install -d $RPM_BUILD_ROOT{%{_datadir}/parigp/galdata,%{_examplesdir}/parigp} \
258         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
259
260 # parigp, pari & pari-devel
261 %{__make} install \
262         DESTDIR=$RPM_BUILD_ROOT
263
264 install src/tags $RPM_BUILD_ROOT%{_datadir}/parigp/misc
265 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
266 install %{SOURCE5} $RPM_BUILD_ROOT%{_pixmapsdir}
267
268 # pari-static
269 install Olinux-%{_target_cpu}/libpari.a $RPM_BUILD_ROOT%{_libdir}/libpari.a
270
271 # parigp-demos
272 install examples/* $RPM_BUILD_ROOT%{_examplesdir}/parigp
273
274 # galdata
275 tar zxvf %{SOURCE1} -C $RPM_BUILD_ROOT%{_datadir}/parigp/galdata
276
277 # gp2c
278 %{__make} install -C gp2c-%{gp2c_version} \
279         DESTDIR=$RPM_BUILD_ROOT
280
281 # math-pari
282 %{__make} install -C Math-Pari-%{math_pari_fversion} \
283         DESTDIR=$RPM_BUILD_ROOT
284
285 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/pari.1
286 echo ".so gp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/pari.1
287
288 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/parigp/{examples,doc}
289 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gp2c
290 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Math/libPARI*.pod
291
292 %clean
293 rm -rf $RPM_BUILD_ROOT
294
295 %post   -n pari -p /sbin/ldconfig
296 %postun -n pari -p /sbin/ldconfig
297
298 %files
299 %defattr(644,root,root,755)
300 %doc AUTHORS CHANGES* COMPAT NEW README examples/Inputrc %{?with_tex:doc/*.pdf}
301 %attr(755,root,root) %{_bindir}/gp-2.13
302 %attr(755,root,root) %{_bindir}/gp
303 %attr(755,root,root) %{_bindir}/gphelp
304 %attr(755,root,root) %{_bindir}/tex2mail
305 %dir %{_datadir}/parigp
306 %{_datadir}/parigp/PARI
307 %{_datadir}/parigp/misc
308 %{_datadir}/parigp/pari.desc
309 %{_mandir}/man1/gp.1*
310 %{_mandir}/man1/gp-*.1*
311 %{_mandir}/man1/gphelp.1*
312 %{_mandir}/man1/pari.1*
313 %{_mandir}/man1/tex2mail.1*
314 %{_desktopdir}/parigp.desktop
315 %{_pixmapsdir}/parigp.png
316
317 %files -n pari
318 %defattr(644,root,root,755)
319 %attr(755,root,root) %{_libdir}/libpari-gmp.so.*.*.*
320 %attr(755,root,root) %ghost %{_libdir}/libpari-gmp.so.7
321 %{_libdir}/parigp
322
323 %files -n pari-devel
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_libdir}/libpari.so
326 %{_includedir}/pari
327
328 %files -n pari-static
329 %defattr(644,root,root,755)
330 %{_libdir}/libpari.a
331
332 %files demos
333 %defattr(644,root,root,755)
334 %doc examples/EXPLAIN
335 %{_examplesdir}/parigp
336
337 %files galdata
338 %defattr(644,root,root,755)
339 %{_datadir}/parigp/galdata
340
341 %files gp2c
342 %defattr(644,root,root,755)
343 %attr(755,root,root) %{_bindir}/gp2c*
344 %doc gp2c-%{gp2c_version}/{AUTHORS,ChangeLog,NEWS,README,BUGS,doc/*.{html,png}}
345 %{?with_tex:%doc gp2c-%{gp2c_version}/doc/gp2c.pdf}
346 %{_datadir}/parigp/gp2c
347 %{_mandir}/man1/gp2c*.1*
348
349 %files -n perl-Math-Pari
350 %defattr(644,root,root,755)
351 %doc Math-Pari-%{math_pari_fversion}/{Changes,README,TODO}
352 %{perl_vendorarch}/Math/Pari.pm
353 %{perl_vendorarch}/Math/PariInit.pm
354 %dir %{perl_vendorarch}/auto/Math/Pari
355 %attr(755,root,root) %{perl_vendorarch}/auto/Math/Pari/Pari.so
356 %{_mandir}/man3/Math::Pari.3pm*
357 %{_mandir}/man3/Math::PariInit.3pm*
358 %{_mandir}/man3/Math::libPARI.3pm*
359 %{_mandir}/man3/Math::libPARI.dumb.3pm*
This page took 0.085256 seconds and 3 git commands to generate.