]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
gmp: Update to 5.0.2 and compat package.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 5 Dec 2011 11:26:27 +0000 (12:26 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 5 Dec 2011 11:26:27 +0000 (12:26 +0100)
A temporary compat package was added to make an easier
transition to gmp 5.

gmp/gmp.nm

index 51f20d4ce5a1a9010e4bdd617f5a3efc23ea8c1d..7a5f24e06e46e340a796216cfd1d792c4d8ca344 100644 (file)
@@ -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