gmp43-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  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: gmp43
  16. Version: 4.3.2
  17. Release: 2%{?_dist_release}
  18. URL: http://gmplib.org/
  19. Source: ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.bz2
  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 -qn gmp-4.3.2
  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 --disable-static
  106. perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
  107. export LD_LIBRARY_PATH=`pwd`/.libs
  108. make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
  109. cd ..
  110. %if %{SSE2}
  111. %define _host pentium4-vine-linux
  112. mkdir build-sse2
  113. cd build-sse2
  114. ln -s ../configure .
  115. CFLAGS="%{optflags} -march=pentium4"
  116. %configure --enable-mpbsd --enable-cxx --disable-static ABI=32
  117. perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
  118. export LD_LIBRARY_PATH=`pwd`/.libs
  119. make %{?_smp_mflags}
  120. unset CFLAGS
  121. cd ..
  122. %endif
  123. %install
  124. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  125. cd base
  126. export LD_LIBRARY_PATH=`pwd`/.libs
  127. make install DESTDIR=$RPM_BUILD_ROOT
  128. install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir}
  129. rm -f $RPM_BUILD_ROOT%{_libdir}/lib{gmp,mp,gmpxx}.la
  130. rm -f $RPM_BUILD_ROOT%{_infodir}/dir
  131. /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
  132. ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so
  133. cd ..
  134. %if %{SSE2}
  135. cd build-sse2
  136. export LD_LIBRARY_PATH=`pwd`/.libs
  137. mkdir $RPM_BUILD_ROOT%{_libdir}/sse2
  138. install -m 755 .libs/libgmp.so.3.* $RPM_BUILD_ROOT%{_libdir}/sse2
  139. cp -a .libs/libgmp.so.3 $RPM_BUILD_ROOT%{_libdir}/sse2
  140. chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmp.so.3
  141. install -m 755 .libs/libgmpxx.so.4.* $RPM_BUILD_ROOT%{_libdir}/sse2
  142. cp -a .libs/libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/sse2
  143. chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmpxx.so.4
  144. install -m 755 .libs/libmp.so.3.* $RPM_BUILD_ROOT%{_libdir}/sse2
  145. cp -a .libs/libmp.so.3 $RPM_BUILD_ROOT%{_libdir}/sse2
  146. chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libmp.so.3
  147. cd ..
  148. %endif
  149. # Rename gmp.h to gmp-<arch>.h and gmp-mparam.h to gmp-mparam-<arch>.h to
  150. # avoid file conflicts on multilib systems and install wrapper include files
  151. # gmp.h and gmp-mparam-<arch>.h
  152. basearch=%{_arch}
  153. # always use i386 for iX86
  154. %ifarch %{ix86}
  155. basearch=i386
  156. %endif
  157. # always use arm for arm*
  158. %ifarch %{arm}
  159. basearch=arm
  160. %endif
  161. # Rename files and install wrappers
  162. mv %{buildroot}/%{_includedir}/gmp.h %{buildroot}/%{_includedir}/gmp-${basearch}.h
  163. install -m644 %{SOURCE2} %{buildroot}/%{_includedir}/gmp.h
  164. mv %{buildroot}/%{_includedir}/gmp-mparam.h %{buildroot}/%{_includedir}/gmp-mparam-${basearch}.h
  165. install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/gmp-mparam.h
  166. %check
  167. %ifnarch ppc
  168. cd base
  169. export LD_LIBRARY_PATH=`pwd`/.libs
  170. make %{?_smp_mflags} check
  171. cd ..
  172. %endif
  173. %if %{SSE2}
  174. cd build-sse2
  175. export LD_LIBRARY_PATH=`pwd`/.libs
  176. make %{?_smp_mflags} check
  177. cd ..
  178. %endif
  179. %post -p /sbin/ldconfig
  180. %postun -p /sbin/ldconfig
  181. %post devel
  182. /sbin/install-info %{_infodir}/gmp.info.gz %{_infodir}/dir
  183. %preun devel
  184. if [ "$1" = 0 ]; then
  185. /sbin/install-info --delete %{_infodir}/gmp.info.gz %{_infodir}/dir
  186. fi
  187. %post -n compat32-%{name} -p /sbin/ldconfig
  188. %postun -n compat32-%{name} -p /sbin/ldconfig
  189. %clean
  190. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  191. %files
  192. %defattr(-,root,root,-)
  193. %doc COPYING COPYING.LIB NEWS README
  194. %{_libdir}/libgmp.so.*
  195. %{_libdir}/libmp.so.*
  196. %exclude %{_libdir}/libgmpxx.so.*
  197. %if %{SSE2}
  198. %{_libdir}/sse2/libgmp.so.*
  199. %{_libdir}/sse2/libmp.so.*
  200. %exclude %{_libdir}/sse2/libgmpxx.so.*
  201. %endif
  202. %files devel
  203. %defattr(-,root,root,-)
  204. %{_libdir}/libmp.so
  205. %{_libdir}/libgmp.so
  206. %exclude %{_libdir}/libgmpxx.so
  207. #{_libdir}/libmpfr.a
  208. %{_includedir}/*.h
  209. %{_infodir}/gmp.info*
  210. #{_infodir}/mpfr.info*
  211. #%files static
  212. #%defattr(-,root,root,-)
  213. #%doc README
  214. #%{_libdir}/libmp.a
  215. #%{_libdir}/libgmp.a
  216. #%{_libdir}/libgmpxx.a
  217. # compat32
  218. %if %{build_compat32}
  219. %files -n compat32-%{name}
  220. %defattr(-,root,root,-)
  221. %{_libdir}/libgmp.so.*
  222. %{_libdir}/libmp.so.*
  223. %exclude %{_libdir}/libgmpxx.so.*
  224. %if %{SSE2}
  225. %{_libdir}/sse2/libgmp.so.*
  226. %{_libdir}/sse2/libmp.so.*
  227. %exclude %{_libdir}/sse2/libgmpxx.so.*
  228. %endif
  229. %files -n compat32-%{name}-devel
  230. %defattr(-,root,root,-)
  231. %{_libdir}/libmp.so
  232. %{_libdir}/libgmp.so
  233. %exclude %{_libdir}/libgmpxx.so
  234. #{_libdir}/libmpfr.a
  235. #%files -n compat32-%{name}-static
  236. #%defattr(-,root,root,-)
  237. #%doc README
  238. #%{_libdir}/libmp.a
  239. #%{_libdir}/libgmp.a
  240. #%{_libdir}/libgmpxx.a
  241. %endif
  242. %changelog
  243. * Sun Nov 03 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 4.3.2-2
  244. - made for backward compatibility
  245. * Tue Apr 19 2011 NAKAMURA Kenta <kenta@vinelinux.org> 4.3.2-1
  246. - new upstream release
  247. * Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 4.3.1-2
  248. - rebuilt with rpm-4.8.1-3
  249. * Sat Nov 28 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.1-1
  250. - new upstream release
  251. - split static libraries to subpackage
  252. * Sun Jun 28 2009 NAKAMURA Kenta <kenta@vinelinux.org> 4.2.2-5
  253. - added compat32 package for x86_64 arch support
  254. - run autoreconf to get autotools right
  255. * Mon May 19 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-4
  256. - applied new versioning policy
  257. - added Patch3 from upstream
  258. * Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl2
  259. - remove --enable-mpfr
  260. (mpfr has been splitted since gmp 4.2)
  261. * Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl1
  262. - new upstream release
  263. * Mon Sep 24 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-3
  264. - fix libgmpxx.so link
  265. * Thu Sep 20 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-2
  266. - fix check tag
  267. * Thu Nov 2 2006 Thomas Woerner <twoerner@redhat.com> 4.1.4-10
  268. - fixed arch order in gmp.h and gmp-mparam.h wrapper for all architectures
  269. - re-include libraries using SSE2 on x86 arch
  270. - updated URL
  271. * Wed May 09 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1.4-6vl2
  272. - rebuilt with new toolchain
  273. * Sat Feb 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.1.4-6vl1
  274. - new upstream release
  275. * Mon Apr 18 2005 Thomas Woerner <twoerner@redhat.com> 4.1.4-6
  276. - fixed __setfpucw call in mpfr-test.h
  277. * Sun Sep 26 2004 Florian La Roche <Florian.LaRoche@redhat.de>
  278. - disable ppc64 patch, now fixed upstream
  279. * Wed Mar 31 2004 Thomas Woerner <twoerner@redhat.com> 4.1.2-14
  280. - dropped RPATH (#118506)
  281. - exclude libraries using SSE2 in default settings.
  282. * Fri Mar 12 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 4.1.2-13vl1
  283. - modified for Vine
  284. * Mon Jan 20 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl3
  285. - added Obsoletes: gmp4(-devel)
  286. * Wed Jan 15 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl2
  287. - rebuilt against new toolchain
  288. * Fri May 31 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org>
  289. - modified for Vine
  290. * Sat May 25 2002 Florian La Roche <Florian.LaRoche@redhat.de>
  291. - update to version 4.1
  292. - patch s390 gmp-mparam.h to match other archs.
  293. * Thu May 23 2002 Tim Powers <timp@redhat.com>
  294. - automated rebuild
  295. * Mon Mar 11 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-3
  296. - Use standard %%configure macro and edit %%{_tmppath}
  297. * Tue Feb 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-2
  298. - Rebuild
  299. * Tue Jan 22 2002 Florian La Roche <Florian.LaRoche@redhat.de>
  300. - update to 4.0.1
  301. - bzip2 src
  302. * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
  303. - automated rebuild
  304. * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
  305. - Bump release + rebuild.
  306. * Mon Feb 05 2001 Philipp Knirsch <pknirsch@redhat.de>
  307. - Fixed bugzilla bug #25515 where GMP wouldn't work on IA64 as IA64 is not
  308. correctly identified as a 64 bit platform.
  309. * Mon Dec 18 2000 Preston Brown <pbrown@redhat.com>
  310. - include bsd mp library
  311. * Tue Oct 17 2000 Florian La Roche <Florian.LaRoche@redhat.de>
  312. - update to 3.1.1
  313. * Sun Sep 3 2000 Florian La Roche <Florian.LaRoche@redhat.com>
  314. - update to 3.1
  315. * Sat Aug 19 2000 Preston Brown <pbrown@redhat.com>
  316. - devel subpackage depends on main package so that .so symlink is OK.
  317. * Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
  318. - automatic rebuild
  319. * Sat Jun 3 2000 Nalin Dahyabhai <nalin@redhat.com>
  320. - switch to the configure and makeinstall macros
  321. - FHS-compliance fixing
  322. - move docs to non-devel package
  323. * Fri Apr 28 2000 Bill Nottingham <notting@redhat.com>
  324. - libtoolize for ia64
  325. * Fri Apr 28 2000 Florian La Roche <Florian.LaRoche@redhat.com>
  326. - update to 3.0.1
  327. * Thu Apr 27 2000 Jakub Jelinek <jakub@redhat.com>
  328. - sparc64 fixes for 3.0
  329. * Wed Apr 26 2000 Florian La Roche <Florian.LaRoche@redhat.com>
  330. - update to 3.0
  331. * Mon Feb 14 2000 Matt Wilson <msw@redhat.com>
  332. - #include <string.h> in files that use string functions
  333. * Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
  334. - fix description and summary
  335. * Mon Dec 06 1999 Michael K. Johnson <johnsonm@redhat.com>
  336. - s/GPL/LGPL/
  337. - build as non-root (#7604)
  338. * Mon Sep 06 1999 Jakub Jelinek <jj@ultra.linux.cz>
  339. - merge in some debian gmp fixes
  340. - Ulrich Drepper's __gmp_scale2 fix
  341. - my mpf_set_q fix
  342. - sparc64 fixes
  343. * Wed Apr 28 1999 Cristian Gafton <gafton@redhat.com>
  344. - add sparc patch for PIC handling
  345. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  346. - auto rebuild in the new build environment (release 8)
  347. * Thu Feb 11 1999 Michael Johnson <johnsonm@redhat.com>
  348. - include the private header file gmp-mparam.h because several
  349. apps seem to assume that they are building against the gmp
  350. source tree and require it. Sigh.
  351. * Tue Jan 12 1999 Michael K. Johnson <johnsonm@redhat.com>
  352. - libtoolize to work on arm
  353. * Thu Sep 10 1998 Cristian Gafton <gafton@redhat.com>
  354. - yet another touch of the spec file
  355. * Wed Sep 2 1998 Michael Fulbright <msf@redhat.com>
  356. - looked over before inclusion in RH 5.2
  357. * Sat May 24 1998 Dick Porter <dick@cymru.net>
  358. - Patch Makefile.in, not Makefile
  359. - Don't specify i586, let configure decide the arch
  360. * Sat Jan 24 1998 Marc Ewing <marc@redhat.com>
  361. - started with package from Toshio Kuratomi <toshiok@cats.ucsc.edu>
  362. - cleaned up file list
  363. - fixed up install-info support