4e13ac
# build compat-libmpc for bootstrapping purposes
4e13ac
%global bootstrap 0
4e13ac
%global bootstrap_version 0.9
4e13ac
4e13ac
Summary: C library for multiple precision complex arithmetic
4e13ac
Name: libmpc
4e13ac
Version: 1.2.1
4e13ac
Release: 4%{?dist}
4e13ac
License: LGPLv3+
4e13ac
URL: http://www.multiprecision.org/mpc/
4e13ac
Source0: https://ftp.gnu.org/gnu/mpc/mpc-%{version}.tar.gz
4e13ac
%if 0%{?bootstrap}
4e13ac
Source1: https://ftp.gnu.org/gnu/mpc/mpc-%{bootstrap_version}.tar.gz
4e13ac
%endif
4e13ac
4e13ac
BuildRequires: gcc
4e13ac
BuildRequires: gmp-devel >= 5.0.0
4e13ac
BuildRequires: mpfr-devel >= 4.1.0
4e13ac
BuildRequires: make
4e13ac
4e13ac
# This can be removed when F32 reaches EOL
4e13ac
Obsoletes: libmpc-mpfr3 < 1.1.0-7
4e13ac
Provides: libmpc-mpfr3 = %{version}-%{release}
4e13ac
4e13ac
%if 0%{?bootstrap} == 0
4e13ac
Obsoletes: compat-libmpc < %{version}-1
4e13ac
Provides: compat-libmpc = %{version}-%{release}
4e13ac
%endif
4e13ac
4e13ac
%description
4e13ac
MPC is a C library for the arithmetic of complex numbers with
4e13ac
arbitrarily high precision and correct rounding of the result. It is
4e13ac
built upon and follows the same principles as Mpfr.
4e13ac
4e13ac
%package devel
4e13ac
Summary: Headers and shared development libraries for MPC
4e13ac
Requires: %{name}%{?_isa} = %{version}-%{release}
4e13ac
Requires: gmp-devel%{?_isa}
4e13ac
Requires: mpfr-devel%{?_isa}
4e13ac
4e13ac
# This can be removed when F32 reaches EOL
4e13ac
Obsoletes: libmpc-mpfr3-devel < 1.1.0-7
4e13ac
Provides: libmpc-mpfr3-devel = %{version}-%{release}
4e13ac
4e13ac
%description devel
4e13ac
Header files and shared library symlinks for the MPC library.
4e13ac
4e13ac
%package doc
4e13ac
Summary: Documentation for the MPC library
4e13ac
License: GFDL
4e13ac
BuildArch: noarch
4e13ac
4e13ac
%description doc
4e13ac
Documentation for the MPC library.
4e13ac
4e13ac
%if 0%{?bootstrap}
4e13ac
%package -n compat-libmpc
4e13ac
Summary: compat/bootstrap mpc-%{bootstrap_version} library
4e13ac
4e13ac
%description -n compat-libmpc
4e13ac
Contains the .so files for mpc version %{bootstrap-version}.
4e13ac
%endif
4e13ac
4e13ac
%prep
4e13ac
%setup -q -n mpc-%{version}
4e13ac
%if 0%{?bootstrap}
4e13ac
%setup -q -n mpc-%{version} -a 1
4e13ac
%endif
4e13ac
4e13ac
%build
4e13ac
%configure --disable-static
4e13ac
4e13ac
# Get rid of undesirable hardcoded rpaths; workaround libtool reordering
4e13ac
# -Wl,--as-needed after all the libraries.
4e13ac
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
4e13ac
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
4e13ac
    -e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \
4e13ac
    -i libtool
