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