Unbundle cctz.

This commit is contained in:
Elliott Sales de Andrade 2018-03-17 04:55:21 -04:00
parent 463258b7e0
commit 819b1f619d

View File

@ -6,7 +6,7 @@
Name: R-%{packname}
Version: 1.7.3
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Make dealing with dates a little easier
License: GPLv2+ and ASL 2.0
@ -25,7 +25,11 @@ Patch0001: 0001-Fix-system-timezone-memoization.patch
Requires: R-methods
Requires: R-stringr
Requires: tzdata
%if %{fedora} >= 28
BuildRequires: cctz-devel
%else
BuildRequires: tzdata
%endif
BuildRequires: R-devel tex(latex) R-methods
BuildRequires: R-stringr R-Rcpp-devel
BuildRequires: R-testthat
@ -53,6 +57,17 @@ popd
# Don't need coverage; it's not packaged either.
sed -i 's/, covr//g' %{packname}/DESCRIPTION
%if %{fedora} >= 28
# Delete bundled cctz.
rm -r %{packname}/src/cctz
cat > %{packname}/src/Makevars << EOF
CXX_STD = CXX11
PKG_CPPFLAGS= -I. -I/usr/include/cctz
PKG_LIBS= -lcctz
EOF
sed -i '/time_zone_if/d' %{packname}/src/update.cpp
%endif
%build
@ -93,6 +108,9 @@ _R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname} --ignore-vignettes
%changelog
* Sat Mar 17 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.7.3-3
- Unbundle cctz.
* Mon Mar 05 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.7.3-2
- Enable doc build.