gmp-vl.spec 14 KB

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