Skip to content

Commit

Permalink
feat(create-turbo): apply official-starter transform
Browse files Browse the repository at this point in the history
  • Loading branch information
turbobot-temp authored and yurivict committed Oct 2, 2024
1 parent 7d0be9b commit 52c0456
Show file tree
Hide file tree
Showing 25 changed files with 93 additions and 355 deletions.
42 changes: 20 additions & 22 deletions devel/RStudio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@

PORTNAME= RStudio
DISTVERSIONPREFIX= v
DISTVERSION= 2022.12.0+353
PORTREVISION= 6
DISTVERSION= 2024.09.0+375
CATEGORIES= devel math java
MASTER_SITES= https://s3.amazonaws.com/rstudio-buildtools/dictionaries/:dictionaries \
https://s3.amazonaws.com/rstudio-buildtools/:buildtools
DISTFILES= core-dictionaries.zip:dictionaries \
gin-${GIN_VERSION}.zip:buildtools \
gwt-${GWT_VERSION}.zip:buildtools \
mathjax-27.zip:buildtools

MAINTAINER= [email protected]
Expand Down Expand Up @@ -48,7 +45,8 @@ GH_PROJECT= ${PORTNAME:tl}
GH_TUPLE= rstudio:r2d3:v0.2.0:r2d3/dependencies/common/r2d3 \
rstudio:rmarkdown:aed26ac:rmarkdown/dependencies/common/rmarkdown \
rstudio:rsconnect:03c379b:rsconnect/dependencies/common/rsconnect \
trestletech:plumber:v0.4.6:plumber/dependencies/common/plumber
trestletech:plumber:v0.4.6:plumber/dependencies/common/plumber \
quarto-dev:quarto:v1.115.0-vsix:quarto/src/gwt/lib/quarto

CMAKE_ARGS= -DFREEBSD_RSTUDIO_VERSION:STRING=${PORTVERSION} \
-DFREEBSD_LIBDIR:STRING=${PREFIX}/lib
Expand Down Expand Up @@ -91,40 +89,40 @@ USE_RC_SUBR= ${PORTNAME:tl}-server
OPTIONS_DEFINE= WITH_QUARTO

WITH_QUARTO_DESC= Build with support for Quarto
WITH_QUARTO_CMAKE_BOOL= FREEBSD_QUARTO_ENABLED
WITH_QUARTO_CMAKE_BOOL= QUARTO_ENABLED
WITH_QUARTO_BROKEN= Quarto isn't yet ported

