Merge remote-tracking branch 'up/master' into master-riscv64

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
David Abdurachmanov 2020-04-25 18:47:03 +03:00
commit c8f49857dd
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
5 changed files with 136 additions and 52 deletions

5
.gitignore vendored
View File

@ -29,3 +29,8 @@
/R-3.5.3.tar.gz
/R-3.6.0.tar.gz
/R-3.6.1.tar.gz
/R-3.6.2.tar.gz
/bzip2-1.0.8.tar.gz
/pcre-8.43.tar.bz2
/curl-7.67.0.tar.bz2
/R-3.6.3.tar.gz

View File

@ -0,0 +1,16 @@
diff -up R-3.6.2/src/main/arithmetic.c.ppc64 R-3.6.2/src/main/arithmetic.c
--- R-3.6.2/src/main/arithmetic.c.ppc64 2019-10-18 18:15:02.000000000 -0400
+++ R-3.6.2/src/main/arithmetic.c 2019-12-18 09:05:50.363220122 -0500
@@ -177,7 +177,12 @@ void attribute_hidden InitArithmetic()
}
#if HAVE_LONG_DOUBLE && (SIZEOF_LONG_DOUBLE > SIZEOF_DOUBLE)
+# ifdef __PPC64__
+ // PowerPC 64 (when gcc has -mlong-double-128) fails constant folding with LDOUBLE
+# define q_1_eps (1 / LDBL_EPSILON)
+# else
static LDOUBLE q_1_eps = 1 / LDBL_EPSILON;
+# endif
#else
static double q_1_eps = 1 / DBL_EPSILON;
#endif

157
R.spec
View File

