File: R-2.5.0.patch

package info (click to toggle)
r-base 4.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 112,852 kB
  • sloc: ansic: 291,246; fortran: 111,889; javascript: 14,798; yacc: 6,154; sh: 5,689; makefile: 5,242; tcl: 4,562; perl: 963; objc: 791; f90: 758; asm: 258; java: 31; sed: 1
file content (149 lines) | stat: -rw-r--r-- 5,509 bytes parent folder | download | duplicates (14)
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
diff -uNr R-2.5.0/src/nmath/standalone/Makefile.in R-2.5.0-patched/src/nmath/standalone/Makefile.in
--- R-2.5.0/src/nmath/standalone/Makefile.in	2007-03-26 18:42:08.000000000 +0200
+++ R-2.5.0-patched/src/nmath/standalone/Makefile.in	2007-04-29 14:50:55.000000000 +0200
@@ -67,7 +67,7 @@
 libRmath_la_LDFLAGS =
 
 CLEANFILES = Makedeps *.d *.o *.lo test $(SOURCES)
-DISTCLEANFILES = Makefile $(Rexeclibdir_LIBRARIES) $(Rexeclibdir_LTLIBRARIES)
+DISTCLEANFILES = Makefile libRmath.pc $(Rexeclibdir_LIBRARIES) $(Rexeclibdir_LTLIBRARIES)
 
 DEFS = -DHAVE_CONFIG_H -DMATHLIB_STANDALONE
 ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) -I$(srcdir)/.. $(CPPFLAGS) $(DEFS)
@@ -78,7 +78,7 @@
 @r_cc_lo_rules_frag@
 
 
-all: Makefile inc static shared
+all: Makefile inc static shared build-pc
 
 inc:
 	(cd ../../include; $(MAKE) Rmath.h)
@@ -100,6 +100,11 @@
 shared: Makefile ../../include/Rconfig.h Copy Makedeps
 	@$(MAKE) $(Rexeclibdir_LTLIBRARIES)
 
+build-pc:
+	@$(SED) -e "s:@libdir:$(libdir):" -e "s:@includedir:$(includedir):" \
+	  -e 's/@VERSION/$(VERSION)/' -e 's/@libm/$(LIBM)/' $(srcdir)/libRmath.pc.in \
+	  > "libRmath.pc"
+
 ../../include/Rconfig.h:
 	(cd $(@D); $(MAKE) $(@F))
 
@@ -163,9 +168,7 @@
 
 install-pc:
 	@$(MKINSTALLDIRS) "$(libdir)/pkgconfig"
-	@$(SED) -e "s:@libdir:$(libdir):" -e "s:@includedir:$(includedir):" \
-	  -e 's/@VERSION/$(VERSION)/' -e 's/@libm/$(LIBM)/' $(srcdir)/libRmath.pc.in \
-	  > "$(libdir)/pkgconfig/libRmath.pc"
+	@$(INSTALL_DATA) libRmath.pc "$(libdir)/pkgconfig/libRmath.pc"
 
 uninstall:
 	@rm -f $(includedir)/Rmath.h $(libdir)/$(libRmath_la) $(libdir)/libRmath.a "$(libdir)/pkgconfig/libRmath.pc"
diff -uNr R-2.5.0/src/scripts/Makefile.in R-2.5.0-patched/src/scripts/Makefile.in
--- R-2.5.0/src/scripts/Makefile.in	2007-03-26 18:42:09.000000000 +0200
+++ R-2.5.0-patched/src/scripts/Makefile.in	2007-04-29 14:50:14.000000000 +0200
@@ -23,17 +23,22 @@
 DISTFILES = Makefile.in Makefile.win $(SCRIPTS_S) $(SCRIPTS_B_IN) R.sh.in
 
 CLEANFILES =
-DISTCLEANFILES = Makefile R.fe R.sh $(SCRIPTS_B)
+DISTCLEANFILES = Makefile R.fe R.fe2 R.sh $(SCRIPTS_B)
 
 all: Makefile R
 
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
-R: $(SCRIPTS_B) R.fe
+R: $(SCRIPTS_B) R.fe R.fe2
 	@$(MAKE) rhome=$(top_builddir) install-cmds
 	@$(INSTALL_SCRIPT) R.fe $(top_builddir)/bin/R
 
+R.fe2: 
+	@(d=`echo '$(rhome)' | sed 's,/,\\\/,g';`; \
+	  sed -e "s/\\(R_HOME_DIR=\\).*/\\1$${d}/;" -e "s+\\(R_SHARE_DIR=\\).*+\\1$(rsharedir)+;" -e  "s+\\(R_INCLUDE_DIR=\\).*+\\1$(rincludedir)+;" -e "s+\\(R_DOC_DIR=\\).*+\\1$(rdocdir)+;"\
+	  < R.fe > $@)
+
 ## <NOTE>
 ## Seems we need target rules for creating FOO from FOO.in: pattern
 ## rules ('%:%.in') are not portable, and some versions of Make do not
