6427eb9
Name:           e-antic
80622e4
Version:        1.0.3
6570788
Release:        2%{?dist}
6427eb9
Summary:        Real Embedded Algebraic Number Theory In C
6427eb9
6427eb9
License:        LGPLv3+
3c77645
URL:            https://github.com/flatsurf/%{name}
6427eb9
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
3c77645
# The e-antic sources contain patches to flint and antic, but those patches
3c77645
# have already been incorporated into the Fedora versions.  Make e-antic skip
3c77645
# attempts to build the patched files.
3c77645
Patch0:         %{name}-unpatch.patch
2e0198d
# Work around a comparison bug with negative integers on 32-bit platforms.
2e0198d
# https://github.com/flatsurf/e-antic/issues/194
2e0198d
Patch1:         %{name}-negative-int.patch
6427eb9
6427eb9
BuildRequires:  antic-devel
6427eb9
BuildRequires:  arb-devel
3c77645
BuildRequires:  boost-devel
3c77645
BuildRequires:  catch-devel
3c77645
BuildRequires:  cereal-devel
6427eb9
BuildRequires:  gcc-c++
6427eb9
BuildRequires:  libtool
7c1071f
BuildRequires:  make
3c77645
3c77645
# Missing dependencies to build docs:
3c77645
# - byexample: https://github.com/byexamples/byexample
3c77645
# - standardese: https://github.com/standardese/standardese
7a8a177
7a8a177
# The python interface, pyeantic, requires cppyy, which is currently not
7a8a177
# available in Fedora.
7a8a177
# This can be removed when Fedora 38 reaches EOL
7a8a177
Obsoletes:      python3-pyeantic < 1.0.1-2
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}
3c77645
Requires:       antic-devel%{?_isa}
6427eb9
Requires:       arb-devel%{?_isa}
3c77645
Requires:       boost-devel%{?_isa}
3c77645
Requires:       cereal-devel%{?_isa}
6427eb9
6427eb9
%description    devel
6427eb9
The %{name}-devel package contains libraries and header files for
6427eb9
developing applications that use %{name}.
6427eb9
3c77645
%prep
3c77645
%autosetup -p1
6427eb9
3c77645
# Update the configure script due to patch 0
6427eb9
autoreconf -fi .
6427eb9
3c77645
# Make catch2 available for testing
3c77645
mkdir -p libeantic/test/external/catch2/single_include
3c77645
ln -s %{_includedir}/catch2 libeantic/test/external/catch2/single_include
3c77645
3c77645
# Make cereal available for testing
3c77645
rmdir libeantic/test/external/cereal
3c77645
ln -s %{_includedir}/cereal libeantic/test/external/cereal
3c77645
6427eb9
%build
6427eb9
export CPPFLAGS="-I %{_includedir}/arb"
3c77645
%configure --disable-silent-rules --disable-static \
3c77645
  --enable-openmp \
3c77645
  --without-benchmark \
3c77645
  --without-byexample \
3c77645
  --without-doc \
7a8a177
  --without-pyeantic \
3c77645
  --without-realalg \
3c77645
  --without-sage
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"|' \
7a8a177
    -i libeantic/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
bca4a78
LD_LIBRARY_PATH=%{buildroot}%{_libdir} make check
6427eb9
6427eb9
%files
3c77645
%doc AUTHORS README.md
6427eb9
%license COPYING COPYING.LESSER
3c77645
%{_libdir}/libeantic.so.1*
3c77645
%{_libdir}/libeanticxx.so.1*
6427eb9
6427eb9
%files          devel
6427eb9
%{_includedir}/%{name}/
3c77645
%{_includedir}/libeantic/
6427eb9
%{_libdir}/libeantic.so
6427eb9
%{_libdir}/libeanticxx.so
6427eb9
6427eb9
%changelog
6570788
* Wed Aug 25 2021 Jerry James <loganjerry@gmail.com> - 1.0.3-2
6570788
- Rebuild for flint 2.8.0
6570788
80622e4
* Fri Aug 20 2021 Jerry James <loganjerry@gmail.com> - 1.0.3-1
80622e4
- Version 1.0.3
80622e4
5ac9cb3
* Wed Aug 11 2021 Jerry James <loganjerry@gmail.com> - 1.0.2-1
5ac9cb3
- Version 1.0.2
5ac9cb3
8cee8ae
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
8cee8ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
8cee8ae
7a8a177
* Sun Jul 18 2021 Jerry James <loganjerry@gmail.com> - 1.0.1-2
7a8a177
- Drop the python3-pyeantic subpackage due to missing cppyy
7a8a177
3c77645
* Thu Jul 15 2021 Jerry James <loganjerry@gmail.com> - 1.0.1-1
3c77645
- Version 1.0.1
3c77645
- Add the python3-pyeantic subpackage
2e0198d
- Add -unpatch and -negative-int patches
3c77645
d0cc638
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-2
d0cc638
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
d0cc638
6427eb9
* Fri Aug  7 2020 Jerry James <loganjerry@gmail.com> - 0.1.8-1
6427eb9
- Initial RPM