Fix unbundling of fonts.

This commit is contained in:
Elliott Sales de Andrade 2018-09-23 00:19:06 -04:00
parent b05af3785a
commit 71adc1a673
1 changed files with 16 additions and 12 deletions

View File

@ -3,7 +3,7 @@
Name: R-%{packname}
Version: 0.7.2
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Loading Fonts into R
License: GPLv2
@ -41,17 +41,6 @@ in order to support other packages such as 'R2SWF' and 'showtext'.
%prep
%setup -q -c -n %{packname}
# Unbundle fonts
pushd %{packname}/inst/fonts
rm AUTHORS License.txt
for family in Mono Sans Serif; do
for style in Regular Bold Italic BoldItalic; do
rm Liberation${family}-${style}.ttf
ln -s /usr/share/fonts/liberation/Liberation${family}-${style}.ttf
done
done
popd
# Fix line endings
for file in %{packname}/inst/NEWS.Rd; do
sed "s|\r||g" ${file} > ${file}.new
@ -69,6 +58,18 @@ mkdir -p %{buildroot}%{rlibdir}
test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
rm -f %{buildroot}%{rlibdir}/R.css
# Replace fonts by system fonts (note that this cannot be done in prep because
# R CMD INSTALL copies symlink targets.)
pushd %{buildroot}%{rlibdir}/%{packname}/fonts
rm AUTHORS License.txt
for family in Mono Sans Serif; do
for style in Regular Bold Italic BoldItalic; do
rm Liberation${family}-${style}.ttf
ln -s /usr/share/fonts/liberation/Liberation${family}-${style}.ttf
done
done
popd
%check
%{_bindir}/R CMD check %{packname}
@ -92,6 +93,9 @@ rm -f %{buildroot}%{rlibdir}/R.css
%changelog
* Sun Sep 23 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.7.2-5
- Fix unbundling of fonts
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild