From: Michael Tremer Date: Mon, 5 Dec 2011 11:26:27 +0000 (+0100) Subject: gmp: Update to 5.0.2 and compat package. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=482cb9d27db676487abb026cfb88cb4fa0f7b6b0;p=ipfire-3.x.git gmp: Update to 5.0.2 and compat package. A temporary compat package was added to make an easier transition to gmp 5. --- diff --git a/gmp/gmp.nm b/gmp/gmp.nm index 51f20d4ce..7a5f24e06 100644 --- a/gmp/gmp.nm +++ b/gmp/gmp.nm @@ -4,8 +4,10 @@ ############################################################################### 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/ @@ -13,17 +15,17 @@ license = LGPLv3+ 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 @@ -64,45 +66,61 @@ build 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 @@ -130,6 +148,11 @@ build 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 @@ -139,4 +162,12 @@ packages 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