Gentoo Archives: gentoo-commits

From: "Denis Dupeyron (calchan)" <calchan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/R: ChangeLog R-3.1.1.ebuild
Date: Mon, 28 Jul 2014 17:33:58
Message-Id: 20140728173354.008762004E@flycatcher.gentoo.org
1 calchan 14/07/28 17:33:53
2
3 Modified: ChangeLog
4 Added: R-3.1.1.ebuild
5 Log:
6 Version bump, bug #517098.
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit)
9
10 Revision Changes Path
11 1.237 dev-lang/R/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/R/ChangeLog?rev=1.237&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/R/ChangeLog?rev=1.237&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/R/ChangeLog?r1=1.236&r2=1.237
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/R/ChangeLog,v
20 retrieving revision 1.236
21 retrieving revision 1.237
22 diff -u -r1.236 -r1.237
23 --- ChangeLog 16 Apr 2014 16:01:45 -0000 1.236
24 +++ ChangeLog 28 Jul 2014 17:33:53 -0000 1.237
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-lang/R
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/ChangeLog,v 1.236 2014/04/16 16:01:45 bicatali Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/ChangeLog,v 1.237 2014/07/28 17:33:53 calchan Exp $
30 +
31 +*R-3.1.1 (28 Jul 2014)
32 +
33 + 28 Jul 2014; Denis Dupeyron <calchan@g.o> +R-3.1.1.ebuild:
34 + Version bump, bug #517098.
35
36 16 Apr 2014; Sébastien Fabbro <bicatali@g.o> R-3.0.1.ebuild,
37 R-3.0.3.ebuild, R-3.1.0.ebuild:
38
39
40
41 1.1 dev-lang/R/R-3.1.1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/R/R-3.1.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/R/R-3.1.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: R-3.1.1.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-lang/R/R-3.1.1.ebuild,v 1.1 2014/07/28 17:33:53 calchan Exp $
51
52 EAPI=5
53
54 inherit bash-completion-r1 autotools eutils flag-o-matic fortran-2 multilib versionator toolchain-funcs
55
56 BCP=${PN}-20130129.bash_completion
57 DESCRIPTION="Language and environment for statistical computing and graphics"
58 HOMEPAGE="http://www.r-project.org/"
59 SRC_URI="
60 mirror://cran/src/base/R-3/${P}.tar.gz
61 bash-completion? ( http://dev.gentoo.org/~bicatali/distfiles/${BCP}.bz2 )"
62
63 LICENSE="|| ( GPL-2 GPL-3 ) LGPL-2.1"
64 SLOT="0"
65 KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
66 IUSE="bash-completion cairo doc icu java jpeg lapack minimal nls openmp perl png prefix profile readline static-libs tiff tk X"
67 REQUIRED_USE="png? ( || ( cairo X ) ) jpeg? ( || ( cairo X ) ) tiff? ( || ( cairo X ) )"
68
69 CDEPEND="
70 app-arch/bzip2:0=
71 app-arch/xz-utils:0=
72 app-text/ghostscript-gpl
73 >=dev-libs/libpcre-8.35:3=
74 virtual/blas:0
75 || ( >=sys-apps/coreutils-8.15 sys-freebsd/freebsd-bin app-misc/realpath )
76 cairo? ( x11-libs/cairo:0=[X] x11-libs/pango:0= )
77 icu? ( dev-libs/icu:= )
78 jpeg? ( virtual/jpeg:0 )
79 lapack? ( virtual/lapack:0 )
80 perl? ( dev-lang/perl )
81 png? ( media-libs/libpng:0= )
82 readline? ( sys-libs/readline:0= )
83 tiff? ( media-libs/tiff:0= )
84 tk? ( dev-lang/tk:0= )
85 X? ( x11-libs/libXmu:0= x11-misc/xdg-utils )"
86
87 DEPEND="${CDEPEND}
88 virtual/pkgconfig
89 doc? (
90 virtual/latex-base
91 dev-texlive/texlive-fontsrecommended
92 )"
93
94 RDEPEND="${CDEPEND}
95 ( || ( <sys-libs/zlib-1.2.5.1-r1:0= >=sys-libs/zlib-1.2.5.1-r2:0=[minizip] ) )
96 java? ( >=virtual/jre-1.5 )"
97
98 RESTRICT="minimal? ( test )"
99
100 R_DIR="${EROOT%/}/usr/$(get_libdir)/${PN}"
101
102 pkg_setup() {
103 if use openmp; then
104 if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then
105 ewarn "OpenMP is not available in your current selected gcc"
106 die "need openmp capable gcc"
107 fi
108 FORTRAN_NEED_OPENMP=1
109 fi
110 fortran-2_pkg_setup
111 filter-ldflags -Wl,-Bdirect -Bdirect
112 # avoid using existing R installation
113 unset R_HOME
114 # Temporary fix for bug #419761
115 if [[ ($(tc-getCC) == *gcc) && ($(gcc-version) == 4.7) ]]; then
116 append-flags -fno-ipa-cp-clone
117 fi
118 }
119
120 src_prepare() {
121 epatch \
122 "${FILESDIR}"/${PN}-2.11.1-parallel.patch \
123 "${FILESDIR}"/${PN}-2.13.1-zlib_header_fix.patch \
124 "${FILESDIR}"/${PN}-3.0.0-rmath-shared.patch
125
126 # fix packages.html for doc (gentoo bug #205103)
127 sed -i \
128 -e "s:../../../library:../../../../$(get_libdir)/R/library:g" \
129 src/library/tools/R/Rd.R || die
130
131 # fix Rscript path when installed (gentoo bug #221061)
132 sed -i \
133 -e "s:-DR_HOME='\"\$(rhome)\"':-DR_HOME='\"${R_DIR}\"':" \
134 src/unix/Makefile.in || die "sed unix Makefile failed"
135
136 # fix HTML links to manual (gentoo bug #273957)
137 sed -i \
138 -e 's:\.\./manual/:manual/:g' \
139 $(grep -Flr ../manual/ doc) || die "sed for HTML links failed"
140
141 use lapack && \
142 export LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)"
143
144 if use X; then
145 export R_BROWSER="$(type -p xdg-open)"
146 export R_PDFVIEWER="$(type -p xdg-open)"
147 fi
148 use perl && \
149 export PERL5LIB="${S}/share/perl:${PERL5LIB:+:}${PERL5LIB}"
150
151 # don't search /usr/local
152 sed -i -e '/FLAGS=.*\/local\//c\: # removed by ebuild' configure.ac || die
153 # Fix for Darwin (OS X)
154 if use prefix; then
155 if [[ ${CHOST} == *-darwin* ]] ; then
156 sed -i \
157 -e 's:-install_name libR.dylib:-install_name ${libdir}/R/lib/libR.dylib:' \
158 -e 's:-install_name libRlapack.dylib:-install_name ${libdir}/R/lib/libRlapack.dylib:' \
159 -e 's:-install_name libRblas.dylib:-install_name ${libdir}/R/lib/libRblas.dylib:' \
160 -e "/SHLIB_EXT/s/\.so/.dylib/" \
161 configure.ac || die
162 # sort of "undo" 2.14.1-rmath-shared.patch
163 sed -i \
164 -e "s:-Wl,-soname=libRmath.so:-install_name ${EROOT%/}/usr/$(get_libdir)/libRmath.dylib:" \
165 src/nmath/standalone/Makefile.in || die
166 else
167 append-ldflags -Wl,-rpath="${EROOT%/}/usr/$(get_libdir)/R/lib"
168 fi
169 fi
170 AT_M4DIR=m4 eaclocal
171 eautoconf
172 }
173
174 src_configure() {
175 # --with-system-tre \
176 # tre is patched from upstream
177 econf \
178 --enable-byte-compiled-packages \
179 --enable-R-shlib \
180 --disable-R-framework \
181 --with-system-zlib \
182 --with-system-bzlib \
183 --with-system-pcre \
184 --with-system-xz \
185 --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
186 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
187 rdocdir="${EPREFIX}/usr/share/doc/${PF}" \
188 $(use_enable nls) \
189 $(use_enable openmp) \
190 $(use_enable profile R-profiling) \
191 $(use_enable profile memory-profiling) \
192 $(use_enable static-libs static) \
193 $(use_enable static-libs R-static-lib) \
194 $(use_with cairo) \
195 $(use_with icu ICU) \
196 $(use_with jpeg jpeglib) \
197 $(use_with lapack) \
198 $(use_with !minimal recommended-packages) \
199 $(use_with png libpng) \
200 $(use_with readline) \
201 $(use_with tiff libtiff) \
202 $(use_with tk tcltk) \
203 $(use_with tk tk-config "${EPREFIX}"/usr/lib/tkConfig.sh) \
204 $(use_with tk tcl-config "${EPREFIX}"/usr/lib/tclConfig.sh) \
205 $(use_with X x)
206 }
207
208 src_compile() {
209 export VARTEXFONTS="${T}/fonts"
210 emake AR="$(tc-getAR)"
211 emake -C src/nmath/standalone \
212 shared $(use static-libs && echo static) AR="$(tc-getAR)"
213 use doc && emake info pdf
214 }
215
216 src_install() {
217 default
218 emake -j1 -C src/nmath/standalone DESTDIR="${D}" install
219
220 if use doc; then
221 emake DESTDIR="${D}" install-info install-pdf
222 dosym ../manual /usr/share/doc/${PF}/html/manual
223 fi
224
225 cat > 99R <<-EOF
226 LDPATH=${R_DIR}/lib
227 R_HOME=${R_DIR}
228 EOF
229 doenvd 99R
230 use bash-completion && newbashcomp "${WORKDIR}"/${BCP} ${PN}
231 # The buildsystem has a different understanding of install_names than
232 # we require. Since it builds modules like shared objects (wrong), many
233 # objects (all modules) get an incorrect install_name. Fixing the build
234 # system here is not really trivial.
235 if [[ ${CHOST} == *-darwin* ]] ; then
236 local mod
237 pushd "${ED}"/usr/lib/R > /dev/null
238 for mod in $(find . -name "*.dylib") ; do
239 mod=${mod#./}
240 install_name_tool -id "${EPREFIX}/usr/lib/R/${mod}" \
241 "${mod}"
242 done
243 popd > /dev/null
244 fi
245 docompress -x /usr/share/doc/${PF}/NEWS.rds
246 }
247
248 pkg_postinst() {
249 if use java; then
250 einfo "Re-initializing java paths for ${P}"
251 R CMD javareconf
252 fi
253 }