pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pipes-c: Update patches to match upstream fix



Module Name:	pkgsrc-wip
Committed By:	Travis Paul <tr%vispaul.me@localhost>
Pushed By:	tpaul
Date:		Mon Apr 23 14:28:49 2018 +0000
Changeset:	f90b1cd88ce8e4d95042dc83aa7322a9dc18f671

Modified Files:
	pipes-c/distinfo
	pipes-c/patches/patch-src_pipe.c
	pipes-c/patches/patch-src_pipe.h

Log Message:
pipes-c: Update patches to match upstream fix

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f90b1cd88ce8e4d95042dc83aa7322a9dc18f671

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 pipes-c/distinfo                 |  4 ++--
 pipes-c/patches/patch-src_pipe.c | 47 ++++++++++++++++++++++++++--------------
 pipes-c/patches/patch-src_pipe.h | 16 ++++++++------
 3 files changed, 42 insertions(+), 25 deletions(-)

diffs:
diff --git a/pipes-c/distinfo b/pipes-c/distinfo
index 98734dec0a..626a2a9b98 100644
--- a/pipes-c/distinfo
+++ b/pipes-c/distinfo
@@ -4,5 +4,5 @@ SHA1 (pipes.c/pipes-c-1.1.0.tar.gz) = a0e2ebf294358d6781837476b34157fb753309e7
 RMD160 (pipes.c/pipes-c-1.1.0.tar.gz) = 2745285ab146bf942acd99ec1c29bd2c8179bb4d
 SHA512 (pipes.c/pipes-c-1.1.0.tar.gz) = c3ccac2fa65d9a34fed9cc283098b3221d49c2e12d74ec6582db94cbad35f154b7309a5c4919b6422a12c02bbc4ffac125ae56fbc3e6650db91cf2d44d4514ab
 Size (pipes.c/pipes-c-1.1.0.tar.gz) = 142924 bytes
-SHA1 (patch-src_pipe.c) = 81f98cea55a80a83e049b50f9ce610b054f050da
-SHA1 (patch-src_pipe.h) = a4169f207b670923f8923fec31e62bd6d839d096
+SHA1 (patch-src_pipe.c) = a56934c8b9858af0333aa985076cff55574b8a06
+SHA1 (patch-src_pipe.h) = 9e11c204f76c01a4e95c22a578321dd8f3a8a2c5
diff --git a/pipes-c/patches/patch-src_pipe.c b/pipes-c/patches/patch-src_pipe.c
index 3a649433fa..d3b4a98efc 100644
--- a/pipes-c/patches/patch-src_pipe.c
+++ b/pipes-c/patches/patch-src_pipe.c
@@ -1,19 +1,34 @@
 $NetBSD$
-# This enum has a symbol (UP) which conflicts with termcap.h
-# https://github.com/pipeseroni/pipes.c/pull/25
+# Add a CPIPES_ prefix to each member of the DIRECTIONS enum to prevent termcap.h conflict
+# Fixed upstream awaiting new release: https://github.com/pipeseroni/pipes.c/pull/25
 --- src/pipe.c.orig	2018-04-16 23:07:46.000000000 +0000
 +++ src/pipe.c
-@@ -62,6 +62,13 @@ static size_t charwidth(const char *pipe
- //              Right    Down   Left    Up
- char states[][2] = {{1,0}, {0,1}, {-1,0}, {0,-1}};
- 
-+enum DIRECTIONS {
-+    RIGHT = 0,
-+    DOWN = 1,
-+    LEFT = 2,
-+    UP = 3
-+};
-+
- const char * transition_char(char **list, int row, int col){
-     return list[row * 4 + col];
- }
+@@ -266,20 +266,20 @@ void assign_matrices(char *pipe_chars,
+                 break;
+             // Transition chars go ┓,┛,┗,┏
+             case 2:
+-                transition[RIGHT * 4 + DOWN] = c;
+-                transition[UP * 4 + LEFT] = c;
++                transition[CPIPES_RIGHT * 4 + CPIPES_DOWN] = c;
++                transition[CPIPES_UP * 4 + CPIPES_LEFT] = c;
+                 break;
+             case 3:
+-                transition[RIGHT * 4 + UP] = c;
+-                transition[DOWN * 4 + LEFT] = c;
++                transition[CPIPES_RIGHT * 4 + CPIPES_UP] = c;
++                transition[CPIPES_DOWN * 4 + CPIPES_LEFT] = c;
+                 break;
+             case 4:
+-                transition[LEFT * 4 + UP] = c;
+-                transition[DOWN * 4 + RIGHT] = c;
++                transition[CPIPES_LEFT * 4 + CPIPES_UP] = c;
++                transition[CPIPES_DOWN * 4 + CPIPES_RIGHT] = c;
+                 break;
+             case 5:
+-                transition[LEFT * 4 + DOWN] = c;
+-                transition[UP * 4 + RIGHT] = c;
++                transition[CPIPES_LEFT * 4 + CPIPES_DOWN] = c;
++                transition[CPIPES_UP * 4 + CPIPES_RIGHT] = c;
+                 break;
+             default:
+                 // No way to reach here.
diff --git a/pipes-c/patches/patch-src_pipe.h b/pipes-c/patches/patch-src_pipe.h
index d07423568d..7157217843 100644
--- a/pipes-c/patches/patch-src_pipe.h
+++ b/pipes-c/patches/patch-src_pipe.h
@@ -1,18 +1,20 @@
 $NetBSD$
-# This enum has a symbol (UP) which conflicts with termcap.h
-# https://github.com/pipeseroni/pipes.c/pull/25
+# Add a CPIPES_ prefix to each member of the DIRECTIONS enum to prevent termcap.h conflict
+# Fixed upstream awaiting new release: https://github.com/pipeseroni/pipes.c/pull/25
 --- src/pipe.h.orig	2018-04-16 23:07:46.000000000 +0000
 +++ src/pipe.h
-@@ -25,12 +25,6 @@ struct pipe {
-     int x, y;
+@@ -26,10 +26,10 @@ struct pipe {
  };
  
--enum DIRECTIONS {
+ enum DIRECTIONS {
 -    RIGHT = 0,
 -    DOWN = 1,
 -    LEFT = 2,
 -    UP = 3
--};
++    CPIPES_RIGHT = 0,
++    CPIPES_DOWN = 1,
++    CPIPES_LEFT = 2,
++    CPIPES_UP = 3
+ };
  struct palette;
  
- void init_pipe(struct pipe *pipe, struct palette *palette,


Home | Main Index | Thread Index | Old Index