diff --git a/app-shells/fish/patches/fish-1.23.1.patch b/app-shells/fish/patches/fish-1.23.1.patch new file mode 100644 index 000000000..967e0133a --- /dev/null +++ b/app-shells/fish/patches/fish-1.23.1.patch @@ -0,0 +1,225 @@ +diff -ur fish-1.23.1.org/builtin_ulimit.c fish-1.23.1/builtin_ulimit.c +--- fish-1.23.1.org/builtin_ulimit.c 2009-03-08 15:46:47.007077888 +0100 ++++ fish-1.23.1/builtin_ulimit.c 2010-08-16 18:34:19.289931264 +0200 +@@ -167,10 +167,11 @@ + { + struct rlimit ls; + rlim_t l; ++ wchar_t *unit; + getrlimit( resource_arr[i].resource, &ls ); + l = hard ? ls.rlim_max:ls.rlim_cur; + +- wchar_t *unit = ((resource_arr[i].resource==RLIMIT_CPU)?L"(seconds, ":(get_multiplier(resource_arr[i].resource)==1?L"(":L"(kB, ")); ++ unit = ((resource_arr[i].resource==RLIMIT_CPU)?L"(seconds, ":(get_multiplier(resource_arr[i].resource)==1?L"(":L"(kB, ")); + + sb_printf( sb_out, + L"%-*ls %10ls-%lc) ", +diff -ur fish-1.23.1.org/builtin.c fish-1.23.1/builtin.c +--- fish-1.23.1.org/builtin.c 2009-03-08 15:46:47.017301504 +0100 ++++ fish-1.23.1/builtin.c 2009-10-28 03:48:56.934805504 +0100 +@@ -160,12 +160,14 @@ + + static void builtin_wperror( const wchar_t *s) + { ++ char *err; ++ wchar_t *werr; + if( s != 0 ) + { + sb_append( sb_err, s, L": ", (void *)0 ); + } +- char *err = strerror( errno ); +- wchar_t *werr = str2wcs( err ); ++ err = strerror( errno ); ++ werr = str2wcs( err ); + if( werr ) + { + sb_append( sb_err, werr, L"\n", (void *)0 ); +@@ -250,6 +252,7 @@ + + const wchar_t *h; + int is_short = 0; ++ wchar_t *str; + + if( b == sb_err ) + { +@@ -262,7 +265,7 @@ + if( !h ) + return; + +- wchar_t *str = wcsdup( h ); ++ str = wcsdup( h ); + if( str ) + { + +diff -ur fish-1.23.1.org/config.h.in fish-1.23.1/config.h.in +--- fish-1.23.1.org/config.h.in 2009-03-08 15:46:47.010747904 +0100 ++++ fish-1.23.1/config.h.in 2009-10-21 01:06:56.935854080 +0200 +@@ -163,7 +163,7 @@ + /* Define to 1 if the _nl_msg_cat_cntr symbol is exported. */ + #undef HAVE__NL_MSG_CAT_CNTR + +-/* Define to 1 if you have the file `AC_File'. */ ++/* Define to 1 if you have the file `/proc/self/stat'. */ + #undef HAVE__PROC_SELF_STAT + + /* Define to 1 if the __environ symbol is exported. */ +@@ -181,6 +181,9 @@ + /* Define to the one symbol short name of this package. */ + #undef PACKAGE_TARNAME + ++/* Define to the home page for this package. */ ++#undef PACKAGE_URL ++ + /* Define to the version of this package. */ + #undef PACKAGE_VERSION + +diff -ur fish-1.23.1.org/configure.ac fish-1.23.1/configure.ac +--- fish-1.23.1.org/configure.ac 2009-03-08 15:46:47.057409536 +0100 ++++ fish-1.23.1/configure.ac 2010-08-16 19:24:41.480509952 +0200 +@@ -99,7 +99,7 @@ + # tree and doesn't update CFLAGS. + # + +-for i in /usr/pkg /sw /opt /opt/local; do ++for i in /usr/pkg /sw /opt /opt/local /boot/common /boot/home/config; do + + AC_MSG_CHECKING([for $i/include include directory]) + if test -d $i/include; then +@@ -113,7 +113,8 @@ + AC_MSG_CHECKING([for $i/lib library directory]) + if test -d $i/lib; then + AC_MSG_RESULT(yes) +- LDFLAGS="$LDFLAGS -L$i/lib/ -R$i/lib/" ++ LDFLAGS="$LDFLAGS -L$i/lib/" ++ #LDFLAGS="$LDFLAGS -R$i/lib/" + else + AC_MSG_RESULT(no) + fi +@@ -136,6 +137,12 @@ + + + # ++# Ask autoconf to detect the platform type ++# ++AC_CANONICAL_TARGET ++ ++ ++# + # This adds markup to the code that results in a few extra compile + # time checks on recent GCC versions. It helps stop a few common bugs. + # +@@ -298,7 +305,13 @@ + # bug has been verified to not exist on Linux using GCC 3.3.3. + # + +- CFLAGS="$CFLAGS -fno-optimize-sibling-calls" ++ case $target_os in ++ beos*|haiku*) ++ ;; ++ *) ++ CFLAGS="$CFLAGS -fno-optimize-sibling-calls" ++ ;; ++ esac + + + # +@@ -370,8 +383,6 @@ + # seems that tputs is never really needed. + # + +-AC_CANONICAL_TARGET +- + if test $target_cpu = powerpc; then + AC_DEFINE([TPUTS_KLUDGE],[1],[Evil kludge to get Power based machines to work]) + fi +@@ -502,7 +513,7 @@ + # Check for os dependant libraries for all binaries. + LIBS_COMMON=$LIBS + LIBS="" +-AC_SEARCH_LIBS( connect, socket, , [AC_MSG_ERROR([Cannot find the socket library, needed to build this package.] )] ) ++AC_SEARCH_LIBS( connect, network socket, , [AC_MSG_ERROR([Cannot find the socket library, needed to build this package.] )] ) + AC_SEARCH_LIBS( nanosleep, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] ) + AC_SEARCH_LIBS( setupterm, [ncurses curses], , [AC_MSG_ERROR([Could not find a curses implementation, needed to build fish])] ) + AC_SEARCH_LIBS( [nan], [m], [AC_DEFINE( [HAVE_NAN], [1], [Define to 1 if you have the nan function])] ) +@@ -547,7 +558,7 @@ + if test x$local_gettext != xno; then + AC_SEARCH_LIBS( gettext, intl,,) + fi +-AC_SEARCH_LIBS( iconv_open, iconv, , [AC_MSG_ERROR([Could not find an iconv implementation, needed to build fish])] ) ++AC_SEARCH_LIBS( iconv_open, iconv, , [AC_SEARCH_LIBS( libiconv_open, iconv, , [AC_MSG_ERROR([Could not find an iconv implementation, needed to build fish])] )] ) + LIBS_FISH_PAGER=$LIBS + LIBS=$LIBS_COMMON + +@@ -560,7 +571,7 @@ + if test x$local_gettext != xno; then + AC_SEARCH_LIBS( gettext, intl,,) + fi +-AC_SEARCH_LIBS( iconv_open, iconv, , [AC_MSG_ERROR([Could not find an iconv implementation, needed to build fish])] ) ++AC_SEARCH_LIBS( iconv_open, iconv, , [AC_SEARCH_LIBS( libiconv_open, iconv, , [AC_MSG_ERROR([Could not find an iconv implementation, needed to build fish])] )] ) + LIBS_FISHD=$LIBS + LIBS=$LIBS_COMMON + +diff -ur fish-1.23.1.org/function.c fish-1.23.1/function.c +--- fish-1.23.1.org/function.c 2009-03-08 15:46:47.016252928 +0100 ++++ fish-1.23.1/function.c 2009-10-21 13:29:56.943980544 +0200 +@@ -125,12 +125,12 @@ + tokenize_variable_array( path_var, &path_list ); + for( i=0; id_name; +diff -ur fish-1.23.1.org/proc.c fish-1.23.1/proc.c +--- fish-1.23.1.org/proc.c 2009-03-08 15:46:47.002621440 +0100 ++++ fish-1.23.1/proc.c 2010-08-16 18:43:25.155713536 +0200 +@@ -482,8 +482,11 @@ + return; + } + +- ++#ifdef SA_SIGINFO + void job_handle_signal ( int signal, siginfo_t *info, void *con ) ++#else ++void job_handle_signal ( int signal ) ++#endif + { + + int status; +diff -ur fish-1.23.1.org/proc.h fish-1.23.1/proc.h +--- fish-1.23.1.org/proc.h 2009-03-08 15:46:47.009961472 +0100 ++++ fish-1.23.1/proc.h 2009-10-21 13:25:18.947650560 +0200 +@@ -427,7 +427,9 @@ + Signal handler for SIGCHLD. Mark any processes with relevant + information. + */ ++#ifdef SA_SIGINFO + void job_handle_signal( int signal, siginfo_t *info, void *con ); ++#endif + + /** + Send the specified signal to all processes in the specified job. +diff -ur fish-1.23.1.org/signal.c fish-1.23.1/signal.c +--- fish-1.23.1.org/signal.c 2009-03-08 15:46:47.060817408 +0100 ++++ fish-1.23.1/signal.c 2010-08-16 19:20:06.433848320 +0200 +@@ -29,6 +29,14 @@ + #include "reader.h" + #include "proc.h" + ++#ifdef __HAIKU__ ++#ifndef SA_SIGINFO ++#define SA_SIGINFO 0 ++typedef struct { ++} siginfo_t; ++#define sa_sigaction sa_handler ++#endif ++#endif + + /** + Struct describing an entry for the lookup table used to convert