post-extract:
@${MKDIR} ${WRKSRC}/dependencies/dictionaries && ${MV} ${WRKDIR}/en_* ${WRKSRC}/dependencies/dictionaries/
@${MV} ${WRKDIR}/mathjax-* ${WRKSRC}/dependencies/
@${MKDIR} ${WRKSRC}/src/gwt/lib/gwt && ${MV} ${WRKDIR}/gwt-${GWT_VERSION} ${WRKSRC}/src/gwt/lib/gwt/${GWT_VERSION}
@${MKDIR} ${WRKSRC}/src/gwt/lib/gin/${GIN_VERSION} && ${MV} ${WRKDIR}/*.jar ${WRKSRC}/src/gwt/lib/gin/${GIN_VERSION}/
#@${MKDIR} ${WRKSRC}/src/gwt/lib/gwt && ${MV} ${WRKDIR}/gwt-${GWT_VERSION} ${WRKSRC}/src/gwt/lib/gwt/${GWT_VERSION}
#@${MKDIR} ${WRKSRC}/src/gwt/lib/gin/${GIN_VERSION} && ${MV} ${WRKDIR}/*.jar ${WRKSRC}/src/gwt/lib/gin/${GIN_VERSION}/

post-patch:
@${REINPLACE_CMD} -e ' \
s|target_link_libraries(rstudio|target_link_libraries(rstudio procstat|; \
s|get_filename_component|#get_filename_component|; \
s|set(CMAKE_PREFIX_PATH "$${QT_BIN_DIR}//..//lib//cmake")|set(CMAKE_PREFIX_PATH "${LOCALBASE}/lib/cmake")|; \
s|/usr/share/|${PREFIX}/share/|g' \
${WRKSRC}/src/cpp/desktop/CMakeLists.txt
@${REINPLACE_CMD} -e ' \
s|</java>|<jvmarg value="-Duser.home=${WRKDIR}"/></java>|' \
${WRKSRC}/src/gwt/build.xml
#@${REINPLACE_CMD} -e ' \
# s|target_link_libraries(rstudio|target_link_libraries(rstudio procstat|; \
# s|get_filename_component|#get_filename_component|; \
# s|set(CMAKE_PREFIX_PATH "$${QT_BIN_DIR}//..//lib//cmake")|set(CMAKE_PREFIX_PATH "${LOCALBASE}/lib/cmake")|; \
# s|/usr/share/|${PREFIX}/share/|g' \
# ${WRKSRC}/src/cpp/desktop/CMakeLists.txt
#@${REINPLACE_CMD} -e ' \
# s|</java>|<jvmarg value="-Duser.home=${WRKDIR}"/></java>|' \
# ${WRKSRC}/src/gwt/build.xml
@${REINPLACE_CMD} -e ' \
s|rHomePaths.push_back|//rHomePaths.push_back|; \
s|//rHomePaths.push_back(FilePath("/usr/local/lib/|rHomePaths.push_back(FilePath("${PREFIX}/lib/|' \
${WRKSRC}/src/cpp/core/r_util/RVersionsPosix.cpp
@${REINPLACE_CMD} -e ' \
s|<condition property="node.bin" value="../../../$${node.dir}/bin/node">|<condition property="node.bin" value="${LOCALBASE}/bin/node">|' \
${WRKSRC}/src/gwt/build.xml
#@${REINPLACE_CMD} -e ' \
# s|<condition property="node.bin" value="../../../$${node.dir}/bin/node">|<condition property="node.bin" value="${LOCALBASE}/bin/node">|' \
# ${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/
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/src/cpp/desktop/global-setenv.h
#@${CP} ${FILESDIR}/global-setenv.h ${WRKSRC}/src/cpp/desktop/
#@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/src/cpp/desktop/global-setenv.h

post-install:
@(echo "#!/bin/sh"; \
Expand Down
12 changes: 5 additions & 7 deletions devel/RStudio/distinfo
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
TIMESTAMP = 1672353588
TIMESTAMP = 1727743998
SHA256 (core-dictionaries.zip) = 4341a9630efb9dcf7f215c324136407f3b3d6003e1c96f2e5e1f9f14d5787494
SIZE (core-dictionaries.zip) = 876339
SHA256 (gin-2.1.2.zip) = b98e704164f54be596779696a3fcd11be5785c9907a99ec535ff6e9525ad5f9a
SIZE (gin-2.1.2.zip) = 1341053
SHA256 (gwt-2.8.1.zip) = 0b7af89fdadb4ec51cdb400ace94637d6fe9ffa401b168e2c3d372392a00a0a7
SIZE (gwt-2.8.1.zip) = 95650299
SHA256 (mathjax-27.zip) = c56cbaa6c4ce03c1fcbaeb2b5ea3c312d2fb7626a360254770cbcb88fb204176
SIZE (mathjax-27.zip) = 3285230
SHA256 (RStudio-rstudio-v2022.12.0+353_GH0.tar.gz) = e4f3503e2ad4229301360f56fd5288e5c8e769c490073dae7fe40366237ecce0
SIZE (RStudio-rstudio-v2022.12.0+353_GH0.tar.gz) = 266546261
SHA256 (RStudio-rstudio-v2024.09.0+375_GH0.tar.gz) = 8a29b77c53a3db8379d824a9f4a491843036003d105ed71981cd40fe39d2c8c8
SIZE (RStudio-rstudio-v2024.09.0+375_GH0.tar.gz) = 268564378
SHA256 (rstudio-r2d3-v0.2.0_GH0.tar.gz) = 6355a7632134c8c9487056019a9c458db2c98d10388cf66b018d5461d0a947af
SIZE (rstudio-r2d3-v0.2.0_GH0.tar.gz) = 21977747
SHA256 (rstudio-rmarkdown-aed26ac_GH0.tar.gz) = b6f6f48dd9930514204739d8957c2737f0b1d110aebf9f89fa31de10598cb29b
Expand All @@ -17,3 +13,5 @@ SHA256 (rstudio-rsconnect-03c379b_GH0.tar.gz) = d24b6ee49f32f650f6d10bbfc7b2f61a
SIZE (rstudio-rsconnect-03c379b_GH0.tar.gz) = 220711
SHA256 (trestletech-plumber-v0.4.6_GH0.tar.gz) = 7bcbfdf5a8a2e3a051d2c673ac5ac51a483ed888afe73116cba7741dbb5f63a6
SIZE (trestletech-plumber-v0.4.6_GH0.tar.gz) = 83332
SHA256 (quarto-dev-quarto-v1.115.0-vsix_GH0.tar.gz) = 59a10967d3d4a45f1224180aaa52c96b334a1c82c0e7411dfeac53137bef48ed
SIZE (quarto-dev-quarto-v1.115.0-vsix_GH0.tar.gz) = 5207281
46 changes: 0 additions & 46 deletions devel/RStudio/files/patch-CMakeGlobals.txt

This file was deleted.

15 changes: 11 additions & 4 deletions devel/RStudio/files/patch-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- CMakeLists.txt.orig 2019-09-19 13:59:21 UTC
--- CMakeLists.txt.orig 2024-09-16 17:02:32 UTC
+++ CMakeLists.txt
@@ -31,7 +31,7 @@ endif()
@@ -39,7 +39,7 @@ if (NOT RSTUDIO_SESSION_WIN32)
if (NOT RSTUDIO_SESSION_WIN32)
# dynamically configure SOURCE with the git revision hash
INSTALL(CODE "
Expand All @@ -9,11 +9,18 @@
WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\"
OUTPUT_VARIABLE RSTUDIO_GIT_REVISION_HASH)
configure_file (\"${CMAKE_CURRENT_SOURCE_DIR}/SOURCE.in\"
@@ -40,6 +40,7 @@ if (NOT RSTUDIO_SESSION_WIN32)
@@ -48,6 +48,7 @@ if (NOT RSTUDIO_SESSION_WIN32)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/VERSION.in
${CMAKE_CURRENT_BINARY_DIR}/VERSION)
+ set(RSTUDIO_VERSION ${FREEBSD_RSTUDIO_VERSION})

# install root docs
include(CMakeInstallDocs.txt)
include(cmake/install-docs.cmake)
@@ -62,5 +63,5 @@ add_subdirectory(src)
add_subdirectory(src)

# packaging
-add_subdirectory(package)
+#add_subdirectory(package)

21 changes: 11 additions & 10 deletions devel/RStudio/files/patch-src_cpp_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
--- src/cpp/CMakeLists.txt.orig 2022-12-03 07:38:59 UTC
--- src/cpp/CMakeLists.txt.orig 2024-09-16 17:02:32 UTC
+++ src/cpp/CMakeLists.txt
@@ -468,9 +468,9 @@ endif()
@@ -479,10 +479,10 @@ if(UNIX)
# find SOCI libraries
if(UNIX)
if(NOT APPLE AND RSTUDIO_USE_SYSTEM_SOCI)
- find_library(SOCI_CORE_LIB NAMES "libsoci_core.a" "soci_core")
- find_library(SOCI_SQLITE_LIB NAMES "libsoci_sqlite3.a" "soci_sqlite3")
- find_library(SOCI_POSTGRESQL_LIB NAMES "libsoci_postgresql.a" "soci_postgresql")
+ find_library(SOCI_CORE_LIB NAMES "libsoci_core.so" "soci_core")
+ find_library(SOCI_SQLITE_LIB NAMES "libsoci_sqlite3.so" "soci_sqlite3")
+ find_library(SOCI_POSTGRESQL_LIB NAMES "libsoci_postgresql.so" "soci_postgresql")
if(NOT SOCI_CORE_LIB OR NOT SOCI_SQLITE_LIB OR NOT SOCI_POSTGRESQL_LIB)
message(FATAL_ERROR "Some or all SOCI libraries were not found. Ensure the SOCI dependency is installed and try again.")
- find_library(SOCI_CORE_LIB NAMES "libsoci_core.a" "soci_core" REQUIRED)
- find_library(SOCI_SQLITE_LIB NAMES "libsoci_sqlite3.a" "soci_sqlite3" REQUIRED)
+ find_library(SOCI_CORE_LIB NAMES "libsoci_core.so" "soci_core" REQUIRED)
+ find_library(SOCI_SQLITE_LIB NAMES "libsoci_sqlite3.so" "soci_sqlite3" REQUIRED)
if(RSTUDIO_PRO_BUILD)
- find_library(SOCI_POSTGRESQL_LIB NAMES "libsoci_postgresql.a" "soci_postgresql" REQUIRED)
+ find_library(SOCI_POSTGRESQL_LIB NAMES "libsoci_postgresql.so" "soci_postgresql" REQUIRED)
endif()
get_filename_component(SOCI_LIBRARY_DIR "${SOCI_CORE_LIB}" DIRECTORY)
else()
4 changes: 2 additions & 2 deletions devel/RStudio/files/patch-src_cpp_core_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- src/cpp/core/CMakeLists.txt.orig 2022-12-03 07:38:59 UTC
--- src/cpp/core/CMakeLists.txt.orig 2024-09-16 17:02:32 UTC
+++ src/cpp/core/CMakeLists.txt
@@ -161,12 +161,14 @@ if (UNIX)
@@ -162,12 +162,14 @@ if (UNIX)
# platform introspection
check_symbol_exists(SA_NOCLDWAIT "signal.h" HAVE_SA_NOCLDWAIT)
check_symbol_exists(SO_PEERCRED "sys/socket.h" HAVE_SO_PEERCRED)
Expand Down
12 changes: 0 additions & 12 deletions devel/RStudio/files/patch-src_cpp_core_include_core_Thread.hpp

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- src/cpp/core/system/PosixChildProcess.cpp.orig 2022-12-30 20:28:33 UTC
--- src/cpp/core/system/PosixChildProcess.cpp.orig 2024-09-16 17:02:32 UTC
+++ src/cpp/core/system/PosixChildProcess.cpp
@@ -28,6 +28,11 @@
#include <pty.h>
Expand All @@ -12,7 +12,7 @@
#endif

#include <sys/wait.h>
@@ -807,7 +812,7 @@ Error ChildProcess::run()
@@ -812,7 +817,7 @@ Error ChildProcess::run()

if (options_.exitWithParent)
{
Expand Down
12 changes: 6 additions & 6 deletions devel/RStudio/files/patch-src_cpp_core_system_PosixSystem.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
- one of the patches is a workaround for access to /proc/{pid}/fd : https://github.com/rstudio/rstudio/issues/8912

--- src/cpp/core/system/PosixSystem.cpp.orig 2022-12-03 07:38:59 UTC
--- src/cpp/core/system/PosixSystem.cpp.orig 2024-06-04 21:19:10 UTC
+++ src/cpp/core/system/PosixSystem.cpp
@@ -56,6 +56,11 @@
#include <dirent.h>
@@ -69,6 +69,11 @@

#endif

+#if defined(__FreeBSD__)
Expand All @@ -14,23 +14,23 @@
#include <boost/thread.hpp>
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp>
@@ -619,6 +624,7 @@ Error getOpenFds(std::vector<uint32_t>* pFds)
@@ -633,6 +638,7 @@ Error getOpenFds(pid_t pid, std::vector<uint32_t>* pFd
#ifndef __APPLE__
Error getOpenFds(pid_t pid, std::vector<uint32_t>* pFds)
{
+#if !defined(__FreeBSD__)
std::string pidStr = safe_convert::numberToString(pid);
boost::format fmt("/proc/%1%/fd");
FilePath filePath(boost::str(fmt % pidStr));
@@ -645,6 +651,7 @@ Error getOpenFds(pid_t pid, std::vector<uint32_t>* pFd
@@ -659,6 +665,7 @@ Error getOpenFds(pid_t pid, std::vector<uint32_t>* pFd
pFds->push_back(fd.get());
}
}
+#endif

return Success();
}
@@ -970,7 +977,7 @@ Error executablePath(const char * argv0,
@@ -984,7 +991,7 @@ Error executablePath(const char * argv0,

#elif defined(HAVE_PROCSELF)

Expand Down

This file was deleted.

28 changes: 0 additions & 28 deletions devel/RStudio/files/patch-src_cpp_desktop_DesktopMain.cpp

This file was deleted.

4 changes: 2 additions & 2 deletions devel/RStudio/files/patch-src_cpp_server_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- src/cpp/server/CMakeLists.txt.orig 2021-05-24 22:22:25 UTC
--- src/cpp/server/CMakeLists.txt.orig 2024-06-04 21:19:10 UTC
+++ src/cpp/server/CMakeLists.txt
@@ -137,6 +137,9 @@ include_directories(
@@ -146,6 +146,9 @@ add_stripped_executable(rserver ServerMain.cpp ${SERVE
# define executable
add_stripped_executable(rserver ServerMain.cpp ${SERVER_SOURCE_FILES} ${SERVER_HEADER_FILES})

Expand Down

This file was deleted.

Loading

0 comments on commit 52c0456

Please sign in to comment.