1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = System/Libraries
11 url = http://gmplib.org/
13 summary = A GNU arbitrary precision library.
16 The gmp package contains GNU MP, a library for arbitrary precision \
17 arithmetic, signed integers operations, rational numbers and floating \
18 point numbers. GNU MP is designed for speed, for both small and very \
19 large operands. GNU MP is fast because it uses fullwords as the basic \
20 arithmetic type, it uses fast algorithms, it carefully optimizes \
21 assembly code for many CPUs' most common inner loops, and it generally \
22 emphasizes speed over simplicity/elegance in its operations.
25 source_dl = ftp://ftp.gmplib.org/pub/%{thisapp}/
26 sources = %{thisapp}.tar.bz2
34 # Build different versions of gmp to enhance the speed
40 if "%{DISTRO_ARCH}" == "x86_64"
44 if "%{DISTRO_ARCH}" == "i686"
45 # Build sse2 enabled version of gmp.
46 build_versions += sse2
51 configure_options += \
58 for version in %{build_versions}; do
59 mkdir build-${version}
62 ln -svf ../configure .
68 for version in %{build_versions}; do
72 CXXFLAFS="%{CXXFLAGS}"
73 if [ "${version}" = "sse2" ]; then
75 CFLAGS="${CFLAGS} -march=pentium4"
76 CXXFLAGS="${CXXFLAGS} -march=pentium4"
80 CXXFLAGS="${CXXFLAGS}" \
85 sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
86 -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
87 -e 's|-lstdc++ -lm|-lstdc++|' \
90 make %{PARALLELISMFLAGS} \
92 CXXFLAGS="${CXXFLAGS}"
99 for version in %{build_versions}; do
109 for version in %{build_versions}; do
112 if [ "${version}" = "sse2" ]; then
113 # Manually install sse2 libs.
114 mkdir -pv %{BUILDROOT}/usr/lib/sse2
116 install -m 755 .libs/libgmp.so.*.* %{BUILDROOT}/usr/lib/sse2
117 cp -a .libs/libgmp.so.[^.]* %{BUILDROOT}/usr/lib/sse2
118 chmod 755 %{BUILDROOT}/usr/lib/sse2/libgmp.so.[^.]*
120 install -m 755 .libs/libgmpxx.so.*.* %{BUILDROOT}/usr/lib/sse2
121 cp -a .libs/libgmpxx.so.? %{BUILDROOT}/usr/lib/sse2
122 chmod 755 %{BUILDROOT}/usr/lib/sse2/libgmpxx.so.?
124 install -m 755 .libs/libmp.so.*.* %{BUILDROOT}/usr/lib/sse2
125 cp -a .libs/libmp.so.? %{BUILDROOT}/usr/lib/sse2
126 chmod 755 %{BUILDROOT}/usr/lib/sse2/libmp.so.?
128 make install DESTDIR="%{BUILDROOT}"
139 package %{name}-devel