4e13ac
4e13ac
%make_build
4e13ac
4e13ac
%if 0%{?bootstrap}
4e13ac
export CPPFLAGS="%{optflags} -std=gnu99"
4e13ac
export CFLAGS="%{optflags} -std=gnu99"
4e13ac
export EGREP=egrep
4e13ac
4e13ac
pushd mpc-%{bootstrap_version}
4e13ac
%configure --disable-static
4e13ac
%make_build
4e13ac
popd
4e13ac
%endif
4e13ac
4e13ac
%install
4e13ac
%if 0%{?bootstrap}
4e13ac
%make_install -C mpc-%{bootstrap_version}
4e13ac
4e13ac
## remove everything but shlib
4e13ac
rm -fv %{buildroot}%{_libdir}/libmpc.so
4e13ac
rm -fv %{buildroot}%{_includedir}/*
4e13ac
rm -fv %{buildroot}%{_infodir}/*
4e13ac
%endif
4e13ac
4e13ac
%make_install
4e13ac
rm -f %{buildroot}%{_libdir}/*.la
4e13ac
rm -f %{buildroot}%{_infodir}/dir
4e13ac
4e13ac
%check
4e13ac
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
4e13ac
make check
4e13ac
4e13ac
%files
4e13ac
%license COPYING.LESSER
4e13ac
%doc README NEWS
4e13ac
%{_libdir}/libmpc.so.3*
4e13ac
4e13ac
%files devel
4e13ac
%{_libdir}/libmpc.so
4e13ac
%{_includedir}/mpc.h
4e13ac
4e13ac
%files doc
4e13ac
%doc AUTHORS
4e13ac
%{_infodir}/*.info*
4e13ac
4e13ac
%if 0%{?bootstrap}
4e13ac
%files -n compat-libmpc
4e13ac
%{_libdir}/libmpc.so.2*
4e13ac
%endif
4e13ac
4e13ac
%changelog
4e13ac
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.1-4
4e13ac
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
4e13ac
  Related: rhbz#1991688
4e13ac
4e13ac
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.1-3
4e13ac
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
4e13ac
4e13ac
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-2
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
4e13ac
4e13ac
* Fri Nov 13 2020 Jerry James <loganjerry@gmail.com> - 1.2.1-1
4e13ac
- Upgrade to libmpc version 1.2.1
4e13ac
4e13ac
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-9
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
4e13ac
4e13ac
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-8
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4e13ac
4e13ac
* Fri Oct 11 2019 Jerry James <loganjerry@gmail.com> - 1.1.0-7
4e13ac
- Drop the libmpc-mpfr3 and libmpc-mpfr3-devel subpackages
4e13ac
4e13ac
* Wed Oct  9 2019 Jerry James <loganjerry@gmail.com> - 1.1.0-6
4e13ac
- Build the main package against mpfr4
4e13ac
4e13ac
* Tue Oct  8 2019 Jerry James <loganjerry@gmail.com> - 1.1.0-5
4e13ac
- Make mpfr3 and mpfr3-devel subpackages
4e13ac
- Drop the compat-libmpc package; nothing in Fedora needs it
4e13ac
- Update project URL
4e13ac
- Add a -doc subpackage to hold the GFDL-licensed content
4e13ac
- Drop unnecessary texinfo BR
4e13ac
- Drop ldconfig_scriptlets; this version cannot appear in distros that need it
4e13ac
- Make sure there are no rpaths and that -Wl,--as-needed takes effect
4e13ac
4e13ac
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
4e13ac
4e13ac
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
4e13ac
4e13ac
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
4e13ac
4e13ac
* Fri Jun 15 2018 Serhii Turivnyi <sturivny@redhat.com> - 1.1.0-1
4e13ac
- Add tests according to the CI wiki. PR: https://src.fedoraproject.org/rpms/libmpc/pull-request/3
4e13ac
4e13ac
* Mon Feb 26 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.0-1
4e13ac
- Modernization of the spec file (remove Group, use new make and ldconfig macros,
4e13ac
  add gcc to BuildRequires)
4e13ac
- Move build to %%build
4e13ac
4e13ac
* Mon Feb 26 2018 James Paul Turner <jamesturner246@fedoraproject.org> - 1.1.0-1
4e13ac
- Upgrade to libmpc version 1.1.0
4e13ac
- Fix broken compat package build
4e13ac
4e13ac
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-9
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
4e13ac
4e13ac
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-8
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
4e13ac
4e13ac
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-7
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4e13ac
4e13ac
* Wed Feb 01 2017 Stephen Gallagher <sgallagh@redhat.com> - 1.0.2-6
4e13ac
- Add missing %%license macro
4e13ac
4e13ac
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-5
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
4e13ac
4e13ac
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-4
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
4e13ac
4e13ac
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-3
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
4e13ac
4e13ac
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4e13ac
4e13ac
* Mon Feb 24 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.2-1
4e13ac
- mpc-1.0.2
4e13ac
4e13ac
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4e13ac
4e13ac
* Tue Feb 19 2013 Rex Dieter <rdieter@fedoraproject.org> - 1.0.1-1
4e13ac
- compat-libmpc (for bootsrapping purposes)
4e13ac
- mpc-1.0.1
4e13ac
- update Source URLs
4e13ac
- fix License: tag
4e13ac
4e13ac
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-3
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
4e13ac
4e13ac
* Thu Aug 02 2012 Rex Dieter <rdieter@fedoraproject.org> - 1.0-2
4e13ac
- %%files: track lib soname (so bumps aren't a surprise)
4e13ac
- tighten subpkg deps (%%_isa)
4e13ac
- %%build: --disable-static
4e13ac
4e13ac
* Thu Aug  2 2012 Petr Machata <pmachata@redhat.com> - 1.0-1
4e13ac
- Upstream 1.0
4e13ac
4e13ac
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-3.2
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4e13ac
4e13ac
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2.2
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4e13ac
4e13ac
* Wed Oct 26 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.9-1.2
4e13ac
- rebuild with new gmp without compat lib
4e13ac
4e13ac
* Wed Oct 12 2011 Peter Schiffer <pschiffe@redhat.com> - 0.9-1.1
4e13ac
- rebuild with new gmp
4e13ac
4e13ac
* Wed Jun 22 2011  <pmachata@redhat.com> - 0.9-1
4e13ac
- Upstream 0.9
4e13ac
4e13ac
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-0.3.svn855
4e13ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
4e13ac
4e13ac
* Tue Nov 30 2010 Petr Machata <pmachata@redhat.com> - 0.8.3-0.2.svn855
4e13ac
- Bump for rebuild against the new mpfr
4e13ac
4e13ac
* Fri Nov 19 2010 Petr Machata <pmachata@redhat.com> - 0.8.3-0.1.svn855
4e13ac
- Devel updates (to-be-0.8.3, SVN release 855)
4e13ac
  - New functions mpc_set_dc, mpc_set_ldc, mpc_get_dc, mpc_get_ldc
4e13ac
  - Speed-up mpc_pow_si and mpc_pow_z
4e13ac
  - Bug fixes in trigonometric functions, exp, sqrt
4e13ac
- Upstream 0.8.2
4e13ac
  - Speed-up mpc_pow_ui
4e13ac
- Adjust BuildRequires
4e13ac
- Resolves: #653931
4e13ac
4e13ac
* Wed Jan 20 2010 Petr Machata <pmachata@redhat.com> - 0.8.1-1
4e13ac
- Upstream 0.8.1
4e13ac
  - acosh, asinh, atanh: swap of precisions between real and imaginary parts
4e13ac
  - atan: memory leak
4e13ac
  - log: wrong ternary value in data file; masked by bug in Mpfr 2.4.1
4e13ac
- Resolves: #555471 FTBFS libmpc-0.8-3.fc13
4e13ac
4e13ac
* Fri Nov 13 2009 Petr Machata <pmachata@redhat.com> - 0.8-3
4e13ac
- Require mpfr-devel, gmp-devel in -devel subpackage
4e13ac
- Don't pass --entry to install-info
4e13ac
4e13ac
* Thu Nov 12 2009 Petr Machata <pmachata@redhat.com> - 0.8-2
4e13ac
- Rename the package to libmpc, it's a better choice of name
4e13ac
- %%preun should uninstall mpc's info page, not make's
4e13ac
- Move info page to -devel
4e13ac
- BR on -devel packages
4e13ac
- Drop postscript documentation
4e13ac
4e13ac
* Thu Nov 12 2009 Petr Machata <pmachata@redhat.com> - 0.8-1
4e13ac
- Initial package.