Mon Oct 30 11:45:14 2017 UTC ()
fish: Unbreak build on non-NetBSD.


(jperkin)
diff -r1.10 -r1.11 pkgsrc/shells/fish/distinfo
diff -r1.2 -r1.3 pkgsrc/shells/fish/patches/patch-configure.ac
diff -r1.2 -r1.3 pkgsrc/shells/fish/patches/patch-src_fallback.h
diff -r1.1 -r1.2 pkgsrc/shells/fish/patches/patch-src_output.cpp
diff -r1.1 -r1.2 pkgsrc/shells/fish/patches/patch-src_output.h
diff -r1.1 -r1.2 pkgsrc/shells/fish/patches/patch-src_screen.cpp

cvs diff -r1.10 -r1.11 pkgsrc/shells/fish/distinfo (expand / switch to unified diff)

--- pkgsrc/shells/fish/distinfo 2017/10/25 09:32:38 1.10
+++ pkgsrc/shells/fish/distinfo 2017/10/30 11:45:13 1.11
@@ -1,14 +1,15 @@ @@ -1,14 +1,15 @@
1$NetBSD: distinfo,v 1.10 2017/10/25 09:32:38 maya Exp $ 1$NetBSD: distinfo,v 1.11 2017/10/30 11:45:13 jperkin Exp $
2 2
3SHA1 (fish-2.6.0.tar.gz) = 16f6612747f8013cd04b3639fe504d4750f363ca 3SHA1 (fish-2.6.0.tar.gz) = 16f6612747f8013cd04b3639fe504d4750f363ca
4RMD160 (fish-2.6.0.tar.gz) = f12093fef235487b7c02c245cbbd600750fff874 4RMD160 (fish-2.6.0.tar.gz) = f12093fef235487b7c02c245cbbd600750fff874
5SHA512 (fish-2.6.0.tar.gz) = d4ded5ce24600e85673a7bb016e9dc36bce999b27f40e6b1ce0b9ca49a421be2d444d9d2b6f178f6eee963e59daa4a65df4c3de2a8086a610486f758fcfb0ed1 5SHA512 (fish-2.6.0.tar.gz) = d4ded5ce24600e85673a7bb016e9dc36bce999b27f40e6b1ce0b9ca49a421be2d444d9d2b6f178f6eee963e59daa4a65df4c3de2a8086a610486f758fcfb0ed1
6Size (fish-2.6.0.tar.gz) = 3575346 bytes 6Size (fish-2.6.0.tar.gz) = 3575346 bytes
7SHA1 (patch-Makefile.in) = e2f5722d2e08e644e0813a662b64bbfe811a8ec6 7SHA1 (patch-Makefile.in) = e2f5722d2e08e644e0813a662b64bbfe811a8ec6
8SHA1 (patch-configure.ac) = ba20a0182920e2dfb0851038e00875331ba94196 8SHA1 (patch-configure.ac) = 05bad922ce93d5624f8c98a210e473ad702fbe8d
9SHA1 (patch-src_builtin.cpp) = b48a52d45ba545a92043e58dc554305670c7fcfc 9SHA1 (patch-src_builtin.cpp) = b48a52d45ba545a92043e58dc554305670c7fcfc
10SHA1 (patch-src_fallback.h) = 9ca7e829c663d744165fc06ff50ec101ae20091d 10SHA1 (patch-src_fallback.cpp) = 4a35401ed0d3c3a912e448d56c9375801c919fbc
11SHA1 (patch-src_output.cpp) = 36a2cc0576aca6585090a1b5b32aa39c90ed3996 11SHA1 (patch-src_fallback.h) = e58b29135404211b841232d68e76facdfecc653b
12SHA1 (patch-src_output.h) = 8e72aefbd940450fb69f4b970ce1d151f17eb48a 12SHA1 (patch-src_output.cpp) = ce8a5043982b0f1dc28d56eaaf4ac2c1d4d1e0c6
13SHA1 (patch-src_screen.cpp) = f2d5e10dff9d09e985a8e27a8f2066dcfb58db05 13SHA1 (patch-src_output.h) = 971dfe5e137f46b52a56d808c32bf643750ad65a
 14SHA1 (patch-src_screen.cpp) = acac708ab49a66daf7de274e5d3ed77bb73ab724
