summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2013-07-09 18:37:24 +0000
committerMichael Palimaka <kensington@gentoo.org>2013-07-09 18:37:24 +0000
commit9a5dd942c9cd73bfd9c02b7cb1fed675d37ba550 (patch)
treed87380bdcf1fe4bbaf3be74d912456c37b528a4e /app-shells
parentAdded patch to rename AM_CONFIG_HEADER to AC_CONFIG_HEADER. Closes bug #467536 (diff)
downloadgentoo-2-9a5dd942c9cd73bfd9c02b7cb1fed675d37ba550.tar.gz
gentoo-2-9a5dd942c9cd73bfd9c02b7cb1fed675d37ba550.tar.bz2
gentoo-2-9a5dd942c9cd73bfd9c02b7cb1fed675d37ba550.zip
Remove old.
(Portage version: 2.1.12.12/cvs/Linux x86_64, signed Manifest commit with key 675D0D2C)
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/sash/ChangeLog9
-rw-r--r--app-shells/sash/files/sash-3.6-readline.patch301
-rw-r--r--app-shells/sash/sash-3.7-r1.ebuild44
3 files changed, 6 insertions, 348 deletions
diff --git a/app-shells/sash/ChangeLog b/app-shells/sash/ChangeLog
index 74b5ce36b321..97ae1d20b3fd 100644
--- a/app-shells/sash/ChangeLog
+++ b/app-shells/sash/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-shells/sash
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/sash/ChangeLog,v 1.50 2012/07/08 17:03:32 armin76 Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-shells/sash/ChangeLog,v 1.51 2013/07/09 18:37:24 kensington Exp $
+
+ 09 Jul 2013; Michael Palimaka <kensington@gentoo.org>
+ -files/sash-3.6-readline.patch, -sash-3.7-r1.ebuild:
+ Remove old.
08 Jul 2012; Raúl Porcel <armin76@gentoo.org> sash-3.7-r3.ebuild:
alpha/ia64/m68k/s390/sh/sparc stable wrt #418451
@@ -178,4 +182,3 @@
sash is always static now... previous versions were only built statically
if 'static' USE keyword was set
-
diff --git a/app-shells/sash/files/sash-3.6-readline.patch b/app-shells/sash/files/sash-3.6-readline.patch
deleted file mode 100644
index 79749e48f944..000000000000
--- a/app-shells/sash/files/sash-3.6-readline.patch
+++ /dev/null
@@ -1,301 +0,0 @@
---- sash-3.6/Makefile
-+++ sash-3.6/Makefile
-@@ -19,10 +19,11 @@
- -DHAVE_LINUX_ATTR=$(HAVE_LINUX_ATTR) \
- -DHAVE_LINUX_MOUNT=$(HAVE_LINUX_MOUNT) \
- -DHAVE_BSD_MOUNT=$(HAVE_BSD_MOUNT) \
-- -DMOUNT_TYPE=$(MOUNT_TYPE)
-+ -DMOUNT_TYPE=$(MOUNT_TYPE) \
-+ -DHAVE_READLINE
-
- LDFLAGS = -static -s
--LIBS = -lz
-+LIBS = -lz -lreadline -lncurses
-
-
- BINDIR = /bin
---- sash-3.6/sash.c
-+++ sash-3.6/sash.c
-@@ -384,6 +384,201 @@
- static void usage(void);
- static Alias * findAlias(const char * name);
-
-+#ifdef HAVE_READLINE
-+/*--- Interface of readline 4.0 by vlk@vinf.ru ---*/
-+
-+#include <readline/readline.h>
-+#include <readline/history.h>
-+#include <dirent.h>
-+
-+char * dupstr (char *s);
-+void initialize_readline (void);
-+char ** fileman_completion (char *text, int start, int end);
-+char *command_generator (char *text, int state);
-+void err_alloc(int ErrorNumber);
-+extern char *xmalloc ();
-+
-+static char ** listBase;
-+static long listSize;
-+
-+void
-+err_alloc(int ErrorNumber)
-+{
-+ fprintf(stderr, "Memory space failed: %d\n",ErrorNumber);
-+ return;
-+}
-+
-+/* Add a one item to exec-command array */
-+static int
-+listAdd(const char * new_item)
-+{
-+ if ((listBase = realloc(listBase, sizeof(char *) * ( listSize + 1 ))) == 0 )
-+ {
-+ err_alloc(3); exit(1);
-+ }
-+ listBase[listSize] = strdup(new_item);
-+ listSize++;
-+ return(0);
-+}
-+
-+static int
-+genExecList(void)
-+{
-+ char * dirName;
-+ char * path;
-+ char * endPath;
-+ char * fullName;
-+ struct dirent **namelist;
-+ int n;
-+
-+ if (getenv("PATH") == 0)
-+ return(1);
-+ else
-+ {
-+ if ((path = strdup(getenv("PATH"))) == 0)
-+ {
-+ err_alloc(4);
-+ return(1);
-+ }
-+ }
-+ /*
-+ * Check out each path to see if the program exists and is
-+ * executable in that path.
-+ */
-+ for ( ; path; path = endPath)
-+ {
-+ /*
-+ * Find the end of the next path and NULL terminate
-+ * it if necessary.
-+ */
-+ endPath = strchr(path, ':');
-+
-+ if (endPath)
-+ *endPath++ = '\0';
-+
-+ /*
-+ * Get the directory name, defaulting it to DOT if
-+ * it is null.
-+ */
-+ dirName = path;
-+
-+ /*
-+ * See if the program exists and is executable.
-+ */
-+ if (access(dirName, F_OK) < 0)
-+ {
-+ if (errno != ENOENT)
-+ printf("%s: %s\n", dirName, strerror(errno));
-+
-+ continue;
-+ }
-+ n = scandir(dirName, &namelist, 0, alphasort);
-+ if (n < 0)
-+ perror("scandir");
-+ else
-+ while(n--)
-+ {
-+ if (strncmp(namelist[n]->d_name,".",1) != 0)
-+ {
-+ fullName = malloc(sizeof(dirName) + 1 \
-+ + sizeof(namelist[n]->d_name));
-+ strcpy(fullName, dirName);
-+ strcat(fullName, "/");
-+ strcat(fullName, namelist[n]->d_name);
-+ if (access(fullName,X_OK|F_OK) == 0)
-+ listAdd(namelist[n]->d_name);
-+ }
-+ }
-+ }
-+return(0);
-+}
-+
-+/******************************************************************/
-+/* BEGIN Interface to Readline Completion */
-+/******************************************************************/
-+
-+char * dupstr (char *s)
-+{
-+ char *r;
-+
-+ r = xmalloc (strlen (s) + 1);
-+ strcpy (r, s);
-+ return (r);
-+}
-+
-+/* Tell the GNU Readline library how to complete. We want to try to complete
-+ on command names if this is the first word in the line, or on filenames
-+ if not. */
-+void initialize_readline (void)
-+{
-+ /* Allow conditional parsing of the ~/.inputrc file. */
-+ rl_readline_name = "readline";
-+
-+ /* Tell the completer that we want a crack first. */
-+ rl_attempted_completion_function = (CPPFunction *)fileman_completion;
-+}
-+
-+/* Attempt to complete on the contents of TEXT. START and END bound the
-+ region of rl_line_buffer that contains the word to complete. TEXT is
-+ the word to complete. We can use the entire contents of rl_line_buffer
-+ in case we want to do some simple parsing. Return the array of matches,
-+ or NULL if there aren't any. */
-+char ** fileman_completion (char *text, int start, int end)
-+{
-+ char **matches;
-+
-+ matches = (char **)NULL;
-+
-+ /* If this word is at the start of the line, then it is a command
-+ to complete. Otherwise it is the name of a file in the current
-+ directory. */
-+ if (start == 0) // is it the begin of string ?
-+ matches = rl_completion_matches (text, command_generator);
-+ return (matches);
-+}
-+
-+/* Generator function for command completion. STATE lets us know whether
-+ to start from scratch; without any state (i.e. STATE == 0), then we
-+ start at the top of the list. */
-+char * command_generator (char *text, int state)
-+{
-+ static int list_index, len;
-+ char *ename;
-+ static long exec_count;
-+
-+ /* If this is a new word to complete, initialize now. This includes
-+ saving the length of TEXT for efficiency, and initializing the index
-+ variable to 0. */
-+ if (!state)
-+ {
-+ exec_count = 0;
-+ list_index = 0;
-+ len = strlen (text);
-+ }
-+
-+ /* Return the next name which partially matches from the command list. */
-+
-+ while (ename = (char*)commandEntryTable[list_index].name)
-+ {
-+ list_index++;
-+ if (strncmp (ename, text, len) == 0)
-+ return (dupstr(ename));
-+ }
-+
-+ while (exec_count < listSize)
-+ {
-+ ename = listBase[exec_count];
-+ exec_count++;
-+ if (strncmp (ename, text, len) == 0)
-+ return(dupstr(ename));
-+ }
-+ /* If no names matched, then return NULL. */
-+ return ((char *)NULL);
-+}
-+/******************************************************************/
-+/* END Interface to Readline Completion */
-+/******************************************************************/
-+#endif
-
- /*
- * Global interrupt flag.
-@@ -405,7 +600,16 @@
- commandFile = NULL;
- quietFlag = FALSE;
- aliasFlag = FALSE;
-+#ifdef HAVE_READLINE
-+ /*
-+ * Default our path if it is not set.
-+ */
-+ if (getenv("PATH") == NULL)
-+ putenv("PATH=/bin:/usr/bin:/sbin:/usr/sbin");
-
-+ genExecList();
-+ initialize_readline (); /* Bind our completer. */
-+#endif
- /*
- * Look for options.
- */
-@@ -554,6 +758,9 @@
- static void
- readFile(const char * name)
- {
-+#ifdef HAVE_READLINE
-+ char *input_line = NULL;
-+#endif
- FILE * fp;
- int cc;
- BOOL ttyFlag;
-@@ -586,9 +793,10 @@
-
- while (TRUE)
- {
-- if (ttyFlag)
-+#ifndef HAVE_READLINE
-+ if (ttyFlag)
- showPrompt();
--
-+#endif
- if (intFlag && !ttyFlag && (fp != stdin))
- {
- fclose(fp);
-@@ -805,17 +805,34 @@
- return;
- }
-
-- if (fgets(buf, CMD_LEN - 1, fp) == NULL)
-+#ifdef HAVE_READLINE
-+ if (name != NULL)
- {
-- if (ferror(fp) && (errno == EINTR))
-+#endif
-+ if (fgets(buf, CMD_LEN - 1, fp) == NULL)
- {
-- clearerr(fp);
-+ if (ferror(fp) && (errno == EINTR))
-+ {
-+ clearerr(fp);
-+ continue;
-+ }
-
-- continue;
-+ break;
- }
--
-- break;
-+#ifdef HAVE_READLINE
- }
-+ if (name == NULL)
-+ {
-+ input_line = readline(prompt ? prompt : "$ ");
-+ if (input_line)
-+ {
-+ if (*input_line)
-+ add_history(input_line);
-+ strcpy(buf,input_line);
-+ }
-+ free(input_line);
-+ }
-+#endif
-
- cc = strlen(buf);
-
diff --git a/app-shells/sash/sash-3.7-r1.ebuild b/app-shells/sash/sash-3.7-r1.ebuild
deleted file mode 100644
index 501056b23706..000000000000
--- a/app-shells/sash/sash-3.7-r1.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/sash/sash-3.7-r1.ebuild,v 1.4 2011/09/25 19:43:27 vapier Exp $
-
-EAPI="3"
-
-inherit eutils flag-o-matic toolchain-funcs
-
-DESCRIPTION="A small static UNIX Shell with readline support"
-HOMEPAGE="http://www.canb.auug.org.au/~dbell/ http://dimavb.st.simbirsk.su/vlk/"
-SRC_URI="http://www.canb.auug.org.au/~dbell/programs/${P}.tar.gz"
-
-LICENSE="freedist"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
-IUSE="readline"
-
-DEPEND="|| ( <sys-libs/zlib-1.2.5.1-r2 sys-libs/zlib[static-libs] )
- readline? (
- >=sys-libs/readline-4.1
- sys-libs/ncurses[static-libs]
- )"
-RDEPEND=""
-
-src_prepare() {
- epatch "${FILESDIR}"/sash-3.7-builtin.patch
- use readline && epatch "${FILESDIR}"/sash-3.6-readline.patch
-
- sed -i \
- -e "s:-O3:${CFLAGS}:" \
- -e "/^LDFLAGS /s: -s$: ${LDFLAGS}:" \
- Makefile || die
-}
-
-src_compile() {
- emake CC="$(tc-getCC)" || die
-}
-
-src_install() {
- into /
- dobin sash || die
- doman sash.1
- dodoc README
-}