2021-05-30 14:50:36 +02:00
|
|
|
From 16da5903326d13ecc32794b4561967c15bbe8a50 Mon Sep 17 00:00:00 2001
|
|
|
|
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
|
|
|
|
Date: Mon, 13 Jan 2020 11:27:06 +0100
|
|
|
|
Subject: [PATCH 1/8] Unbundle mathjax and pandoc
|
|
|
|
|
|
|
|
Use find_file() & find_program() functions to find the dependencies in the
|
|
|
|
dependencies/ subdirectory first. If they are not there, use the system paths
|
|
|
|
instead.
|
|
|
|
---
|
|
|
|
src/cpp/session/CMakeLists.txt | 13 +++++++------
|
|
|
|
1 file changed, 7 insertions(+), 6 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/src/cpp/session/CMakeLists.txt b/src/cpp/session/CMakeLists.txt
|
|
|
|
index cb45b35ecc..d0b41b13d2 100644
|
srcpkgs/r*: convert patches to -Np1
* runit is kept at -Np0
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
for p in ${template%/template}/patches/*; do
sed -i '
\,^[+-][+-][+-] /dev/null,b
/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
s,^[*][*][*] ,&a/,
/^--- /{
s,\(^--- \)\(./\)*,\1a/,
s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1,
s/[.-][Oo][Rr][Ii][Gg]$//
s/[.]patched[.]\([^.]\)/.\1/
h
}
/^+++ -/{
g
s/^--- a/+++ b/
b
}
s,\(^+++ \)\(./\)*,\1b/,
' "$p"
done
sed -i '/^patch_args=/d' $template
done
```
2021-06-19 05:03:21 +02:00
|
|
|
--- a/src/cpp/session/CMakeLists.txt
|
|
|
|
+++ b/src/cpp/session/CMakeLists.txt
|
2021-05-30 14:50:36 +02:00
|
|
|
@@ -22,13 +22,13 @@ add_subdirectory(workers)
|
|
|
|
if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/dictionaries")
|
|
|
|
message(FATAL_ERROR "Dictionaries not found (re-run install-dependencies script to install)")
|
|
|
|
endif()
|
|
|
|
-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-27")
|
|
|
|
+
|
|
|
|
+find_file(MATHJAX_JS_LOCATION
|
|
|
|
+ NAMES MathJax.js
|
|
|
|
+ PATHS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-27" /usr/share/mathjax/)
|
|
|
|
+if("${MATHJAX_JS_LOCATION}" STREQUAL "MATHJAX_JS_LOCATION-NOTFOUND")
|
|
|
|
message(FATAL_ERROR "Mathjax 2.7 not found (re-run install-dependencies script to install)")
|
|
|
|
endif()
|
|
|
|
-set(PANDOC_VERSION "2.11.4" CACHE INTERNAL "Pandoc version")
|
|
|
|
-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/${PANDOC_VERSION}")
|
|
|
|
- message(FATAL_ERROR "pandoc ${PANDOC_VERSION} not found (re-run install-dependencies script to install)")
|
|
|
|
-endif()
|
|
|
|
|
|
|
|
# verify embedded packages are available
|
|
|
|
foreach(PKG ${RSTUDIO_EMBEDDED_PACKAGES})
|
|
|
|
@@ -535,7 +535,7 @@ if (NOT RSTUDIO_SESSION_WIN32)
|
|
|
|
DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
|
|
|
|
|
|
|
|
# install mathjax for local html preview
|
|
|
|
- install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-27"
|
|
|
|
+ install(DIRECTORY "${MATHJAX_PATH}"
|
|
|
|
DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
|
|
|
|
|
|
|
|
# icons for database connections
|
|
|
|
@@ -553,6 +553,7 @@ if (NOT RSTUDIO_SESSION_WIN32)
|
|
|
|
# install pandoc
|
|
|
|
set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/${PANDOC_VERSION}")
|
|
|
|
file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
|
|
|
|
+ set(PANDOC_FILES ${PANDOC_CITEPROC_BIN_LOCATION} ${PANDOC_BIN_LOCATION})
|
|
|
|
install(FILES ${PANDOC_FILES}
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
|
|
|
DESTINATION ${RSTUDIO_INSTALL_BIN}/pandoc)
|
|
|
|
--
|
|
|
|
2.30.2
|