1 | # |
---|
2 | # Important for %{ix86}: |
---|
3 | # This rpm has to be build on a CPU with sse2 support like Pentium 4 ! |
---|
4 | # |
---|
5 | %ifarch %{ix86} |
---|
6 | %define SSE2 1 |
---|
7 | %else |
---|
8 | %define SSE2 0 |
---|
9 | %endif |
---|
10 | |
---|
11 | # Don't you want to build a libraries using SSE2? |
---|
12 | %{?_without_sse2%define SSE2 0} |
---|
13 | |
---|
14 | %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0} |
---|
15 | |
---|
16 | Summary: A GNU arbitrary precision library. |
---|
17 | Summary(ja): GNU 多倍長演算ライブラリ |
---|
18 | Name: gmp |
---|
19 | Version: 5.1.3 |
---|
20 | Release: 1%{?_dist_release} |
---|
21 | URL: http://gmplib.org/ |
---|
22 | Source: ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.xz |
---|
23 | Source2: gmp.h |
---|
24 | Source3: gmp-mparam.h |
---|
25 | Patch0: gmp-4.0.1-s390.patch |
---|
26 | License: LGPLv3+ |
---|
27 | Group: System Environment/Libraries |
---|
28 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
29 | BuildRequires: autoconf libtool |
---|
30 | Obsoletes: gmp4 |
---|
31 | |
---|
32 | Vendor: Project Vine |
---|
33 | Distribution: Vine Linux |
---|
34 | Packager: inagaki, kenta |
---|
35 | |
---|
36 | %description |
---|
37 | The gmp package contains GNU MP, a library for arbitrary precision |
---|
38 | arithmetic, signed integers operations, rational numbers and floating |
---|
39 | point numbers. GNU MP is designed for speed, for both small and very |
---|
40 | large operands. GNU MP is fast because it uses fullwords as the basic |
---|
41 | arithmetic type, it uses fast algorithms, it carefully optimizes |
---|
42 | assembly code for many CPUs' most common inner loops, and it generally |
---|
43 | emphasizes speed over simplicity/elegance in its operations. |
---|
44 | |
---|
45 | Install the gmp package if you need a fast arbitrary precision |
---|
46 | library. |
---|
47 | |
---|
48 | %package devel |
---|
49 | Summary: Development tools for the GNU MP arbitrary precision library. |
---|
50 | Group: Development/Libraries |
---|
51 | Requires: %{name} = %{version}-%{release} |
---|
52 | Requires(post): /sbin/install-info |
---|
53 | Requires(preun): /sbin/install-info |
---|
54 | #Obsoletes: gmp4-devel |
---|
55 | |
---|
56 | %description devel |
---|
57 | The libraries, header files and documentation for using the GNU MP |
---|
58 | arbitrary precision library in applications. |
---|
59 | |
---|
60 | If you want to develop applications which will use the GNU MP library, |
---|
61 | you'll need to install the gmp-devel package. You'll also need to |
---|
62 | install the gmp package. |
---|
63 | |
---|
64 | %package static |
---|
65 | Summary: Development tools for the GNU MP arbitrary precision library |
---|
66 | Group: Development/Libraries |
---|
67 | Requires: %{name}-devel = %{version}-%{release} |
---|
68 | |
---|
69 | %description static |
---|
70 | The static libraries for using the GNU MP arbitrary precision library |
---|
71 | in applications. |
---|
72 | |
---|
73 | %package -n compat32-%{name} |
---|
74 | Summary: A GNU arbitrary precision library. |
---|
75 | Group: System Environment/Libraries |
---|
76 | Requires: %{name} = %{version}-%{release} |
---|
77 | |
---|
78 | %description -n compat32-%{name} |
---|
79 | The gmp package contains GNU MP, a library for arbitrary precision |
---|
80 | arithmetic, signed integers operations, rational numbers and floating |
---|
81 | point numbers. GNU MP is designed for speed, for both small and very |
---|
82 | large operands. GNU MP is fast because it uses fullwords as the basic |
---|
83 | arithmetic type, it uses fast algorithms, it carefully optimizes |
---|
84 | assembly code for many CPUs' most common inner loops, and it generally |
---|
85 | emphasizes speed over simplicity/elegance in its operations. |
---|
86 | |
---|
87 | Install the gmp package if you need a fast arbitrary precision |
---|
88 | library. |
---|
89 | |
---|
90 | %package -n compat32-%{name}-devel |
---|
91 | Summary: Development tools for the GNU MP arbitrary precision library. |
---|
92 | Group: Development/Libraries |
---|
93 | Requires: compat32-%{name} = %{version}-%{release} |
---|
94 | Requires: %{name}-devel = %{version}-%{release} |
---|
95 | |
---|
96 | %description -n compat32-%{name}-devel |
---|
97 | The libraries, header files and documentation for using the GNU MP |
---|
98 | arbitrary precision library in applications. |
---|
99 | |
---|
100 | If you want to develop applications which will use the GNU MP library, |
---|
101 | you'll need to install the gmp-devel package. You'll also need to |
---|
102 | install the gmp package. |
---|
103 | |
---|
104 | %package -n compat32-%{name}-static |
---|
105 | Summary: Development tools for the GNU MP arbitrary precision library |
---|
106 | Group: Development/Libraries |
---|
107 | Requires: compat32-%{name}-devel = %{version}-%{release} |
---|
108 | |
---|
109 | %description -n compat32-%{name}-static |
---|
110 | The static libraries for using the GNU MP arbitrary precision library |
---|
111 | in applications. |
---|
112 | |
---|
113 | |
---|
114 | %prep |
---|
115 | %setup -q |
---|
116 | %patch0 -p1 |
---|
117 | |
---|
118 | %build |
---|
119 | autoreconf -if |
---|
120 | if as --help | grep -q execstack; then |
---|
121 | # the object files do not require an executable stack |
---|
122 | export CCAS="gcc -c -Wa,--noexecstack" |
---|
123 | fi |
---|
124 | mkdir base |
---|
125 | cd base |
---|
126 | ln -s ../configure . |
---|
127 | #%configure --enable-mpbsd --enable-cxx |
---|
128 | %configure --enable-cxx |
---|
129 | perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool |
---|
130 | export LD_LIBRARY_PATH=`pwd`/.libs |
---|
131 | make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} |
---|
132 | cd .. |
---|
133 | |
---|
134 | %if %{SSE2} |
---|
135 | %define _host pentium4-vine-linux |
---|
136 | mkdir build-sse2 |
---|
137 | cd build-sse2 |
---|
138 | ln -s ../configure . |
---|
139 | CFLAGS="%{optflags} -march=pentium4" |
---|
140 | #%configure --enable-mpbsd --enable-cxx |
---|
141 | %configure --enable-cxx |
---|
142 | |
---|
143 | perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool |
---|
144 | export LD_LIBRARY_PATH=`pwd`/.libs |
---|
145 | make %{?_smp_mflags} |
---|
146 | unset CFLAGS |
---|
147 | cd .. |
---|
148 | %endif |
---|
149 | |
---|
150 | %install |
---|
151 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT |
---|
152 | cd base |
---|
153 | export LD_LIBRARY_PATH=`pwd`/.libs |
---|
154 | make install DESTDIR=$RPM_BUILD_ROOT |
---|
155 | install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir} |
---|
156 | |
---|
157 | rm -f $RPM_BUILD_ROOT%{_libdir}/lib{gmp,mp,gmpxx}.la |
---|
158 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
---|
159 | /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir} |
---|
160 | ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so |
---|
161 | cd .. |
---|
162 | |
---|
163 | %if %{SSE2} |
---|
164 | cd build-sse2 |
---|
165 | export LD_LIBRARY_PATH=`pwd`/.libs |
---|
166 | mkdir $RPM_BUILD_ROOT%{_libdir}/sse2 |
---|
167 | install -m 755 .libs/libgmp.so.*.* $RPM_BUILD_ROOT%{_libdir}/sse2 |
---|
168 | cp -a .libs/libgmp.so.[^.]* $RPM_BUILD_ROOT%{_libdir}/sse2 |
---|
169 | chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmp.so.[^.]* |
---|
170 | install -m 755 .libs/libgmpxx.so.*.* $RPM_BUILD_ROOT%{_libdir}/sse2 |
---|
171 | cp -a .libs/libgmpxx.so.? $RPM_BUILD_ROOT%{_libdir}/sse2 |
---|
172 | chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmpxx.so.? |
---|
173 | cd .. |
---|
174 | %endif |
---|
175 | |
---|
176 | # Rename gmp.h to gmp-<arch>.h and gmp-mparam.h to gmp-mparam-<arch>.h to |
---|
177 | # avoid file conflicts on multilib systems and install wrapper include files |
---|
178 | # gmp.h and gmp-mparam-<arch>.h |
---|
179 | basearch=%{_arch} |
---|
180 | # always use i386 for iX86 |
---|
181 | %ifarch %{ix86} |
---|
182 | basearch=i386 |
---|
183 | %endif |
---|
184 | # always use arm for arm* |
---|
185 | %ifarch %{arm} |
---|
186 | basearch=arm |
---|
187 | %endif |
---|
188 | # Rename files and install wrappers |
---|
189 | |
---|
190 | mv %{buildroot}/%{_includedir}/gmp.h %{buildroot}/%{_includedir}/gmp-${basearch}.h |
---|
191 | install -m644 %{SOURCE2} %{buildroot}/%{_includedir}/gmp.h |
---|
192 | mv %{buildroot}/%{_includedir}/gmp-mparam.h %{buildroot}/%{_includedir}/gmp-mparam-${basearch}.h |
---|
193 | install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/gmp-mparam.h |
---|
194 | |
---|
195 | |
---|
196 | %check |
---|
197 | %ifnarch ppc |
---|
198 | cd base |
---|
199 | export LD_LIBRARY_PATH=`pwd`/.libs |
---|
200 | make %{?_smp_mflags} check |
---|
201 | cd .. |
---|
202 | %endif |
---|
203 | |
---|
204 | %if %{SSE2} |
---|
205 | cd build-sse2 |
---|
206 | export LD_LIBRARY_PATH=`pwd`/.libs |
---|
207 | make %{?_smp_mflags} check |
---|
208 | cd .. |
---|
209 | %endif |
---|
210 | |
---|
211 | |
---|
212 | %post -p /sbin/ldconfig |
---|
213 | |
---|
214 | %postun -p /sbin/ldconfig |
---|
215 | |
---|
216 | %post devel |
---|
217 | /sbin/install-info %{_infodir}/gmp.info.gz %{_infodir}/dir |
---|
218 | |
---|
219 | %preun devel |
---|
220 | if [ "$1" = 0 ]; then |
---|
221 | /sbin/install-info --delete %{_infodir}/gmp.info.gz %{_infodir}/dir |
---|
222 | fi |
---|
223 | |
---|
224 | %post -n compat32-%{name} -p /sbin/ldconfig |
---|
225 | |
---|
226 | %postun -n compat32-%{name} -p /sbin/ldconfig |
---|
227 | |
---|
228 | %clean |
---|
229 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT |
---|
230 | |
---|
231 | |
---|
232 | %files |
---|
233 | %defattr(-,root,root,-) |
---|
234 | %doc COPYING COPYING.LIB NEWS README |
---|
235 | %{_libdir}/libgmp.so.* |
---|
236 | %{_libdir}/libgmpxx.so.* |
---|
237 | %if %{SSE2} |
---|
238 | %{_libdir}/sse2/* |
---|
239 | %endif |
---|
240 | |
---|
241 | %files devel |
---|
242 | %defattr(-,root,root,-) |
---|
243 | %{_libdir}/libgmp.so |
---|
244 | %{_libdir}/libgmpxx.so |
---|
245 | #{_libdir}/libmpfr.a |
---|
246 | %{_includedir}/*.h |
---|
247 | %{_infodir}/gmp.info* |
---|
248 | #{_infodir}/mpfr.info* |
---|
249 | |
---|
250 | %files static |
---|
251 | %defattr(-,root,root,-) |
---|
252 | %doc README |
---|
253 | %{_libdir}/libgmp.a |
---|
254 | %{_libdir}/libgmpxx.a |
---|
255 | |
---|
256 | # compat32 |
---|
257 | %if %{build_compat32} |
---|
258 | %files -n compat32-%{name} |
---|
259 | %defattr(-,root,root,-) |
---|
260 | %{_libdir}/libgmp.so.* |
---|
261 | %{_libdir}/libgmpxx.so.* |
---|
262 | %if %{SSE2} |
---|
263 | %{_libdir}/sse2/* |
---|
264 | %endif |
---|
265 | |
---|
266 | %files -n compat32-%{name}-devel |
---|
267 | %defattr(-,root,root,-) |
---|
268 | %{_libdir}/libgmp.so |
---|
269 | %{_libdir}/libgmpxx.so |
---|
270 | #{_libdir}/libmpfr.a |
---|
271 | |
---|
272 | %files -n compat32-%{name}-static |
---|
273 | %defattr(-,root,root,-) |
---|
274 | %doc README |
---|
275 | %{_libdir}/libgmp.a |
---|
276 | %{_libdir}/libgmpxx.a |
---|
277 | %endif |
---|
278 | |
---|
279 | %changelog |
---|
280 | * Sun Nov 03 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.1.3-1 |
---|
281 | - new upstream release |
---|
282 | - changed file archive type to xz |
---|
283 | - replaced Patch0 to Fedora rawhide's Patch |
---|
284 | - deleted unrecognized option: --enable-mpbsd |
---|
285 | |
---|
286 | * Tue Apr 19 2011 NAKAMURA Kenta <kenta@vinelinux.org> 4.3.2-1 |
---|
287 | - new upstream release |
---|
288 | |
---|
289 | * Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 4.3.1-2 |
---|
290 | - rebuilt with rpm-4.8.1-3 |
---|
291 | |
---|
292 | * Sat Nov 28 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.1-1 |
---|
293 | - new upstream release |
---|
294 | - split static libraries to subpackage |
---|
295 | |
---|
296 | * Sun Jun 28 2009 NAKAMURA Kenta <kenta@vinelinux.org> 4.2.2-5 |
---|
297 | - added compat32 package for x86_64 arch support |
---|
298 | - run autoreconf to get autotools right |
---|
299 | |
---|
300 | * Mon May 19 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-4 |
---|
301 | - applied new versioning policy |
---|
302 | - added Patch3 from upstream |
---|
303 | |
---|
304 | * Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl2 |
---|
305 | - remove --enable-mpfr |
---|
306 | (mpfr has been splitted since gmp 4.2) |
---|
307 | |
---|
308 | * Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl1 |
---|
309 | - new upstream release |
---|
310 | * Mon Sep 24 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-3 |
---|
311 | - fix libgmpxx.so link |
---|
312 | * Thu Sep 20 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-2 |
---|
313 | - fix check tag |
---|
314 | * Thu Nov 2 2006 Thomas Woerner <twoerner@redhat.com> 4.1.4-10 |
---|
315 | - fixed arch order in gmp.h and gmp-mparam.h wrapper for all architectures |
---|
316 | - re-include libraries using SSE2 on x86 arch |
---|
317 | - updated URL |
---|
318 | |
---|
319 | * Wed May 09 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1.4-6vl2 |
---|
320 | - rebuilt with new toolchain |
---|
321 | |
---|
322 | * Sat Feb 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.1.4-6vl1 |
---|
323 | - new upstream release |
---|
324 | * Mon Apr 18 2005 Thomas Woerner <twoerner@redhat.com> 4.1.4-6 |
---|
325 | - fixed __setfpucw call in mpfr-test.h |
---|
326 | * Sun Sep 26 2004 Florian La Roche <Florian.LaRoche@redhat.de> |
---|
327 | - disable ppc64 patch, now fixed upstream |
---|
328 | * Wed Mar 31 2004 Thomas Woerner <twoerner@redhat.com> 4.1.2-14 |
---|
329 | - dropped RPATH (#118506) |
---|
330 | - exclude libraries using SSE2 in default settings. |
---|
331 | |
---|
332 | * Fri Mar 12 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 4.1.2-13vl1 |
---|
333 | - modified for Vine |
---|
334 | |
---|
335 | * Mon Jan 20 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl3 |
---|
336 | - added Obsoletes: gmp4(-devel) |
---|
337 | |
---|
338 | * Wed Jan 15 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl2 |
---|
339 | - rebuilt against new toolchain |
---|
340 | |
---|
341 | * Fri May 31 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> |
---|
342 | - modified for Vine |
---|
343 | |
---|
344 | * Sat May 25 2002 Florian La Roche <Florian.LaRoche@redhat.de> |
---|
345 | - update to version 4.1 |
---|
346 | - patch s390 gmp-mparam.h to match other archs. |
---|
347 | |
---|
348 | * Thu May 23 2002 Tim Powers <timp@redhat.com> |
---|
349 | - automated rebuild |
---|
350 | |
---|
351 | * Mon Mar 11 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-3 |
---|
352 | - Use standard %%configure macro and edit %%{_tmppath} |
---|
353 | |
---|
354 | * Tue Feb 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-2 |
---|
355 | - Rebuild |
---|
356 | |
---|
357 | * Tue Jan 22 2002 Florian La Roche <Florian.LaRoche@redhat.de> |
---|
358 | - update to 4.0.1 |
---|
359 | - bzip2 src |
---|
360 | |
---|
361 | * Wed Jan 09 2002 Tim Powers <timp@redhat.com> |
---|
362 | - automated rebuild |
---|
363 | |
---|
364 | * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com> |
---|
365 | - Bump release + rebuild. |
---|
366 | |
---|
367 | * Mon Feb 05 2001 Philipp Knirsch <pknirsch@redhat.de> |
---|
368 | - Fixed bugzilla bug #25515 where GMP wouldn't work on IA64 as IA64 is not |
---|
369 | correctly identified as a 64 bit platform. |
---|
370 | |
---|
371 | * Mon Dec 18 2000 Preston Brown <pbrown@redhat.com> |
---|
372 | - include bsd mp library |
---|
373 | |
---|
374 | * Tue Oct 17 2000 Florian La Roche <Florian.LaRoche@redhat.de> |
---|
375 | - update to 3.1.1 |
---|
376 | |
---|
377 | * Sun Sep 3 2000 Florian La Roche <Florian.LaRoche@redhat.com> |
---|
378 | - update to 3.1 |
---|
379 | |
---|
380 | * Sat Aug 19 2000 Preston Brown <pbrown@redhat.com> |
---|
381 | - devel subpackage depends on main package so that .so symlink is OK. |
---|
382 | |
---|
383 | * Thu Jul 13 2000 Prospector <bugzilla@redhat.com> |
---|
384 | - automatic rebuild |
---|
385 | |
---|
386 | * Sat Jun 3 2000 Nalin Dahyabhai <nalin@redhat.com> |
---|
387 | - switch to the configure and makeinstall macros |
---|
388 | - FHS-compliance fixing |
---|
389 | - move docs to non-devel package |
---|
390 | |
---|
391 | * Fri Apr 28 2000 Bill Nottingham <notting@redhat.com> |
---|
392 | - libtoolize for ia64 |
---|
393 | |
---|
394 | * Fri Apr 28 2000 Florian La Roche <Florian.LaRoche@redhat.com> |
---|
395 | - update to 3.0.1 |
---|
396 | |
---|
397 | * Thu Apr 27 2000 Jakub Jelinek <jakub@redhat.com> |
---|
398 | - sparc64 fixes for 3.0 |
---|
399 | |
---|
400 | * Wed Apr 26 2000 Florian La Roche <Florian.LaRoche@redhat.com> |
---|
401 | - update to 3.0 |
---|
402 | |
---|
403 | * Mon Feb 14 2000 Matt Wilson <msw@redhat.com> |
---|
404 | - #include <string.h> in files that use string functions |
---|
405 | |
---|
406 | * Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com> |
---|
407 | - fix description and summary |
---|
408 | |
---|
409 | * Mon Dec 06 1999 Michael K. Johnson <johnsonm@redhat.com> |
---|
410 | - s/GPL/LGPL/ |
---|
411 | - build as non-root (#7604) |
---|
412 | |
---|
413 | * Mon Sep 06 1999 Jakub Jelinek <jj@ultra.linux.cz> |
---|
414 | - merge in some debian gmp fixes |
---|
415 | - Ulrich Drepper's __gmp_scale2 fix |
---|
416 | - my mpf_set_q fix |
---|
417 | - sparc64 fixes |
---|
418 | |
---|
419 | * Wed Apr 28 1999 Cristian Gafton <gafton@redhat.com> |
---|
420 | - add sparc patch for PIC handling |
---|
421 | |
---|
422 | * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> |
---|
423 | - auto rebuild in the new build environment (release 8) |
---|
424 | |
---|
425 | * Thu Feb 11 1999 Michael Johnson <johnsonm@redhat.com> |
---|
426 | - include the private header file gmp-mparam.h because several |
---|
427 | apps seem to assume that they are building against the gmp |
---|
428 | source tree and require it. Sigh. |
---|
429 | |
---|
430 | * Tue Jan 12 1999 Michael K. Johnson <johnsonm@redhat.com> |
---|
431 | - libtoolize to work on arm |
---|
432 | |
---|
433 | * Thu Sep 10 1998 Cristian Gafton <gafton@redhat.com> |
---|
434 | - yet another touch of the spec file |
---|
435 | |
---|
436 | * Wed Sep 2 1998 Michael Fulbright <msf@redhat.com> |
---|
437 | - looked over before inclusion in RH 5.2 |
---|
438 | |
---|
439 | * Sun May 24 1998 Dick Porter <dick@cymru.net> |
---|
440 | - Patch Makefile.in, not Makefile |
---|
441 | - Don't specify i586, let configure decide the arch |
---|
442 | |
---|
443 | * Sat Jan 24 1998 Marc Ewing <marc@redhat.com> |
---|
444 | - started with package from Toshio Kuratomi <toshiok@cats.ucsc.edu> |
---|
445 | - cleaned up file list |
---|
446 | - fixed up install-info support |
---|
447 | |
---|