gmp-vl.spec 13 KB

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