2019-09-30 10:40:58 -04:00
|
|
|
Name: gmp
|
2021-01-30 15:26:40 +08:00
|
|
|
Version: 6.2.1
|
2021-12-07 19:28:11 +08:00
|
|
|
Release: 3
|
2019-09-30 10:40:58 -04:00
|
|
|
Epoch: 1
|
|
|
|
|
URL: https://gmplib.org
|
|
|
|
|
Source0: https://gmplib.org/download/gmp/gmp-%{version}.tar.bz2
|
|
|
|
|
License: LGPLv3 and GPLv2
|
2021-07-30 22:48:18 +08:00
|
|
|
BuildRequires: autoconf automake libtool gcc gcc-c++ perl-Carp
|
2019-09-30 10:40:58 -04:00
|
|
|
Summary: A GNU multiple precision arithmetic library
|
|
|
|
|
|
2021-12-07 19:28:11 +08:00
|
|
|
Patch1 :0001-CVE-2021-43618.patch
|
|
|
|
|
|
2019-09-30 10:40:58 -04:00
|
|
|
%description
|
|
|
|
|
GMP is a portable library written in C for arbitrary precision arithmetic
|
|
|
|
|
on integers, rational numbers, and floating-point numbers. It aims to provide
|
|
|
|
|
the fastest possible arithmetic for all applications that need higher
|
|
|
|
|
precision than is directly supported by the basic C types.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development library package for GMP.
|
|
|
|
|
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
|
|
Requires: %{name}-c++%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
|
|
Requires: %{name}-devel = %{epoch}:%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
Devel package include header files, documentation and libraries for GMP
|
|
|
|
|
|
|
|
|
|
%package c++
|
|
|
|
|
Summary: C++ development library package for GMP.
|
|
|
|
|
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description c++
|
|
|
|
|
GMP dependent library for C++ applications.
|
|
|
|
|
|
|
|
|
|
%prep
|
2021-07-30 22:48:18 +08:00
|
|
|
%autosetup -p1
|
2019-09-30 10:40:58 -04:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
autoreconf -ifv
|
|
|
|
|
if as --help | grep -q execstack; then
|
|
|
|
|
export CCAS="gcc -c -Wa,--noexecstack"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
|
export CFLAGS=$(echo %{optflags} | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*/-march=i686/g")
|
|
|
|
|
export CXXFLAGS=$(echo %{optflags} | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*/-march=i686/g")
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%configure --enable-cxx
|
|
|
|
|
|
|
|
|
|
sed -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
|
|
|
|
|
-e 's|-lstdc++ -lm|-lstdc++|' \
|
|
|
|
|
-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
|
|
|
|
|
-i libtool
|
|
|
|
|
export LD_LIBRARY_PATH=`pwd`/.libs
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
export LD_LIBRARY_PATH=`pwd`/.libs
|
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir}
|
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/lib{gmp,mp,gmpxx}.la
|
|
|
|
|
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
|
|
|
|
|
ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so
|
|
|
|
|
|
|
|
|
|
basearch=%{_arch}
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
|
basearch=i386
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
export LD_LIBRARY_PATH=`pwd`/.libs
|
|
|
|
|
make %{?_smp_mflags} check
|
|
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%post c++ -p /sbin/ldconfig
|
|
|
|
|
%postun c++ -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{!?_licensedir:%global license %%doc}
|
|
|
|
|
%license COPYING COPYING.LESSERv3 COPYINGv2 COPYINGv3
|
|
|
|
|
%doc NEWS README
|
|
|
|
|
%{_libdir}/libgmp.so.*
|
2020-07-23 03:15:46 +00:00
|
|
|
%{_libdir}/pkgconfig/gmp.pc
|
2019-09-30 10:40:58 -04:00
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_libdir}/libgmpxx.so
|
|
|
|
|
%{_libdir}/libgmp.so
|
|
|
|
|
%{_includedir}/*.h
|
|
|
|
|
%{_infodir}/gmp.info*
|
|
|
|
|
%{_libdir}/libgmpxx.a
|
|
|
|
|
%{_libdir}/libgmp.a
|
|
|
|
|
|
|
|
|
|
%files c++
|
|
|
|
|
%{_libdir}/libgmpxx.so.*
|
2020-07-23 03:15:46 +00:00
|
|
|
%{_libdir}/pkgconfig/gmpxx.pc
|
2019-09-30 10:40:58 -04:00
|
|
|
|
|
|
|
|
%changelog
|
2021-12-07 19:28:11 +08:00
|
|
|
* Tue Dec 7 2021 zhouwenpei <zhouwenpei1@huawei.com> - 6.2.1-3
|
|
|
|
|
- fix CVE-2021-43618
|
|
|
|
|
|
2021-07-30 22:48:18 +08:00
|
|
|
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 6.2.1-2
|
|
|
|
|
- DESC: delete -S git from %autosetup, and delete BuildRequires git
|
|
|
|
|
|
2021-01-30 15:26:40 +08:00
|
|
|
* Sat Jan 30 2021 xinghe <xinghe1@huawei.com> - 1:6.2.1-1
|
|
|
|
|
- Upgrade to 6.2.1
|
|
|
|
|
|
2020-07-23 03:15:46 +00:00
|
|
|
* Thu Jul 23 2020 jinzhimin <jinzhimin2@huawei.com> - 1:6.2.0-1
|
|
|
|
|
- Upgrade to 6.2.0
|
|
|
|
|
|
2020-01-08 16:47:23 +08:00
|
|
|
* Fri Jan 10 2020 yuxiangyang <yuxiangyang4@huawei.com> - 1:6.1.2-10
|
|
|
|
|
- Delete unuseful files
|
|
|
|
|
|
2019-09-30 10:40:58 -04:00
|
|
|
* Mon Aug 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:6.1.2-9
|
|
|
|
|
- Package init
|