Gentoo Archives: gentoo-commits

From: Mark Wright <gienah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/R/
Date: Tue, 03 Jul 2018 00:48:43
Message-Id: 1530578844.c13cb5aef5770ba3e947fb4891b955ce1ebd6b71.gienah@gentoo
1 commit: c13cb5aef5770ba3e947fb4891b955ce1ebd6b71
2 Author: Mark Wright <gienah <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 2 11:28:58 2018 +0000
4 Commit: Mark Wright <gienah <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 3 00:47:24 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c13cb5ae
7
8 dev-lang/R: Bump to 3.5.1 RC
9
10 Thanks to Neil for reporting, John Dough and Daniel M. Weeks for commenting.
11 Bug: https://bugs.gentoo.org/632364
12 Package-Manager: Portage-2.3.41, Repoman-2.3.9
13
14 dev-lang/R/Manifest | 1 +
15 dev-lang/R/R-3.5.1_rc.ebuild | 207 +++++++++++++++++++++++++++++++++++++++++++
16 2 files changed, 208 insertions(+)
17
18 diff --git a/dev-lang/R/Manifest b/dev-lang/R/Manifest
19 index bf671c6578e..d69ac509af6 100644
20 --- a/dev-lang/R/Manifest
21 +++ b/dev-lang/R/Manifest
22 @@ -3,3 +3,4 @@ DIST R-3.2.2.tar.gz 29772864 BLAKE2B f3f7ff9b9bd3cf685712e8997dd5a511a47e56ed261
23 DIST R-3.3.2.tar.gz 29440670 BLAKE2B 37308fb0caf19c33196b496d5b6f2f1b5b6f75e3ed985f2f0c4b0633d6191181de7f4cbd1ec986d76089a101d8895493cfe3b8563cfbc36f0b72a1ea14c748c5 SHA512 06a98687c0b180cb0bfd57440ea26088212d9f48948d503136475bf54b42d72cfec5bea7e333c0cedd60733bd614dd0f8c2eced7e24478b6c89f48e8d0c43482
24 DIST R-3.4.1.tar.gz 30200109 BLAKE2B 03602e9a48759caee8ce047fa6273df7a54af089de4489e21953c0e3fc7bfdf720d924f1e0167d3dbf65f63ed42ac10dea8b45289b921cda1c0e6d25a0063ebb SHA512 19bd50c87dc001ef947c15c1760f27ac8986ff6b43c6d90d3093ae184e42963027ef06faf31ec57ac9e519af7a35a2f53f8ea23ef75d800ebbd02945cedc4651
25 DIST R-78d6830e28ea90a046da79a9b4f70c39594bb6d6.bash_completion 13596 BLAKE2B 53338e4a1c4f68beb69247216e553dbcac47f660fbf032bfebf7a660e32d2cff5b11ed35411c52de7e1fd6e00bbf5b5ea19369a325fa0a38bd93d63dc3288cbd SHA512 9ccd19bb1b0c18a2f13035ccd6809447429e197e298fb4d1df808ef345d723b42f75a1b91c349f6dbb46e4a82e59ef33e11300c495d79b63d670d0c0f2b16a06
26 +DIST R-patched_2018-06-29.tar.gz 29775566 BLAKE2B 905f2cacd01d151f4d35f1dcba5cdc850958f1dae2ecb334932ec652dad5f964ed861c54878dfee2b6c2880d4ea7894e1e71384975d90a2653f9289fa94e6f82 SHA512 2dafcd57e7821f5ccbce44915e312d24f13de35e6c9ece13185c941de1f4c71e52151a44dc0ad801fac90e0955a26d5c6b47d89656c07cddf4959b34a935d0f9
27
28 diff --git a/dev-lang/R/R-3.5.1_rc.ebuild b/dev-lang/R/R-3.5.1_rc.ebuild
29 new file mode 100644
30 index 00000000000..c77d3ebacb4
31 --- /dev/null
32 +++ b/dev-lang/R/R-3.5.1_rc.ebuild
33 @@ -0,0 +1,207 @@
34 +# Copyright 1999-2018 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +inherit bash-completion-r1 autotools eutils flag-o-matic fortran-2 multilib versionator toolchain-funcs
40 +
41 +# latest git commit for R bash completion: https://github.com/deepayan/rcompletion
42 +BCPV=78d6830e28ea90a046da79a9b4f70c39594bb6d6
43 +
44 +DESCRIPTION="Language and environment for statistical computing and graphics"
45 +HOMEPAGE="http://www.r-project.org/"
46 +# This release candidate is not on the CRAN mirrors
47 +SRC_URI="
48 + https://stat.ethz.ch/R/daily/R-patched_2018-06-29.tar.gz
49 + https://raw.githubusercontent.com/deepayan/rcompletion/${BCPV}/bash_completion/R -> ${PN}-${BCPV}.bash_completion"
50 +
51 +LICENSE="|| ( GPL-2 GPL-3 ) LGPL-2.1"
52 +SLOT="0"
53 +KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
54 +IUSE="cairo doc icu java jpeg lapack minimal nls openmp perl png prefix profile readline static-libs tiff tk X"
55 +REQUIRED_USE="png? ( || ( cairo X ) ) jpeg? ( || ( cairo X ) ) tiff? ( || ( cairo X ) )"
56 +
57 +CDEPEND="
58 + app-arch/bzip2:0=
59 + app-arch/xz-utils:0=
60 + app-text/ghostscript-gpl
61 + >=dev-libs/libpcre-8.35:3=
62 + net-misc/curl
63 + virtual/blas:0
64 + || ( >=sys-apps/coreutils-8.15 sys-freebsd/freebsd-bin app-misc/realpath )
65 + cairo? ( x11-libs/cairo:0=[X] x11-libs/pango:0= )
66 + icu? ( dev-libs/icu:= )
67 + jpeg? ( virtual/jpeg:0 )
68 + lapack? ( virtual/lapack:0 )
69 + perl? ( dev-lang/perl )
70 + png? ( media-libs/libpng:0= )
71 + readline? ( sys-libs/readline:0= )
72 + tiff? ( media-libs/tiff:0= )
73 + tk? ( dev-lang/tk:0= )
74 + X? ( x11-libs/libXmu:0= x11-misc/xdg-utils )"
75 +
76 +DEPEND="${CDEPEND}
77 + virtual/pkgconfig
78 + doc? (
79 + virtual/latex-base
80 + dev-texlive/texlive-fontsrecommended
81 + )"
82 +
83 +RDEPEND="${CDEPEND}
84 + >=sys-libs/zlib-1.2.5.1-r2:0[minizip]
85 + java? ( >=virtual/jre-1.5 )"
86 +
87 +RESTRICT="minimal? ( test )"
88 +
89 +PATCHES=(
90 + "${FILESDIR}"/${PN}-3.4.1-parallel.patch
91 + "${FILESDIR}"/${PN}-3.4.1-rmath-shared.patch
92 +)
93 +
94 +S="${WORKDIR}/R-rc"
95 +
96 +pkg_pretend() {
97 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
98 +}
99 +
100 +pkg_setup() {
101 + if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
102 + if ! tc-check-openmp; then
103 + ewarn "OpenMP is not available in your current selected compiler"
104 + die "need openmp capable compiler"
105 + fi
106 + FORTRAN_NEED_OPENMP=1
107 + fi
108 + fortran-2_pkg_setup
109 + filter-ldflags -Wl,-Bdirect -Bdirect
110 + # avoid using existing R installation
111 + unset R_HOME
112 + # Temporary fix for bug #419761
113 + if [[ ($(tc-getCC) == *gcc) && ($(gcc-version) == 4.7) ]]; then
114 + append-flags -fno-ipa-cp-clone
115 + fi
116 +}
117 +
118 +src_prepare() {
119 + default
120 +
121 + # fix packages.html for doc (gentoo bug #205103)
122 + sed -e "s:../../../library:../../../../$(get_libdir)/R/library:g" \
123 + -i src/library/tools/R/Rd.R || die
124 +
125 + # fix Rscript path when installed (gentoo bug #221061)
126 + sed -e "s:-DR_HOME='\"\$(rhome)\"':-DR_HOME='\"${EROOT%/}/usr/$(get_libdir)/${PN}\"':" \
127 + -i src/unix/Makefile.in || die "sed unix Makefile failed"
128 +
129 + # fix HTML links to manual (gentoo bug #273957)
130 + sed -e 's:\.\./manual/:manual/:g' \
131 + -i $(grep -Flr ../manual/ doc) || die "sed for HTML links failed"
132 +
133 + use lapack && \
134 + export LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)"
135 +
136 + if use X; then
137 + export R_BROWSER="$(type -p xdg-open)"
138 + export R_PDFVIEWER="$(type -p xdg-open)"
139 + fi
140 + use perl && \
141 + export PERL5LIB="${S}/share/perl:${PERL5LIB:+:}${PERL5LIB}"
142 +
143 + # don't search /usr/local
144 + sed -i -e '/FLAGS=.*\/local\//c\: # removed by ebuild' configure.ac || die
145 + # Fix for Darwin (OS X)
146 + if use prefix; then
147 + if [[ ${CHOST} == *-darwin* ]] ; then
148 + sed -e 's:-install_name libR.dylib:-install_name ${libdir}/R/lib/libR.dylib:' \
149 + -e 's:-install_name libRlapack.dylib:-install_name ${libdir}/R/lib/libRlapack.dylib:' \
150 + -e 's:-install_name libRblas.dylib:-install_name ${libdir}/R/lib/libRblas.dylib:' \
151 + -e "/SHLIB_EXT/s/\.so/.dylib/" \
152 + -i configure.ac || die
153 + # sort of "undo" 2.14.1-rmath-shared.patch
154 + sed -e "s:-Wl,-soname=libRmath.so:-install_name ${EROOT%/}/usr/$(get_libdir)/libRmath.dylib:" \
155 + -i src/nmath/standalone/Makefile.in || die
156 + else
157 + append-ldflags -Wl,-rpath="${EROOT%/}/usr/$(get_libdir)/R/lib"
158 + fi
159 + fi
160 + AT_M4DIR=m4
161 + eautoreconf
162 +}
163 +
164 +src_configure() {
165 + # --with-system-tre \
166 + # tre is patched from upstream
167 + econf \
168 + --enable-byte-compiled-packages \
169 + --enable-R-shlib \
170 + --disable-R-framework \
171 + --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
172 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
173 + rdocdir="${EPREFIX}/usr/share/doc/${PF}" \
174 + $(use_enable java) \
175 + $(use_enable nls) \
176 + $(use_enable openmp) \
177 + $(use_enable profile R-profiling) \
178 + $(use_enable profile memory-profiling) \
179 + $(use_enable static-libs static) \
180 + $(use_enable static-libs R-static-lib) \
181 + $(use_with cairo) \
182 + $(use_with icu ICU) \
183 + $(use_with jpeg jpeglib) \
184 + $(use_with lapack) \
185 + $(use_with !minimal recommended-packages) \
186 + $(use_with png libpng) \
187 + $(use_with readline) \
188 + $(use_with tiff libtiff) \
189 + $(use_with tk tcltk) \
190 + $(use_with tk tk-config "${EPREFIX}"/usr/$(get_libdir)/tkConfig.sh) \
191 + $(use_with tk tcl-config "${EPREFIX}"/usr/$(get_libdir)/tclConfig.sh) \
192 + $(use_with X x)
193 +}
194 +
195 +src_compile() {
196 + export VARTEXFONTS="${T}/fonts"
197 + emake AR="$(tc-getAR)"
198 + emake -C src/nmath/standalone \
199 + shared $(use static-libs && echo static) AR="$(tc-getAR)"
200 + use doc && emake info pdf
201 +}
202 +
203 +src_install() {
204 + default
205 + emake -j1 -C src/nmath/standalone DESTDIR="${D}" install
206 +
207 + if use doc; then
208 + emake DESTDIR="${D}" install-info install-pdf
209 + dosym ../manual /usr/share/doc/${PF}/html/manual
210 + fi
211 +
212 + cat > 99R <<-EOF
213 + LDPATH=${EROOT%/}/usr/$(get_libdir)/${PN}/lib
214 + R_HOME=${EROOT%/}/usr/$(get_libdir)/${PN}
215 + EOF
216 + doenvd 99R
217 + newbashcomp "${DISTDIR}"/${PN}-${BCPV}.bash_completion ${PN}
218 + # The buildsystem has a different understanding of install_names than
219 + # we require. Since it builds modules like shared objects (wrong), many
220 + # objects (all modules) get an incorrect install_name. Fixing the build
221 + # system here is not really trivial.
222 + if [[ ${CHOST} == *-darwin* ]] ; then
223 + local mod
224 + pushd "${ED}"/usr/$(get_libdir)/R > /dev/null
225 + for mod in $(find . -name "*.dylib") ; do
226 + mod=${mod#./}
227 + install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/R/${mod}" \
228 + "${mod}"
229 + done
230 + popd > /dev/null
231 + fi
232 + docompress -x /usr/share/doc/${PF}/{BioC_mirrors.csv,CRAN_mirrors.csv,KEYWORDS.db,NEWS.rds}
233 +}
234 +
235 +pkg_postinst() {
236 + if use java; then
237 + einfo "Re-initializing java paths for ${P}"
238 + R CMD javareconf
239 + fi
240 +}