summaryrefslogtreecommitdiff
blob: b2a1a33b44c2625730822ce3b78cf53411aa9ac7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
--- rstudio-1.0.44-orig/CMakeGlobals.txt	2016-10-19 08:32:41.000000000 +1100
+++ rstudio-1.0.44/CMakeGlobals.txt	2016-12-01 23:33:04.149326324 +1100
@@ -123,7 +123,7 @@
    else()
      set(RSTUDIO_INSTALL_BIN bin)
    endif()
-   set(RSTUDIO_INSTALL_SUPPORTING .)
+   set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE})
 endif()
 
 # if the install prefix is /usr/local then tweak as appropriate
--- rstudio-1.0.44-orig/src/cpp/server/CMakeLists.txt	2016-10-19 08:32:41.000000000 +1100
+++ rstudio-1.0.44/src/cpp/server/CMakeLists.txt	2016-12-01 23:35:51.634862018 +1100
@@ -155,7 +155,7 @@
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in
                   ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT})
    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}
-           DESTINATION ${RSERVER_INITD_DEBIAN_DIR})
+           DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR})
 
    # install configured redhat init.d script
    set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat")
@@ -163,7 +163,7 @@
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in
                   ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT})
    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}
-           DESTINATION ${RSERVER_INITD_REDHAT_DIR})
+           DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR})
 
    # install configured suse init.d script
    set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse")
@@ -171,13 +171,13 @@
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in
                   ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT})
    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}
-           DESTINATION ${RSERVER_INITD_SUSE_DIR})
+           DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR})
 
    # install pam profile
    set(RSERVER_PAM_DIR "extras/pam")
    set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio")
    install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE}
-           DESTINATION ${RSERVER_PAM_DIR})
+           DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR})
 
    # install configured apparmor profile
    set(RSERVER_APPARMOR_DIR "extras/apparmor")
@@ -185,9 +185,9 @@
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_PROFILE}.in
                   ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE})
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE}
-           DESTINATION ${RSERVER_APPARMOR_DIR})
+           DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
    install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_DIR}/apparmor-profile-load
-           DESTINATION ${RSERVER_APPARMOR_DIR})
+           DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
 
    # install configured upstart profile
    set(RSERVER_UPSTART_DIR "extras/upstart")
@@ -195,12 +195,12 @@
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in
                   ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE})
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}
-           DESTINATION ${RSERVER_UPSTART_DIR})
+           DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
    set(RSERVER_UPSTART_PROFILE_REDHAT "${RSERVER_UPSTART_DIR}/rstudio-server.redhat.conf")
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}.in
                   ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT})
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}
-           DESTINATION ${RSERVER_UPSTART_DIR})
+           DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
 
     # install configured systemd profile
    set(RSERVER_SYSTEMD_DIR "extras/systemd")
--- rstudio-1.0.44-orig/src/cpp/server/ServerOptions.cpp	2016-10-19 08:32:41.000000000 +1100
+++ rstudio-1.0.44/src/cpp/server/ServerOptions.cpp	2016-12-01 23:33:04.151326331 +1100
@@ -386,8 +386,8 @@
 
    // convert relative paths by completing from the system installation
    // path (this allows us to be relocatable)
-   resolvePath(resourcePath, &wwwLocalPath_);
-   resolvePath(resourcePath, &wwwSymbolMapsPath_);
+   resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
+   resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
    resolvePath(binaryPath, &authPamHelperPath_);
    resolvePath(binaryPath, &rsessionPath_);
    resolvePath(binaryPath, &rldpathPath_);
--- rstudio-1.0.44-orig/src/cpp/session/SessionOptions.cpp	2016-10-19 08:32:41.000000000 +1100
+++ rstudio-1.0.44/src/cpp/session/SessionOptions.cpp	2016-12-01 23:33:04.151326331 +1100
@@ -49,7 +49,7 @@
 namespace session {  
 
 namespace {
-const char* const kDefaultPandocPath = "bin/pandoc";
+const char* const kDefaultPandocPath = "bin";
 const char* const kDefaultPostbackPath = "bin/postback/rpostback";
 const char* const kDefaultRsclangPath = "bin/rsclang";
 
@@ -481,14 +481,14 @@
    }
    
    // convert relative paths by completing from the app resource path
-   resolvePath(resourcePath_, &rResourcesPath_);
-   resolvePath(resourcePath_, &agreementFilePath_);
-   resolvePath(resourcePath_, &wwwLocalPath_);
-   resolvePath(resourcePath_, &wwwSymbolMapsPath_);
-   resolvePath(resourcePath_, &coreRSourcePath_);
-   resolvePath(resourcePath_, &modulesRSourcePath_);
-   resolvePath(resourcePath_, &sessionLibraryPath_);
-   resolvePath(resourcePath_, &sessionPackageArchivesPath_);
+   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &rResourcesPath_);
+   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &agreementFilePath_);
+   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwLocalPath_);
+   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
+   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &coreRSourcePath_);
+   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &modulesRSourcePath_);
+   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &sessionLibraryPath_);
+   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &sessionPackageArchivesPath_);
    resolvePostbackPath(resourcePath_, &rpostbackPath_);
 #ifdef _WIN32
    resolvePath(resourcePath_, &consoleIoPath_);
@@ -498,7 +498,7 @@
    resolvePath(resourcePath_, &sumatraPath_);
    resolvePath(resourcePath_, &winutilsPath_);
 #endif
-   resolvePath(resourcePath_, &hunspellDictionariesPath_);
+   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &hunspellDictionariesPath_);
    resolvePath(resourcePath_, &mathjaxPath_);
    resolvePath(resourcePath_, &libclangHeadersPath_);
    resolvePandocPath(resourcePath_, &pandocPath_);