This commit is contained in:
Tom Callaway 2013-10-16 00:50:38 +01:00
parent bfd2a54760
commit ee48b1de3a
3 changed files with 76 additions and 26 deletions

View File

@ -0,0 +1,32 @@
diff -up R-3.0.1/src/library/tools/R/install.R.armfix R-3.0.1/src/library/tools/R/install.R
--- R-3.0.1/src/library/tools/R/install.R.armfix 2013-08-12 13:57:17.956790673 -0400
+++ R-3.0.1/src/library/tools/R/install.R 2013-08-12 13:59:51.230800752 -0400
@@ -108,7 +108,11 @@
SHLIB_EXT <- if (WINDOWS) ".dll" else {
## can we do better?
mconf <- file.path(R.home(), paste0("etc", rarch), "Makeconf")
- sub(".*= ", "", grep("^SHLIB_EXT", readLines(mconf), value = TRUE))
+ if (substr( Sys.info()["machine"], 1, 3) == "arm") { # arm has broken regexps in libc
+ sub(".*= ", "", grep("^SHLIB_EXT", readLines(mconf), value = TRUE), perl = TRUE)
+ } else {
+ sub(".*= ", "", grep("^SHLIB_EXT", readLines(mconf), value = TRUE))
+ }
}
options(warn = 1)
@@ -1627,8 +1631,13 @@
mconf <- readLines(file.path(R.home(),
paste0("etc", Sys.getenv("R_ARCH")),
"Makeconf"))
- SHLIB_EXT <- sub(".*= ", "", grep("^SHLIB_EXT", mconf, value = TRUE))
- SHLIB_LIBADD <- sub(".*= ", "", grep("^SHLIB_LIBADD", mconf, value = TRUE))
+ if (substr( Sys.info()["machine"], 1, 3) == "arm") { # arm has broken regexps in libc
+ SHLIB_EXT <- sub(".*= ", "", grep("^SHLIB_EXT", mconf, value = TRUE), perl = TRUE)
+ SHLIB_LIBADD <- sub(".*= ", "", grep("^SHLIB_LIBADD", mconf, value = TRUE), perl = TRUE)
+ } else {
+ SHLIB_EXT <- sub(".*= ", "", grep("^SHLIB_EXT", mconf, value = TRUE))
+ SHLIB_LIBADD <- sub(".*= ", "", grep("^SHLIB_LIBADD", mconf, value = TRUE))
+ }
MAKE <- Sys.getenv("MAKE")
rarch <- Sys.getenv("R_ARCH")
} else {

68
R.spec
View File

@ -16,13 +16,15 @@
%endif
Name: R
Version: 3.0.1
Version: 3.0.2
Release: 1%{?dist}
Summary: A language for data analysis and graphics
URL: http://www.r-project.org
Source0: ftp://cran.r-project.org/pub/R/src/base/R-3/R-%{version}.tar.gz
Source1: macros.R
Source2: R-make-search-index.sh
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679180
Patch0: R-3.0.1-arm-compile-fix.patch
License: GPLv2+
Group: Applications/Engineering
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -89,26 +91,26 @@ Requires: perl, sed, gawk, tex(latex), less
# packager convenience.
Provides: R-base = %{version}
Provides: R-boot = 1.3.9
Provides: R-class = 7.3.7
Provides: R-class = 7.3.9
Provides: R-cluster = 1.14.4
Provides: R-codetools = 0.2.8
Provides: R-datasets = %{version}
Provides: R-foreign = 0.8.53
Provides: R-foreign = 0.8.55
Provides: R-graphics = %{version}
Provides: R-grDevices = %{version}
Provides: R-grid = %{version}
Provides: R-KernSmooth = 2.23.10
Provides: R-lattice = 0.20.15
Provides: R-MASS = 7.3.26
Provides: R-Matrix = 1.0.12
Provides: R-lattice = 0.20.23
Provides: R-MASS = 7.3.29
Provides: R-Matrix = 1.0.14
Obsoletes: R-Matrix < 0.999375-7
Provides: R-methods = %{version}
Provides: R-mgcv = 1.7.22
Provides: R-nlme = 3.1.109
Provides: R-nnet = 7.3.6
Provides: R-mgcv = 1.7.26
Provides: R-nlme = 3.1.111
Provides: R-nnet = 7.3.7
Provides: R-parallel = %{version}
Provides: R-rpart = 4.1.1
Provides: R-spatial = 7.3.6
Provides: R-rpart = 4.1.3
Provides: R-spatial = 7.3.7
Provides: R-splines = %{version}
Provides: R-stats = %{version}
Provides: R-stats4 = %{version}
@ -151,7 +153,7 @@ Requires: tex(ptmri8t.tfm)
Requires: tex(ptmro8t.tfm)
Requires: tex(cm-super-ts1.enc)
%endif
Provides: R-Matrix-devel = 1.0.12
Provides: R-Matrix-devel = 1.0.14
Obsoletes: R-Matrix-devel < 0.999375-7
%if %{modern}
@ -238,6 +240,7 @@ from the R project. This package provides the static libRmath library.
%prep
%setup -q
%patch0 -p1 -b .armfix
# Filter false positive provides.
cat <<EOF > %{name}-prov
@ -304,7 +307,7 @@ export FCFLAGS="%{optflags}"
--with-tk-config=%{_libdir}/tkConfig.sh \
--enable-R-shlib \
--enable-prebuilt-html \
rdocdir=%{_docdir}/R-%{version} \
rdocdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} \
rincludedir=%{_includedir}/R \
rsharedir=%{_datadir}/R) \
| grep -A30 'R is now' - > CAPABILITIES
@ -312,12 +315,14 @@ make
(cd src/nmath/standalone; make)
#make check-all
make pdf
%if 0%{?fedora} >= 19
# What a hack.
# Current texinfo doesn't like @eqn. Use @math instead where stuff breaks.
cp doc/manual/R-exts.texi doc/manual/R-exts.texi.spot
cp doc/manual/R-intro.texi doc/manual/R-intro.texi.spot
sed -i 's|@eqn|@math|g' doc/manual/R-exts.texi
sed -i 's|@eqn|@math|g' doc/manual/R-intro.texi
%endif
make info
# Convert to UTF-8
@ -329,13 +334,15 @@ done
%install
make DESTDIR=${RPM_BUILD_ROOT} install install-info
# And now, undo the hack. :P
%if 0%{?fedora} >= 19
mv doc/manual/R-exts.texi.spot doc/manual/R-exts.texi
mv doc/manual/R-intro.texi.spot doc/manual/R-intro.texi
%endif
make DESTDIR=${RPM_BUILD_ROOT} install-pdf
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir.old
install -p CAPABILITIES ${RPM_BUILD_ROOT}%{_docdir}/R-%{version}
install -p CAPABILITIES ${RPM_BUILD_ROOT}%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
#Install libRmath files
(cd src/nmath/standalone; make install DESTDIR=${RPM_BUILD_ROOT})
@ -354,21 +361,21 @@ mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm/
install -m0755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/rpm/
# Fix multilib
touch -r NEWS ${RPM_BUILD_ROOT}%{_docdir}/R-%{version}/CAPABILITIES
touch -r NEWS ${RPM_BUILD_ROOT}%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}/CAPABILITIES
touch -r NEWS doc/manual/*.pdf
touch -r NEWS $RPM_BUILD_ROOT%{_bindir}/R
# Fix html/packages.html
# We can safely use RHOME here, because all of these are system packages.
sed -i 's|\..\/\..|%{_libdir}/R|g' $RPM_BUILD_ROOT%{_docdir}/R-%{version}/html/packages.html
sed -i 's|\..\/\..|%{_libdir}/R|g' $RPM_BUILD_ROOT%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}/html/packages.html
for i in $RPM_BUILD_ROOT%{_libdir}/R/library/*/html/*.html; do
sed -i 's|\..\/\..\/..\/doc|%{_docdir}/R-%{version}|g' $i
sed -i 's|\..\/\..\/..\/doc|%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}|g' $i
done
# Fix exec bits
chmod +x $RPM_BUILD_ROOT%{_datadir}/R/sh/echo.sh
chmod -x $RPM_BUILD_ROOT%{_libdir}/R/library/mgcv/CITATION ${RPM_BUILD_ROOT}%{_docdir}/R-%{version}/CAPABILITIES
chmod -x $RPM_BUILD_ROOT%{_libdir}/R/library/mgcv/CITATION ${RPM_BUILD_ROOT}%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}/CAPABILITIES
# Symbolic link for convenience
pushd $RPM_BUILD_ROOT%{_libdir}/R
@ -441,7 +448,6 @@ popd
%{_libdir}/R/library/class/html/
%{_libdir}/R/library/class/INDEX
%{_libdir}/R/library/class/libs/
%{_libdir}/R/library/class/LICENCE
%{_libdir}/R/library/class/Meta/
%{_libdir}/R/library/class/NAMESPACE
%{_libdir}/R/library/class/NEWS
@ -536,6 +542,8 @@ popd
%lang(de) %{_libdir}/R/library/lattice/po/de/
%lang(en) %{_libdir}/R/library/lattice/po/en*/
%lang(fr) %{_libdir}/R/library/lattice/po/fr/
%lang(ko) %{_libdir}/R/library/lattice/po/ko/
%lang(pl) %{_libdir}/R/library/lattice/po/pl*/
%{_libdir}/R/library/lattice/R/
# MASS
%dir %{_libdir}/R/library/MASS/
@ -546,7 +554,6 @@ popd
%{_libdir}/R/library/MASS/html/
%{_libdir}/R/library/MASS/INDEX
%{_libdir}/R/library/MASS/libs/
%{_libdir}/R/library/MASS/LICENCE
%{_libdir}/R/library/MASS/Meta/
%{_libdir}/R/library/MASS/NAMESPACE
%{_libdir}/R/library/MASS/NEWS
@ -594,7 +601,6 @@ popd
%{_libdir}/R/library/nlme/html/
%{_libdir}/R/library/nlme/INDEX
%{_libdir}/R/library/nlme/libs/
%{_libdir}/R/library/nlme/LICENCE
%{_libdir}/R/library/nlme/Meta/
%{_libdir}/R/library/nlme/mlbook/
%{_libdir}/R/library/nlme/NAMESPACE
@ -602,6 +608,7 @@ popd
%lang(de) %{_libdir}/R/library/nlme/po/de/
%lang(en) %{_libdir}/R/library/nlme/po/en*/
%lang(fr) %{_libdir}/R/library/nlme/po/fr/
%lang(ko) %{_libdir}/R/library/nlme/po/ko/
%lang(pl) %{_libdir}/R/library/nlme/po/pl/
%{_libdir}/R/library/nlme/R/
%{_libdir}/R/library/nlme/scripts/
@ -613,7 +620,6 @@ popd
%{_libdir}/R/library/nnet/html/
%{_libdir}/R/library/nnet/INDEX
%{_libdir}/R/library/nnet/libs/
%{_libdir}/R/library/nnet/LICENCE
%{_libdir}/R/library/nnet/Meta/
%{_libdir}/R/library/nnet/NAMESPACE
%{_libdir}/R/library/nnet/NEWS
@ -654,7 +660,6 @@ popd
%{_libdir}/R/library/spatial/html/
%{_libdir}/R/library/spatial/INDEX
%{_libdir}/R/library/spatial/libs/
%{_libdir}/R/library/spatial/LICENCE
%{_libdir}/R/library/spatial/Meta/
%{_libdir}/R/library/spatial/NAMESPACE
%{_libdir}/R/library/spatial/NEWS
@ -688,8 +693,8 @@ popd
%{_infodir}/R-*.info*
%{_sysconfdir}/rpm/macros.R
%{_mandir}/man1/*
%{_docdir}/R-%{version}
%docdir %{_docdir}/R-%{version}
%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
%docdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
/etc/ld.so.conf.d/*
%files core-devel
@ -806,6 +811,19 @@ R CMD javareconf \
%postun -n libRmath -p /sbin/ldconfig
%changelog
* Tue Oct 15 2013 Tom Callaway <spot@fedoraproject.org> - 3.0.2-1
- update to 3.0.2
* Mon Aug 12 2013 Tom Callaway <spot@fedoraproject.org> - 3.0.1-4
- add support for unversioned docdir in F20+
- fix compile on arm (thanks Debian, wish you'd upstreamed that patch)
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sat May 18 2013 Tom Callaway <spot@fedoraproject.org> - 3.0.1-2
- conditionalize the ugly hack for fedora 19+
* Fri May 17 2013 Tom Callaway <spot@fedoraproject.org> - 3.0.1-1
- update to 3.0.1

View File

@ -1 +1 @@
36d51544b007fff26c7fbf36b02ea5ad R-3.0.1.tar.gz
f9a8374736e7650e4848f33e2e3bbee3 R-3.0.2.tar.gz