Package gmp: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
%define _unpackaged_files_terminate_build 1
%define _stripped_files_terminate_build 1
%set_verify_elf_method strict

Name: gmp
Version: 6.2.1
Release: alt4

Summary: GNU MP arbitrary precision arithmetic library
License: LGPLv3+
Group: System/Libraries
Url: http://gmplib.org/

# https://gmplib.org/download/gmp/gmp-%version.tar.xz
Source: gmp-%version.tar
Patch: gmp-%version-%release.patch

# Automatically added by buildreq on Wed Dec 16 2015
# optimized out: elfutils libstdc++-devel perl-Encode perl-Text-Unidecode perl-Unicode-EastAsianWidth perl-Unicode-Normalize perl-libintl perl-unicore python-base xz
BuildRequires: flex gcc-c++ libreadline-devel makeinfo

%def_disable static
%def_enable cxx
%ifarch %ix86
%def_enable fat
%else
%def_disable fat
%endif

%define libgmp libgmp10
%define libgmpxx libgmpxx4

%description
GNU MP is a library for arbitrary precision arithmetic, operating on
signed integers, rational numbers, and floating point numbers.  It has
a rich set of functions, and the functions have a regular interface.

%package -n %libgmp
Summary: GNU MP arbitrary precision arithmetic library
Group: System/Libraries
Provides: gmp = %version, libgmp = %version
Obsoletes: gmp < %version

%package -n libgmp-devel
Summary: Development GNU MP arbitrary precision arithmetic library
Group: Development/C
Requires: %libgmp = %version-%release
Provides: gmp-devel = %version
Obsoletes: gmp-devel

%package -n libgmp-devel-static
Summary: Static GNU MP arbitrary precision arithmetic library
Group: Development/C
Requires: libgmp-devel = %version-%release

%package -n %libgmpxx
Summary: C++ bindings for the GNU MP arbitrary precision arithmetic library
Group: Development/C++
Requires: %libgmp = %version-%release
Provides: libgmp_cxx = %version
Obsoletes: libgmp_cxx

%package -n libgmpxx-devel
Summary: Development C++ bindings for the GNU MP arbitrary precision arithmetic library
Group: Development/C++
Requires: %libgmpxx = %version-%release
Requires: libgmp-devel = %version-%release
Provides: libgmp_cxx-devel = %version
Obsoletes: libgmp_cxx-devel

%package -n libgmpxx-devel-static
Summary: Static C++ bindings for the GNU MP arbitrary precision arithmetic library
Group: Development/C++
Requires: libgmpxx-devel = %version-%release
Requires: libgmp-devel-static = %version-%release
Provides: libgmp_cxx-devel-static = %version
Obsoletes: libgmp_cxx-devel-static

%description -n %libgmp
GNU MP is a library for arbitrary precision arithmetic, operating on
signed integers, rational numbers, and floating point numbers.  It has
a rich set of functions, and the functions have a regular interface.

GNU MP is designed to be as fast as possible, both for small operands
and huge operands.  The speed is achieved by using fullwords as the
basic arithmetic type, by using fast algorithms, with carefully
optimized assembly code for the most common inner loops for lots of
CPUs, and by a general emphasis on speed (instead of simplicity or
elegance).

GNU MP is believed to be faster than any other similar library.
Its advantage increases with operand sizes for certain operations,
since GNU MP in many cases has asymptotically faster algorithms.

%description -n libgmp-devel
This package contains libraries, header files and documentation required
for development with the GNU MP arbitrary precision arithmetic library.

%description -n libgmp-devel-static
This package contains static libraries required for development of
statically linked applications with the GNU MP arbitrary precision
arithmetic library.

%description -n %libgmpxx
This package contains C++ bindings for the GNU MP arbitrary precision
arithmetic library.

%description -n libgmpxx-devel
This package contains libraries, header files and documentation required
for development C++ applications with the GNU MP arbitrary precision
arithmetic library.

%description -n libgmpxx-devel-static
This package contains static libraries required for development of
statically linked C++ applications with the GNU MP arbitrary precision
arithmetic library.

%prep
%setup
%patch -p1

%build
# -ffat-lto-objects is needed even if static libraries are disabled
%{?optflags_lto:%global optflags_lto %optflags_lto -ffat-lto-objects}
%autoreconf
%configure %{subst_enable static} %{subst_enable cxx} %{subst_enable fat}
LANG=C awk 'NR>=3&&$1=="#define"&&$2~/^[a-z_0-9]+$/&&$3~/^__/{print gensub("^__MPN\\(([^)]+)\\)","__gmpn_\\1",1,$3)}' \
	gmp.h > libgmp.sym
