gmp-vl.spec 14 KB

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