@@ -95,10 +100,8 @@
 
 install: installdirs install-cmds
 	@rm -f $(bindir)/R
-	@(d=`echo '$(rhome)' | sed 's,/,\\\/,g';`; \
-	  sed -e "s/\\(R_HOME_DIR=\\).*/\\1$${d}/;" -e "s+\\(R_SHARE_DIR=\\).*+\\1$(rsharedir)+;" -e  "s+\\(R_INCLUDE_DIR=\\).*+\\1$(rincludedir)+;" -e "s+\\(R_DOC_DIR=\\).*+\\1$(rdocdir)+;"\
-	  < R.fe > "$(Rexecbindir)/R")
-	@$(INSTALL_SCRIPT)  "$(Rexecbindir)/R" "$(bindir)/R"
+	@$(INSTALL_SCRIPT)  R.fe2 "$(Rexecbindir)/R"
+	@$(INSTALL_SCRIPT)  R.fe2 "$(bindir)/R"
 	@chmod 755 "$(bindir)/R" "$(Rexecbindir)/R"
 ## why of all the scriots does this alone chmod just one copy?
 installdirs:
diff -uNr R-2.5.0/src/unix/Makefile.in R-2.5.0-patched/src/unix/Makefile.in
--- R-2.5.0/src/unix/Makefile.in	2007-03-26 18:41:33.000000000 +0200
+++ R-2.5.0-patched/src/unix/Makefile.in	2007-04-29 14:51:55.000000000 +0200
@@ -26,7 +26,7 @@
 
 @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO)
 
-all: Makefile Makedeps R
+all: Makefile Makedeps R 
 
 Makefile: $(srcdir)/Makefile.in \
   $(top_builddir)/config.status \
@@ -38,11 +38,23 @@
 	@cat $(DEPENDS) >> Makefile
 	@touch $@
 
-R: Makefile
+R: Makefile 
 	@$(MAKE) Makedeps
 @WANT_R_SHLIB_FALSE@	@$(MAKE) libunix.a
 @WANT_R_SHLIB_TRUE@	@$(MAKE) stamp-lo
+	@$(MAKE) rhome=$(abs_top_builddir) build-Rscript
 	@$(MAKE) rhome=$(abs_top_builddir) install-Rscript
+	@$(MAKE) build-Rscript
+	@$(MAKE) build-pc
+
+build-pc:
+	@$(SED) -e "s:@rhome:$(rhome):" -e "s:@rincludedir:$(rincludedir):" \
+	  -e 's/@VERSION/$(VERSION)/' $(srcdir)/libR.pc.in \
+	  > "libR.pc"
+
+build-Rscript:
+	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -DR_HOME='"$(rhome)"' -o Rscript \
+	  $(srcdir)/Rscript.c
 
 ## is this portable?
 ../include/Rversion.h:
@@ -60,22 +72,19 @@
 clean:
 	@-rm -rf .libs _libs
 	@-rm -f Makedeps *.d *.o *.a *.lo *.la stamp-lo
+	@-rm -f Rscript libR.pc
 distclean: clean
 	@-rm -f Makefile
 maintainer-clean: distclean
 
-## we need to build at install time to capture the correct 'rhome'
+## install previously built Rscript
 install-Rscript:
-	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -DR_HOME='"$(rhome)"' -o Rscript \
-	  $(srcdir)/Rscript.c
 	@$(MKINSTALLDIRS) "$(Rexecbindir)"
 	@$(INSTALL_PROGRAM) Rscript "$(Rexecbindir)/Rscript"
-## substitute at install time to allow 'prefix' to be overridden
+## install previously built libR.pc
 install-pc:
 	@$(MKINSTALLDIRS) "$(libdir)/pkgconfig"
-	@$(SED) -e "s:@rhome:$(rhome):" -e "s:@rincludedir:$(rincludedir):" \
-	  -e 's/@VERSION/$(VERSION)/' $(srcdir)/libR.pc.in \
-	  > "$(libdir)/pkgconfig/libR.pc"
+	@$(INSTALL_DATA) libR.pc "$(libdir)/pkgconfig/libR.pc"
 install: install-Rscript @WANT_R_SHLIB_TRUE@ install-pc
 	@$(MKINSTALLDIRS) "$(bindir)"
 	@$(INSTALL_PROGRAM) Rscript "$(bindir)/Rscript"