Tue Oct 24 03:51:41 2017 UTC ()
fish: add patches from pkgsrc-wip reported to fix build with clang
force ncurses because auto-completion is broken with netbsd curses.
bump pkgrevision
(maya)
diff -r1.11 -r1.12 pkgsrc/shells/fish/Makefile
diff -r1.8 -r1.9 pkgsrc/shells/fish/distinfo
diff -r0 -r1.1 pkgsrc/shells/fish/patches/patch-configure.ac
diff -r0 -r1.1 pkgsrc/shells/fish/patches/patch-src_fallback.cpp
diff -r0 -r1.1 pkgsrc/shells/fish/patches/patch-src_fallback.h
diff -r0 -r1.1 pkgsrc/shells/fish/patches/patch-src_output.cpp
diff -r0 -r1.1 pkgsrc/shells/fish/patches/patch-src_output.h
diff -r0 -r1.1 pkgsrc/shells/fish/patches/patch-src_screen.cpp
--- pkgsrc/shells/fish/Makefile 2017/08/19 09:28:38 1.11
+++ pkgsrc/shells/fish/Makefile 2017/10/24 03:51:41 1.12
| @@ -1,49 +1,55 @@ | | | @@ -1,49 +1,55 @@ |
1 | # $NetBSD: Makefile,v 1.11 2017/08/19 09:28:38 fhajny Exp $ | | 1 | # $NetBSD: Makefile,v 1.12 2017/10/24 03:51:41 maya Exp $ |
2 | | | 2 | |
3 | DISTNAME= fish-2.6.0 | | 3 | DISTNAME= fish-2.6.0 |
| | | 4 | PKGREVISION= 1 |
4 | CATEGORIES= shells | | 5 | CATEGORIES= shells |
5 | MASTER_SITES= http://fishshell.com/files/${PKGVERSION_NOREV}/ | | 6 | MASTER_SITES= http://fishshell.com/files/${PKGVERSION_NOREV}/ |
6 | | | 7 | |
7 | MAINTAINER= pkgsrc-users@NetBSD.org | | 8 | MAINTAINER= pkgsrc-users@NetBSD.org |
8 | HOMEPAGE= http://www.fishshell.com/ | | 9 | HOMEPAGE= http://www.fishshell.com/ |
9 | COMMENT= User friendly command line shell for UNIX-like operating systems | | 10 | COMMENT= User friendly command line shell for UNIX-like operating systems |
10 | LICENSE= gnu-gpl-v2 | | 11 | LICENSE= gnu-gpl-v2 |
11 | | | 12 | |
12 | EXTRACT_USING= gtar | | 13 | EXTRACT_USING= gtar |
13 | | | 14 | |
14 | USE_LANGUAGES+= c c++ | | 15 | USE_LANGUAGES+= c c++ |
15 | GNU_CONFIGURE= yes | | 16 | GNU_CONFIGURE= yes |
| | | 17 | USE_NCURSES= yes |
16 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} | | 18 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} |
17 | CONFIGURE_ARGS+= --without-xsel | | 19 | CONFIGURE_ARGS+= --without-xsel |
18 | USE_TOOLS+= gmake | | 20 | USE_TOOLS+= gmake autoreconf autoconf automake |
19 | | | 21 | |
20 | EGDIR= ${PREFIX}/share/examples/fish | | 22 | EGDIR= ${PREFIX}/share/examples/fish |
21 | INSTALL_ENV+= EGDIR=${EGDIR} | | 23 | INSTALL_ENV+= EGDIR=${EGDIR} |
22 | | | 24 | |
23 | PKG_SHELL= bin/fish | | 25 | PKG_SHELL= bin/fish |
24 | | | 26 | |
25 | REPLACE_PYTHON+= share/tools/*.py | | 27 | REPLACE_PYTHON+= share/tools/*.py |
26 | REPLACE_PYTHON+= share/tools/web_config/webconfig.py | | 28 | REPLACE_PYTHON+= share/tools/web_config/webconfig.py |
27 | | | 29 | |
28 | LDFLAGS.SunOS+= -lintl | | 30 | LDFLAGS.SunOS+= -lintl |
29 | | | 31 | |
30 | .include "../../mk/bsd.prefs.mk" | | 32 | .include "../../mk/bsd.prefs.mk" |
31 | | | 33 | |
32 | .if ${OPSYS} == "NetBSD" && exists(/usr/include/execinfo.h) | | 34 | .if ${OPSYS} == "NetBSD" && exists(/usr/include/execinfo.h) |
33 | CPPFLAGS+= -DHAVE_BACKTRACE | | 35 | CPPFLAGS+= -DHAVE_BACKTRACE |
34 | CPPFLAGS+= -DHAVE_BACKTRACE_SYMBOLS | | 36 | CPPFLAGS+= -DHAVE_BACKTRACE_SYMBOLS |
35 | CXXFLAGS.NetBSD+= -fpermissive | | 37 | CXXFLAGS.NetBSD+= -fpermissive |
36 | LDFLAGS+= -lexecinfo | | 38 | LDFLAGS+= -lexecinfo |
37 | .endif | | 39 | .endif |
38 | | | 40 | |
39 | # Upstream intentionally omits open.1 on Darwin | | 41 | # Upstream intentionally omits open.1 on Darwin |
40 | PLIST_VARS+= open | | 42 | PLIST_VARS+= open |
41 | .if ${OPSYS} != "Darwin" | | 43 | .if ${OPSYS} != "Darwin" |
42 | PLIST.open= yes | | 44 | PLIST.open= yes |
43 | .endif | | 45 | .endif |
44 | | | 46 | |
| | | 47 | pre-configure: |
| | | 48 | ${RUN} cd ${WRKSRC} && autoreconf -fiv |
| | | 49 | |
45 | .include "../../devel/gettext-lib/buildlink3.mk" | | 50 | .include "../../devel/gettext-lib/buildlink3.mk" |
46 | .include "../../devel/gettext-tools/buildlink3.mk" | | 51 | .include "../../devel/gettext-tools/buildlink3.mk" |
47 | .include "../../lang/python/application.mk" | | 52 | .include "../../lang/python/application.mk" |
48 | .include "../../mk/curses.buildlink3.mk" | | 53 | # Broken auto completion with netbsd curses |
| | | 54 | .include "../../devel/ncurses/buildlink3.mk" |
49 | .include "../../mk/bsd.pkg.mk" | | 55 | .include "../../mk/bsd.pkg.mk" |
--- pkgsrc/shells/fish/distinfo 2017/08/19 09:28:38 1.8
+++ pkgsrc/shells/fish/distinfo 2017/10/24 03:51:41 1.9
| @@ -1,10 +1,15 @@ | | | @@ -1,10 +1,15 @@ |
1 | $NetBSD: distinfo,v 1.8 2017/08/19 09:28:38 fhajny Exp $ | | 1 | $NetBSD: distinfo,v 1.9 2017/10/24 03:51:41 maya Exp $ |
2 | | | 2 | |
3 | SHA1 (fish-2.6.0.tar.gz) = 16f6612747f8013cd04b3639fe504d4750f363ca | | 3 | SHA1 (fish-2.6.0.tar.gz) = 16f6612747f8013cd04b3639fe504d4750f363ca |
4 | RMD160 (fish-2.6.0.tar.gz) = f12093fef235487b7c02c245cbbd600750fff874 | | 4 | RMD160 (fish-2.6.0.tar.gz) = f12093fef235487b7c02c245cbbd600750fff874 |
5 | SHA512 (fish-2.6.0.tar.gz) = d4ded5ce24600e85673a7bb016e9dc36bce999b27f40e6b1ce0b9ca49a421be2d444d9d2b6f178f6eee963e59daa4a65df4c3de2a8086a610486f758fcfb0ed1 | | 5 | SHA512 (fish-2.6.0.tar.gz) = d4ded5ce24600e85673a7bb016e9dc36bce999b27f40e6b1ce0b9ca49a421be2d444d9d2b6f178f6eee963e59daa4a65df4c3de2a8086a610486f758fcfb0ed1 |
6 | Size (fish-2.6.0.tar.gz) = 3575346 bytes | | 6 | Size (fish-2.6.0.tar.gz) = 3575346 bytes |
7 | SHA1 (patch-Makefile.in) = e2f5722d2e08e644e0813a662b64bbfe811a8ec6 | | 7 | SHA1 (patch-Makefile.in) = e2f5722d2e08e644e0813a662b64bbfe811a8ec6 |
8 | SHA1 (patch-configure) = 867ad2e2b93aa58fd93db05646efd9c0335c8bb8 | | 8 | SHA1 (patch-configure.ac) = 862b6cef9e269531924965ce928031e063aa90ba |
9 | SHA1 (patch-src_builtin.cpp) = b48a52d45ba545a92043e58dc554305670c7fcfc | | 9 | SHA1 (patch-src_builtin.cpp) = b48a52d45ba545a92043e58dc554305670c7fcfc |
| | | 10 | SHA1 (patch-src_fallback.cpp) = 4a35401ed0d3c3a912e448d56c9375801c919fbc |
| | | 11 | SHA1 (patch-src_fallback.h) = 87537e6f5be2fa1b8a196d67eb21e6b48380cabb |
| | | 12 | SHA1 (patch-src_output.cpp) = 36a2cc0576aca6585090a1b5b32aa39c90ed3996 |
| | | 13 | SHA1 (patch-src_output.h) = 8e72aefbd940450fb69f4b970ce1d151f17eb48a |
| | | 14 | SHA1 (patch-src_screen.cpp) = f2d5e10dff9d09e985a8e27a8f2066dcfb58db05 |
10 | SHA1 (patch-src_wutil.cpp) = dbb73cf81d850c4b73598d0c711f68b0d74cabd6 | | 15 | SHA1 (patch-src_wutil.cpp) = dbb73cf81d850c4b73598d0c711f68b0d74cabd6 |
$NetBSD: patch-configure.ac,v 1.1 2017/10/24 03:51:41 maya Exp $
--- configure.ac.orig 2017-06-03 12:45:13.000000000 +0000
+++ configure.ac
@@ -323,7 +323,24 @@ AC_CHECK_FUNCS( wcslcpy lrand48_r killpg
AC_CHECK_FUNCS( backtrace_symbols getifaddrs )
AC_CHECK_FUNCS( futimens clock_gettime )
AC_CHECK_FUNCS( getpwent flock )
-AC_CHECK_FUNCS( dirfd )
+
+AC_MSG_CHECKING([dirfd])
+AC_LINK_IFELSE([
+
+#include <dirent.h>
+
+DIR *dirp;
+
+int
+main(void)
+{
+ return dirfd(dirp);
+}
+], [ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_DIRFD], 1, [ Define to 1 if you have the `dirfd' function or macro. ])
+ ],
+ [ AC_MSG_RESULT([no])]
+)
AC_CHECK_DECL( [mkostemp], [ AC_CHECK_FUNCS([mkostemp]) ] )
$NetBSD: patch-src_fallback.cpp,v 1.1 2017/10/24 03:51:41 maya Exp $
--- src/fallback.cpp.orig 2017-06-03 12:45:13.000000000 +0000
+++ src/fallback.cpp
@@ -46,7 +46,7 @@
#undef tparm
/// Checks for known string values and maps to correct number of parameters.
-char *tparm_solaris_kludge(char *str, ...) {
+char *tparm_solaris_kludge(const char *str, ...) {
long int param[9] = {};
va_list ap;
$NetBSD: patch-src_fallback.h,v 1.1 2017/10/24 03:51:41 maya Exp $
--- src/fallback.h.orig 2017-06-03 12:45:13.000000000 +0000
+++ src/fallback.h
@@ -37,7 +37,7 @@ int fish_mkstemp_cloexec(char *);
/// Under curses, tputs expects an int (*func)(char) as its last parameter, but in ncurses, tputs
/// expects a int (*func)(int) as its last parameter. tputs_arg_t is defined to always be what tputs
/// expects. Hopefully.
-#ifdef NCURSES_VERSION
+#if defined(NCURSES_VERSION) || defined(__NetBSD__)
typedef int tputs_arg_t;
#else
typedef char tputs_arg_t;
@@ -57,7 +57,7 @@ struct winsize {
#ifdef TPARM_SOLARIS_KLUDGE
/// Solaris tparm has a set fixed of paramters in it's curses implementation, work around this here.
#define tparm tparm_solaris_kludge
-char *tparm_solaris_kludge(char *str, ...);
+char *tparm_solaris_kludge(const char *str, ...);
#endif
/// On OS X, use weak linking for wcsdup and wcscasecmp. Weak linking allows you to call the
$NetBSD: patch-src_output.cpp,v 1.1 2017/10/24 03:51:41 maya Exp $
--- src/output.cpp.orig 2017-06-03 12:45:13.000000000 +0000
+++ src/output.cpp
@@ -63,7 +63,7 @@ unsigned char index_for_color(rgb_color_
return c.to_term256_index();
}
-static bool write_color_escape(char *todo, unsigned char idx, bool is_fg) {
+static bool write_color_escape(const char *todo, unsigned char idx, bool is_fg) {
if (term_supports_color_natively(idx)) {
// Use tparm to emit color escape.
writembs(tparm(todo, idx));
@@ -550,7 +550,7 @@ rgb_color_t parse_color(const wcstring &
}
/// Write specified multibyte string.
-void writembs_check(char *mbs, const char *mbs_name, const char *file, long line) {
+void writembs_check(const char *mbs, const char *mbs_name, const char *file, long line) {
if (mbs != NULL) {
tputs(mbs, 1, &writeb);
} else {
$NetBSD: patch-src_output.h,v 1.1 2017/10/24 03:51:41 maya Exp $
--- src/output.h.orig 2017-06-03 12:45:13.000000000 +0000
+++ src/output.h
@@ -29,7 +29,7 @@ enum {
void set_color(rgb_color_t c, rgb_color_t c2);
-void writembs_check(char *mbs, const char *mbs_name, const char *file, long line);
+void writembs_check(const char *mbs, const char *mbs_name, const char *file, long line);
#define writembs(mbs) writembs_check((mbs), #mbs, __FILE__, __LINE__)
int writech(wint_t ch);
$NetBSD: patch-src_screen.cpp,v 1.1 2017/10/24 03:51:41 maya Exp $
--- src/screen.cpp.orig 2017-06-03 12:45:13.000000000 +0000
+++ src/screen.cpp
@@ -215,7 +215,7 @@ static bool is_color_escape_seq(const wc
// Detect these terminfo color escapes with parameter value up to max_colors, all of which
// don't move the cursor.
- char *const esc[] = {
+ const char *const esc[] = {
set_a_foreground, set_a_background, set_foreground, set_background,
};
@@ -238,7 +238,7 @@ static bool is_color_escape_seq(const wc
/// displayed other than the color.
static bool is_visual_escape_seq(const wchar_t *code, size_t *resulting_length) {
if (!cur_term) return false;
- char *const esc2[] = {
+ const char *const esc2[] = {
enter_bold_mode, exit_attribute_mode, enter_underline_mode, exit_underline_mode,
enter_standout_mode, exit_standout_mode, flash_screen, enter_subscript_mode,
exit_subscript_mode, enter_superscript_mode, exit_superscript_mode, enter_blink_mode,
@@ -506,7 +506,7 @@ static void s_move(screen_t *s, data_buf
int i;
int x_steps, y_steps;
- char *str;
+ const char *str;
/*
debug( 0, L"move from %d %d to %d %d",
s->screen_cursor[0], s->screen_cursor[1],
@@ -540,7 +540,7 @@ static void s_move(screen_t *s, data_buf
x_steps = 0;
}
- char *multi_str = NULL;
+ const char *multi_str = NULL;
if (x_steps < 0) {
str = cursor_left;
multi_str = parm_left_cursor;
@@ -594,7 +594,7 @@ static void s_write_char(screen_t *s, da
}
/// Send the specified string through tputs and append the output to the specified buffer.
-static void s_write_mbs(data_buffer_t *b, char *s) {
+static void s_write_mbs(data_buffer_t *b, const char *s) {
scoped_buffer_t scoped_buffer(b);
writembs(s);
}