update code

This commit is contained in:
zhuchunyi 2019-11-06 19:32:15 +08:00
parent cfba158aef
commit 4bee8b5455
3 changed files with 75 additions and 15 deletions

View File

@ -0,0 +1,19 @@
--- gpm-1.20.1/src/lib/report-lib.c.lib-silent 2002-12-24 23:57:16.000000000 +0100
+++ gpm-1.20.1/src/lib/report-lib.c 2006-01-18 17:55:38.000000000 +0100
@@ -24,8 +24,16 @@
#include "headers/message.h"
+static int gpm_silent() {
+ if ( getenv( "GPM_VERBOSE" ) == NULL ) return 1;
+ return 0;
+}
+
void gpm_report(int line, char *file, int stat, char *text, ... )
{
+ if ( gpm_silent() && stat != GPM_STAT_OOPS )
+ return;
+
char *string = NULL;
int log_level;
va_list ap;

View File

@ -0,0 +1,26 @@
--- gpm-1.20.1/src/lib/libcurses.c.weak-wgetch 2002-12-24 17:57:16.000000000 -0500
+++ gpm-1.20.1/src/lib/libcurses.c 2004-03-22 15:51:24.000000000 -0500
@@ -41,7 +41,12 @@
#endif /* HAVE_NCURSES_CURSES_H */
#endif /* HAVE_NCURSES_H */
-#define GET(win) ((win) ? wgetch(win) : getch())
+/* If win != NULL, it must have been created by ncurses anyway.
+ Avoid circular library dependencies. */
+#pragma weak wgetch
+#pragma weak stdscr
+
+#define GET(win) ((win && wgetch) ? wgetch(win) : getch())
int Gpm_Wgetch(WINDOW *win)
{
--- gpm-1.20.1/configure.ac.weak-wgetch 2004-03-22 15:49:51.000000000 -0500
+++ gpm-1.20.1/configure.ac 2004-03-22 15:51:24.000000000 -0500
@@ -115,7 +115,7 @@
AC_CHECK_LIB($i, wgetch,,,$TERMLIBS)
else :; fi
done
- SHARED_LIBS="$LIBS $TERMLIBS -lc"
+ SHARED_LIBS="-lc"
LIBS=$SAVELIBS ;;
esac

View File

@ -1,6 +1,6 @@
Name: gpm
Version: 1.20.7
Release: 17
Release: 18
Summary: The gpm package contains a mouse server for the console and xterm
License: GPLv2 and GPLv2+ with exceptions and GPLv3+ and Verbatim and Copyright only
URL: http://www.nico.schottelius.org/software/gpm/
@ -8,12 +8,14 @@ Source: %{name}-%{version}.tar.xz
Source1: gpm.service
Patch1: gpm-1.20.6-multilib.patch
Patch2: gpm-1.20.5-close-fds.patch
Patch3: gpm-1.20.7-rhbz-668480-gpm-types-7-manpage-fixes.patch
Patch4: gpm-1.20.6-missing-header-dir-in-make-depend.patch
Patch5: gpm-format-security.patch
Patch6: gpm-1.20.7-sysmacros.patch
Patch7: gpm-1.20.7-sigemptyset.patch
Patch2: gpm-1.20.1-lib-silent.patch
Patch3: gpm-1.20.5-close-fds.patch
Patch4: gpm-1.20.1-weak-wgetch.patch
Patch5: gpm-1.20.7-rhbz-668480-gpm-types-7-manpage-fixes.patch
Patch6: gpm-1.20.6-missing-header-dir-in-make-depend.patch
Patch7: gpm-format-security.patch
Patch8: gpm-1.20.7-sysmacros.patch
Patch9: gpm-1.20.7-sigemptyset.patch
Patch6000: fix-highly-illegal-return-of-int-as-char-and-less-wo.patch
Patch6001: fix-signedness-issue.patch
@ -47,23 +49,30 @@ Obsoletes: gpm-static
The gpm-devel package includes header files and libraries necessary
for the gpm library.
%package help
Summary: This package contains help documents
Requires: %{name}-libs = %{version}-%{release}
%description help
Files for help with gpm.
%package_help
%prep
%autosetup -p1
%setup -q
./autogen.sh
%patch1 -p1 -b .multilib
%patch2 -p1 -b .lib-silent
%patch3 -p1 -b .close-fds
%patch4 -p1 -b .weak-wgetch
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch6000 -p1
%patch6001 -p1
%build
%configure
%make_build
%install
%makeinstall
%make_install
chmod 0755 %{buildroot}/%{_libdir}/libgpm.so.2.1.0
ln -sf libgpm.so.2.1.0 %{buildroot}/%{_libdir}/libgpm.so
@ -114,5 +123,11 @@ fi
%{_mandir}/man?/*
%changelog
* Thu Oct 24 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.20.7-18
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:add original patch
* Fri Sep 20 2019 Yiru Wang <wangyiru1@huawei.com> - 1.20.7-17
- Pakcage init