]> git.pld-linux.org Git - packages/parigp.git/blame - parigp.spec
- try with pari 2.13.1
[packages/parigp.git] / parigp.spec
CommitLineData
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 15Summary: Number Theory-oriented Computer Algebra System
434b919b 16Summary(pl.UTF-8): Komputerowy system obliczeń algebraicznych zorientowany na metody teorii liczb
dd89a8b7 17Name: parigp
c8d4b162 18Version: %{pari_version}
469b1919 19Release: 20
67867ee0 20License: GPL v2+
dd89a8b7 21Group: Applications/Math
469b1919
JB
22Source0: http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%{pari_version}.tar.gz
23# Source0-md5: 826064cf75af268be8a482ade6e27501
34b4d8a3 24Source1: http://pari.math.u-bordeaux.fr/pub/pari/packages/galdata.tgz
2fe27273 25# Source1-md5: f9f61b2930757a785b568e5d307a7d75
0c7245da
JR
26Source2: http://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-%{gp2c_version}.tar.gz
27# Source2-md5: ab29c383985d1b7d339189ecff31d40a
7e8bf48a
JB
28Source3: http://www.cpan.org/modules/by-module/Math/Math-Pari-%{math_pari_fversion}.zip
29# Source3-md5: f0d1d9f803c92abff0d6349869a82699
1d785e6a 30Source4: %{name}.desktop
95882164 31Source5: %{name}.png
24b72da1 32Patch0: %{name}-target_arch.patch
24b72da1 33Patch2: %{name}-arch.patch
c1170d84 34Patch3: perl-Math-Pari-crash-workaround.patch
7e8bf48a 35Patch4: perl-Math-Pari-noproccpuinfo.patch
5b9ede90 36Patch5: %{name}-noproccpuinfo.patch
e6713c66 37Patch6: gmp-version.patch
71b8978e 38Patch7: Math-Pari-escape-left-braces-in-regex.patch
469b1919
JB
39Patch8: perl-Math-Pari-update.patch
40# based on Math-Pari-%{math_pari_fversion}/patches/diff-2.11.0-all
41Patch10: pari-Math-Pari-diff.patch
3c0d90f0 42URL: http://pari.math.u-bordeaux.fr/
c8d4b162 43BuildRequires: autoconf
bc327ffe 44BuildRequires: ctags
e6713c66 45BuildRequires: gmp-devel
56f71478 46BuildRequires: perl-devel >= 1:5.8.0
e07df94b 47BuildRequires: readline-devel >= 4.2
c8d4b162 48BuildRequires: rpm-perlprov >= 3.0.3-16
34b4d8a3 49BuildRequires: rpmbuild(macros) >= 1.745
90c38ece 50%if %{with tex}
88d21d33
JR
51BuildRequires: texlive
52BuildRequires: texlive-amstex
53BuildRequires: texlive-csplain
54BuildRequires: texlive-dvips
55BuildRequires: texlive-fonts-cm
65cd5e24 56BuildRequires: texlive-format-pdflatex
88d21d33
JR
57BuildRequires: texlive-plain
58BuildRequires: texlive-pdftex
59BuildRequires: texlive-tex-babel
60BuildRequires: texlive-tex-ruhyphen
90c38ece 61%endif
101d00e8 62BuildRequires: xorg-lib-libX11-devel
24b72da1 63BuildRequires: xorg-util-imake
56f71478 64Requires: pari = %{pari_version}-%{release}
9a83e110 65Requires: xdvi
f3b4af7f 66BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
dd89a8b7 67
dd89a8b7 68%description
c4d271de 69PARI/GP is a package which is aimed at efficient computations in
f3b4af7f 70number theory, but also contains a large number of other useful
71functions. It is somewhat related to a Computer Algebra System, but is
72not really one since it treats symbolic expressions as mathematical
73entities such as matrices, polynomials, series, etc..., and not as
74expressions per se. However it is often much faster than other CAS,
75and contains a large number of specific functions not found elsewhere,
76essentially for use in number theory.
dd89a8b7 77
6f6f7023
JR
78%description -l pl.UTF-8
79System PARI/GP jest przeznaczony do wydajnych obliczeń z zakresu
80teorii liczb, ale zawiera również inne przydatne funkcje. Jest nieco
f3b4af7f 81spokrewniony z Komputerowymi Systemami Algebraicznymi, ale nie
6f6f7023
JR
82identyczny, ponieważ traktuje wyrażenia symboliczne jako obiekty
83matematyczne (macierze, wielomiany, szeregi itp.) a nie jako wyrażenia
84same w sobie. Jest jednak często znacznie szybszy od innych KSA-ów a
f3b4af7f 85ponadto zawiera wiele innych funkcji nie spotykanych gdzie indziej, a
6f6f7023 86przydatnych zwłaszcza w teorii liczb.
dd89a8b7
RW
87
88%package -n pari
89Summary: Shared PARI library (required by the parigp package)
434b919b 90Summary(pl.UTF-8): Biblioteka współdzielona PARI (wymagana przez pakiet parigp)
f3b4af7f 91Group: Libraries
dd89a8b7
RW
92
93%description -n pari
c4d271de 94Shared PARI library. You need it to run PARI/GP.
dd89a8b7 95
6f6f7023
JR
96%description -n pari -l pl.UTF-8
97Biblioteka współdzielona PARI. Potrzebujesz jej do uruchomienia
434a9a07 98PARI/GP.
dd89a8b7
RW
99
100%package -n pari-devel
101Summary: Include files for PARI shared library
434b919b 102Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki współdzielonej PARI
f3b4af7f 103Group: Development/Libraries
56f71478 104Requires: pari = %{pari_version}-%{release}
dd89a8b7
RW
105
106%description -n pari-devel
f3b4af7f 107Include files for shared PARI library. You need them to use PARI
108routines in you own programs.
dd89a8b7 109
6f6f7023
JR
110%description -n pari-devel -l pl.UTF-8
111Pliki nagłówkowe biblioteki współdzielonej PARI. Będziesz ich
112potrzebował, jeżeli będziesz chciał wykorzystywać procedury PARI w
f3b4af7f 113swoich programach.
dd89a8b7 114
86e1d1c3
RW
115%package -n pari-static
116Summary: Static PARI library
434b919b 117Summary(pl.UTF-8): Statyczna biblioteka PARI
86e1d1c3 118Group: Development/Libraries
56f71478 119Requires: pari-devel = %{pari_version}-%{release}
dd89a8b7 120
86e1d1c3 121%description -n pari-static
434a9a07 122Static PARI library. You need it to statically link your programs with
123PARI.
dd89a8b7 124
6f6f7023 125%description -n pari-static -l pl.UTF-8
434a9a07 126Biblioteka statyczna PARI. Potrzebujesz jej do konsolidowania
6f6f7023 127statycznego swoich programów korzystających z biblioteki PARI.
dd89a8b7
RW
128
129%package demos
c4d271de 130Summary: Example PARI/GP scripts
434b919b 131Summary(pl.UTF-8): Przykładowe skrypty pisane w języku PARI/GP
f3b4af7f 132Group: Applications/Math
56f71478 133Requires: %{name} = %{pari_version}-%{release}
dd89a8b7
RW
134
135%description demos
c4d271de 136Example PARI/GP scripts. You can write such programs on your own.
dd89a8b7 137
6f6f7023
JR
138%description demos -l pl.UTF-8
139Przykładowe skrypty pisane w języku PARI/GP. Sam możesz takie napisać.
dd89a8b7
RW
140
141%package galdata
c4d271de 142Summary: Galois data resolvents for PARI/GP
434b919b 143Summary(pl.UTF-8): Reprezentacje danych Galois fla PARI/GP
f3b4af7f 144Group: Applications/Math
56f71478 145Requires: %{name} = %{pari_version}-%{release}
dd89a8b7
RW
146
147%description galdata
c4d271de 148Galois data resolvents for PARI/GP.
dd89a8b7 149
6f6f7023 150%description galdata -l pl.UTF-8
c4d271de 151Reprezentacje danych Galois do PARI/GP.
dd89a8b7 152
446a2143 153%package gp2c
be3def7b 154Summary: PARI/GP to C translator
434b919b 155Summary(pl.UTF-8): Konwerter skryptów PARI/GP do języka C
0741c06b 156Version: %{gp2c_version}
b628e85a 157Epoch: 1
446a2143 158Group: Development/Tools
56f71478
JB
159Requires: pari-devel = %{pari_version}-%{release}
160Requires: %{name} = %{pari_version}-%{release}
446a2143
RW
161
162%description gp2c
434a9a07 163PARI/GP to C translator. Use it to compile your own C programs which
36af16a6
JB
164use pari library, without necessarily being a C programmer. Note: use
165gp2c-run to run your programs inside the PARI/GP environment.
446a2143 166
6f6f7023
JR
167%description gp2c -l pl.UTF-8
168Konwerter skryptów PARI/GP do języka C. Można nim tworzyć własne
169programy w C korzystające z biblioteki pari. Znajomość języka C nie
170jest wymagana. Uwaga: do uruchamiania programów w środowisku PARI/GP
171należy używać gp2c-run.
446a2143 172
1d785e6a 173%package -n perl-Math-Pari
174Summary: Math-Pari perl module
434b919b 175Summary(pl.UTF-8): Moduł perla Math-Pari
c8d4b162 176Version: %{math_pari_version}
1d785e6a 177Group: Development/Languages/Perl
1d785e6a 178
179%description -n perl-Math-Pari
36af16a6 180The Perl interface to the PARI part of GP/PARI.
1d785e6a 181
6f6f7023 182%description -n perl-Math-Pari -l pl.UTF-8
36af16a6 183Interfejs 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
192cd 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
219ln -s Olinux-%{_target_cpu} Olinux-x86_64
220%endif
eaf472d3 221%ifarch %{ix86}
222ln -s Olinux-%{_target_cpu} Olinux-ix86
223%endif
d73dc01e
JB
224%ifarch sparc sparc64
225# allow building sparc package on sparc64
226ln -s Olinux-sparc Olinux-sparc64
227%endif
dd89a8b7 228
446a2143
RW
229# gp2c
230cd gp2c-%{gp2c_version}
24b72da1 231
e647ea60 232ln -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 240cd ..
241
242# math-pari
7e8bf48a 243cd Math-Pari-%{math_pari_fversion}
bc327ffe
JB
244cp -f ../Olinux-%{_target_cpu}/paricfg.h libPARI/paricfg.h
245echo '#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
256rm -rf $RPM_BUILD_ROOT
56f71478
JB
257install -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 264install src/tags $RPM_BUILD_ROOT%{_datadir}/parigp/misc
56f71478 265install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
8f98520d 266install %{SOURCE5} $RPM_BUILD_ROOT%{_pixmapsdir}
dd89a8b7 267
86e1d1c3 268# pari-static
a1fc7ab1 269install Olinux-%{_target_cpu}/libpari.a $RPM_BUILD_ROOT%{_libdir}/libpari.a
dd89a8b7
RW
270
271# parigp-demos
a1fc7ab1 272install examples/* $RPM_BUILD_ROOT%{_examplesdir}/parigp
dd89a8b7
RW
273
274# galdata
56f71478 275tar 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
286echo ".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
293rm -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*
This page took 0.164668 seconds and 4 git commands to generate.