jjames / rpms / crlibm

Forked from rpms/crlibm 4 months ago
Clone
Blob Blame Raw
%global commit      eb3063791aa75bc9705b49283bf14250465220a7
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global betaver     beta5

Name:           crlibm
Version:        1.0
Release:        0.20.%{betaver}%{?dist}
Summary:        Correctly Rounded mathematical library

License:        LGPLv2+
URL:            https://gforge.inria.fr/scm/browser.php?group_id=5929&extra=crlibm
# Visit this URL to get the source tarball, then rename it appropriately:
# https://scm.gforge.inria.fr/anonscm/gitweb?p=metalibm/crlibm.git;a=snapshot;h=%%{commit};sf=tgz
Source0:        %{name}-%{version}%{betaver}.tar.gz
# Build a shared library instead of a static library
Patch0:         %{name}-1.0beta4-shared.patch
# Use gcc builtins instead of dividing by zero
Patch1:         %{name}-1.0beta5-div-by-zero.patch
# Fix some ISO8859-1 issues in the LaTeX documentation
Patch2:         %{name}-1.0beta5-latin-tex.patch

BuildRequires:  autoconf, automake, libtool
BuildRequires:  libscs-devel
BuildRequires:  tex(latex)
BuildRequires:  tex(fullpage.sty)

%description
CRlibm is a free mathematical library (libm) which provides:
* implementations of the double-precision C99 standard elementary functions,
* correctly rounded in the four IEEE-754 rounding modes,
* with a comprehensive proof of both the algorithms used and their
  implementation,
* sufficiently efficient in average time, worst-case time, and memory
  consumption to replace existing libms transparently.


%package        devel
Summary:        Development files for %{name}
Requires:       %{name} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q -n %{name}-%{shortcommit}
%patch0 -p1 -b .shared
%patch1 -p1 -b .div-by-zero
%patch2 -p1 -b .latin-tex

rm -rf scs_lib


%build
# autoreconf requires because the patch modifies configure.ac and Makefile.am
autoreconf --install --force
%configure --disable-static

# Get rid of undesirable hardcoded rpaths; workaround libtool reordering
# -Wl,--as-needed after all the libraries.
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
    -e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \
    -i libtool

make %{?_smp_mflags}
make crlibm.pdf


%install
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -delete

# We do not want to install the test programs
rm -rf $RPM_BUILD_ROOT%{_bindir}


%check
LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} make check


%ldconfig_scriptlets


%files
%doc README AUTHORS COPYING.LIB
%{_libdir}/*.so.*

%files devel
%doc docs/crlibm.pdf
%{_includedir}/*
%{_libdir}/*.so


%changelog
* Thu Jul 11 2019 Jerry James <loganjerry@gmail.com> - 1.0-0.20.beta5
- Update to beta5
- Update URLs
- Drop BuildRequires for EPEL < 6
- Add a check script

* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.19.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.18.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.17.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.16.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.15.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.14.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.13.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.12.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.11.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.10.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Mon Aug 19 2013 Ralf Cors├ępius <corsepiu@fedoraproject.org> - 1.0-0.9.beta4
- Rework latex related BRs (FTFBS, RHBZ #992096, #913930).

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.8.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.7.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.6.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.5.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Mar 21 2011 Tim Niemueller <tim@niemueller.de> - 1.0-0.4.beta4
- Fix LaTeX build require for EL5

* Sat Feb 19 2011 Tim Niemueller <tim@niemueller.de> - 1.0-0.3.beta4
- Delete included scs_lib in prep stage

* Sat Feb 19 2011 Tim Niemueller <tim@niemueller.de> - 1.0-0.2.beta4
- Use system-wide installed scslib if available

* Tue Feb 08 2011 Tim Niemueller <tim@niemueller.de> - 1.0-0.1.beta4
- Initial package