1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

devel/RStudio: Add safeguards agaist running without /proc mounted

Port changes:
* Add check that /proc is mounted that fails when it is not
* Add pkg-message warning users about the need to have /proc mounted
* Fix typo in passing arguments in the shell script bin/rstudio

Reported by:	Kostas Oikonomou <ko@research.att.com> (user)
This commit is contained in:
Yuri Victorovich 2018-04-23 05:50:26 +00:00
parent aef563de48
commit 3fb0a46958
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=468071
2 changed files with 19 additions and 1 deletions

View File

@ -6,6 +6,7 @@
PORTNAME= RStudio
DISTVERSIONPREFIX= v
DISTVERSION= 1.1.447
PORTREVISION= 1
CATEGORIES= devel math java
MASTER_SITES= https://s3.amazonaws.com/rstudio-dictionaries/:dictionaries \
https://s3.amazonaws.com/rstudio-buildtools/:buildtools
@ -73,8 +74,14 @@ pre-build:
post-install:
@(echo "#!/bin/sh"; \
echo ""; \
echo "if ! [ -d /proc/curproc ]; then"; \
echo " echo \"${PORTNAME} needs /proc to be mounted as procfs\" >&2"; \
echo " exit 1"; \
echo "fi"; \
echo ""; \
echo "# workaround for the problem that RStudio passes /lib with LD_LIBRARY_PATH that causes the /lib/libgcc_s.so.1 conflict with gcc"; \
echo "LD_PRELOAD=${PREFIX}/lib/gcc6/libgcc_s.so ${PREFIX}/lib/rstudio/bin/rstudio \"$@\"" \
echo "LD_PRELOAD=${PREFIX}/lib/gcc6/libgcc_s.so ${PREFIX}/lib/rstudio/bin/rstudio \"$$@\"" \
) > ${STAGEDIR}${PREFIX}/bin/rstudio
@${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/rstudio
@${REINPLACE_CMD} -e 's|^Exec=.*/rstudio|Exec=${PREFIX}/bin/rstudio|' ${STAGEDIR}${PREFIX}/share/applications/rstudio.desktop

11
devel/RStudio/pkg-message Normal file
View File

@ -0,0 +1,11 @@
======================================================================
You installed RStudio: Integrated development environment (IDE) for R.
Please note that RStudio requires /proc to be mounted.
The usual way to do this is to add this line to /etc/fstab:
proc /proc procfs rw 0 0
and then run this command as root:
# mount /proc
======================================================================