@ -3,6 +3,48 @@
%global runjavareconf 1
# lapack comes from openblas, whenever possible.
# We decided to implement this change in Fedora 32+ and EPEL-8 only.
# This was to minimize the impact on end-users who might have R modules
# installed locally with the old dependency on libRlapack.so
%if 0%{?fedora} >= 32
%global syslapack 1
%else
%if 0%{?rhel} && 0%{?rhel} >= 8
%global syslapack 1
%else
%global syslapack 0
%endif
%endif
%if 0%{?rhel} >= 8
%global openblas 1
%else
%if 0%{?rhel} == 7
%ifarch x86_64 %{ix86} armv7hl %{power64} aarch64
%global openblas 1
%else
%global openblas 0
%endif
%else
%if 0%{?fedora}
%global openblas 1
%else
%global openblas 0
%endif
%endif
%endif
%if 0%{?fedora} >= 31
%global usemacros 1
%else
%if 0%{?rhel} && 0%{?rhel} >= 8
%global usemacros 1
%else
%global usemacros 0
%endif
%endif
%if 0%{?rhel} && 0%{?rhel} <= 6
%ifarch ppc64 ppc64le
%global runjavareconf 0
@ -104,22 +146,8 @@
%global texi2any 1
%endif
%ifarch x86_64 %{ix86} armv7hl %{power64} aarch64
%if 0%{?rhel} >= 7
%global openblas 1
%else
%if 0%{?fedora} >= 23
%global openblas 1
%else
%global openblas 0
%endif
%endif
%else
%global openblas 0
%endif
Name: R
Version: 3.6.1
Version: 3.6.3
Release: 1.0.riscv64%{?dist}
Summary: A language for data analysis and graphics
URL: http://www.r-project.org
@ -140,14 +168,14 @@ Source106: https://cran.r-project.org/doc/FAQ/R-FAQ.html
%endif
%if %{zlibhack}
%global zlibv 1.2.11
%global bzipv 1.0.6
%global bzipv 1.0.8
%global xzv 5.2.4
%global pcrev 8.42
%global curlv 7.63.0
%global pcrev 8.43
%global curlv 7.67.0
Source1000: http://zlib.net/zlib-%{zlibv}.tar.gz
Source1001: http://www.bzip.org/1.0.6/bzip2-%{bzipv}.tar.gz
Source1001: https://www.sourceware.org/pub/bzip2/bzip2-%{bzipv}.tar.gz
Source1002: http://tukaani.org/xz/xz-%{xzv}.tar.bz2
Source1003: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-%{pcrev}.tar.bz2
Source1003: https://ftp.pcre.org/pub/pcre/pcre-%{pcrev}.tar.bz2
Source1004: https://curl.haxx.se/download/curl-%{curlv}.tar.bz2
BuildRequires: glibc-devel
BuildRequires: groff
@ -208,19 +236,10 @@ BuildRequires: autoconf, automake, libtool
BuildRequires: openblas-devel
%endif
# We use the bundled lapack and shim for BLAS now.
%if 0
%if 0%{?fedora} >= 21
%if %{syslapack}
%if !%{openblas}
BuildRequires: lapack-devel >= 3.5.0-7
BuildRequires: blas-devel >= 3.5.0-7
%else
%if 0%{?fedora} >= 19
BuildRequires: lapack-devel >= 3.4.2-7
BuildRequires: blas-devel >= 3.4.2-7
%else
BuildRequires: lapack-devel
BuildRequires: blas-devel >= 3.0
%endif
%endif
%endif
@ -286,9 +305,11 @@ Requires: sed, gawk, tex(latex), less, make, unzip
# Make sure we bring the new libRmath with us
Requires: libRmath%{?_isa} = %{version}-%{release}
%if !%{syslapack}
%if %{openblas}
Requires: openblas-Rblas
%endif
%endif
%if %{use_devtoolset}
# We need it for CXX11 and higher support.
@ -306,24 +327,24 @@ Requires: devtoolset-%{dts_version}-toolchain
print("Provides: R(" .. name .. ") = " .. version)
}
%add_submodule base %{version}
%add_submodule boot 1.3-22
%add_submodule boot 1.3-24
%add_submodule class 7.3-15
%add_submodule cluster 2.0.8
%add_submodule cluster 2.1.0
%add_submodule codetools 0.2-16
%add_submodule compiler %{version}
%add_submodule datasets %{version}
%add_submodule foreign 0.8-71
%add_submodule foreign 0.8-75
%add_submodule graphics %{version}
%add_submodule grDevices %{version}
%add_submodule grid %{version}
%add_submodule KernSmooth 2.23-15
%add_submodule KernSmooth 2.23-16
%add_submodule lattice 0.20-38
%add_submodule MASS 7.3-51.4
%add_submodule Matrix 1.2-17
%add_submodule MASS 7.3-51.5
%add_submodule Matrix 1.2-18
Obsoletes: R-Matrix < 0.999375-7
%add_submodule methods %{version}
%add_submodule mgcv 1.8-28
%add_submodule nlme 3.1-139
%add_submodule mgcv 1.8-31
%add_submodule nlme 3.1-144
%add_submodule nnet 7.3-12
%add_submodule parallel %{version}
%add_submodule rpart 4.1-15
@ -331,7 +352,7 @@ Obsoletes: R-Matrix < 0.999375-7
%add_submodule splines %{version}
%add_submodule stats %{version}
%add_submodule stats4 %{version}
%add_submodule survival 2.44-1.1
%add_submodule survival 3.1-8
%add_submodule tcltk %{version}
%add_submodule tools %{version}
%add_submodule translations %{version}
@ -364,8 +385,11 @@ Requires: pcre-devel
# Configure picks this up, but despite linking to it, it does not seem to be used as of R 3.5.2.
Requires: pcre2-devel
%endif
# No longer true.
# Requires: blas-devel >= 3.0, lapack-devel
%if %{syslapack}
%if %{openblas}
Requires: openblas-devel
%endif
%endif
%if %{modern}
Requires: libicu-devel
%endif
@ -390,7 +414,7 @@ Requires: tex(cm-super-ts1.enc)
Requires: qpdf
%endif
Provides: R-Matrix-devel = 1.2.17
Provides: R-Matrix-devel = 1.2.18
Obsoletes: R-Matrix-devel < 0.999375-7
%if %{modern}
@ -405,7 +429,9 @@ Install R-core-devel if you are going to develop or compile R packages.
%package devel
Summary: Full R development environment metapackage
%if %{usemacros}
Requires: R-rpm-macros
%endif
Requires: R-core-devel = %{version}-%{release}
%if %{modern}
Requires: R-java-devel = %{version}-%{release}
@ -614,7 +640,7 @@ export FFLAGS="%{optflags} --no-optimize-sibling-calls"
# https://bugzilla.redhat.com/show_bug.cgi?id=1117496
# https://bugzilla.redhat.com/show_bug.cgi?id=1117497
#
# We use --enable-BLAS-shlib here. It generates a shared library
# On old RHEL, we use --enable-BLAS-shlib here. It generates a shared library
# of the R bundled blas, that can be replaced by an optimized version.
# It also results in R using the bundled lapack copy.
@ -626,14 +652,17 @@ export FFLAGS="%{optflags} --no-optimize-sibling-calls"
--with-system-tre \
%endif
--with-system-valgrind-headers \
%if 0%{?fedora}
%if %{syslapack}
--with-lapack \
--with-blas \
%else
--enable-BLAS-shlib \
%endif
--with-tcl-config=%{_libdir}/tclConfig.sh \
--with-tk-config=%{_libdir}/tkConfig.sh \
--enable-BLAS-shlib \
--enable-R-shlib \
--enable-prebuilt-html \
--enable-R-profiling \
--enable-memory-profiling \
%if %{with_lto}
%ifnarch %{arm}
@ -770,16 +799,19 @@ sed -i 's|:/builddir/build/BUILD/R-%{version}/curl-%{curlv}/target%{_libdir}/:/b
sed -i 's|/builddir/build/BUILD/R-%{version}/curl-%{curlv}/target%{_libdir}/:/builddir/build/BUILD/R-%{version}/curl-%{curlv}/target%{_libdir}||g' %{buildroot}%{_libdir}/R/etc/ldpaths
%endif
%if !%{syslapack}
%if %{openblas}
# Rename the R blas so.
mv %{buildroot}%{_libdir}/R/lib/libRblas.so %{buildroot}%{_libdir}/R/lib/libRrefblas.so
%endif
%endif
# okay, look. its very clear that upstream does not run the test suite on any non-intel architectures.
%check
%if 0%{?zlibhack}
# Most of these tests pass. Some don't. All pieces belong to you.
%else
%ifnarch ppc64 ppc64le armv7hl riscv64
%ifnarch ppc64 ppc64le armv7hl s390x aarch64 riscv64
# Needed by tests/ok-error.R, which will smash the stack on PPC64. This is the purpose of the test.
ulimit -s 16384
TZ="Europe/Paris" make check
@ -1202,9 +1234,38 @@ R CMD javareconf \
%{_libdir}/libRmath.a
%changelog
* Tue Aug 20 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> - 3.6.1-1.0.riscv64
* Sat Apr 25 2020 David Abdurachmanov <david.abdurachmanov@sifive.com> - 3.6.3-1.0.riscv64
- Disable tests on RISC-V (riscv64)
* Mon Mar 2 2020 Tom Callaway <spot@fedoraproject.org> - 3.6.3-1
- update to 3.6.3
- conditionalize lapack changes from previous commits to Fedora 32+ and EPEL-8
* Tue Feb 18 2020 Tom Callaway <spot@fedoraproject.org> - 3.6.2-5
- fix openblas conditionals, openblas has wider arch support everywhere except el7
* Tue Feb 18 2020 Tom Callaway <spot@fedoraproject.org> - 3.6.2-4
- fix conditionals so that Fedora builds against system openblas for lapack/blas
and we only generate the R lapack/blas libs on RHEL 5-6-7 (where system lapack/openblas
is not reliable). Thanks to Dirk Eddelbuettel for pointing out the error.
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Dec 18 2019 Tom Callaway <spot@fedoraproject.org> - 3.6.2-2
- adjust ppc64 patch to reflect upstream fix
* Thu Dec 12 2019 Tom Callaway <spot@fedoraproject.org> - 3.6.2-1
- update to 3.6.2
- disable tests on all non-intel arches
- fix powerpc64
* Fri Nov 01 2019 Pete Walter <pwalter@fedoraproject.org> - 3.6.1-3
- Rebuild for ICU 65
* Fri Aug 30 2019 Tom Callaway <spot@fedoraproject.org> - 3.6.1-2
- conditionalize macro usage so that it only happens on Fedora 31+ and EPEL-8
* Fri Aug 16 2019 Tom Callaway <spot@fedoraproject.org> - 3.6.1-1
- update to 3.6.1