sed -n 's/^[^ ]\+ \(__gmp_[^ ]\+\) .*/\1/p' rand/randmt.h >> libgmp.sym
# extra symbols required by libgmpxx and test suite
cat >>libgmp.sym <<'EOF'
__gmp_allocate_func
__gmp_asprintf_final
__gmp_asprintf_memory
__gmp_asprintf_reps
__gmp_assert_fail
__gmp_binvert_limb_table
__gmp_default_allocate
__gmp_default_free
__gmp_default_reallocate
__gmp_doprnt_integer
__gmp_doprnt_mpf2
__gmp_fib_table
__gmp_free_func
__gmp_randinit_mt_noseed
__gmp_rands
__gmp_rands_initialized
__gmp_reallocate_func
__gmp_tmp_reentrant_alloc
__gmp_tmp_reentrant_free
__gmpn_bases
__gmpn_bdiv_qr
__gmpn_bdiv_qr_itch
__gmpn_broot
__gmpn_brootinv
__gmpn_clz_tab
__gmpn_cpuvec
__gmpn_cpuvec_init
__gmpn_cpuvec_initialized
__gmpn_dcpi1_bdiv_q
__gmpn_dcpi1_bdiv_qr
__gmpn_dcpi1_div_q
__gmpn_dcpi1_div_qr
__gmpn_dcpi1_divappr_q
__gmpn_div_q
__gmpn_divexact
__gmpn_dump
__gmpn_fft_best_k
__gmpn_fib2_ui
__gmpn_fib2m
__gmpn_gcd_22
__gmpn_get_d
__gmpn_hgcd
__gmpn_hgcd_appr
__gmpn_hgcd_appr_itch
__gmpn_hgcd_itch
__gmpn_hgcd_matrix_init
__gmpn_invert
__gmpn_invert_limb
__gmpn_jacobi_base
__gmpn_matrix22_mul
__gmpn_matrix22_mul_itch
__gmpn_mod_1_1p
__gmpn_mod_1_1p_cps
__gmpn_mod_1s_2p
__gmpn_mod_1s_2p_cps
__gmpn_mod_1s_3p
__gmpn_mod_1s_3p_cps
__gmpn_mod_1s_4p
__gmpn_mod_1s_4p_cps
__gmpn_mod_34lsub1
__gmpn_mu_bdiv_q
__gmpn_mu_bdiv_q_itch
__gmpn_mu_bdiv_qr
__gmpn_mu_bdiv_qr_itch
__gmpn_mu_div_q
__gmpn_mu_div_q_itch
__gmpn_mu_div_qr
__gmpn_mu_div_qr_itch
__gmpn_mu_divappr_q
__gmpn_mu_divappr_q_itch
__gmpn_mul_basecase
__gmpn_mul_fft
__gmpn_mullo_basecase
__gmpn_mullo_n
__gmpn_mulmid
__gmpn_mulmod_bnm1
__gmpn_mulmod_bnm1_next_size
__gmpn_powlo
__gmpn_preinv_divrem_1
__gmpn_sbpi1_bdiv_q
__gmpn_sbpi1_bdiv_qr
__gmpn_sbpi1_bdiv_r
__gmpn_sbpi1_div_q
__gmpn_sbpi1_div_qr
__gmpn_sbpi1_divappr_q
__gmpn_sqr_basecase
__gmpn_sqrlo
__gmpn_sqrmod_bnm1
__gmpn_sqrmod_bnm1_next_size
__gmpn_toom22_mul
__gmpn_toom2_sqr
__gmpn_toom32_mul
__gmpn_toom33_mul
__gmpn_toom3_sqr
__gmpn_toom42_mul
__gmpn_toom43_mul
__gmpn_toom44_mul
__gmpn_toom4_sqr
__gmpn_toom52_mul
__gmpn_toom53_mul
__gmpn_toom54_mul
__gmpn_toom62_mul
__gmpn_toom63_mul
__gmpn_toom6_sqr
__gmpn_toom6h_mul
__gmpn_toom8_sqr
__gmpn_toom8h_mul
__gmpz_divexact_gcd
__gmpz_lucas_mod
EOF
sort -u -o libgmp.sym libgmp.sym
%make_build

%install
%makeinstall_std
install -pm644 gmp-mparam.h rand/randmt.h %buildroot%_includedir/

%check
%make_build -k check

%files -n %libgmp
%doc AUTHORS README NEWS
%_libdir/libgmp.so.*

