%bcond_without openmp # OpenMP support
%bcond_without tcl # Tcl/Tk support
%bcond_without tests # do not run "make check"
-%bcond_without docs # do not build documentation
+%bcond_without doc # do not build documentation
#
# NOTE:
# - /etc/localtime must be present for tests to work
# TODO:
# - script for rpm to autoprovides/autorequires R internals
#
-%include /usr/lib/rpm/macros.perl
Summary: A language for data analysis and graphics
Summary(pl.UTF-8): Język do analizy danych oraz grafiki
Name: R
-Version: 3.2.5
-Release: 6
+Version: 4.1.3
+Release: 2
License: mixed (distributable), mostly GPL v2+
Group: Development/Languages
-# CRAN master site: ftp://cran.r-project.org/pub/R/src/
-Source0: ftp://stat.ethz.ch/R-CRAN/src/base/R-3/%{name}-%{version}.tar.gz
-# Source0-md5: 7b23ee70cfb383be3bd4360e3c71d8c3
+Source0: https://cran.r-project.org/src/base/R-4/%{name}-%{version}.tar.gz
+# Source0-md5: 409bc782b1a42c8247712f6446d7d640
Source1: %{name}.desktop
Source2: %{name}.xpm
-URL: http://www.r-project.org/
+Patch0: %{name}-timezone.patch
+Patch1: curl8.patch
+URL: https://www.r-project.org/
# yes, it is, or tests will fail
BuildRequires: /etc/localtime
-BuildRequires: autoconf >= 2.62
+BuildRequires: autoconf >= 2.69
BuildRequires: automake
BuildRequires: blas-devel >= 3.2.2-2
BuildRequires: bzip2-devel >= 1.0.6
%{?with_openmp:BuildRequires: libgomp-devel}
BuildRequires: libicu-devel
BuildRequires: libjpeg-devel >= 6b
-BuildRequires: libpng-devel >= 1.2.7
+BuildRequires: libpng-devel >= 2:1.2.7
BuildRequires: libstdc++-devel
BuildRequires: libtiff-devel
+BuildRequires: libtirpc-devel
BuildRequires: libtool >= 2:2.0
-BuildRequires: libxml2-devel >= 2.6.26
BuildRequires: pango-devel
-BuildRequires: pcre-devel >= 8.10
+BuildRequires: pcre2-8-devel
BuildRequires: perl-base >= 1:5.6
BuildRequires: pkgconfig
BuildRequires: readline-devel
BuildRequires: tcl-devel >= 8.4
BuildRequires: tk-devel >= 8.4
%endif
-BuildRequires: tre-devel
-%if %{with docs}
-BuildRequires: tetex-dvips
-BuildRequires: tetex-latex
-BuildRequires: tetex-pdftex
+# 0.8.0 is too old currently (checking for tre_regncompb in -ltre... no)
+#BuildRequires: tre-devel >= ?
+%if %{with doc}
BuildRequires: texinfo-texi2dvi >= 4.7
+BuildRequires: texlive-dvips
+BuildRequires: texlive-latex
+BuildRequires: texlive-latex-ae
+BuildRequires: texlive-pdftex
%endif
BuildRequires: xorg-lib-libX11-devel
BuildRequires: xorg-lib-libXmu-devel
Requires: blas >= 3.2.2-2
Requires: bzip2 >= 1.0.6
Requires: curl-libs >= 7.28.0
-Requires: pcre >= 8.10
+Requires: pcre >= 8.32
Requires: xz-libs >= 5.0.3
Requires: zlib >= 1.2.3
Suggests: rkward
%prep
%setup -q
+%patch0 -p1
+%patch1 -p0
%build
%{__aclocal} -I m4
--with-libpng \
--with-readline \
--with-recommended-packages \
- --with-system-bzlib \
- --with-system-pcre \
--with-system-tre \
- --with-system-xz \
- --with-system-zlib \
%if %{with tcl}
--with-tcltk \
--with-tcl-config=/usr/lib/tclConfig.sh \
%{__make} check
%endif
-%if %{with docs}
+%if %{with doc}
%{__make} docs pdf info
%endif
ln -sf %{_libdir}/R/lib/libR.so $RPM_BUILD_ROOT%{_libdir}
-mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R
ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include
gen_lang() {
%{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/COPYING
# packaged as %doc
%{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/{AUTHORS,COPYRIGHTS,FAQ,NEWS.rds,THANKS}
-%if %{with docs}
+%if %{with doc}
# pdf version of NEWS
%{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/NEWS.pdf
%endif
%{_libdir}/R/doc/CRAN_mirrors.csv
%{_libdir}/R/doc/NEWS*
%dir %{_libdir}/R/doc/html
+%{_libdir}/R/doc/html/Rlogo.svg
%{_libdir}/R/doc/html/*.css
%{_libdir}/R/doc/html/[NRSa-lr-u]*.html
%{_libdir}/R/doc/html/packages-head*.html