From nobody Tue Aug 29 08:39:47 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RZgpW67x5z4rXgD; Tue, 29 Aug 2023 08:39:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZgpW5TN3z4Tvb; Tue, 29 Aug 2023 08:39:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693298387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Knjl2KD0Tb1Lnele7Kj7KCoKpcerOwNhBejIr2wc9pI=; b=O4TqtZqv9ceEp8sAStntv6vzBMVJcTzuv4VeXi/L9wFl9T0/czX4jcRVWvIuyRHExvdvwa fHlHqXiK5PJpPo83P7QyduMgayNADUTauPptYyQlHj7Yiu3/zwtXaxCMhfOoUIjVhjgdw+ qE4MquqiNRxuNBre/mMfWCTdCO0POiA48BhWIaigWa2IG9cZ9eIBWTDSGCYRatkfGPTPJW TO4n0NX+vvLs0aqo1++cZMHwOGEufeyg2DLmVewJfGPcfucIx+XNVhZciZ+96qrYc1coEh lApJttjoDSJfBBUYMIX0+x2NUaMZnUq/muHxgFrCAJEN+beGR+XqHiBgcysN1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693298387; a=rsa-sha256; cv=none; b=lghP9S6bufdKN7KcGWevzEl8rRT7s39mtV7RvFVmxvYrrR7y12McC7md993AufzyHq5eve 8M4TlNVOjbeQOL/w/xDE2pUTyfsdJWxPfdSUo7xT6rD+cgnQkkf3kAicPzOmXnM5VmDaZT iisNb2IxuSTFHaEp7aRE3p+VLDQy6qFavJ66p9/CX9C9kZqEqdsr1j4Z++8lHk7Mysv7ln 2jaSYU4bDRKwZmODAXwf86PrHZrOjhI3Flr1gIVjh7WEH2+JwV0bRBvfE8n/vmMdCEJSWF cNRFtXenYK/P+qj5GoxFS0m1i5CyOqll6REpLpruKr6+NqXbziys6Dh19Z2VxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693298387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Knjl2KD0Tb1Lnele7Kj7KCoKpcerOwNhBejIr2wc9pI=; b=Y1TUqHW6P8jQdQA614+5XnuB4Ja1viYD2OM3NZyp1X7GGJZKgCzrHOGP1kCZa1PuRsYR4I E52j1AmkFjzcHebSUdBgBI/IACFX0VIkMjbGGSPKYQadnbyKOlBQszQVusbJYbEigy3ZpL I6+UKxsZFgMnDvNcRkLnw+s3nTqXSzhTGGJ6dq8ca30Qh4eTqzB0fMTWJUXNKmSrtDlFq4 DyqcD1M+73sIquw+GSvbVQSDgmtp7WOtCUDGvInM9tmNX8E6q5M86wQVas258nBjGCvpx+ PMq0nqNBG/+Xe1N2wlm3wgGjdzbBHirgrAQ0WhEA2KiptGB5QeDiXLaaZ9aZQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RZgpW4W1LzkhZ; Tue, 29 Aug 2023 08:39:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37T8dlhR075591; Tue, 29 Aug 2023 08:39:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37T8dlEq075589; Tue, 29 Aug 2023 08:39:47 GMT (envelope-from git) Date: Tue, 29 Aug 2023 08:39:47 GMT Message-Id: <202308290839.37T8dlEq075589@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 9884a43067a4 - main - devel/RStudio: Fix bug that RStudio-server didn't have /usr/local/bin in PATH List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9884a43067a47d9f4088306ad29d1ec373b25eee Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=9884a43067a47d9f4088306ad29d1ec373b25eee commit 9884a43067a47d9f4088306ad29d1ec373b25eee Author: Yuri Victorovich AuthorDate: 2023-08-29 08:37:27 +0000 Commit: Yuri Victorovich CommitDate: 2023-08-29 08:39:44 +0000 devel/RStudio: Fix bug that RStudio-server didn't have /usr/local/bin in PATH This was previously fixed in post-install but the previous fix relied on the other path that changed, which eroded this fix. The new fix adds /usr/local/bin to PATH in the C++ code. --- devel/RStudio/Makefile | 12 +++++------ .../patch-src_cpp_session_modules_SessionGit.cpp | 24 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/devel/RStudio/Makefile b/devel/RStudio/Makefile index dcc39863ecb0..a6df10b46383 100644 --- a/devel/RStudio/Makefile +++ b/devel/RStudio/Makefile @@ -4,7 +4,7 @@ PORTNAME= RStudio DISTVERSIONPREFIX= v DISTVERSION= 2022.12.0+353 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= devel math java MASTER_SITES= https://s3.amazonaws.com/rstudio-buildtools/dictionaries/:dictionaries \ https://s3.amazonaws.com/rstudio-buildtools/:buildtools @@ -117,6 +117,10 @@ post-patch: @${REINPLACE_CMD} -e ' \ s|||' \ ${WRKSRC}/src/gwt/build.xml + # add $PREFIX/bin to PATH for the server daemon +.if ${FLAVOR:U} == server + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/src/cpp/session/modules/SessionGit.cpp +.endif pre-build: @${CP} ${FILESDIR}/global-setenv.h ${WRKSRC}/src/cpp/desktop/ @@ -143,12 +147,6 @@ 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/devel/RStudio/files/patch-src_cpp_session_modules_SessionGit.cpp b/devel/RStudio/files/patch-src_cpp_session_modules_SessionGit.cpp new file mode 100644 index 000000000000..c72a605a439a --- /dev/null +++ b/devel/RStudio/files/patch-src_cpp_session_modules_SessionGit.cpp @@ -0,0 +1,24 @@ +- add path %%PREFIX%%/bin to PATH so that gmake and cmake executable would be found + +--- src/cpp/session/modules/SessionGit.cpp.orig 2023-08-29 01:47:30 UTC ++++ src/cpp/session/modules/SessionGit.cpp +@@ -130,6 +130,9 @@ core::system::ProcessOptions procOptions() + FilePath postbackDir = session::options().rpostbackPath().getParent(); + core::system::addToPath(&childEnv, postbackDir.getAbsolutePath()); + ++ // add $PREFIX/bin to path ++ core::system::addToPath(&childEnv, "%%PREFIX%%/bin"); ++ + options.workingDir = projects::projectContext().directory(); + + #ifdef _WIN32 +@@ -3370,6 +3373,9 @@ core::Error initialize() + } + + core::system::addToPath(postbackDir.getAbsolutePath()); ++ ++ // add $PREFIX/bin to path ++ core::system::addToPath("%%PREFIX%%/bin"); + + // add suspend/resume handler + addSuspendHandler(SuspendHandler(boost::bind(onSuspend, _2), onResume));