%files -n libgmp-devel
%_libdir/libgmp.so
%_includedir/*
%{?_enable_cxx:%exclude %_includedir/*xx*}
%_infodir/*.info*
%_pkgconfigdir/gmp.pc

%if_enabled static
%files -n libgmp-devel-static
%_libdir/libgmp.a
%endif #static

%if_enabled cxx
%files -n %libgmpxx
%_libdir/*xx*.so.*

%files -n libgmpxx-devel
%_libdir/*xx*.so
%_includedir/*xx*
%_pkgconfigdir/gmpxx.pc
%endif #cxx

%if %{enabled cxx} && %{enabled static}
%files -n libgmpxx-devel-static
%_libdir/*xx*.a
%endif #cxx && static

%changelog
* Fri Oct 29 2021 Leontiy Volodin <lvol@altlinux.org> 6.2.1-alt4
- Enabled visibility for __gmpn_fft_best_k and __gmpn_mul_fft,
  which are used in gmp-ecm (ALT#41248).

* Thu Aug 26 2021 Dmitry V. Levin <ldv@altlinux.org> 6.2.1-alt3
- Disabled build and packaging of static libraries.

* Tue Aug 03 2021 Aleksei Nikiforov <darktemplar@altlinux.org> 6.2.1-alt2
- Packaged pkgconfig files.

* Tue Dec 01 2020 Gleb F-Malinovskiy <glebfm@altlinux.org> 6.2.1-alt1
- Updated to 6.2.1.

* Mon May 13 2019 Gleb F-Malinovskiy <glebfm@altlinux.org> 6.1.2-alt3
- Made __gmpn_clz_tab symbol visible to fix testsuite (on at least
  riscv64 architecture).

* Thu Apr 13 2017 Anton Farygin <rider@altlinux.ru> 6.1.2-alt2
- Enabled visibility for __gmpn_divexact, which is used in ocaml-zarith.

* Thu Jan 12 2017 Gleb F-Malinovskiy <glebfm@altlinux.org> 6.1.2-alt1
- Updated to 6.1.2.

* Wed Dec 16 2015 Gleb F-Malinovskiy <glebfm@altlinux.org> 6.1.0-alt1
- Updated to 6.1.0.

* Fri May 08 2015 Gleb F-Malinovskiy <glebfm@altlinux.org> 6.0.0a-alt1
- Updated to 6.0.0a.

* Wed Oct 02 2013 Dmitry V. Levin <ldv@altlinux.org> 5.1.3-alt1
- Updated to 5.1.3.

* Mon Jul 08 2013 Dmitry V. Levin <ldv@altlinux.org> 5.1.2-alt2
- libgmp10 shouldn't formally obsolete older libgmp (closes: #29152).

* Wed May 29 2013 Dmitry V. Levin <ldv@altlinux.org> 5.1.2-alt1
- Updated to 5.1.2.

* Tue Apr 09 2013 Dmitry V. Levin <ldv@altlinux.org> 5.1.1-alt1
- Updated to 5.1.1.
- Dropped libmp (it has been removed in 5.1.0).

* Wed Jun 06 2012 Dmitry V. Levin <ldv@altlinux.org> 5.0.5-alt2
- Renamed libgmp_cxx-devel to libgmpxx-devel.

* Wed Jun 06 2012 Dmitry V. Levin <ldv@altlinux.org> 5.0.5-alt1
- Updated to 5.0.5.
- Packaged libmp.so.3 in separate libmp subpackage.
- Renamed libgmp to libgmp10.
- Renamed libgmp_cxx to libgmpxx4.

* Fri Feb 18 2011 Dmitry V. Levin <ldv@altlinux.org> 4.3.2-alt3
- Rebuilt for debuginfo.

* Tue Oct 12 2010 Dmitry V. Levin <ldv@altlinux.org> 4.3.2-alt2
- Fixed build on arm (by silicium@).
- Rebuilt for soname set-versions.

* Thu Jun 17 2010 Dmitry V. Levin <ldv@altlinux.org> 4.3.2-alt1
- Updated to 4.3.2.

* Thu Sep 10 2009 Dmitry V. Levin <ldv@altlinux.org> 4.2.4-alt3
- Moved "make check" to %%check section.

* Tue Sep 01 2009 Dmitry V. Levin <ldv@altlinux.org> 4.2.4-alt2
- Packaged randmt.h and exported all ELF symbols declared
  in this header file (closes: #21325).
- Removed obsolete %%install_info/%%uninstall_info calls.

* Tue Mar 10 2009 Dmitry V. Levin <ldv@altlinux.org> 4.2.4-alt1
- Updated to 4.2.4.
- Imported patches from http://gmplib.org/patches/.

* Mon Dec 15 2008 Dmitry V. Levin <ldv@altlinux.org> 4.2.2-alt2
- Removed obsolete %%post_ldconfig/%%postun_ldconfig calls.

* Fri Mar 14 2008 Dmitry V. Levin <ldv@altlinux.org> 4.2.2-alt1
- Updated to 4.2.2.
- Updated URL, license tag, dropped manually added prereqs.
- gmp.h: Fixed to support gcc >= 4.3.0.
- Build with --enable-fat on %%ix86.
- Restricted list of global symbols exported by the libgmp library to
  only those which are either declared in gmp.h or required by test suit.

* Sat Apr 14 2007 Dmitry V. Levin <ldv@altlinux.org> 4.1.4-alt5
- Uncompressed tarball.

* Sun Apr 23 2006 Dmitry V. Levin <ldv@altlinux.org> 4.1.4-alt4
- Build without --enable-mpfr, because
  MPFR is separate project and packaged separately.

* Fri Apr 14 2006 Dmitry V. Levin <ldv@altlinux.org> 4.1.4-alt3
- Applied fixes from Debian and FC gmp packages.
- Build with --enable-mpfr, because
  GMP with MPFR support is required to build fortran (#8861).

* Tue May 24 2005 Dmitry V. Levin <ldv@altlinux.org> 4.1.4-alt2
- Applied fixes from Debian gmp package.
- Added multilib support (mouse, closes #6030).
- Fixed License tag (at, closes #6705).

* Fri Apr 29 2005 Anton D. Kachalov <mouse@altlinux.org> 4.1.4-alt1.1
- multilib support

* Tue Jan 18 2005 Stanislav Ievlev <inger@altlinux.org> 4.1.4-alt1
- 4.1.4

* Fri Feb 27 2004 Stanislav Ievlev <inger@altlinux.org> 4.1.2-alt3
- force building with automake 1.7

* Tue Dec 02 2003 Stanislav Ievlev <inger@altlinux.org> 4.1.2-alt2.2
- rebuild without .la files

* Mon Jun 16 2003 Stanislav Ievlev <inger@altlinux.ru> 4.1.2-alt2.1
- fixed buildreq
- added special hack to build under bte

* Fri Feb 28 2003 Stanislav Ievlev <inger@altlinux.ru> 4.1.2-alt2
- fixed ldconfig usage according packaging policy

* Tue Feb 25 2003 Stanislav Ievlev <inger@altlinux.ru> 4.1.2-alt1
- review patches:
  lc-assert-always - removed
  noinline - removed
  vafixes  - removed
  x86_64   - updated
  gmpxx.h.getnum - removed (included)
  mpf_inp_str.c - removed (included)
  powm_ui.c.41 - removed (included)
- added subpackage with C++ API (like liddb4_cxx)

* Fri Sep 20 2002 Stanislav Ievlev <inger@altlinux.ru> 4.1-alt1
- 4.1
- little spec improvements
- added devel-static subpackage
- added gmpxx.h header to %_includedir
- merge with latest RH and MDK patches

* Fri Mar 02 2001 Dmitry V. Levin <ldv@fandra.org> 3.1.1-ipl2mdk
- Libification.
- Added ia64 patch.
- Build Berkley MP compatibility library.

* Fri Dec 01 2000 Dmitry V. Levin <ldv@fandra.org> 3.1.1-ipl1mdk
- 3.1.1
- Fixed configure script.
- Fixed texinfo documentation.

* Fri Apr 28 2000 Dmitry V. Levin <ldv@fandra.org>
- 3.0.1

* Thu Apr 20 2000 Dmitry V. Levin <ldv@fandra.org>
- 3.0

* Fri Oct 22 1999 Dmitry V. Levin <ldv@fandra.org>
- Fandra adaptions

* Wed Oct 20 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Release version.

* Thu Jul 22 1999 Thierry Vignaud <tvignaud@mandrakesoft.com>
- add french description

* Sat Apr 10 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com>
- Mandrake adaptions
- bzip2 man/info pages
- add de locale
- .spec optimizations

* Thu Feb 11 1999 Michael Johnson <johnsonm@redhat.com>
- include the private header file gmp-mparam.h because several
  apps seem to assume that they are building against the gmp
  source tree and require it.  Sigh.

* Tue Jan 12 1999 Michael K. Johnson <johnsonm@redhat.com>
- libtoolize to work on arm

* Thu Sep 10 1998 Cristian Gafton <gafton@redhat.com>
- yet another touch of the spec file

* Wed Sep  2 1998 Michael Fulbright <msf@redhat.com>
- looked over before inclusion in RH 5.2

* Sun May 24 1998 Dick Porter <dick@cymru.net>
- Patch Makefile.in, not Makefile
- Don't specify i586, let configure decide the arch

* Sat Jan 24 1998 Marc Ewing <marc@redhat.com>
- started with package from Toshio Kuratomi <toshiok@cats.ucsc.edu>
- cleaned up file list
- fixed up install-info support