Sophie

Sophie

distrib > Mandriva > 2009.1 > i586 > media > main-release-src > by-pkgid > edaf45674119c9ec6304f76a86753895 > files > 6

R-base-2.8.1-6mdv2009.1.src.rpm

%define libname %mklibname Rmath
# (tpg) really not needed
# for private copy in /usr/lib/R/share/perl/Text/DelimMatch.pm 
%define _provides_exceptions KernSmooth.so\\|MASS.so\\|R_X11.so\\|class.so\\|cluster.so\\|foreign.so\\|grDevices.so\\|grid.so\\|internet.so\\|lapack.so\\|lattice.so\\|libR.so\\|libRblas.so\\|libRlapack.so\\|methods.so\\|mgcv.so\\|nlme.so\\|nnet.so\\|rpart.so\\|spatial.so\\|splines.so\\|stats.so\\|survival.so\\|tcltk.so\\|tools.so\\|vfonts.so\\|perl\(R::.*\)
%define _requires_exceptions libR.so\\|libRblas.so\\|libRlapack.so\\|perl\(R::.*\)

%define _disable_ld_no_undefined 1

Summary:	A language for data analysis and graphics
Name:		R-base
Version:	2.8.1
Release:	%mkrel 6
License:	GPLv2+
Group:		Sciences/Mathematics
URL:		http://www.r-project.org
Source0:	http://cran.r-project.org/src/base/R-2/R-%{version}.tar.lzma
Source1:        R-icons-png.tar.bz2
Source2:	R.bash_completion.bz2
Patch0:         R-2.8.1-menu.patch
Patch2:		R-2.8.1-underlinking.patch
Patch3:		R-2.7.2-CVE-2008-3931.patch
Patch4:		R-2.8.1-format_not_a_string_literal_and_no_format_arguments.patch
BuildRequires:	pth-devel
BuildRequires:	glibc-static-devel
BuildRequires:	gcc-c++
BuildRequires:	cups-common
BuildRequires:	bzip2-devel
BuildRequires:	gcc-gfortran
BuildRequires:	gpm-devel
BuildRequires:	ncurses-devel
BuildRequires:	readline-devel
BuildRequires:	tk-devel
Buildrequires:	tcl
BuildRequires:	tcl-devel
BuildRequires:	texinfo
BuildRequires:	tetex-latex
BuildRequires:  X11-devel
BuildRequires:	png-devel
BuildRequires:	jpeg-devel
BuildRequires:	pcre-devel
BuildRequires:	bison
BuildRequires:	xdg-utils
BuildRequires:	java-rpmbuild
BuildRequires:	paper-utils
BuildRequires:	cairo-devel
BuildRequires:	pango-devel
BuildRequires:	libtiff-devel
BuildRequires:	zip
%if %mdkversion >= 200900
BuildRequires:	lapack-devel
BuildRequires:	blas-devel
%endif
BuildRequires:	gcc-objc
BuildRequires:	gcc-objc++
BuildRequires:	imake
BuildRequires:	gettext-devel
BuildRequires:	glibc-static-devel
BuildRequires:	pth-devel
#BuildRequires:	gnustep-make
#BuildRequires:	libgnustep-base-devel
#BuildRequires:	gnustep-base
Requires:	tcl
Requires:	tk
Requires:	perl
Requires:	sed
Requires:	x11-font-adobe-100dpi
Provides:	R
Obsoletes:	R-recommended <= 1.5.1
Provides:	R-recommended
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description 
`GNU S' - A language and environment for statistical computing and
graphics. R is similar to the S system, which was developed at Bell
Laboratories by John Chambers et al. It provides a wide variety of
statistical and graphical techniques (linear and nonlinear modelling,
statistical tests, time series analysis, classification, clustering, ...).

R is designed as a true computer language with control-flow
constructions for iteration and alternation, and it allows users to
add additional functionality by defining new functions. For
computationally intensive tasks, C, C++ and Fortran code can be linked
and called at run time.

%package -n %{libname}
Summary:	Standalone math library from the R project
Group:		Development/Other

%description -n %{libname}
A standalone library of mathematical and statistical functions derived
from the R project.  This packages provides the shared libRmath library.

%package -n %{libname}-devel
Summary:	Standalone math library from the R project
Group:		Development/Other
Provides:	libRmath-devel = %{version}-%{release}
Requires:	%{libname} = %{version}-%{release}

%description -n %{libname}-devel
A standalone library of mathematical and statistical functions derived
from the R project.  This packages provides the static libRmath library
and header files.

%prep
%setup -qn R-%{version}
%patch0 -p1
#%patch2 -p1
#patch3 -p1 -b .cve
%patch4 -p1

#perl -pi -e "s/firefox/mozilla-firefox/" m4/R.m4 configure
#rm -f acinclude.m4
aclocal -I ./m4
autoconf --force
#autoreconf -fiv

%build
export R_BROWSER="$(type -p xdg-open)"
export R_PDFVIEWER="$(type -p xdg-open)"
export R_PRINTCMD="lpr"
#export R_BROWSER="%{_bindir}/mozilla-firefox"

# (tpg) do not set R_LIBS #37781
#echo 'R_LIBS=${R_LIBS-'"'%{_libdir}/R/lib'"'}' >> etc/Renviron.in
# (tpg) try to not build with -ffast-math
export CFLAGS=$(echo "%{optflags}" | sed -e s/-ffast-math/-fno-fast-math/g )
export CFLAGS="%{optflags}"
export FFLAGS=$CFLAGS
export CXXFLAGS=$CFLAGS
export FCFLAGS=$CFLAGS
export OBJCFLAGS=$CFLAGS
export F77="gfortran"
export JAVA_HOME="%{java_home}"
export FPICFLAGS=-fPIC
unset DISPLAY



%configure2_5x \
	--with-tcltk \
	--with-tcl-config=%{_libdir}/tclConfig.sh \
	--with-tk-config=%{_libdir}/tkConfig.sh \
	--enable-mbcs \
	--with-iconv \
	--disable-rpath \
	--with-cairo \
	--with-libpng \
	--with-jpeglib \
	--with-system-zlib \
	--with-system-bzlib \
	--with-system-pcre \
	--with-readline \
	%if %mdkversion >= 200900
	--disable-BLAS-shlib \
	%else
	--enable-BLAS-shlib \
	%endif
	%if %mdkversion >= 200900
	--with-lapack=%{_libdir} \
	--with-blas=%{_libdir} \
	%endif
	--enable-threads=pth \
	--enable-R-profiling \
	--enable-R-shlib

# (tpg) somehow --prefix is not honored
sed -i -e 's#/usr/local#%{_prefix}#g' Makeconf

%make

pushd src/nmath/standalone 
make
popd

%make pdf
%make info

# DON'T comment "make check" below! If R doesn't pass the 'check' test
# then it is probably badly compiled, or there are problems with
# the compiler.

# (tpg) disable for now checks for ix86, because they fails only in iurt!

%ifnarch %{ix86}
%check
make check
%endif

%install
rm -rf %{buildroot}

# (tpg) makeinstall_std is broken here
%makeinstall install-info rhome=%{buildroot}%{_libdir}/R

pushd src/nmath/standalone
%makeinstall \
    includedir=%{buildroot}%{_includedir} \
    libdir=%{buildroot}%{_libdir}
popd

mv doc/manual/*.pdf $RPM_BUILD_DIR/R-%{version} || :

# Remove latex versions of help pages
#
rm -rf %{buildroot}%{_libdir}/R/library/*/latex/

# Get rid of buildroot in script
for i in %{buildroot}%{_libdir}/R/bin/R %{buildroot}%{_bindir}/R %{buildroot}%{_libdir}/pkgconfig/libR*.pc;
do
  sed -i "s|%{buildroot}||g" $i;
done

# Remove package indices. They are rebuilt by the postinstall script.
#
rm -f %{buildroot}%{_libdir}/R/doc/html/function.html
rm -f %{buildroot}%{_libdir}/R/doc/html/packages.html
rm -f %{buildroot}%{_libdir}/R/doc/html/search/index.txt

# Fix permissions
chmod 644 %{buildroot}%{_libdir}/R/library/MASS/scripts/*
chmod 755 %{buildroot}%{_libdir}/R/share/sh/help-links.sh
chmod 755 %{buildroot}%{_libdir}/R/share/sh/help-print.sh
chmod 755 %{buildroot}%{_libdir}/R/share/sh/echo.sh

mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop <<EOF
[Desktop Entry]
Name=R
Comment=A language for statistical computing
Exec=%{_bindir}/R --gui=tk
Terminal=true
Type=Application
Icon=Rlogo
Categories=Science;Math;
EOF

# icons
mkdir -p %{buildroot}%{_iconsdir}
tar xjf %{SOURCE1} -C %{buildroot}%{_iconsdir}

# remove unpackaged files
rm -f %{buildroot}%{_infodir}/dir{,.old*}

# remove private perl libraries
rm -rf %{buildroot}%{_libdir}/R/share/perl/File
rm -rf %{buildroot}%{_libdir}/R/share/perl/Text

# (tpg) add bash completion file
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
bzcat %{SOURCE2} > %{buildroot}%{_sysconfdir}/bash_completion.d/R-base

%find_lang %{name}

%clean
rm -rf %{buildroot}

%post
%if %mdkversion < 200900
%{update_menus}
%update_icon_cache hicolor
%endif
%_install_info R-admin.info
%_install_info R-data.info
%_install_info R-exts.info
%_install_info R-FAQ.info
%_install_info R-intro.info
%_install_info R-lang.info
%{_bindir}/R CMD perl %{_libdir}/R/share/perl/build-help.pl --htmllist > /dev/null 2>&1
cat %{_libdir}/R/library/*/CONTENTS > %{_libdir}/R/doc/html/search/index.txt

%preun 
if [ $1 = 0 ]; then
rm -f %{_libdir}/R/doc/html/function.html \
	 %{_libdir}/R/doc/html/packages.html \
	 %{_libdir}/R/doc/html/search/index.txt
%_remove_install_info R-admin.info
%_remove_install_info R-data.info
%_remove_install_info R-exts.info
%_remove_install_info R-FAQ.info
%_remove_install_info R-intro.info
%_remove_install_info R-lang.info
fi

%if %mdkversion < 200900
%postun
%{clean_menus}
%clean_icon_cache hicolor
%endif

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif
%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%files -f %{name}.lang
%defattr(-,root,root)
%doc README VERSION NEWS
%doc R-admin.pdf R-data.pdf R-exts.pdf R-FAQ.pdf R-intro.pdf R-lang.pdf refman.pdf
%{_sysconfdir}/bash_completion.d/*
%{_bindir}/R
%{_bindir}/Rscript
%{_mandir}/*/*
%{_libdir}/R
%{_infodir}/*.info*
%{_iconsdir}/*.*
%{_liconsdir}/*.*
%{_miconsdir}/*.*
%{_datadir}/applications/*.desktop
%{_libdir}/pkgconfig/libR.pc

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libRmath.so

%files -n %{libname}-devel
%defattr(-,root,root)
%{_libdir}/libRmath.a
%{_includedir}/Rmath.h
%{_libdir}/pkgconfig/libRmath.pc


%changelog
* Wed Mar 18 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 2.8.1-6mdv2009.1
+ Revision: 357464
- disable for now checks for ix86, because they fails only in iurt
- rebuild
- rebuild
- define _disable_ld_no_undefined 1, because i have no idea how to fix Makefile compressed into tarball, R kernel modules
- patch 1 is not needed anymore
- update to new version 2.8.1
- export compiles flags by using %%setup_compile_flags macro

  + Guillaume Rousse <guillomovitch@mandriva.org>
    - add pth-devel and glibc-static-devel to build dependencies
    - rebuild for latest tk libs

  + Thierry Vignaud <tvignaud@mandriva.com>
    - rebuild for new libreadline

* Fri Oct 31 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.8.0-1mdv2009.1
+ Revision: 299061
- disable patch 3 for now
- disable patch 1 for now
- update to new version 2.8.0

* Wed Sep 17 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.7.2-2mdv2009.0
+ Revision: 285483
- Patch3: security fix for CVE-2008-3931

* Tue Aug 26 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.7.2-1mdv2009.0
+ Revision: 276262
- update to new version 2.7.2

* Thu Aug 07 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.7.1-2mdv2009.0
+ Revision: 266675
- disable -ffast-math flag as it breaks tests
- add conditionals for mdv 200900
- Patch1: fix detection of bzip2 version
- Patch2: fix underlinking (work in progress)
- use %%{_prefix} instead of hardcoded /usr/local
- compile against system wide blas and lapack (disabled --enable-BLAS-shlib)
- use pth threads
- use _disable_ld_no_undefined to fix build
- add missing buildrequires on imake, gcc-objc, gcc-objc++ and gettext-devel
- require x11-font-adobe-100dpi
- add buildrequires on zip
- do not set R_LIBS variable (#37781)
- add requires on x11-font-adobe-75dpi, as it was pointed on cooker ML
- try to build with enabled -ffast-math
- update to new version 2.7.1

  + Thierry Vignaud <tvignaud@mandriva.com>
    - rebuild early 2009.0 package (before pixel changes)

  + Pixel <pixel@mandriva.com>
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas
    - fix typo calling %%clean_icon_cache in %%postun
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Thu Apr 24 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.7.0-4mdv2009.0
+ Revision: 197249
- add buildrequires on pango, cairo and tiff

* Thu Apr 24 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.7.0-3mdv2009.0
+ Revision: 197243
- new version

* Mon Feb 11 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.2-3mdv2008.1
+ Revision: 165448
- revert my last commit (lapack & blas)
- use system blas and lapack libraries
- add bash completion file

* Mon Feb 11 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.2-2mdv2008.1
+ Revision: 165176
- use xdg-open instead of hardcoding pdfviewer and web browser

* Sun Feb 10 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.2-1mdv2008.1
+ Revision: 164979
- enable java support
- add missing build requires on bison and paper-utils
- export FCFLAGS and OBJCFLAGS
- use xpdf as a default pdf viewer
- do not compile with -ffast-math, as it breaks checks
- new version 2.6.2

* Wed Dec 19 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.1-4mdv2008.1
+ Revision: 133819
- fix exceptions for package requires

* Sun Dec 16 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.1-3mdv2008.1
+ Revision: 120664
- add requires exceptions on perl(R::*)
- new license policy
- do not package COPYING file
- add missing scriplets

* Wed Dec 12 2007 Guillaume Rousse <guillomovitch@mandriva.org> 2.6.1-2mdv2008.1
+ Revision: 118467
- don't provide private perl libraries
  don't even ship private copies of standard ones

* Tue Nov 27 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.1-1mdv2008.1
+ Revision: 113286
- new version

* Tue Oct 09 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.0-1mdv2008.1
+ Revision: 96121
- new version
- requires tk

* Fri Sep 07 2007 Anssi Hannula <anssi@mandriva.org> 2.5.1-3mdv2008.0
+ Revision: 82069
- buildrequires tcl-devel
- rebuild for new soname of tcl

* Thu Sep 06 2007 Adam Williamson <awilliamson@mandriva.org> 2.5.1-2mdv2008.0
+ Revision: 81307
- menu entry fix for #33216

* Tue Jul 03 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.1-1mdv2008.0
+ Revision: 47695
- drop patch 1
- new version

* Sat Jun 16 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-7mdv2008.0
+ Revision: 40396
- blacklist self-requires on libraries

* Sat Jun 16 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-6mdv2008.0
+ Revision: 40300
- really remove unneeded requires
- blacklist libraries as a provides

* Fri Jun 15 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-5mdv2008.0
+ Revision: 39940
- blacklist lapack.so from provides
- fix bug #31177
- evince is now default pdf viewer
- fix file list
- get rid of ld.so.conf.d stuff

* Sat May 05 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-4mdv2008.0
+ Revision: 23202
- R doesn't set its own library path, now it does
- correct requires on R and libRmath
- drop unused directory

* Thu May 03 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-3mdv2008.0
+ Revision: 21963
- enable libRmath compiling
- add reworked P1 from Fedora
- added some stuff - hope rkward will work

* Mon Apr 30 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-2mdv2008.0
+ Revision: 19462
- remove buildrequires on liblapack-devel
- drop P0 (seems to be not needed)
- revoke dead configure options and add new ones
- fix buildrequires
- drop old menu style

* Thu Apr 26 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-1mdv2008.0
+ Revision: 18415
- new version
- own missing files


* Sun Feb 18 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.4.1-2mdv2007.0
+ Revision: 122253
- xdg menus.

* Fri Feb 09 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.4.1-1mdv2007.1
+ Revision: 118653
- Release 2.4.1.

* Wed Nov 15 2006 Olivier Blin <oblin@mandriva.com> 2.4.0-1mdv2007.1
+ Revision: 84511
- 2.4.0
- Import R-base

* Mon Jun 19 2006 Stefan van der Eijk <stefan@eijk.nu.lurtspam> 2.3.1-1mdv2007.0
- rebuild for png

* Sat Jun 03 2006 Jerome Soyer <saispo@mandriva.org> 2.3.1-1mdv2007.0
- New release 2.3.1

* Sat May 20 2006 Jerome Soyer <saispo@mandriva.org> 2.2.1-2mdk
- Rebuild for the new glibc

* Fri Mar 10 2006 Giuseppe Ghibò <ghibo@mandriva.com> 2.2.1-1mdk
- Release 2.2.1.

* Sun Jan 01 2006 Oden Eriksson <oeriksson@mandriva.com> 2.2.0-5mdk
- rebuilt against soname aware deps

* Sat Dec 10 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.2.0-4mdk
- Don't use parallel build for %%make check
- Added cups-common to BuildRequires.

* Wed Dec 07 2005 Giuseppe Ghibò <ghibo@mandriva.org> 2.2.0-3mdk
- fix bug #19905.

* Sun Nov 27 2005 Michael Scherer <misc@mandriva.org> 2.2.0-2mdk
- do not provides perl(Text::DelimMatch)

* Thu Oct 20 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.2.0-1mdk
- Release: 2.2.0.

* Fri Aug 05 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.1.1-2mdk
- Fix BuildRequires

* Thu Aug 04 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.1.1-1mdk
- Release: 2.1.1.

* Fri Jun 17 2005 Couriousous <couriousous@mandriva.org> 2.1.0-2mdk
- Better fix for gcc4 bug
- Patch to allow R starting from desktop menu

* Sun May 08 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.1.0-1mdk
- Merged fixes from Couriousous <couriousous@mandriva.org>:
  - Release: 2.1.0.
  - Enable shared lib.
  - gnome gui is no more provided, use tk one in the menu.
  - Enable Large file support ( > 2Go ).
- lowered optimization from -O2 to -O1 due to gcc/gfortran bugs.
- fixed gcc-g77 BuildRequires.

* Sun Apr 17 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0.1-5mdk
- Replaced libblas3-devel with libblas-devel in BuildConflicts
  (for X86_64).

* Wed Mar 23 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0.1-4mdk
- Added Patch1 for supporting www-browser.

* Sat Jan 22 2005 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 2.0.1-3mdk
- rebuild for new readline
- wipe out buildroot at the beginning of %%install
- cosmetics

* Thu Dec 16 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0.1-2mdk
- Added libgnome-devel, libglade-devel to BuildRequires.

* Sun Dec 05 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0.1-1mdk
- Release 2.0.1.
- Removed Patch1 (RestoreAction), merged upstream.

* Sat Nov 13 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0.0-1mdk
- Release 2.0.0.
- Removed Patch1, merged upstream.
- Added Patch1 (RestoreAction) for fixing undefined (RestoreAction) in 
  R_gnome.so.

* Tue Oct 05 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.9.1-3mdk
- Added --gui=gnome to menu entry.
- Added Patch1 to allow R starting from desktop menu.

* Tue Aug 17 2004 Laurent MONTEL <lmontel@mandrakesoft.com> 1.9.1-2mdk
- Rebuild with new menu

* Tue Jul 20 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.9.1-1mdk
- Release 1.9.1.
- Removed Patch1.