File: debianization-plugins-r.patch

package info (click to toggle)
texmacs 1%3A2.1.4%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 145,080 kB
  • sloc: cpp: 227,393; lisp: 197,386; ansic: 5,395; python: 1,939; makefile: 1,065; sh: 781; perl: 339; xml: 100; awk: 36
file content (45 lines) | stat: -rw-r--r-- 2,011 bytes parent folder | download | duplicates (2)
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
Description: debianization-plugins: r
 Meant to address Debian specific stuff related to the R plugin.
Origin: vendor, Debian
Forwarded: not-needed
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2024-09-06

--- a/plugins/r/src/tm_r.c
+++ b/plugins/r/src/tm_r.c
@@ -797,7 +797,7 @@
 
 int main(int argc, char *argv[])
 {
-  const char* const listof_TEXMACS_PATH_name[]={"TEXMACS_HOME_PATH","TEXMACS_PATH",NULL};
+  const char* const listof_TEXMACS_PATH_name[]={"TEXMACS_HOME_PATH","TEXMACS_LOCAL_PATH","TEXMACS_PATH",NULL};
 	const char* const * name_ptr=NULL;
   const char *name=NULL ;
 	char R_PROFILE[4096];
@@ -829,7 +829,7 @@
   }
 #endif
 
-#if 1
+#if 0
   // Let spawn a child-process for installing or upgrading, when applicable,
   // the R TeXmacs package from source. The invoked script `tm_r_install`
   // might be basically a R script that checks the installation state of the
--- a/plugins/r/bin/tm_r_install
+++ b/plugins/r/bin/tm_r_install
@@ -20,10 +20,13 @@
 		rtmpkg_rdir <- "/plugins/r/r/TeXmacs"
 		default_custom_dir <- paste(Sys.getenv("HOME","/nonexistent"),"/.TeXmacs",sep="")
 		custom_dir <- paste(Sys.getenv("TEXMACS_HOME_PATH",default_custom_dir),rtmpkg_rdir,sep="")
-		system_dir <- paste(Sys.getenv("TEXMACS_PATH","/usr/local/share/TeXmacs"),rtmpkg_rdir,sep="")
-		source_dir <- paste(Sys.getenv("TEXMACS_SOURCE_DIR","/usr/local/src/TeXmacs"),rtmpkg_rdir,sep="")
+		system_ldir <- paste(Sys.getenv("TEXMACS_LOCAL_PATH","/usr/local/share/texmacs"),rtmpkg_rdir,sep="")
+		system_dir <- paste(Sys.getenv("TEXMACS_PATH","/usr/share/texmacs"),rtmpkg_rdir,sep="")
+		source_dir <- paste(Sys.getenv("TEXMACS_SOURCE_DIR","/usr/src/texmacs"),rtmpkg_rdir,sep="")
 		if (dir.exists(custom_dir)) {
  			system(paste("R CMD build",custom_dir,sep=" "));
+		} else if (dir.exists(system_ldir)) {
+			system(paste("R CMD build",system_ldir,sep=" "));
 		} else if (dir.exists(system_dir)) {
 			system(paste("R CMD build",system_dir,sep=" "));
 		} else if (dir.exists(source_dir)) {