about summary refs log tree commit diff
path: root/pkgs/development/tools/cdecl
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-03-07 22:12:12 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-03-07 22:12:12 +0000
commitf1f834f26091c39a10fc09078d93651afeb031cf (patch)
tree63e521845d940c4e7c6014200dd833a3745ff6ed /pkgs/development/tools/cdecl
parent11f64b0449c91b0ede4b3bb672eb922f60c0e296 (diff)
downloadnixlib-f1f834f26091c39a10fc09078d93651afeb031cf.tar
nixlib-f1f834f26091c39a10fc09078d93651afeb031cf.tar.gz
nixlib-f1f834f26091c39a10fc09078d93651afeb031cf.tar.bz2
nixlib-f1f834f26091c39a10fc09078d93651afeb031cf.tar.lz
nixlib-f1f834f26091c39a10fc09078d93651afeb031cf.tar.xz
nixlib-f1f834f26091c39a10fc09078d93651afeb031cf.tar.zst
nixlib-f1f834f26091c39a10fc09078d93651afeb031cf.zip
Adding patches for cdecl to build. I picked them from:
http://gentoo-overlays.zugaina.org/gentoo/portage/dev-util/cdecl/files/


svn path=/nixpkgs/trunk/; revision=32866
Diffstat (limited to 'pkgs/development/tools/cdecl')
-rw-r--r--pkgs/development/tools/cdecl/cdecl-2.5-gentoo.patch29
-rw-r--r--pkgs/development/tools/cdecl/cdecl-2.5-implicit-pointer.patch12
-rw-r--r--pkgs/development/tools/cdecl/default.nix2
3 files changed, 42 insertions, 1 deletions
diff --git a/pkgs/development/tools/cdecl/cdecl-2.5-gentoo.patch b/pkgs/development/tools/cdecl/cdecl-2.5-gentoo.patch
new file mode 100644
index 000000000000..b3a67515620c
--- /dev/null
+++ b/pkgs/development/tools/cdecl/cdecl-2.5-gentoo.patch
@@ -0,0 +1,29 @@
+--- a/cdecl.c	2009-07-07 13:20:37.000000000 +0200
++++ a/cdecl.c.new	2009-07-07 13:25:00.000000000 +0200
+@@ -91,7 +91,7 @@
+ #ifdef USE_READLINE
+ # include <readline/readline.h>
+   /* prototypes for functions related to readline() */
+-  char * getline();
++  char * mygetline();
+   char ** attempt_completion(char *, int, int);
+   char * keyword_completion(char *, int);
+   char * command_completion(char *, int);
+@@ -375,7 +375,7 @@
+ static char *line_read = NULL;
+ 
+ /* Read a string, and return a pointer to it.  Returns NULL on EOF. */
+-char * getline ()
++char * mygetline ()
+ {
+   /* If the buffer has already been allocated, return the memory
+      to the free pool. */
+@@ -887,7 +887,7 @@
+ 
+ 	if (!quiet) (void) printf("Type `help' or `?' for help\n");
+ 	ret = 0;
+-	while ((line = getline())) {
++	while ((line = mygetline())) {
+ 	    if (!strcmp(line, "quit") || !strcmp(line, "exit")) {
+ 		free(line);
+ 		return ret;
diff --git a/pkgs/development/tools/cdecl/cdecl-2.5-implicit-pointer.patch b/pkgs/development/tools/cdecl/cdecl-2.5-implicit-pointer.patch
new file mode 100644
index 000000000000..ee4949beb6ed
--- /dev/null
+++ b/pkgs/development/tools/cdecl/cdecl-2.5-implicit-pointer.patch
@@ -0,0 +1,12 @@
+Index: cdecl-2.5/cdecl.c
+===================================================================
+--- cdecl-2.5.orig/cdecl.c
++++ cdecl-2.5/cdecl.c
+@@ -204,6 +204,7 @@ int DebugFlag = 0;		/* -d, output debugg
+ #define ANSI	4	/* combo not allowed anymore in ANSI compiler */
+ #define A	ANSI
+ 
++extern char **completion_matches PARAMS((char *, rl_compentry_func_t *));
+ /* This is an lower left triangular array. If we needed */
+ /* to save 9 bytes, the "long" row can be removed. */
+ char crosscheck[9][9] = {
\ No newline at end of file
diff --git a/pkgs/development/tools/cdecl/default.nix b/pkgs/development/tools/cdecl/default.nix
index c2682391c559..2c7010e44fec 100644
--- a/pkgs/development/tools/cdecl/default.nix
+++ b/pkgs/development/tools/cdecl/default.nix
@@ -7,7 +7,7 @@ stdenv.mkDerivation {
     md5 = "29895dab52e85b2474a59449e07b7996";
   };
 
-  patches = [ ./cdecl-2.5.patch ];
+  patches = [ ./cdecl-2.5-implicit-pointer.patch ./cdecl-2.5.patch ./cdecl-2.5-gentoo.patch ];
   preBuild = "
     makeFlags=\"PREFIX=$out\"
   ";