14SHA1 (patch-src_wutil.cpp) = dbb73cf81d850c4b73598d0c711f68b0d74cabd6 15SHA1 (patch-src_wutil.cpp) = dbb73cf81d850c4b73598d0c711f68b0d74cabd6

cvs diff -r1.2 -r1.3 pkgsrc/shells/fish/patches/Attic/patch-configure.ac (expand / switch to unified diff)

--- pkgsrc/shells/fish/patches/Attic/patch-configure.ac 2017/10/25 09:32:38 1.2
+++ pkgsrc/shells/fish/patches/Attic/patch-configure.ac 2017/10/30 11:45:14 1.3
@@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
1$NetBSD: patch-configure.ac,v 1.2 2017/10/25 09:32:38 maya Exp $ 1$NetBSD: patch-configure.ac,v 1.3 2017/10/30 11:45:14 jperkin Exp $
 2
 3Work around NetBSD curses.
2 4
3--- configure.ac.orig 2017-06-03 12:45:13.000000000 +0000 5--- configure.ac.orig 2017-06-03 12:45:13.000000000 +0000
4+++ configure.ac 6+++ configure.ac
5@@ -251,6 +251,9 @@ AC_CHECK_FILES([/proc/self/stat]) 7@@ -251,6 +251,9 @@ AC_CHECK_FILES([/proc/self/stat])
6 AC_DEFINE([NCURSES_NOMACROS], [1], [Define to 1 to disable ncurses macros that conflict with the STL]) 8 AC_DEFINE([NCURSES_NOMACROS], [1], [Define to 1 to disable ncurses macros that conflict with the STL])
7 AC_DEFINE([NOMACROS], [1], [Define to 1 to disable curses macros that conflict with the STL]) 9 AC_DEFINE([NOMACROS], [1], [Define to 1 to disable curses macros that conflict with the STL])
8  10
9+# Get variadic tparm on NetBSD curses 11+# Get variadic tparm on NetBSD curses
10+AC_DEFINE([TPARM_VARARGS], [1], [Define to 1 to get variadic tparm on NetBSD curses]) 12+AC_DEFINE([TPARM_VARARGS], [1], [Define to 1 to get variadic tparm on NetBSD curses])
11+ 13+
12 # Threading is excitingly broken on Solaris without adding -pthread to CXXFLAGS 14 # Threading is excitingly broken on Solaris without adding -pthread to CXXFLAGS
13 # Only support GCC for now 15 # Only support GCC for now
14 dnl Ideally we would use the AX_PTHREAD macro here, but it's GPL3-licensed 16 dnl Ideally we would use the AX_PTHREAD macro here, but it's GPL3-licensed

cvs diff -r1.2 -r1.3 pkgsrc/shells/fish/patches/Attic/patch-src_fallback.h (expand / switch to unified diff)

--- pkgsrc/shells/fish/patches/Attic/patch-src_fallback.h 2017/10/25 09:32:38 1.2
+++ pkgsrc/shells/fish/patches/Attic/patch-src_fallback.h 2017/10/30 11:45:14 1.3
@@ -1,13 +1,15 @@ @@ -1,13 +1,15 @@
1$NetBSD: patch-src_fallback.h,v 1.2 2017/10/25 09:32:38 maya Exp $ 1$NetBSD: patch-src_fallback.h,v 1.3 2017/10/30 11:45:14 jperkin Exp $
 2
 3Work around NetBSD curses.
