diff --git a/packages/rcshell/build.sh b/packages/rcshell/build.sh new file mode 100644 index 000000000..f696e2a1d --- /dev/null +++ b/packages/rcshell/build.sh @@ -0,0 +1,13 @@ +TERMUX_PKG_HOMEPAGE=http://tobold.org/article/rc +TERMUX_PKG_DESCRIPTION="An alternative implementation of the plan 9 rc shell" +TERMUX_PKG_LICENSE="ZLIB" +TERMUX_PKG_VERSION=1.7.4 +TERMUX_PKG_SRCURL=http://static.tobold.org/rc/rc-$TERMUX_PKG_VERSION.tar.gz +TERMUX_PKG_SHA256=5ed26334dd0c1a616248b15ad7c90ca678ae3066fa02c5ddd0e6936f9af9bfd8 +TERMUX_PKG_DEPENDS="readline" +TERMUX_PKG_BUILD_IN_SRC=true + +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +ac_cv_func_setpgrp_void=yes +rc_cv_sysv_sigcld=no +" diff --git a/packages/rcshell/rc-1.7.4_Makefile.in.patch b/packages/rcshell/rc-1.7.4_Makefile.in.patch new file mode 100644 index 000000000..64c7478e1 --- /dev/null +++ b/packages/rcshell/rc-1.7.4_Makefile.in.patch @@ -0,0 +1,20 @@ +diff -uNr rc-1.7.4/Makefile.in rc-1.7.4.mod/Makefile.in +--- rc-1.7.4/Makefile.in 2015-05-14 00:26:18.000000000 +0300 ++++ rc-1.7.4.mod/Makefile.in 2020-01-01 19:24:41.726859279 +0200 +@@ -438,13 +438,13 @@ + @rm -f history$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(history_OBJECTS) $(history_LDADD) $(LIBS) + +-mksignal$(EXEEXT): $(mksignal_OBJECTS) $(mksignal_DEPENDENCIES) $(EXTRA_mksignal_DEPENDENCIES) ++mksignal$(EXEEXT): $(mksignal_SOURCES) $(mksignal_DEPENDENCIES) $(EXTRA_mksignal_DEPENDENCIES) + @rm -f mksignal$(EXEEXT) +- $(AM_V_CCLD)$(LINK) $(mksignal_OBJECTS) $(mksignal_LDADD) $(LIBS) ++ $(AM_V_CCLD)gcc $(mksignal_SOURCES) $(mksignal_LDADD) $(LIBS) -o mksignal$(EXEEXT) + + mkstatval$(EXEEXT): $(mkstatval_OBJECTS) $(mkstatval_DEPENDENCIES) $(EXTRA_mkstatval_DEPENDENCIES) + @rm -f mkstatval$(EXEEXT) +- $(AM_V_CCLD)$(LINK) $(mkstatval_OBJECTS) $(mkstatval_LDADD) $(LIBS) ++ $(AM_V_CCLD)gcc $(mkstatval_SOURCES) $(mkstatval_LDADD) $(LIBS) -o mkstatval$(EXEEXT) + + rc$(EXEEXT): $(rc_OBJECTS) $(rc_DEPENDENCIES) $(EXTRA_rc_DEPENDENCIES) + @rm -f rc$(EXEEXT) diff --git a/packages/rcshell/rc-1.7.4_glom.c.patch b/packages/rcshell/rc-1.7.4_glom.c.patch new file mode 100644 index 000000000..05c90003c --- /dev/null +++ b/packages/rcshell/rc-1.7.4_glom.c.patch @@ -0,0 +1,12 @@ +diff -uNr rc-1.7.4/glom.c rc-1.7.4.mod/glom.c +--- rc-1.7.4/glom.c 2015-04-03 11:07:24.000000000 +0300 ++++ rc-1.7.4.mod/glom.c 2020-01-01 19:16:28.519880748 +0200 +@@ -338,7 +338,7 @@ + List *ret = nnew(List); + static int fifonumber = 0; + +- name = nprint("/tmp/rc%d.%d", getpid(), fifonumber++); ++ name = nprint("@TERMUX_PREFIX@/tmp/rc%d.%d", getpid(), fifonumber++); + if (mkfifo(name, 0666) < 0) { + uerror("mkfifo"); + return NULL; diff --git a/packages/rcshell/rc-1.7.4_history.c.patch b/packages/rcshell/rc-1.7.4_history.c.patch new file mode 100644 index 000000000..335f1ce2a --- /dev/null +++ b/packages/rcshell/rc-1.7.4_history.c.patch @@ -0,0 +1,12 @@ +diff -uNr rc-1.7.4/history.c rc-1.7.4.mod/history.c +--- rc-1.7.4/history.c 2015-04-03 11:07:24.000000000 +0300 ++++ rc-1.7.4.mod/history.c 2020-01-01 19:16:57.983948748 +0200 +@@ -338,7 +338,7 @@ + if (!editit) + fprintf(stderr, "%s\n", s); + if (shell == NULL) +- shell = "/bin/sh"; ++ shell = "@TERMUX_PREFIX@/bin/sh"; + execl(shell, rc_basename(shell), "-c", s, NULL); + perror(shell); + exit(1);