Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Sep 2021 21:20:34 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: e224e0b2a07a - 2021Q3 - devel/RStudio: Fix bug in RStudio-server that gmake isn't in the path
Message-ID:  <202109042120.184LKYOR058053@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2021Q3 has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e224e0b2a07a5ff4fd1f46077911878c6c3f64b2

commit e224e0b2a07a5ff4fd1f46077911878c6c3f64b2
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2021-09-04 21:09:38 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2021-09-04 21:20:29 +0000

    devel/RStudio: Fix bug in RStudio-server that gmake isn't in the path
    
    When R modules are installed gmake is needed, but it wasn't in the path
    in the server flavor of the port. The patch adds the gmake symlink to
    the directory which is in the path.
    
    A better fix will be provided later, pending fix in RStudio, see Makefile.
    
    Also adjust poudriere.conf instructions.
    
    (cherry picked from commit 4a933f3420f6dad303c07a4b90c6d2d591f84b98)
---
 devel/RStudio/Makefile             | 10 ++++++++--
 math/nauty/files/patch-makefile.in | 13 +++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/devel/RStudio/Makefile b/devel/RStudio/Makefile
index 961372fdf98a..8d04a06d90a9 100644
--- a/devel/RStudio/Makefile
+++ b/devel/RStudio/Makefile
@@ -1,9 +1,10 @@
 # This port opens too many files during build, more than the default setting.
-# Its build is known to succeed with MAX_FILES_RStudio=4096 and MAX_FILES_RStudio_server=4096 in poudriere.conf
+# Its build is known to succeed with MAX_FILES_RStudio=4096 in poudriere.conf
 
 PORTNAME=	RStudio
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.4.1717
+PORTREVISION=	3
 CATEGORIES=	devel math java
 MASTER_SITES=	https://s3.amazonaws.com/rstudio-buildtools/dictionaries/:dictionaries \
 		https://s3.amazonaws.com/rstudio-buildtools/:buildtools
@@ -113,7 +114,6 @@ post-patch:
 pre-build:
 	@${CP} ${FILESDIR}/global-setenv.h ${WRKSRC}/src/cpp/desktop/
 	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/src/cpp/desktop/global-setenv.h
-	@${ECHO} "Current max open files (ulimit -n) setting is $$(ulimit -n)." # since build is likely to fail when it is lower than 4096
 
 post-install:
 	@(echo "#!/bin/sh"; \
@@ -136,6 +136,12 @@ post-install:
 	# Some functions expect the pandoc symlink.
 	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/${INSTALL_SUBDIR}/bin/pandoc
 	@cd ${STAGEDIR}${PREFIX}/lib/${INSTALL_SUBDIR}/bin/pandoc && ${LN} -s ../../../../bin/pandoc
+	# Add $LOCALBASE/bin to PATH to allow RStudio-server to run gmake (R_HOME/etc/Renviron.site is installed, see https://stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html)
+.if ${FLAVOR:U} == server
+	#@${MKDIR} ${STAGEDIR}${LOCALBASE}/lib/R/etc
+	#@${ECHO} "PATH=\"${LOCALBASE}/bin:\$$PATH\"" > ${STAGEDIR}${LOCALBASE}/lib/R/etc/Renviron.site # it should be this way, but this fails: https://github.com/rstudio/rstudio/issues/9815
+	@${LN} -s ${LOCALBASE}/bin/${GMAKE} ${STAGEDIR}${PREFIX}/lib/rstudio-server/bin/postback/${GMAKE} # hack, should be as above, but at least gmake is in the path now
+.endif
 	# There is a variability in .js file names due to use of random numbers, so we use the automatic plist.
 	@${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh makeplist | ${GREP} -v ^\/ | ${SED} -e 's|%%WWWDIR%%|www/rstudio| ; s|%%CMAKE_BUILD_TYPE%%|${CMAKE_BUILD_TYPE:tl}|' > ${TMPPLIST}
 
diff --git a/math/nauty/files/patch-makefile.in b/math/nauty/files/patch-makefile.in
new file mode 100644
index 000000000000..76dc49de9aac
--- /dev/null
+++ b/math/nauty/files/patch-makefile.in
@@ -0,0 +1,13 @@
+- allow to add additional CFLAGS to build shared libraries
+
+--- makefile.in.orig	2021-09-03 17:45:35 UTC
++++ makefile.in
+@@ -3,7 +3,7 @@
+ 
+ SHELL=@SHELL@
+ CC=@CC@
+-CFLAGS=@CFLAGS@ @MORECFLAGS@
++CFLAGS=@CFLAGS@ @MORECFLAGS@ ${FREEBSD_EXTRA_CFLAGS}
+ SAFECFLAGS=@CFLAGS@
+ LDFLAGS=@LDFLAGS@ @LIBS@
+ THREADLIB=@threadlib@



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109042120.184LKYOR058053>