OBS User unknown 2008-04-12 18:05:21 +00:00 committed by Git OBS Bridge
parent 69934a8514
commit bfb960991d
5 changed files with 82 additions and 40 deletions

35
ncurses-5.6-gpm.dif Normal file
View File

@ -0,0 +1,35 @@
--- ncurses/base/lib_mouse.c
+++ ncurses/base/lib_mouse.c 2008-04-11 17:48:00.119274018 +0200
@@ -352,6 +352,11 @@ enable_xterm_mouse(int enable)
static int
allow_gpm_mouse(void)
{
+#if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
+ /* Danger Robinson: do not use dlopen for libgpm if already loaded */
+ if ((Gpm_Wgetch))
+ return FALSE;
+#endif
/* GPM does printf's without checking if stdout is a terminal */
if (isatty(fileno(stdout))) {
char *env = getenv("TERM");
@@ -359,7 +364,7 @@ allow_gpm_mouse(void)
* it should pass xterm events through. There is no real advantage
* in allowing GPM to do this.
*/
- if (env == 0 || strncmp(env, "xterm", 5))
+ if (env == 0 || strncmp(env, "linux", 5) == 0)
return TRUE;
}
return FALSE;
--- ncurses/curses.priv.h
+++ ncurses/curses.priv.h 2008-04-11 17:33:58.695131162 +0200
@@ -397,6 +397,9 @@ typedef struct {
#if USE_GPM_SUPPORT
#undef buttons /* term.h defines this, and gpm uses it! */
#include <gpm.h>
+#if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
+weak_symbol(Gpm_Wgetch);
+#endif
#ifdef HAVE_LIBDL
/* link dynamically to GPM */

View File

@ -1,33 +1,11 @@
--- ncurses/SigAction.h
+++ ncurses/SigAction.h 2007-01-31 12:39:37.000000000 +0100
@@ -55,6 +55,53 @@
+++ ncurses/SigAction.h 2008-04-11 17:31:36.060814000 +0200
@@ -55,6 +55,31 @@
typedef struct sigaction sigaction_t;
#endif
+#if defined(__GNUC__) && defined(linux)
+# if defined __USE_ISOC99
+# define _cat_pragma(exp) _Pragma(#exp)
+# define _weak_pragma(exp) _cat_pragma(weak name)
+# else
+# define _weak_pragma(exp)
+# endif
+# define _declare(name) __extension__ extern __typeof__(name) name
+# define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
+#else
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
+# error The ncurses library has to be NPTL thread safe (requires the GCC)
+# endif
+#endif
+
+#if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
+# include <pthread.h>
+
+weak_symbol(pthread_sigmask);
+weak_symbol(pthread_kill);
+weak_symbol(pthread_self);
+weak_symbol(pthread_equal);
+
+static inline int _nc__sigprocmask(int how, const sigset_t *newmask, sigset_t *oldmask)
+static inline int _nc_sigprocmask(int how, const sigset_t *newmask, sigset_t *oldmask)
+{
+ if ((pthread_sigmask))
+ return pthread_sigmask(how, newmask, oldmask);
@ -35,7 +13,7 @@
+ return sigprocmask(how, newmask, oldmask);
+}
+# undef sigprocmask
+# define sigprocmask _nc__sigprocmask
+# define sigprocmask _nc_sigprocmask
+
+static inline void _nc_kill(SCREEN *scan, int signal)
+{
@ -55,19 +33,38 @@
#if HAVE_SIGVEC
--- ncurses/curses.priv.h
+++ ncurses/curses.priv.h 2007-01-31 12:40:37.000000000 +0100
@@ -48,6 +48,10 @@
+++ ncurses/curses.priv.h 2008-04-11 18:21:47.136234297 +0200
@@ -284,6 +284,29 @@ color_t;
#define GET_SCREEN_PAIR(s) GetPair(SCREEN_ATTRS(s))
#define SET_SCREEN_PAIR(s,p) SetPair(SCREEN_ATTRS(s), p)
#include <ncurses_dll.h>
+#if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
+# include <pthread.h>
+#if defined(__GNUC__) && defined(linux)
+# if defined __USE_ISOC99
+# define _cat_pragma(exp) _Pragma(#exp)
+# define _weak_pragma(exp) _cat_pragma(weak name)
+# else
+# define _weak_pragma(exp)
+# endif
+# define _declare(name) __extension__ extern __typeof__(name) name
+# define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
+#else
+# if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
+# error The ncurses library has to be NPTL thread safe (requires the GCC)
+# endif
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -591,6 +595,11 @@ struct screen {
+#if defined(linux) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
+# include <pthread.h>
+weak_symbol(pthread_sigmask);
+weak_symbol(pthread_kill);
+weak_symbol(pthread_self);
+weak_symbol(pthread_equal);
+#endif
+
/*
* Definitions for color pairs
*/
@@ -591,6 +614,11 @@ struct screen {
#define _nc_windows SP->_nc_sp_windows
bool _sig_winch;
@ -79,7 +76,7 @@
SCREEN *_next_screen;
/* hashes for old and new lines */
@@ -1209,6 +1218,9 @@ extern NCURSES_EXPORT(void) _nc_scroll_o
@@ -1209,6 +1237,9 @@ extern NCURSES_EXPORT(void) _nc_scroll_o
extern NCURSES_EXPORT(void) _nc_scroll_optimize (void);
extern NCURSES_EXPORT(void) _nc_set_buffer (FILE *, bool);
extern NCURSES_EXPORT(void) _nc_signal_handler (bool);
@ -103,7 +100,7 @@
if (wgetch_should_refresh(win))
wrefresh(win);
--- ncurses/base/lib_set_term.c
+++ ncurses/base/lib_set_term.c 2008-04-08 15:18:15.230819462 +0200
+++ ncurses/base/lib_set_term.c 2008-04-08 15:18:15.000000000 +0200
@@ -40,7 +40,7 @@
*/

View File

@ -1,11 +1,12 @@
--- .pkgextract
+++ .pkgextract 2006-05-18 16:07:14.000000000 +0200
@@ -0,0 +1,5 @@
@@ -0,0 +1,6 @@
+tar Oxfj ../ncurses-5.6-20070128-patch.tar.bz2 | patch -p1 -s
+patch -p0 -s --suffix=.va < ../ncurses-5.3-printw.dif
+patch -p0 -s --suffix=.pt < ../ncurses-5.6-pthread.dif
+patch -p0 -s --suffix=.ov < ../ncurses-5.6-overwrite.dif
+patch -p0 -s --suffix=.cv < ../ncurses-5.6-coverity.patch
+patch -p0 -s --suffix=.gpm < ../ncurses-5.6-gpm.dif
--- aclocal.m4
+++ aclocal.m4 2007-01-31 13:28:46.000000000 +0100
@@ -298,7 +298,7 @@ AC_MSG_CHECKING([for size of bool])

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Apr 11 18:22:32 CEST 2008 - werner@suse.de
- Do not dlopen libgpm if already loaded by runtime linker
-------------------------------------------------------------------
Thu Apr 10 13:39:08 CEST 2008 - lrupp@suse.de

View File

@ -20,7 +20,7 @@ License: X11/MIT
Group: System/Base
AutoReqProv: on
Version: 5.6
Release: 74
Release: 76
Summary: New curses Libraries
Source0: ncurses-5.6.tar.bz2
Url: http://invisible-island.net/ncurses/ncurses.html
@ -33,6 +33,7 @@ Patch1: ncurses-5.3-printw.dif
Patch2: ncurses-5.6-pthread.dif
Patch3: ncurses-5.6-overwrite.dif
Patch4: ncurses-5.6-coverity.patch
Patch5: ncurses-5.6-gpm.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc
%global _miscdir %{_datadir}/misc
@ -152,6 +153,7 @@ tar Oxfj %{SOURCE1} | patch -p1 -s
%patch -P 2 -p0 -b .pt
%patch -P 3 -p0 -b .ow
%patch -P 4 -p0 -b .cv
%patch -P 5 -p0 -b .gpm
%patch -P 0 -p0
%build
@ -439,6 +441,8 @@ tar Oxfj %{SOURCE1} | patch -p1 -s
%defattr(-,root,root)
%changelog
* Fri Apr 11 2008 werner@suse.de
- Do not dlopen libgpm if already loaded by runtime linker
* Thu Apr 10 2008 lrupp@suse.de
- rename ncurses to libncurses5 in baselibs.conf
* Thu Apr 10 2008 ro@suse.de