# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. # Force special prefix for Vespa %define _prefix /opt/vespa-deps # Only strip debug info %global _find_debuginfo_opts -g # Version %define ver_major 1 %define ver_minor 2 %define ver_patch 1 %define ver_release 2 Summary : libmpc compiled for vespa Name : vespa-libmpc Version : %{ver_major}.%{ver_minor}.%{ver_patch} Release : %{ver_release}%{?dist} Group : Development/Tools License : LGPLv3+ and GFDL URL : http://www.multiprecision.org/ Source0 : https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz %if 0%{?el7} %define _devtoolset_enable /opt/rh/devtoolset-9/enable BuildRequires: devtoolset-9-gcc %endif %if 0%{?el8} %define _devtoolset_enable /opt/rh/gcc-toolset-9/enable BuildRequires: gcc-toolset-9-gcc %endif %if 0%{?fedora} BuildRequires: gcc %endif BuildRequires: make BuildRequires: vespa-gmp BuildRequires: vespa-mpfr Requires: vespa-gmp Requires: vespa-mpfr %description libmpc compiled for vespa MPC is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. It is built upon and follows the same principles as Mpfr. %prep %setup -n mpc-%{version} %build %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif export LD_RUN_PATH=%{_libdir} CFLAGS='-g -O2' ./configure --with-gmp-include=%{_prefix}/include --with-gmp-lib=%{_libdir} --enable-static=no --prefix=%{_prefix} --libdir=%{_libdir} make %{?_smp_mflags} %install %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif export LD_RUN_PATH=%{_libdir} make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_infodir}/dir %files %{_libdir} %{_includedir} %{_infodir} %changelog