2 4
3--- src/fallback.h.orig 2017-06-03 12:45:13.000000000 +0000 5--- src/fallback.h.orig 2017-06-03 12:45:13.000000000 +0000
4+++ src/fallback.h 6+++ src/fallback.h
5@@ -37,7 +37,7 @@ int fish_mkstemp_cloexec(char *); 7@@ -37,7 +37,7 @@ int fish_mkstemp_cloexec(char *);
6 /// Under curses, tputs expects an int (*func)(char) as its last parameter, but in ncurses, tputs 8 /// Under curses, tputs expects an int (*func)(char) as its last parameter, but in ncurses, tputs
7 /// expects a int (*func)(int) as its last parameter. tputs_arg_t is defined to always be what tputs 9 /// expects a int (*func)(int) as its last parameter. tputs_arg_t is defined to always be what tputs
8 /// expects. Hopefully. 10 /// expects. Hopefully.
9-#ifdef NCURSES_VERSION 11-#ifdef NCURSES_VERSION
10+#if defined(NCURSES_VERSION) || defined(__NetBSD__) 12+#if defined(NCURSES_VERSION) || defined(__NetBSD__)
11 typedef int tputs_arg_t; 13 typedef int tputs_arg_t;
12 #else 14 #else
13 typedef char tputs_arg_t; 15 typedef char tputs_arg_t;

cvs diff -r1.1 -r1.2 pkgsrc/shells/fish/patches/Attic/patch-src_output.cpp (expand / switch to unified diff)

--- pkgsrc/shells/fish/patches/Attic/patch-src_output.cpp 2017/10/24 03:51:41 1.1
+++ pkgsrc/shells/fish/patches/Attic/patch-src_output.cpp 2017/10/30 11:45:14 1.2
@@ -1,22 +1,31 @@ @@ -1,22 +1,31 @@
1$NetBSD: patch-src_output.cpp,v 1.1 2017/10/24 03:51:41 maya Exp $ 1$NetBSD: patch-src_output.cpp,v 1.2 2017/10/30 11:45:14 jperkin Exp $
 2
 3Work around NetBSD curses.
