Browse Source

R: add BR: openblas-Rblas

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@11729 ec354946-7b23-47d6-9f5a-488ba84defc7
ara_t 5 years ago
parent
commit
3b17f2292a
1 changed files with 43 additions and 22 deletions
  1. 43 22
      R/R/R-vl.spec

+ 43 - 22
R/R/R-vl.spec

@@ -1,6 +1,6 @@
 %define pkg_name    R
 %define pkg_version 3.5.0
-%define pkg_release 1%{?_dist_release}
+%define pkg_release 2%{?_dist_release}
 
 Summary:     A language for data analysis and graphics
 Summary(ja): データ解析・グラフィック化の言語
@@ -13,23 +13,19 @@ Group:       Applications/Edutainment
 URL:         http://www.r-project.org
 
 Source0:     https://cran.r-project.org/src/base/R-3/%{name}-%{version}.tar.gz
-# Source0:     ftp://cran.r-project.org/pub/R/src/base/R-3/%{name}-%{version}.tar.gz
 # Patch0:      R-release.diff.gz
 
-# To avoid 'make check error'
-# Patch1:      reg-tests-3.R.patch
-# Patch2:      reg-tests-3.Rout.save.patch
-
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: gcc-c++
 BuildRequires: gcc-gfortran libgfortran
 BuildRequires: texinfo
+
 %if %{?_dist_release} == "vl6"
 BuildRequires: R-pcre-devel
 BuildRequires: tcl85-devel tk85-devel
 %endif
 %if %{?_dist_release} >= "vl7"
-BuildRequires: pcre-devel
+BuildRequires: pcre2-devel
 BuildRequires: tcl-devel tk-devel
 %endif
 BuildRequires: libpng-devel libjpeg-turbo-devel libtiff-devel
@@ -39,6 +35,8 @@ BuildRequires: libSM-devel libX11-devel libICE-devel libXt-devel libXmu-devel
 BuildRequires: cairo-devel pango-devel
 BuildRequires: libicu-devel
 BuildRequires: curl-devel
+BuildRequires: blas-devel
+
 BuildRequires: texlive-common
 BuildRequires: texlive-collection-basic
 BuildRequires: texlive-collection-latexextra
@@ -61,10 +59,14 @@ Requires: R-pcre
 %endif
 %if %{?_dist_release} >= "vl7"
 Requires: tcl tk
+Requires: pcre2
 Obsoletes: tcl85 tk85
 Obsoletes: R-pcre
 %endif
 
+Requires: blas
+Requires: openblas-Rblas
+
 Obsoletes: R-devel < %{version}-%{release}
 
 Vendor: Project Vine
@@ -97,9 +99,9 @@ Rは、条件分岐や反復計算などの制御構造を持つ正真正銘の
 使用することができる。
 
 %package -n libRmath
-Summary:          standalone math library from the R project
-Summary(ja):      単独で動作するRプロジェクトの数理ライブラリ
-Group:            System Environment/Libraries
+Summary:     standalone math library from the R project
+Summary(ja): 単独で動作するRプロジェクトの数理ライブラリ
+Group:       System Environment/Libraries
 
 %description -n libRmath
 A standalone library of mathematical and statistical functions derived
@@ -110,10 +112,10 @@ from the R project.  This packages provides the shared libRmath library.
 共有ライブラリを提供する。
 
 %package -n libRmath-devel
-Summary:          standalone math library from the R project
-Summary(ja):      libRmathの開発ライブラリ
-Group:            Development/Libraries
-Requires:         libRmath = %{version}-%{release}
+Summary:     standalone math library from the R project
+Summary(ja): libRmathの開発ライブラリ
+Group:       Development/Libraries
+Requires:    libRmath = %{version}-%{release}
 
 %description -n libRmath-devel
 A standalone library of mathematical and statistical functions derived
@@ -137,8 +139,6 @@ from the R project.  This package provides the static libRmath library.
 %{__rm} -rf ${RPM_BUILD_ROOT}
 %setup -q
 # %patch0 -p1
-# %patch1
-# %patch2
 
 cat > R.desktop <<EOF
 [Desktop Entry]
@@ -162,6 +162,7 @@ export LD_LIBRARY_PATH=%{_libdir}/R/lib
 %endif
 
 %{configure} --enable-R-shlib --with-tcltk \
+ --with-blas="-lblas" \
 %if %{?_dist_release} == "vl6"
  --with-tcl-config=%{_libdir}/tclConfig85.sh \
  --with-tk-config=%{_libdir}/tkConfig85.sh \
@@ -170,7 +171,9 @@ export LD_LIBRARY_PATH=%{_libdir}/R/lib
 %endif
 
 %{__make} %{?_smp_mflags}
-(cd src/nmath/standalone; %{__make} %{?_smp_mflags})
+pushd src/nmath/standalone
+%{__make} %{?_smp_mflags}
+popd
 %{__make} pdf
 
 %install
@@ -180,7 +183,9 @@ export LD_LIBRARY_PATH=%{_libdir}/R/lib
 %{__rm} -f ${RPM_BUILD_ROOT}%{_infodir}/dir.old
 
 # Install libRmath files
-(cd src/nmath/standalone; %{make_install})
+pushd src/nmath/standalone
+%{make_install}
+popd
 
 %{__mkdir_p} ${RPM_BUILD_ROOT}/etc/ld.so.conf.d
 echo "%{_libdir}/R/lib" > \
@@ -205,9 +210,14 @@ echo "%{_libdir}/R/lib" > \
 %{__cp} -r ${RPM_BUILD_ROOT}%{_libdir}/%{name}/doc/* \
  ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/
 
+# make symlink for libblas.so.3 (No need to use blas-devel)
+pushd ${RPM_BUILD_ROOT}%{_libdir}/R/lib
+%{__ln_s} %{_libdir}/libblas.so.3 libblas.so
+popd
+
+
 %check
-export TZ="Asia/Tokyo"
-LANG=C %{__make} check
+%{__make} check
 
 %clean
 %{__rm} -rf ${RPM_BUILD_ROOT}
@@ -215,6 +225,13 @@ LANG=C %{__make} check
 
 %post -p %{_syssbindir}/ldconfig
 
+%preun
+if [ "$1" = "0" ]
+then
+    %{__rm} -f %{_libdir}/R/lib/libblas*.so.*
+    %{__rm} -f %{_libdir}/R/lib/libopenblas*.so.*
+fi
+
 %postun -p %{_syssbindir}/ldconfig
 
 %post -n libRmath -p %{_syssbindir}/ldconfig
@@ -248,8 +265,12 @@ LANG=C %{__make} check
 
 
 %changelog
+* Fri Jun 29 2018 Toshiaki Ara <ara_t@384.jp> 3.5.0-2
+- add Requires: openblas-Rblas
+- change using system blas
+
 * Mon Apr 23 2018 Toshiaki Ara <ara_t@384.jp> 3.5.0-1
-- updated to 3.5.0
+- update to 3.5.0
 - drop Patch 1 and 2
 
 * Thu Mar 15 2018 Toshiaki Ara <ara_t@384.jp> 3.4.4-1
@@ -487,7 +508,7 @@ LANG=C %{__make} check
 - Updated to 2.5.1
 - added BuildRequires: gcc-gfortran for VineSeed
 - added BuildRequires: lapack-devel blas-devel
-v- fixed %preun script
+- fixed %preun script
 
 * Wed Dec 20 2006 Susumu Tanimura <stanimura-ngs@umin.ac.jp> 1:2.4.1-0vl1
 - Updated to 2.4.1