###############################################################################
name = gmp
-version = 5.0.1
-release = 2
+version = 5.0.2
+release = 1
+
+compat_version = 4.3.2
groups = System/Libraries
url = http://gmplib.org/
summary = A GNU arbitrary precision library.
description
- The gmp package contains GNU MP, a library for arbitrary precision \
- arithmetic, signed integers operations, rational numbers and floating \
- point numbers. GNU MP is designed for speed, for both small and very \
- large operands. GNU MP is fast because it uses fullwords as the basic \
- arithmetic type, it uses fast algorithms, it carefully optimizes \
- assembly code for many CPUs' most common inner loops, and it generally \
+ The gmp package contains GNU MP, a library for arbitrary precision
+ arithmetic, signed integers operations, rational numbers and floating
+ point numbers. GNU MP is designed for speed, for both small and very
+ large operands. GNU MP is fast because it uses fullwords as the basic
+ arithmetic type, it uses fast algorithms, it carefully optimizes
+ assembly code for many CPUs' most common inner loops, and it generally
emphasizes speed over simplicity/elegance in its operations.
end
-source_dl = ftp://ftp.gmplib.org/pub/%{thisapp}/
-sources = %{thisapp}.tar.bz2
+source_dl += ftp://ftp.gmplib.org/pub/%{thisapp}/ ftp://ftp.gmplib.org/pub/%{name}-%{compat_version}/
+sources = %{thisapp}.tar.bz2 %{name}-%{compat_version}.tar.bz2
build
requires
done
end
+ build_one
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ ./configure \
+ %{configure_options}
+
+ # Kill RPATHs.
+ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+ -e 's|-lstdc++ -lm|-lstdc++|' \
+ -i libtool
+
+ export LD_LIBRARY_PATH=$(pwd)/.libs
+ make %{PARALLELISMFLAGS} \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}"
+ end
+
build
for version in %{build_versions}; do
cd build-${version}
CFLAGS="%{CFLAGS}"
- CXXFLAFS="%{CXXFLAGS}"
+ CXXFLAGS="%{CXXFLAGS}"
if [ "${version}" = "sse2" ]; then
# Enable sse2.
CFLAGS="${CFLAGS} -march=pentium4"
CXXFLAGS="${CXXFLAGS} -march=pentium4"
fi
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- ./configure \
- %{configure_options}
-
- # Kill RPATHs.
- sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
- -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
- -e 's|-lstdc++ -lm|-lstdc++|' \
- -i libtool
-
- make %{PARALLELISMFLAGS} \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}"
+ %{build_one}
cd ..
done
+
+ # Build compat version of library.
+ cd %{DIR_SRC}/%{name}-%{compat_version}
+ %{build_one}
end
test
for version in %{build_versions}; do
cd build-${version}
+ export LD_LIBRARY_PATH=$(pwd)/.libs
make check
cd ..
done
+
+ # Check compat version of library.
+ cd %{DIR_SRC}/%{name}-%{compat_version}
+
+ export LD_LIBRARY_PATH=$(pwd)/.libs
+ make check
end
install
cd ..
done
+
+ # Install compat version of library.
+ cd %{DIR_SRC}/%{name}-%{compat_version}
+ install -m 644 .libs/libgmp.so.3.5.2 %{BUILDROOT}/usr/lib/
+ ln -svf libgmp.so.3.5.2 %{BUILDROOT}/usr/lib/libgmp.so.3
end
end
package %{name}-devel
template DEVEL
end
+
+ package %{name}-compat
+ summary = Compatibility version of %{thisapp} (%{compat_version}).
+
+ files
+ /usr/lib/libgmp.so.3*
+ end
+ end
end