2 4
3--- src/output.cpp.orig 2017-06-03 12:45:13.000000000 +0000 5--- src/output.cpp.orig 2017-06-03 12:45:13.000000000 +0000
4+++ src/output.cpp 6+++ src/output.cpp
5@@ -63,7 +63,7 @@ unsigned char index_for_color(rgb_color_ 7@@ -63,10 +63,14 @@ unsigned char index_for_color(rgb_color_
6 return c.to_term256_index(); 8 return c.to_term256_index();
7 } 9 }
8  10
9-static bool write_color_escape(char *todo, unsigned char idx, bool is_fg) { 11-static bool write_color_escape(char *todo, unsigned char idx, bool is_fg) {
10+static bool write_color_escape(const char *todo, unsigned char idx, bool is_fg) { 12+static bool write_color_escape(const char *todo, unsigned char idx, bool is_fg) {
11 if (term_supports_color_natively(idx)) { 13 if (term_supports_color_natively(idx)) {
12 // Use tparm to emit color escape. 14 // Use tparm to emit color escape.
 15+#ifdef __NetBSD__
13 writembs(tparm(todo, idx)); 16 writembs(tparm(todo, idx));
14@@ -550,7 +550,7 @@ rgb_color_t parse_color(const wcstring & 17+#else
 18+ writembs(tparm((char *)todo, idx));
 19+#endif
 20 return true;
 21 }
 22
 23@@ -550,7 +554,7 @@ rgb_color_t parse_color(const wcstring &
15 } 24 }
16  25
17 /// Write specified multibyte string. 26 /// Write specified multibyte string.
18-void writembs_check(char *mbs, const char *mbs_name, const char *file, long line) { 27-void writembs_check(char *mbs, const char *mbs_name, const char *file, long line) {
19+void writembs_check(const char *mbs, const char *mbs_name, const char *file, long line) { 28+void writembs_check(const char *mbs, const char *mbs_name, const char *file, long line) {
20 if (mbs != NULL) { 29 if (mbs != NULL) {
21 tputs(mbs, 1, &writeb); 30 tputs(mbs, 1, &writeb);
22 } else { 31 } else {

cvs diff -r1.1 -r1.2 pkgsrc/shells/fish/patches/Attic/patch-src_output.h (expand / switch to unified diff)

--- pkgsrc/shells/fish/patches/Attic/patch-src_output.h 2017/10/24 03:51:41 1.1
+++ pkgsrc/shells/fish/patches/Attic/patch-src_output.h 2017/10/30 11:45:14 1.2
@@ -1,13 +1,15 @@ @@ -1,13 +1,15 @@
1$NetBSD: patch-src_output.h,v 1.1 2017/10/24 03:51:41 maya Exp $ 1$NetBSD: patch-src_output.h,v 1.2 2017/10/30 11:45:14 jperkin Exp $
 2
 3Work around NetBSD curses.
2 4
3--- src/output.h.orig 2017-06-03 12:45:13.000000000 +0000 5--- src/output.h.orig 2017-06-03 12:45:13.000000000 +0000
4+++ src/output.h 6+++ src/output.h
5@@ -29,7 +29,7 @@ enum { 7@@ -29,7 +29,7 @@ enum {
6  8
7 void set_color(rgb_color_t c, rgb_color_t c2); 9 void set_color(rgb_color_t c, rgb_color_t c2);
8  10
9-void writembs_check(char *mbs, const char *mbs_name, const char *file, long line); 11-void writembs_check(char *mbs, const char *mbs_name, const char *file, long line);
10+void writembs_check(const char *mbs, const char *mbs_name, const char *file, long line); 12+void writembs_check(const char *mbs, const char *mbs_name, const char *file, long line);
11 #define writembs(mbs) writembs_check((mbs), #mbs, __FILE__, __LINE__) 13 #define writembs(mbs) writembs_check((mbs), #mbs, __FILE__, __LINE__)
12  14
13 int writech(wint_t ch); 15 int writech(wint_t ch);

cvs diff -r1.1 -r1.2 pkgsrc/shells/fish/patches/Attic/patch-src_screen.cpp (expand / switch to unified diff)

--- pkgsrc/shells/fish/patches/Attic/patch-src_screen.cpp 2017/10/24 03:51:41 1.1
+++ pkgsrc/shells/fish/patches/Attic/patch-src_screen.cpp 2017/10/30 11:45:14 1.2
@@ -1,49 +1,87 @@ @@ -1,49 +1,87 @@
1$NetBSD: patch-src_screen.cpp,v 1.1 2017/10/24 03:51:41 maya Exp $ 1$NetBSD: patch-src_screen.cpp,v 1.2 2017/10/30 11:45:14 jperkin Exp $
 2
 3Work around NetBSD curses.
2 4
3--- src/screen.cpp.orig 2017-06-03 12:45:13.000000000 +0000 5--- src/screen.cpp.orig 2017-06-03 12:45:13.000000000 +0000
4+++ src/screen.cpp 6+++ src/screen.cpp
5@@ -215,7 +215,7 @@ static bool is_color_escape_seq(const wc 7@@ -215,7 +215,7 @@ static bool is_color_escape_seq(const wc
6  8
7 // Detect these terminfo color escapes with parameter value up to max_colors, all of which 9 // Detect these terminfo color escapes with parameter value up to max_colors, all of which
8 // don't move the cursor. 10 // don't move the cursor.
9- char *const esc[] = { 11- char *const esc[] = {
10+ const char *const esc[] = { 12+ const char *const esc[] = {
11 set_a_foreground, set_a_background, set_foreground, set_background, 13 set_a_foreground, set_a_background, set_foreground, set_background,
12 }; 14 };
13  15
14@@ -238,7 +238,7 @@ static bool is_color_escape_seq(const wc 16@@ -223,7 +223,11 @@ static bool is_color_escape_seq(const wc
 17 if (!esc[p]) continue;
 18
 19 for (int k = 0; k < max_colors; k++) {
 20+#ifdef __NetBSD__
 21 size_t esc_seq_len = try_sequence(tparm(esc[p], k), code);
 22+#else
 23+ size_t esc_seq_len = try_sequence(tparm((char *)esc[p], k), code);
 24+#endif
 25 if (esc_seq_len) {
 26 *resulting_length = esc_seq_len;
 27 return true;
 28@@ -238,7 +242,7 @@ static bool is_color_escape_seq(const wc
15 /// displayed other than the color. 29 /// displayed other than the color.
16 static bool is_visual_escape_seq(const wchar_t *code, size_t *resulting_length) { 30 static bool is_visual_escape_seq(const wchar_t *code, size_t *resulting_length) {
17 if (!cur_term) return false; 31 if (!cur_term) return false;
18- char *const esc2[] = { 32- char *const esc2[] = {
19+ const char *const esc2[] = { 33+ const char *const esc2[] = {
20 enter_bold_mode, exit_attribute_mode, enter_underline_mode, exit_underline_mode, 34 enter_bold_mode, exit_attribute_mode, enter_underline_mode, exit_underline_mode,
21 enter_standout_mode, exit_standout_mode, flash_screen, enter_subscript_mode, 35 enter_standout_mode, exit_standout_mode, flash_screen, enter_subscript_mode,
22 exit_subscript_mode, enter_superscript_mode, exit_superscript_mode, enter_blink_mode, 36 exit_subscript_mode, enter_superscript_mode, exit_superscript_mode, enter_blink_mode,
23@@ -506,7 +506,7 @@ static void s_move(screen_t *s, data_buf 37@@ -251,7 +255,11 @@ static bool is_visual_escape_seq(const w
 38 if (!esc2[p]) continue;
 39 // Test both padded and unpadded version, just to be safe. Most versions of tparm don't
 40 // actually seem to do anything these days.
 41+#ifdef __NetBSD__
 42 size_t esc_seq_len = maxi(try_sequence(tparm(esc2[p]), code), try_sequence(esc2[p], code));
 43+#else
 44+ size_t esc_seq_len = maxi(try_sequence(tparm((char *)esc2[p]), code), try_sequence(esc2[p], code));
 45+#endif
 46 if (esc_seq_len) {
 47 *resulting_length = esc_seq_len;
 48 return true;
 49@@ -506,7 +514,7 @@ static void s_move(screen_t *s, data_buf
24 int i; 50 int i;
25 int x_steps, y_steps; 51 int x_steps, y_steps;
26  52
27- char *str; 53- char *str;
28+ const char *str; 54+ const char *str;
29 /* 55 /*
30 debug( 0, L"move from %d %d to %d %d", 56 debug( 0, L"move from %d %d to %d %d",
31 s->screen_cursor[0], s->screen_cursor[1], 57 s->screen_cursor[0], s->screen_cursor[1],
32@@ -540,7 +540,7 @@ static void s_move(screen_t *s, data_buf 58@@ -540,7 +548,7 @@ static void s_move(screen_t *s, data_buf
33 x_steps = 0; 59 x_steps = 0;
34 } 60 }
35  61
36- char *multi_str = NULL; 62- char *multi_str = NULL;
37+ const char *multi_str = NULL; 63+ const char *multi_str = NULL;
38 if (x_steps < 0) { 64 if (x_steps < 0) {
39 str = cursor_left; 65 str = cursor_left;
40 multi_str = parm_left_cursor; 66 multi_str = parm_left_cursor;
41@@ -594,7 +594,7 @@ static void s_write_char(screen_t *s, da 67@@ -554,7 +562,11 @@ static void s_move(screen_t *s, data_buf
 68 bool use_multi =
 69 multi_str != NULL && multi_str[0] != '\0' && abs(x_steps) * strlen(str) > strlen(multi_str);
 70 if (use_multi && cur_term) {
 71+#ifdef __NetBSD__
 72 char *multi_param = tparm(multi_str, abs(x_steps));
 73+#else
 74+ char *multi_param = tparm((char *)multi_str, abs(x_steps));
 75+#endif
 76 writembs(multi_param);
 77 } else {
 78 for (i = 0; i < abs(x_steps); i++) {
 79@@ -594,7 +606,7 @@ static void s_write_char(screen_t *s, da
42 } 80 }
43  81
44 /// Send the specified string through tputs and append the output to the specified buffer. 82 /// Send the specified string through tputs and append the output to the specified buffer.
45-static void s_write_mbs(data_buffer_t *b, char *s) { 83-static void s_write_mbs(data_buffer_t *b, char *s) {
46+static void s_write_mbs(data_buffer_t *b, const char *s) { 84+static void s_write_mbs(data_buffer_t *b, const char *s) {
47 scoped_buffer_t scoped_buffer(b); 85 scoped_buffer_t scoped_buffer(b);
48 writembs(s); 86 writembs(s);
49 } 87 }