2
package.cfg Normal file
View File

@ -0,0 +1,2 @@
[koji]
targets = epel8 epel8-playground

View File

@ -1,6 +1,6 @@
SHA512 (zlib-1.2.11.tar.gz) = 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae
SHA512 (bzip2-1.0.6.tar.gz) = 00ace5438cfa0c577e5f578d8a808613187eff5217c35164ffe044fbafdfec9e98f4192c02a7d67e01e5a5ccced630583ad1003c37697219b0f147343a3fdd12
SHA512 (pcre-8.42.tar.bz2) = b47b923108f6ee0c31409b79d0888314271b482a22590e164d02f21d2112fba22dd0342c24f9ba0f5fcc5b8c65550bad08c476e30a2fc79b34ecf4601ed82f3d
SHA512 (xz-5.2.4.tar.bz2) = 25a548c34a304ba51cdaa63813df0fa4ac2f3cf0ec6dc2d181ec5b62fe586090cd0f1c866ee7ba19e9b264ecabf9ca9f2f1dda7f95313546da4152f3cfaa7e6e
SHA512 (curl-7.63.0.tar.bz2) = 2873ef57b15cf12e508626f4546f6e06450cb87b239be1d26d9b3a22f7533d76eebabb5fa00e7b8c5d7fc9854356997ce164afb069411d079b2b9f0bdb00db25
SHA512 (R-3.6.1.tar.gz) = fae7d114437c4b5d10fcb2a4265acd707ad2a4810eeb7c11e25caca1d85093a1495c2e13457b4894c1508830ec1b2be95379b7d54007cf3e574c2a9eea28ef80
SHA512 (bzip2-1.0.8.tar.gz) = 083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3
SHA512 (pcre-8.43.tar.bz2) = 3b4ac2c7ccd77c9575d07a33c3456f40b50731029e62d01fb8f2f5871d7118e12bc9e6bc7a8079769c765e38da5ecf98c4b261b10ff0a2f14f0881b434f67af7
SHA512 (curl-7.67.0.tar.bz2) = 096e12be86bca1c19ba9e1d98b8342ec0d76b2e00cab322a7109d1e3559343ff7702b993c772f221fa073d2b8b6ffe6535d15411819fb245d3fa2c18e110b0a5
SHA512 (R-3.6.3.tar.gz) = 9b1dc78922e431bd1af81e6e560b10ad04d121718f680fed32db735d561fd40ea6028759976722db11559f1a78fe684119b766f0567128cb2ee5003aa87a0931