gmp: Update to 6.0.0 and new compat-gmp package.

Fixes #10519 and #10520.
This commit is contained in:
Michael Tremer 2014-04-12 19:33:04 +02:00
parent f235f2662d
commit bef9b7be19
3 changed files with 103 additions and 38 deletions

77
compat-gmp/compat-gmp.nm Normal file
View File

@ -0,0 +1,77 @@
###############################################################################
# IPFire.org - An Open Source Firewall Solution #
# Copyright (C) - IPFire Development Team <info@ipfire.org> #
###############################################################################
name = compat-gmp
version = 4.3.2
release = 1
thisapp = gmp-%{version}
groups = System/Libraries
url = http://gmplib.org/
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
emphasizes speed over simplicity/elegance in its operations.
end
source_dl += https://gmplib.org/download/gmp/ ftp://ftp.gnu.org/gnu/gmp/
sources = %{thisapp}.tar.xz
build
requires
gcc-c++
m4
end
export ABI = standard
if "%{DISTRO_ARCH}" == "x86_64"
ABI = 64
end
if "%{DISTRO_ARCH}" == "i686"
ABI = 32
end
configure_options += \
--enable-cxx \
--enable-mpbsd \
--disable-static
test
export LD_LIBRARY_PATH=$(pwd)/.libs
make check
end
install
# Install just the library and no headers.
mkdir -pv %{BUILDROOT}%{libdir}
install -m 644 .libs/libgmp.so.3.5.2 %{BUILDROOT}%{libdir}
ln -svf libgmp.so.3.5.2 %{BUILDROOT}%{libdir}/libgmp.so.3
end
end
packages
package %{name}
provides
gmp = %{thisver}
end
obsoletes
gmp <= %{thisver}
end
end
package %{name}-debuginfo
template DEBUGINFO
end
end

View File

@ -0,0 +1,13 @@
https://gmplib.org/list-archives/gmp-bugs/2011-October/002417.html
--- tests/mpz/t-scan.c 2011-05-08 11:49:29.000000000 +0200
+++ tests/mpz/t-scan.c 2011-10-10 16:37:13.657829003 +0200
@@ -79,7 +79,7 @@
for (isize = 0; isize <= size; isize++)
{
- for (oindex = 0; oindex <= numberof (offset); oindex++)
+ for (oindex = 0; oindex < numberof (offset); oindex++)
{
o = offset[oindex];
if ((int) isize*GMP_NUMB_BITS < -o)

View File

@ -4,11 +4,9 @@
###############################################################################
name = gmp
version = 5.0.5
version = 6.0.0
release = 1
compat_version = 4.3.2
groups = System/Libraries
url = http://gmplib.org/
license = LGPLv3+
@ -24,8 +22,8 @@ description
emphasizes speed over simplicity/elegance in its operations.
end
source_dl += ftp://ftp.gnu.org/gnu/gmp/
sources = %{thisapp}.tar.bz2 %{name}-%{compat_version}.tar.bz2
source_dl += https://gmplib.org/download/gmp/ ftp://ftp.gnu.org/gnu/gmp/
sources = %{thisapp}.tar.xz
build
requires
@ -55,6 +53,12 @@ build
--enable-mpbsd \
--disable-static
if "%{DISTRO_ARCH}" == "armv7hl"
# GMP cannot be built with THUMB support.
CFLAGS := %(echo "%{CFLAGS}" | sed -e "s/-mthumb//g")
CXXFLAGS := %(echo "%{CXXFLAGS}" | sed -e "s/-mthumb//g")
end
prepare_cmds
for version in %{build_versions}; do
mkdir -p build-${version}
@ -66,10 +70,8 @@ build
end
build_one
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
./configure \
%{configure_options}
./configure \
%{configure_options}
# Kill RPATHs.
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
@ -91,18 +93,14 @@ build
CXXFLAGS="%{CXXFLAGS}"
if [ "${version}" = "sse2" ]; then
# Enable sse2.
CFLAGS="${CFLAGS} -march=pentium4"
CXXFLAGS="${CXXFLAGS} -march=pentium4"
CFLAGS="%{CFLAGS} -march=pentium4"
CXXFLAGS="%{CXXFLAGS} -march=pentium4"
fi
%{build_one}
cd ..
done
# Build compat version of library.
cd %{DIR_SRC}/%{name}-%{compat_version}
%{build_one}
end
test
@ -114,12 +112,6 @@ build
cd ..
done
# Check compat version of library.
cd %{DIR_SRC}/%{name}-%{compat_version}
export LD_LIBRARY_PATH=$(pwd)/.libs
make check
end
install
@ -137,21 +129,12 @@ build
install -m 755 .libs/libgmpxx.so.*.* %{BUILDROOT}/usr/lib/sse2
cp -a .libs/libgmpxx.so.? %{BUILDROOT}/usr/lib/sse2
chmod 755 %{BUILDROOT}/usr/lib/sse2/libgmpxx.so.?
install -m 755 .libs/libmp.so.*.* %{BUILDROOT}/usr/lib/sse2
cp -a .libs/libmp.so.? %{BUILDROOT}/usr/lib/sse2
chmod 755 %{BUILDROOT}/usr/lib/sse2/libmp.so.?
else
make install DESTDIR="%{BUILDROOT}"
fi
cd ..
done
# Install compat version of library.
cd %{DIR_SRC}/%{name}-%{compat_version}
install -m 644 .libs/libgmp.so.3.5.2 %{BUILDROOT}%{libdir}
ln -svf libgmp.so.3.5.2 %{BUILDROOT}%{libdir}/libgmp.so.3
end
end
@ -162,14 +145,6 @@ packages
template DEVEL
end
package %{name}-compat
summary = Compatibility version of %{thisapp} (%{compat_version}).
files
%{libdir}/libgmp.so.3*
end
end
package %{name}-debuginfo
template DEBUGINFO
end