gmp-vl.spec 13 KB

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