gmp-vl.spec 14 KB

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