Gentoo Archives: gentoo-commits

From: "Sebastien Fabbro (bicatali)" <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/R: R-2.12.2.ebuild ChangeLog
Date: Tue, 01 Mar 2011 21:31:56
Message-Id: 20110301213145.D89CB20054@flycatcher.gentoo.org
1 bicatali 11/03/01 21:31:45
2
3 Modified: ChangeLog
4 Added: R-2.12.2.ebuild
5 Log:
6 Version bump. Switched to EAPI3.
7
8 (Portage version: 2.1.9.41/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.183 dev-lang/R/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/R/ChangeLog?rev=1.183&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/R/ChangeLog?rev=1.183&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/R/ChangeLog?r1=1.182&r2=1.183
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/R/ChangeLog,v
20 retrieving revision 1.182
21 retrieving revision 1.183
22 diff -u -r1.182 -r1.183
23 --- ChangeLog 4 Jan 2011 20:51:10 -0000 1.182
24 +++ ChangeLog 1 Mar 2011 21:31:45 -0000 1.183
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-lang/R
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/ChangeLog,v 1.182 2011/01/04 20:51:10 bicatali Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/ChangeLog,v 1.183 2011/03/01 21:31:45 bicatali Exp $
30 +
31 +*R-2.12.2 (01 Mar 2011)
32 +
33 + 01 Mar 2011; Sébastien Fabbro <bicatali@g.o> +R-2.12.2.ebuild:
34 + Version bump. Switched to EAPI3.
35
36 04 Jan 2011; Sébastien Fabbro <bicatali@g.o> R-2.12.1.ebuild:
37 Profiling is now turn on with a use flag
38
39
40
41 1.1 dev-lang/R/R-2.12.2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/R/R-2.12.2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/R/R-2.12.2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: R-2.12.2.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-lang/R/R-2.12.2.ebuild,v 1.1 2011/03/01 21:31:45 bicatali Exp $
51
52 EAPI=3
53 inherit eutils flag-o-matic bash-completion versionator
54
55 DESCRIPTION="Language and environment for statistical computing and graphics"
56 HOMEPAGE="http://www.r-project.org/"
57 SRC_URI="mirror://cran/src/base/R-2/${P}.tar.gz
58 bash-completion? ( mirror://gentoo/R.bash_completion.bz2 )"
59
60 LICENSE="GPL-2 LGPL-2.1"
61 SLOT="0"
62 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
63
64 IUSE="doc java jpeg lapack minimal nls perl png profile readline static-libs tk X cairo"
65
66 # common depends
67 CDEPEND="dev-libs/libpcre
68 app-arch/bzip2
69 virtual/blas
70 app-text/ghostscript-gpl
71 cairo? ( x11-libs/cairo[X]
72 || ( >=x11-libs/pango-1.20[X] <x11-libs/pango-1.20 ) )
73 jpeg? ( virtual/jpeg )
74 lapack? ( virtual/lapack )
75 perl? ( dev-lang/perl )
76 png? ( media-libs/libpng )
77 readline? ( sys-libs/readline )
78 tk? ( dev-lang/tk )
79 X? ( x11-libs/libXmu x11-misc/xdg-utils )"
80
81 DEPEND="${CDEPEND}
82 dev-util/pkgconfig
83 doc? ( virtual/latex-base
84 || ( dev-texlive/texlive-fontsrecommended
85 app-text/ptex ) )"
86
87 RDEPEND="${CDEPEND}
88 app-arch/unzip
89 app-arch/zip
90 java? ( >=virtual/jre-1.5 )"
91
92 RESTRICT="minimal? ( test )"
93
94 R_DIR="${EPREFIX}"/usr/$(get_libdir)/${PN}
95
96 pkg_setup() {
97 filter-ldflags -Wl,-Bdirect -Bdirect
98 # avoid using existing R installation
99 unset R_HOME
100 }
101
102 src_prepare() {
103 # fix ocasional failure with parallel install (bug #322965)
104 # upstream in R-12.3?
105 # https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14505
106 epatch "${FILESDIR}"/${PN}-2.11.1-parallel.patch
107 # respect ldflags on rscript
108 # upstream does not want it, no reasons given
109 # https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14506
110 epatch "${FILESDIR}"/${PN}-2.12.1-ldflags.patch
111
112 # fix packages.html for doc (bug #205103)
113 # check in later versions if fixed
114 sed -i \
115 -e "s:../../library:../../../../$(get_libdir)/R/library:g" \
116 src/library/tools/R/packageshtml.R \
117 || die "sed failed"
118
119 # fix Rscript
120 sed -i \
121 -e "s:-DR_HOME='\"\$(rhome)\"':-DR_HOME='\"${R_DIR}\"':" \
122 src/unix/Makefile.in || die "sed unix Makefile failed"
123
124 # fix HTML links to manual (bug #273957)
125 sed -i -e 's:\.\./manual/:manual/:g' $(grep -Flr ../manual/ doc) \
126 || die "sed for HTML links to manual failed"
127
128 use lapack && \
129 export LAPACK_LIBS="$(pkg-config --libs lapack)"
130
131 if use X; then
132 export R_BROWSER="$(type -p xdg-open)"
133 export R_PDFVIEWER="$(type -p xdg-open)"
134 fi
135 use perl && \
136 export PERL5LIB="${S}/share/perl:${PERL5LIB:+:}${PERL5LIB}"
137 }
138
139 src_configure() {
140 econf \
141 --enable-R-shlib \
142 --with-system-zlib \
143 --with-system-bzlib \
144 --with-system-pcre \
145 --with-blas="$(pkg-config --libs blas)" \
146 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
147 rdocdir="${EPREFIX}"/usr/share/doc/${PF} \
148 $(use_enable nls) \
149 $(use_enable profile R-profiling) \
150 $(use_enable profile memory-profiling) \
151 $(use_enable static-libs static) \
152 $(use_enable static-libs R-static-lib) \
153 $(use_with lapack) \
154 $(use_with tk tcltk) \
155 $(use_with jpeg jpeglib) \
156 $(use_with !minimal recommended-packages) \
157 $(use_with png libpng) \
158 $(use_with readline) \
159 $(use_with cairo) \
160 $(use_with X x)
161 }
162
163 src_compile(){
164 export VARTEXFONTS="${T}/fonts"
165 emake || die "emake failed"
166 RMATH_V=0.0.0
167 emake -C src/nmath/standalone \
168 libRmath_la_LDFLAGS=-Wl,-soname,libRmath.so.${RMATH_V} \
169 || die "emake math library failed"
170 if use doc; then
171 emake info pdf || die "emake docs failed"
172 fi
173 }
174
175 src_install() {
176 emake DESTDIR="${D}" install || die "emake install failed"
177
178 if use doc; then
179 emake DESTDIR="${D}" \
180 install-info install-pdf || die "emake install docs failed"
181 dosym /usr/share/doc/${PF}/manual /usr/share/doc/${PF}/html/manual
182 fi
183
184 # standalone math lib install (-j1 basically harmless)
185 emake \
186 -C src/nmath/standalone \
187 DESTDIR="${D}" install \
188 || die "emake install math library failed"
189
190 local mv=$(get_major_version ${RMATH_V})
191 mv "${ED}"/usr/$(get_libdir)/libRmath.so \
192 "${ED}"/usr/$(get_libdir)/libRmath.so.${RMATH_V}
193 dosym libRmath.so.${RMATH_V} /usr/$(get_libdir)/libRmath.so.${mv}
194 dosym libRmath.so.${mv} /usr/$(get_libdir)/libRmath.so
195
196 # env file
197 cat > 99R <<-EOF
198 LDPATH=${R_DIR}/lib
199 R_HOME=${R_DIR}
200 EOF
201 doenvd 99R || die "doenvd failed"
202 dobashcompletion "${WORKDIR}"/R.bash_completion
203 }
204
205 pkg_postinst() {
206 if use java; then
207 einfo "Re-initializing java paths for ${P}"
208 R CMD javareconf
209 fi
210 }