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