6427eb9
Name:           e-antic
6427eb9
Version:        0.1.8
6427eb9
Release:        1%{?dist}
6427eb9
Summary:        Real Embedded Algebraic Number Theory In C
6427eb9
6427eb9
# See https://github.com/videlec/e-antic/issues/100
6427eb9
License:        LGPLv3+
6427eb9
URL:            https://github.com/videlec/%{name}
6427eb9
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
6427eb9
6427eb9
BuildRequires:  antic-devel
6427eb9
BuildRequires:  arb-devel
6427eb9
BuildRequires:  gcc-c++
6427eb9
BuildRequires:  libtool
6427eb9
6427eb9
%description
6427eb9
E-ANTIC is a C/C++ library to deal with real embedded number fields,
6427eb9
built on top of ANTIC.  Its aim is to have as fast as possible exact
6427eb9
arithmetic operations and comparisons.
6427eb9
6427eb9
%package        devel
6427eb9
Summary:        Development files for %{name}
6427eb9
Requires:       %{name}%{?_isa} = %{version}-%{release}
6427eb9
Requires:       arb-devel%{?_isa}
6427eb9
Requires:       flint-devel%{?_isa}
6427eb9
Requires:       gmp-devel%{?_isa}
6427eb9
6427eb9
%description    devel
6427eb9
The %{name}-devel package contains libraries and header files for
6427eb9
developing applications that use %{name}.
6427eb9
6427eb9
%prep
6427eb9
%autosetup
6427eb9
6427eb9
# Replace an obsolete autoconf macro
6427eb9
sed -i 's/AC_PROG_LIBTOOL/LT_INIT/' configure.ac
6427eb9
6427eb9
# Create the configure script
6427eb9
autoreconf -fi .
6427eb9
6427eb9
%build
6427eb9
export CPPFLAGS="-I %{_includedir}/arb"
6427eb9
%configure --disable-silent-rules --disable-static --enable-openmp
6427eb9
6427eb9
# Get rid of undesirable hardcoded rpaths; workaround libtool reordering
6427eb9
# -Wl,--as-needed after all the libraries.
6427eb9
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
6427eb9
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
6427eb9
    -e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \
6427eb9
    -i libtool
6427eb9
6427eb9
%make_build
6427eb9
6427eb9
%install
6427eb9
%make_install
6427eb9
6427eb9
# We do not want the libtool archives
6427eb9
rm %{buildroot}%{_libdir}/*.la
6427eb9
6427eb9
# Documentation is installed below
6427eb9
rm -fr %{buildroot}%{_docdir}
6427eb9
6427eb9
%check
6427eb9
LD_LIBRARY_PATH=$PWD/.libs make check
6427eb9
6427eb9
%files
6427eb9
%doc AUTHORS README poly_extra/doc/poly_extra.txt
6427eb9
%license COPYING COPYING.LESSER
6427eb9
%{_libdir}/libeantic.so.0*
6427eb9
%{_libdir}/libeanticxx.so.0*
6427eb9
6427eb9
%files          devel
6427eb9
%doc NEWS
6427eb9
%{_includedir}/%{name}/
6427eb9
%{_libdir}/libeantic.so
6427eb9
%{_libdir}/libeanticxx.so
6427eb9
6427eb9
%changelog
6427eb9
* Fri Aug  7 2020 Jerry James <loganjerry@gmail.com> - 0.1.8-1
6427eb9
- Initial RPM