]>
Commit | Line | Data |
---|---|---|
56f71478 | 1 | # |
90c38ece | 2 | # Conditional build: |
7e8bf48a | 3 | %bcond_without tex # TeX documentation |
56f71478 | 4 | # |
469b1919 JB |
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 | |
0c7245da | 11 | %define gp2c_version 0.0.12 |
7e8bf48a JB |
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 | |
dd89a8b7 | 15 | Summary: Number Theory-oriented Computer Algebra System |
434b919b | 16 | Summary(pl.UTF-8): Komputerowy system obliczeń algebraicznych zorientowany na metody teorii liczb |
dd89a8b7 | 17 | Name: parigp |
c8d4b162 | 18 | Version: %{pari_version} |
469b1919 | 19 | Release: 20 |
67867ee0 | 20 | License: GPL v2+ |
dd89a8b7 | 21 | Group: Applications/Math |
469b1919 JB |
22 | Source0: http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%{pari_version}.tar.gz |
23 | # Source0-md5: 826064cf75af268be8a482ade6e27501 | |
34b4d8a3 | 24 | Source1: http://pari.math.u-bordeaux.fr/pub/pari/packages/galdata.tgz |
2fe27273 | 25 | # Source1-md5: f9f61b2930757a785b568e5d307a7d75 |
0c7245da JR |
26 | Source2: http://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-%{gp2c_version}.tar.gz |
27 | # Source2-md5: ab29c383985d1b7d339189ecff31d40a | |
7e8bf48a JB |
28 | Source3: http://www.cpan.org/modules/by-module/Math/Math-Pari-%{math_pari_fversion}.zip |
29 | # Source3-md5: f0d1d9f803c92abff0d6349869a82699 | |
1d785e6a | 30 | Source4: %{name}.desktop |
95882164 | 31 | Source5: %{name}.png |
24b72da1 | 32 | Patch0: %{name}-target_arch.patch |
24b72da1 | 33 | Patch2: %{name}-arch.patch |
c1170d84 | 34 | Patch3: perl-Math-Pari-crash-workaround.patch |
7e8bf48a | 35 | Patch4: perl-Math-Pari-noproccpuinfo.patch |
5b9ede90 | 36 | Patch5: %{name}-noproccpuinfo.patch |
e6713c66 | 37 | Patch6: gmp-version.patch |
71b8978e | 38 | Patch7: Math-Pari-escape-left-braces-in-regex.patch |
469b1919 JB |
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 | |
3c0d90f0 | 42 | URL: http://pari.math.u-bordeaux.fr/ |
c8d4b162 | 43 | BuildRequires: autoconf |
bc327ffe | 44 | BuildRequires: ctags |
e6713c66 | 45 | BuildRequires: gmp-devel |
56f71478 | 46 | BuildRequires: perl-devel >= 1:5.8.0 |
e07df94b | 47 | BuildRequires: readline-devel >= 4.2 |
c8d4b162 | 48 | BuildRequires: rpm-perlprov >= 3.0.3-16 |
34b4d8a3 | 49 | BuildRequires: rpmbuild(macros) >= 1.745 |
90c38ece | 50 | %if %{with tex} |
88d21d33 JR |
51 | BuildRequires: texlive |
52 | BuildRequires: texlive-amstex | |
53 | BuildRequires: texlive-csplain | |
54 | BuildRequires: texlive-dvips | |
55 | BuildRequires: texlive-fonts-cm | |
65cd5e24 | 56 | BuildRequires: texlive-format-pdflatex |
88d21d33 JR |
57 | BuildRequires: texlive-plain |
58 | BuildRequires: texlive-pdftex | |
59 | BuildRequires: texlive-tex-babel | |
60 | BuildRequires: texlive-tex-ruhyphen | |
90c38ece | 61 | %endif |
101d00e8 | 62 | BuildRequires: xorg-lib-libX11-devel |
24b72da1 | 63 | BuildRequires: xorg-util-imake |
56f71478 | 64 | Requires: pari = %{pari_version}-%{release} |
9a83e110 | 65 | Requires: xdvi |
f3b4af7f | 66 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
dd89a8b7 | 67 | |
dd89a8b7 | 68 | %description |
c4d271de | 69 | PARI/GP is a package which is aimed at efficient computations in |
f3b4af7f | 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. | |
dd89a8b7 | 77 | |
6f6f7023 JR |
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 | |
f3b4af7f | 81 | spokrewniony z Komputerowymi Systemami Algebraicznymi, ale nie |
6f6f7023 JR |
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 | |
f3b4af7f | 85 | ponadto zawiera wiele innych funkcji nie spotykanych gdzie indziej, a |
6f6f7023 | 86 | przydatnych zwłaszcza w teorii liczb. |
dd89a8b7 RW |
87 | |
88 | %package -n pari | |
89 | Summary: Shared PARI library (required by the parigp package) | |
434b919b | 90 | Summary(pl.UTF-8): Biblioteka współdzielona PARI (wymagana przez pakiet parigp) |
f3b4af7f | 91 | Group: Libraries |
dd89a8b7 RW |
92 | |
93 | %description -n pari | |
c4d271de | 94 | Shared PARI library. You need it to run PARI/GP. |
dd89a8b7 | 95 | |
6f6f7023 JR |
96 | %description -n pari -l pl.UTF-8 |
97 | Biblioteka współdzielona PARI. Potrzebujesz jej do uruchomienia | |
434a9a07 | 98 | PARI/GP. |
dd89a8b7 RW |
99 | |
100 | %package -n pari-devel | |
101 | Summary: Include files for PARI shared library | |
434b919b | 102 | Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki współdzielonej PARI |
f3b4af7f | 103 | Group: Development/Libraries |
56f71478 | 104 | Requires: pari = %{pari_version}-%{release} |
dd89a8b7 RW |
105 | |
106 | %description -n pari-devel | |
f3b4af7f | 107 | Include files for shared PARI library. You need them to use PARI |
108 | routines in you own programs. | |
dd89a8b7 | 109 | |
6f6f7023 JR |
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 | |
f3b4af7f | 113 | swoich programach. |
dd89a8b7 | 114 | |
86e1d1c3 RW |
115 | %package -n pari-static |
116 | Summary: Static PARI library | |
434b919b | 117 | Summary(pl.UTF-8): Statyczna biblioteka PARI |
86e1d1c3 | 118 | Group: Development/Libraries |
56f71478 | 119 | Requires: pari-devel = %{pari_version}-%{release} |
dd89a8b7 | 120 | |
86e1d1c3 | 121 | %description -n pari-static |
434a9a07 | 122 | Static PARI library. You need it to statically link your programs with |
123 | PARI. | |
dd89a8b7 | 124 | |
6f6f7023 | 125 | %description -n pari-static -l pl.UTF-8 |
434a9a07 | 126 | Biblioteka statyczna PARI. Potrzebujesz jej do konsolidowania |
6f6f7023 | 127 | statycznego swoich programów korzystających z biblioteki PARI. |
dd89a8b7 RW |
128 | |
129 | %package demos | |
c4d271de | 130 | Summary: Example PARI/GP scripts |
434b919b | 131 | Summary(pl.UTF-8): Przykładowe skrypty pisane w języku PARI/GP |
f3b4af7f | 132 | Group: Applications/Math |
56f71478 | 133 | Requires: %{name} = %{pari_version}-%{release} |
dd89a8b7 RW |
134 | |
135 | %description demos | |
c4d271de | 136 | Example PARI/GP scripts. You can write such programs on your own. |
dd89a8b7 | 137 | |
6f6f7023 JR |
138 | %description demos -l pl.UTF-8 |
139 | Przykładowe skrypty pisane w języku PARI/GP. Sam możesz takie napisać. | |
dd89a8b7 RW |
140 | |
141 | %package galdata | |
c4d271de | 142 | Summary: Galois data resolvents for PARI/GP |
434b919b | 143 | Summary(pl.UTF-8): Reprezentacje danych Galois fla PARI/GP |
f3b4af7f | 144 | Group: Applications/Math |
56f71478 | 145 | Requires: %{name} = %{pari_version}-%{release} |
dd89a8b7 RW |
146 | |
147 | %description galdata | |
c4d271de | 148 | Galois data resolvents for PARI/GP. |
dd89a8b7 | 149 | |
6f6f7023 | 150 | %description galdata -l pl.UTF-8 |
c4d271de | 151 | Reprezentacje danych Galois do PARI/GP. |
dd89a8b7 | 152 | |
446a2143 | 153 | %package gp2c |
be3def7b | 154 | Summary: PARI/GP to C translator |
434b919b | 155 | Summary(pl.UTF-8): Konwerter skryptów PARI/GP do języka C |
0741c06b | 156 | Version: %{gp2c_version} |
b628e85a | 157 | Epoch: 1 |
446a2143 | 158 | Group: Development/Tools |
56f71478 JB |
159 | Requires: pari-devel = %{pari_version}-%{release} |
160 | Requires: %{name} = %{pari_version}-%{release} | |
446a2143 RW |
161 | |
162 | %description gp2c | |
434a9a07 | 163 | PARI/GP to C translator. Use it to compile your own C programs which |
36af16a6 JB |
164 | use pari library, without necessarily being a C programmer. Note: use |
165 | gp2c-run to run your programs inside the PARI/GP environment. | |
446a2143 | 166 | |
6f6f7023 JR |
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. | |
446a2143 | 172 | |
1d785e6a | 173 | %package -n perl-Math-Pari |
174 | Summary: Math-Pari perl module | |
434b919b | 175 | Summary(pl.UTF-8): Moduł perla Math-Pari |
c8d4b162 | 176 | Version: %{math_pari_version} |
1d785e6a | 177 | Group: Development/Languages/Perl |
1d785e6a | 178 | |
179 | %description -n perl-Math-Pari | |
36af16a6 | 180 | The Perl interface to the PARI part of GP/PARI. |
1d785e6a | 181 | |
6f6f7023 | 182 | %description -n perl-Math-Pari -l pl.UTF-8 |
36af16a6 | 183 | Interfejs Perla do biblioteki PARI. |
1d785e6a | 184 | |
dd89a8b7 | 185 | %prep |
c8d4b162 | 186 | %setup -q -n pari-%{pari_version} -a 2 -a 3 |
469b1919 | 187 | %patch10 -p1 |
24b72da1 | 188 | %patch0 -p1 |
21e9bc09 | 189 | %patch2 -p1 |
5b9ede90 | 190 | %patch5 -p1 |
e6713c66 | 191 | %patch6 -p1 |
7e8bf48a JB |
192 | cd Math-Pari-%{math_pari_fversion} |
193 | %patch3 -p1 | |
194 | %patch4 -p1 | |
71b8978e | 195 | %patch7 -p0 |
469b1919 | 196 | %patch8 -p1 |
dd89a8b7 RW |
197 | |
198 | %build | |
446a2143 | 199 | # pari & parigp |
e07df94b | 200 | ./Configure \ |
24b72da1 | 201 | --target=%{_target_cpu} \ |
e07df94b | 202 | --prefix=%{_prefix} \ |
6f23328b | 203 | --libdir=%{_libdir} \ |
24b72da1 JR |
204 | --sysdatadir=%{_libdir}/parigp \ |
205 | --datadir=%{_datadir}/parigp \ | |
e6713c66 JR |
206 | --share-prefix=%{_datadir} \ |
207 | --with-readline-lib=%{_libdir} \ | |
208 | --with-ncurses-lib=%{_libdir} \ | |
209 | --with-gmp-lib=%{_libdir} | |
210 | ||
24b72da1 | 211 | %{__make} -C Olinux-%{_target_cpu} all \ |
bc327ffe | 212 | CC="%{__cc}" \ |
24b72da1 | 213 | CFLAGS="%{rpmcflags} -fno-strict-aliasing -fomit-frame-pointer -fPIC" |
cfe6cbf8 | 214 | |
bc327ffe JB |
215 | %{__make} ctags |
216 | ||
df89f095 | 217 | %{?with_tex:%{__make} -j1 -C doc docpdf} |
e6713c66 JR |
218 | %ifarch x32 |
219 | ln -s Olinux-%{_target_cpu} Olinux-x86_64 | |
220 | %endif | |
eaf472d3 | 221 | %ifarch %{ix86} |
222 | ln -s Olinux-%{_target_cpu} Olinux-ix86 | |
223 | %endif | |
d73dc01e JB |
224 | %ifarch sparc sparc64 |
225 | # allow building sparc package on sparc64 | |
226 | ln -s Olinux-sparc Olinux-sparc64 | |
227 | %endif | |
dd89a8b7 | 228 | |
446a2143 RW |
229 | # gp2c |
230 | cd gp2c-%{gp2c_version} | |
24b72da1 | 231 | |
e647ea60 | 232 | ln -sf .. pari |
66b05270 | 233 | %{__autoconf} |
446a2143 RW |
234 | %configure \ |
235 | --datadir=%{_datadir}/parigp | |
24b72da1 | 236 | |
446a2143 | 237 | %{__make} |
be033589 | 238 | %{?with_tex:%{__make} -j1 -C doc docall} |
24b72da1 | 239 | |
1d785e6a | 240 | cd .. |
241 | ||
242 | # math-pari | |
7e8bf48a | 243 | cd Math-Pari-%{math_pari_fversion} |
bc327ffe JB |
244 | cp -f ../Olinux-%{_target_cpu}/paricfg.h libPARI/paricfg.h |
245 | echo '#define DL_DFLT_NAME NULL' >>libPARI/paricfg.h | |
24b72da1 | 246 | |
c6321049 | 247 | %{__perl} Makefile.PL \ |
248 | INSTALLDIRS=vendor | |
24b72da1 | 249 | |
56f71478 | 250 | %{__make} \ |
bc327ffe | 251 | OPTIMIZE="%{rpmcflags} -I$(pwd)/../Olinux-%{_target_cpu}" |
24b72da1 | 252 | |
471f6a05 | 253 | # %{__make} test |
28a3c1d0 | 254 | |
dd89a8b7 RW |
255 | %install |
256 | rm -rf $RPM_BUILD_ROOT | |
56f71478 JB |
257 | install -d $RPM_BUILD_ROOT{%{_datadir}/parigp/galdata,%{_examplesdir}/parigp} \ |
258 | $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} | |
dd89a8b7 RW |
259 | |
260 | # parigp, pari & pari-devel | |
c6321049 | 261 | %{__make} install \ |
262 | DESTDIR=$RPM_BUILD_ROOT | |
56f71478 | 263 | |
a1fc7ab1 | 264 | install src/tags $RPM_BUILD_ROOT%{_datadir}/parigp/misc |
56f71478 | 265 | install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir} |
8f98520d | 266 | install %{SOURCE5} $RPM_BUILD_ROOT%{_pixmapsdir} |
dd89a8b7 | 267 | |
86e1d1c3 | 268 | # pari-static |
a1fc7ab1 | 269 | install Olinux-%{_target_cpu}/libpari.a $RPM_BUILD_ROOT%{_libdir}/libpari.a |
dd89a8b7 RW |
270 | |
271 | # parigp-demos | |
a1fc7ab1 | 272 | install examples/* $RPM_BUILD_ROOT%{_examplesdir}/parigp |
dd89a8b7 RW |
273 | |
274 | # galdata | |
56f71478 | 275 | tar zxvf %{SOURCE1} -C $RPM_BUILD_ROOT%{_datadir}/parigp/galdata |
dd89a8b7 | 276 | |
446a2143 | 277 | # gp2c |
cfe6cbf8 | 278 | %{__make} install -C gp2c-%{gp2c_version} \ |
446a2143 | 279 | DESTDIR=$RPM_BUILD_ROOT |
446a2143 | 280 | |
1d785e6a | 281 | # math-pari |
7e8bf48a | 282 | %{__make} install -C Math-Pari-%{math_pari_fversion} \ |
1d785e6a | 283 | DESTDIR=$RPM_BUILD_ROOT |
1d785e6a | 284 | |
bc327ffe | 285 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/pari.1 |
cce86261 JB |
286 | echo ".so gp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/pari.1 |
287 | ||
bc327ffe | 288 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/parigp/{examples,doc} |
7e8bf48a | 289 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gp2c |
bc327ffe | 290 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Math/libPARI*.pod |
24b72da1 | 291 | |
dd89a8b7 RW |
292 | %clean |
293 | rm -rf $RPM_BUILD_ROOT | |
294 | ||
7fc9b10b JB |
295 | %post -n pari -p /sbin/ldconfig |
296 | %postun -n pari -p /sbin/ldconfig | |
297 | ||
dd89a8b7 RW |
298 | %files |
299 | %defattr(644,root,root,755) | |
7e8bf48a | 300 | %doc AUTHORS CHANGES* COMPAT NEW README examples/Inputrc %{?with_tex:doc/*.pdf} |
469b1919 | 301 | %attr(755,root,root) %{_bindir}/gp-2.13 |
dd89a8b7 RW |
302 | %attr(755,root,root) %{_bindir}/gp |
303 | %attr(755,root,root) %{_bindir}/gphelp | |
304 | %attr(755,root,root) %{_bindir}/tex2mail | |
dd89a8b7 | 305 | %dir %{_datadir}/parigp |
bc327ffe | 306 | %{_datadir}/parigp/PARI |
846279c1 | 307 | %{_datadir}/parigp/misc |
24b72da1 | 308 | %{_datadir}/parigp/pari.desc |
ed10f0d4 | 309 | %{_mandir}/man1/gp.1* |
24b72da1 | 310 | %{_mandir}/man1/gp-*.1* |
ed10f0d4 | 311 | %{_mandir}/man1/gphelp.1* |
34b4d8a3 JB |
312 | %{_mandir}/man1/pari.1* |
313 | %{_mandir}/man1/tex2mail.1* | |
bc327ffe JB |
314 | %{_desktopdir}/parigp.desktop |
315 | %{_pixmapsdir}/parigp.png | |
dd89a8b7 RW |
316 | |
317 | %files -n pari | |
f3b4af7f | 318 | %defattr(644,root,root,755) |
bc327ffe | 319 | %attr(755,root,root) %{_libdir}/libpari-gmp.so.*.*.* |
469b1919 | 320 | %attr(755,root,root) %ghost %{_libdir}/libpari-gmp.so.7 |
bc327ffe | 321 | %{_libdir}/parigp |
dd89a8b7 RW |
322 | |
323 | %files -n pari-devel | |
f3b4af7f | 324 | %defattr(644,root,root,755) |
24b72da1 | 325 | %attr(755,root,root) %{_libdir}/libpari.so |
cfe6cbf8 | 326 | %{_includedir}/pari |
dd89a8b7 | 327 | |
86e1d1c3 | 328 | %files -n pari-static |
dd89a8b7 | 329 | %defattr(644,root,root,755) |
24b72da1 | 330 | %{_libdir}/libpari.a |
dd89a8b7 RW |
331 | |
332 | %files demos | |
f3b4af7f | 333 | %defattr(644,root,root,755) |
c8d4b162 | 334 | %doc examples/EXPLAIN |
846279c1 | 335 | %{_examplesdir}/parigp |
dd89a8b7 RW |
336 | |
337 | %files galdata | |
f3b4af7f | 338 | %defattr(644,root,root,755) |
cfa61620 | 339 | %{_datadir}/parigp/galdata |
76dd33b2 | 340 | |
446a2143 RW |
341 | %files gp2c |
342 | %defattr(644,root,root,755) | |
4a006b16 | 343 | %attr(755,root,root) %{_bindir}/gp2c* |
24b72da1 JR |
344 | %doc gp2c-%{gp2c_version}/{AUTHORS,ChangeLog,NEWS,README,BUGS,doc/*.{html,png}} |
345 | %{?with_tex:%doc gp2c-%{gp2c_version}/doc/gp2c.pdf} | |
846279c1 | 346 | %{_datadir}/parigp/gp2c |
ed10f0d4 | 347 | %{_mandir}/man1/gp2c*.1* |
1d785e6a | 348 | |
349 | %files -n perl-Math-Pari | |
350 | %defattr(644,root,root,755) | |
7e8bf48a | 351 | %doc Math-Pari-%{math_pari_fversion}/{Changes,README,TODO} |
bc327ffe JB |
352 | %{perl_vendorarch}/Math/Pari.pm |
353 | %{perl_vendorarch}/Math/PariInit.pm | |
c6321049 | 354 | %dir %{perl_vendorarch}/auto/Math/Pari |
c6321049 | 355 | %attr(755,root,root) %{perl_vendorarch}/auto/Math/Pari/Pari.so |
bc327ffe JB |
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* |