From dc84018e13523a69ffac47bf86b35a77283a2786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Tue, 26 Sep 2023 00:05:53 +0200 Subject: [PATCH] R 0.4, 0.5 --- r-builds/build.sh | 14 +++-- r-builds/patch/R-0.4.patch | 107 +++++++++++++++++++++++++++++++++++++ r-builds/patch/R-0.5.patch | 107 +++++++++++++++++++++++++++++++++++++ 3 files changed, 225 insertions(+), 3 deletions(-) create mode 100644 r-builds/patch/R-0.4.patch create mode 100644 r-builds/patch/R-0.5.patch diff --git a/r-builds/build.sh b/r-builds/build.sh index b8ccdb7..6382c12 100755 --- a/r-builds/build.sh +++ b/r-builds/build.sh @@ -291,13 +291,21 @@ build_r_historic() { local build_dir="/opt/R/${rver}" ( cd "${build_dir}" - export "PATH=/usr/X11R6/bin:$PATH" - export PATH="`pwd`/src/manual/help:$PATH" + export PATH="/usr/X11R6/bin:$PATH" + export PATH=".:$PATH" + mkdir -p library + mkdir -p psmetrics cd src mkdir -p lib make + if [ "$rver" = "0.5" ]; then + ( + cd library/mva + make || true + ) + fi make install - make help + make help || make man.help ) } diff --git a/r-builds/patch/R-0.4.patch b/r-builds/patch/R-0.4.patch new file mode 100644 index 0000000..35a3888 --- /dev/null +++ b/r-builds/patch/R-0.4.patch @@ -0,0 +1,107 @@ +diff --git a/src/Systems/Linux b/src/Systems/Linux +index f69bebf..2c90cd7 100644 +--- a/src/Systems/Linux ++++ b/src/Systems/Linux +@@ -9,11 +9,11 @@ SYSDEP= -DLinux -DUnix -DPosixArith + X11BASE= /usr/X11R6 + + # C Compiler and Options (-g and/or -O) +-CC= gcc ++CC= gcc-2.95 + CFLAGS= -g -I$(X11BASE)/include $(SYSDEP) + + # Fortran Compiler and Options (-g and/or -O) +-F77= f77 ++F77= g77-2.95 + FFLAGS= -g -w + + # Yacc (Note: Bison does not work, get byacc). +@@ -23,7 +23,7 @@ YACC=yacc + MKLIB= ../tools/library.bsd + + # Create an Executable from Objects and Libraries +-LD= f77 -g ++LD= g77-2.95 -g + + # Libraries to Load Against + LIBS= -L$(X11BASE)/lib -lX11 +diff --git a/src/blas/Makefile.in b/src/blas/Makefile.in +index c3888e5..3b0ed51 100644 +--- a/src/blas/Makefile.in ++++ b/src/blas/Makefile.in +@@ -5,6 +5,9 @@ OBJ= dasum.o daxpy.o dcopy.o ddot.o dmach.o dnrm2.o drot.o \ + libblas.a: $(OBJ) Makefile + $(MKLIB) libblas.a $(OBJ) + ++%.o: %.f ++ $(F77) -g -w -c -o $@ $< ++ + clean: + @echo cleaning in blas + @-rm -f *.o *.a +diff --git a/src/eispack/Makefile.in b/src/eispack/Makefile.in +index 460dea1..604b654 100644 +--- a/src/eispack/Makefile.in ++++ b/src/eispack/Makefile.in +@@ -25,6 +25,9 @@ SRC= bakvec.f balanc.f balbak.f bandr.f bandv.f bisect.f bqr.f \ + libeispack.a: $(OBJ) Makefile + $(MKLIB) libeispack.a $(OBJ) + ++%.o: %.f ++ $(F77) -g -w -c -o $@ $< ++ + clean: + @echo cleaning in eispack + @-rm -f *.o *.a +diff --git a/src/library/base/STARTUP b/src/library/base/STARTUP +index f785fa9..fe6fee9 100644 +--- a/src/library/base/STARTUP ++++ b/src/library/base/STARTUP +@@ -3,4 +3,4 @@ globalEnv := environment() + T := TRUE + F := FALSE + version := makeversion() +-.First := function() x11() ++.First := function() { } +diff --git a/src/linpack/Makefile.in b/src/linpack/Makefile.in +index 67adeca..92e6a3a 100644 +--- a/src/linpack/Makefile.in ++++ b/src/linpack/Makefile.in +@@ -17,6 +17,9 @@ SRC= dchdc.f dchdd.f dchex.f dchud.f dgbco.f dgbdi.f dgbfa.f \ + liblinpack.a: $(OBJ) + $(MKLIB) liblinpack.a $(OBJ) + ++%.o: %.f ++ $(F77) -g -w -c -o $@ $< ++ + clean: + @echo cleaning in linpack + @-rm -f *.o *.a +diff --git a/src/math/Makefile.in b/src/math/Makefile.in +index e94262a..5770832 100755 +--- a/src/math/Makefile.in ++++ b/src/math/Makefile.in +@@ -25,6 +25,9 @@ libmath.a: $(OBJ) + $(MKLIB) libmath.a $(OBJ) + cp Mathlib.h ../main + ++%.o: %.f ++ $(F77) -g -w -c -o $@ $< ++ + $(OBJ): Mathlib.h + + fperror.o: ../config.h +diff --git a/src/stat/Makefile.in b/src/stat/Makefile.in +index 3b2da59..1b77f60 100755 +--- a/src/stat/Makefile.in ++++ b/src/stat/Makefile.in +@@ -17,6 +17,9 @@ OBJ= \ + libstat.a: $(OBJ) + $(MKLIB) libstat.a $(OBJ) + ++%.o: %.f ++ $(F77) -g -w -c -o $@ $< ++ + clean: + @echo cleaning in stat + @-rm -f *.o *.a diff --git a/r-builds/patch/R-0.5.patch b/r-builds/patch/R-0.5.patch new file mode 100644 index 0000000..9b35e3c --- /dev/null +++ b/r-builds/patch/R-0.5.patch @@ -0,0 +1,107 @@ +diff --git a/src/Systems/Linux b/src/Systems/Linux +index f69bebf..2c90cd7 100644 +--- a/src/Systems/Linux ++++ b/src/Systems/Linux +@@ -9,11 +9,11 @@ SYSDEP= -DLinux -DUnix -DPosixArith + X11BASE= /usr/X11R6 + + # C Compiler and Options (-g and/or -O) +-CC= gcc ++CC= gcc-2.95 + CFLAGS= -g -I$(X11BASE)/include $(SYSDEP) + + # Fortran Compiler and Options (-g and/or -O) +-F77= f77 ++F77= g77-2.95 + FFLAGS= -g -w + + # Yacc (Note: Bison does not work, get byacc). +@@ -23,7 +23,7 @@ YACC=yacc + MKLIB= ../tools/library.bsd + + # Create an Executable from Objects and Libraries +-LD= f77 -g ++LD= g77-2.95 -g + + # Libraries to Load Against + LIBS= -L$(X11BASE)/lib -lX11 +diff --git a/src/blas/Makefile.in b/src/blas/Makefile.in +index c3888e5..3b0ed51 100644 +--- a/src/blas/Makefile.in ++++ b/src/blas/Makefile.in +@@ -5,6 +5,9 @@ OBJ= dasum.o daxpy.o dcopy.o ddot.o dmach.o dnrm2.o drot.o \ + libblas.a: $(OBJ) Makefile + $(MKLIB) libblas.a $(OBJ) + ++%.o: %.f ++ $(F77) -g -w -c -o $@ $< ++ + clean: + @echo cleaning in blas + @-rm -f *.o *.a +diff --git a/src/eispack/Makefile.in b/src/eispack/Makefile.in +index 460dea1..604b654 100644 +--- a/src/eispack/Makefile.in ++++ b/src/eispack/Makefile.in +@@ -25,6 +25,9 @@ SRC= bakvec.f balanc.f balbak.f bandr.f bandv.f bisect.f bqr.f \ + libeispack.a: $(OBJ) Makefile + $(MKLIB) libeispack.a $(OBJ) + ++%.o: %.f ++ $(F77) -g -w -c -o $@ $< ++ + clean: + @echo cleaning in eispack + @-rm -f *.o *.a +diff --git a/src/library/base/STARTUP b/src/library/base/STARTUP +index f785fa9..fe6fee9 100644 +--- a/src/library/base/STARTUP ++++ b/src/library/base/STARTUP +@@ -3,4 +3,4 @@ globalEnv := environment() + T := TRUE + F := FALSE + version := makeversion() +-.First := function() x11() ++.First := function() { } +diff --git a/src/linpack/Makefile.in b/src/linpack/Makefile.in +index 67adeca..92e6a3a 100644 +--- a/src/linpack/Makefile.in ++++ b/src/linpack/Makefile.in +@@ -17,6 +17,9 @@ SRC= dchdc.f dchdd.f dchex.f dchud.f dgbco.f dgbdi.f dgbfa.f \ + liblinpack.a: $(OBJ) + $(MKLIB) liblinpack.a $(OBJ) + ++%.o: %.f ++ $(F77) -g -w -c -o $@ $< ++ + clean: + @echo cleaning in linpack + @-rm -f *.o *.a +diff --git a/src/math/Makefile.in b/src/math/Makefile.in +index e94262a..5770832 100755 +--- a/src/math/Makefile.in ++++ b/src/math/Makefile.in +@@ -25,6 +25,9 @@ libmath.a: $(OBJ) + $(MKLIB) libmath.a $(OBJ) + cp Mathlib.h ../main + ++%.o: %.f ++ $(F77) -g -w -c -o $@ $< ++ + $(OBJ): Mathlib.h + + fperror.o: ../config.h +diff --git a/src/stat/Makefile.in b/src/stat/Makefile.in +index 3bd4be0..cb991c7 100755 +--- a/src/stat/Makefile.in ++++ b/src/stat/Makefile.in +@@ -16,6 +16,9 @@ OBJ= \ + libstat.a: $(OBJ) + $(MKLIB) libstat.a $(OBJ) + ++%.o: %.f ++ $(F77) -g -w -c -o $@ $< ++ + clean: + @echo cleaning in stat + @-rm -f *.o *.a