gmp-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  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: 5.1.3
  17. Release: 2%{?_dist_release}
  18. URL: http://gmplib.org/
  19. Source: ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.xz
  20. Source2: gmp.h
  21. Source3: gmp-mparam.h
  22. Patch0: gmp-4.0.1-s390.patch
  23. License: LGPLv3+
  24. Group: System Environment/Libraries
  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. %patch0 -p1
  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. %doc COPYING COPYING.LIB NEWS README
  193. %{_libdir}/libgmp.so.*
  194. %{_libdir}/libgmpxx.so.*
  195. %if %{SSE2}
  196. %{_libdir}/sse2/*
  197. %endif
  198. %files devel
  199. %defattr(-,root,root,-)
  200. %{_libdir}/libgmp.so
  201. %{_libdir}/libgmpxx.so
  202. #{_libdir}/libmpfr.a
  203. %{_includedir}/*.h
  204. %{_infodir}/gmp.info*
  205. #{_infodir}/mpfr.info*
  206. %files static
  207. %defattr(-,root,root,-)
  208. %doc README
  209. %{_libdir}/libgmp.a
  210. %{_libdir}/libgmpxx.a
  211. # compat32
  212. %if %{build_compat32}
  213. %files -n compat32-%{name}
  214. %defattr(-,root,root,-)
  215. %{_libdir}/libgmp.so.*
  216. %{_libdir}/libgmpxx.so.*
  217. %if %{SSE2}
  218. %{_libdir}/sse2/*
  219. %endif
  220. %files -n compat32-%{name}-devel
  221. %defattr(-,root,root,-)
  222. %{_libdir}/libgmp.so
  223. %{_libdir}/libgmpxx.so
  224. #{_libdir}/libmpfr.a
  225. %files -n compat32-%{name}-static
  226. %defattr(-,root,root,-)
  227. %doc README
  228. %{_libdir}/libgmp.a
  229. %{_libdir}/libgmpxx.a
  230. %endif
  231. %changelog
  232. * Tue Jan 14 2014 NAKAMURA Kenta <kenta@vinelinux.org> 5.1.3-2
  233. - rebuilt with the current environment
  234. * Sun Nov 03 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.1.3-1
  235. - new upstream release
  236. - changed file archive type to xz
  237. - replaced Patch0 to Fedora rawhide's Patch
  238. - deleted unrecognized option: --enable-mpbsd
  239. * Tue Apr 19 2011 NAKAMURA Kenta <kenta@vinelinux.org> 4.3.2-1
  240. - new upstream release
  241. * Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 4.3.1-2
  242. - rebuilt with rpm-4.8.1-3
  243. * Sat Nov 28 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.1-1
  244. - new upstream release
  245. - split static libraries to subpackage
  246. * Sun Jun 28 2009 NAKAMURA Kenta <kenta@vinelinux.org> 4.2.2-5
  247. - added compat32 package for x86_64 arch support
  248. - run autoreconf to get autotools right
  249. * Mon May 19 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-4
  250. - applied new versioning policy
  251. - added Patch3 from upstream
  252. * Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl2
  253. - remove --enable-mpfr
  254. (mpfr has been splitted since gmp 4.2)
  255. * Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl1
  256. - new upstream release
  257. * Mon Sep 24 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-3
  258. - fix libgmpxx.so link
  259. * Thu Sep 20 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-2
  260. - fix check tag
  261. * Thu Nov 2 2006 Thomas Woerner <twoerner@redhat.com> 4.1.4-10
  262. - fixed arch order in gmp.h and gmp-mparam.h wrapper for all architectures
  263. - re-include libraries using SSE2 on x86 arch
  264. - updated URL
  265. * Wed May 09 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1.4-6vl2
  266. - rebuilt with new toolchain
  267. * Sat Feb 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.1.4-6vl1
  268. - new upstream release
  269. * Mon Apr 18 2005 Thomas Woerner <twoerner@redhat.com> 4.1.4-6
  270. - fixed __setfpucw call in mpfr-test.h
  271. * Sun Sep 26 2004 Florian La Roche <Florian.LaRoche@redhat.de>
  272. - disable ppc64 patch, now fixed upstream
  273. * Wed Mar 31 2004 Thomas Woerner <twoerner@redhat.com> 4.1.2-14
  274. - dropped RPATH (#118506)
  275. - exclude libraries using SSE2 in default settings.
  276. * Fri Mar 12 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 4.1.2-13vl1
  277. - modified for Vine
  278. * Mon Jan 20 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl3
  279. - added Obsoletes: gmp4(-devel)
  280. * Wed Jan 15 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl2
  281. - rebuilt against new toolchain
  282. * Fri May 31 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org>
  283. - modified for Vine
  284. * Sat May 25 2002 Florian La Roche <Florian.LaRoche@redhat.de>
  285. - update to version 4.1
  286. - patch s390 gmp-mparam.h to match other archs.
  287. * Thu May 23 2002 Tim Powers <timp@redhat.com>
  288. - automated rebuild
  289. * Mon Mar 11 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-3
  290. - Use standard %%configure macro and edit %%{_tmppath}
  291. * Tue Feb 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-2
  292. - Rebuild
  293. * Tue Jan 22 2002 Florian La Roche <Florian.LaRoche@redhat.de>
  294. - update to 4.0.1
  295. - bzip2 src
  296. * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
  297. - automated rebuild
  298. * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
  299. - Bump release + rebuild.
  300. * Mon Feb 05 2001 Philipp Knirsch <pknirsch@redhat.de>
  301. - Fixed bugzilla bug #25515 where GMP wouldn't work on IA64 as IA64 is not
  302. correctly identified as a 64 bit platform.
  303. * Mon Dec 18 2000 Preston Brown <pbrown@redhat.com>
  304. - include bsd mp library
  305. * Tue Oct 17 2000 Florian La Roche <Florian.LaRoche@redhat.de>
  306. - update to 3.1.1
  307. * Sun Sep 3 2000 Florian La Roche <Florian.LaRoche@redhat.com>
  308. - update to 3.1
  309. * Sat Aug 19 2000 Preston Brown <pbrown@redhat.com>
  310. - devel subpackage depends on main package so that .so symlink is OK.
  311. * Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
  312. - automatic rebuild
  313. * Sat Jun 3 2000 Nalin Dahyabhai <nalin@redhat.com>
  314. - switch to the configure and makeinstall macros
  315. - FHS-compliance fixing
  316. - move docs to non-devel package
  317. * Fri Apr 28 2000 Bill Nottingham <notting@redhat.com>
  318. - libtoolize for ia64
  319. * Fri Apr 28 2000 Florian La Roche <Florian.LaRoche@redhat.com>
  320. - update to 3.0.1
  321. * Thu Apr 27 2000 Jakub Jelinek <jakub@redhat.com>
  322. - sparc64 fixes for 3.0
  323. * Wed Apr 26 2000 Florian La Roche <Florian.LaRoche@redhat.com>
  324. - update to 3.0
  325. * Mon Feb 14 2000 Matt Wilson <msw@redhat.com>
  326. - #include <string.h> in files that use string functions
  327. * Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
  328. - fix description and summary
  329. * Mon Dec 06 1999 Michael K. Johnson <johnsonm@redhat.com>
  330. - s/GPL/LGPL/
  331. - build as non-root (#7604)
  332. * Mon Sep 06 1999 Jakub Jelinek <jj@ultra.linux.cz>
  333. - merge in some debian gmp fixes
  334. - Ulrich Drepper's __gmp_scale2 fix
  335. - my mpf_set_q fix
  336. - sparc64 fixes
  337. * Wed Apr 28 1999 Cristian Gafton <gafton@redhat.com>
  338. - add sparc patch for PIC handling
  339. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  340. - auto rebuild in the new build environment (release 8)
  341. * Thu Feb 11 1999 Michael Johnson <johnsonm@redhat.com>
  342. - include the private header file gmp-mparam.h because several
  343. apps seem to assume that they are building against the gmp
  344. source tree and require it. Sigh.
  345. * Tue Jan 12 1999 Michael K. Johnson <johnsonm@redhat.com>
  346. - libtoolize to work on arm
  347. * Thu Sep 10 1998 Cristian Gafton <gafton@redhat.com>
  348. - yet another touch of the spec file
  349. * Wed Sep 2 1998 Michael Fulbright <msf@redhat.com>
  350. - looked over before inclusion in RH 5.2
  351. * Sun May 24 1998 Dick Porter <dick@cymru.net>
  352. - Patch Makefile.in, not Makefile
  353. - Don't specify i586, let configure decide the arch
  354. * Sat Jan 24 1998 Marc Ewing <marc@redhat.com>
  355. - started with package from Toshio Kuratomi <toshiok@cats.ucsc.edu>
  356. - cleaned up file list
  357. - fixed up install-info support