dev-lang/R: new revision that leaves more docs uncompressed.
authorMichael Orlitzky <mjo@gentoo.org>
Fri, 17 Apr 2020 23:23:38 +0000 (19:23 -0400)
committerMichael Orlitzky <mjo@gentoo.org>
Sat, 18 Apr 2020 01:31:10 +0000 (21:31 -0400)
The R interactive shell encourages users to read several documentation
files using functions like contributors() and RShowDoc() that rely on
the files being installed with their god-given names. This new revision
tries to fix a few of the more common ones with docompress -x.

Closes: https://bugs.gentoo.org/556706
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
dev-lang/R/R-3.6.3-r1.ebuild [moved from dev-lang/R/R-3.6.3.ebuild with 86% similarity]

similarity index 86%
rename from dev-lang/R/R-3.6.3.ebuild
rename to dev-lang/R/R-3.6.3-r1.ebuild
index f797705dcd70cd0d1df7e636398f247eade77dfc..0f45bd0490e6aa7616ca420de48bb148f980004b 100644 (file)
@@ -189,7 +189,37 @@ src_install() {
                done
                popd > /dev/null
        fi
-       docompress -x /usr/share/doc/${PF}/{BioC_mirrors.csv,CRAN_mirrors.csv,KEYWORDS.db,NEWS.rds}
+
+       # Users are encouraged to access some of the the R documentation
+       # interactively, through functions like "contributors()" that
+       # tries to open the "AUTHORS" file. Other files can be accessed
+       # by name with RShowDoc(), and the documentation for e.g. license()
+       # and RShowDoc() suggests a few of these names. Here we try to
+       # collect as many names as possible that a user might actually
+       # try to view through R, because if we don't decompress them,
+       # then R doesn't know what to do with 'em. Bug #556706.
+       INTERACTIVE_DOCS=(
+               AUTHORS
+               COPYING
+               FAQ
+               NEWS
+               THANKS
+       )
+
+       # Other data sources that are shipped as "documentation," but which
+       # need to be accessible via their original unmolested filenames.
+       INTERACTIVE_DATA=(
+               BioC_mirrors.csv
+               CRAN_mirrors.csv
+               KEYWORDS.db
+               NEWS.rds
+       )
+
+       NOCOMPRESS_DOCS=( "${INTERACTIVE_DOCS[@]}" "${INTERACTIVE_DATA[@]}" )
+
+       for f in "${NOCOMPRESS_DOCS[@]}"; do
+               docompress -x "/usr/share/doc/${PF}/${f}"
+       done
 }
 
 pkg_postinst() {