gmp-vl.spec 13 KB

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