Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gpm/1.20.1: 01_all_info.patch 03_all_DESTDIR.patch 04_all_root.patch 05_all_serialconsole.patch 08_all_nodebug.patch 09_all_logfillup.patch 10_all_link.patch 11_all_lib_segv.patch 12_all_linux26-dependcache.patch 20_all_gpm-1.20.1-subscript.patch 21_all_synps2-four-way-button.patch 25_all_gpm-mousewheel-support.patch 28_all_gpm-OPEN_MAX.patch 30_all_gpm-1.20.1-weak-wgetch.patch 40_all_gpm-daemon.patch 60_all_parallel-build.patch
Date: Sun, 20 Apr 2008 03:00:13
Message-Id: E1JnPmj-00089P-IC@stork.gentoo.org
1 vapier 08/04/20 03:00:09
2
3 Added: 01_all_info.patch 03_all_DESTDIR.patch
4 04_all_root.patch 05_all_serialconsole.patch
5 08_all_nodebug.patch 09_all_logfillup.patch
6 10_all_link.patch 11_all_lib_segv.patch
7 12_all_linux26-dependcache.patch
8 20_all_gpm-1.20.1-subscript.patch
9 21_all_synps2-four-way-button.patch
10 25_all_gpm-mousewheel-support.patch
11 28_all_gpm-OPEN_MAX.patch
12 30_all_gpm-1.20.1-weak-wgetch.patch
13 40_all_gpm-daemon.patch 60_all_parallel-build.patch
14 Log:
15 relocate into versioned subdir
16
17 Revision Changes Path
18 1.1 src/patchsets/gpm/1.20.1/01_all_info.patch
19
20 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/01_all_info.patch?rev=1.1&view=markup
21 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/01_all_info.patch?rev=1.1&content-type=text/plain
22
23 Index: 01_all_info.patch
24 ===================================================================
25 Touch up the info headers.
26
27 diff -Nru gpm-1.19.6/doc/doc.gpm gpm-1.17.9.new/doc/doc.gpm
28 --- gpm-1.19.6/doc/doc.gpm.in Fri Aug 6 07:35:33 1999
29 +++ gpm-1.19.6.new/doc/doc.gpm.in Wed Sep 1 04:36:32 1999
30 @@ -34,9 +34,9 @@
31
32 @ifinfo
33 @format
34 -@dircategory Miscellaneous
35 +@dircategory Miscellaneous
36 @direntry
37 -* Gpm: (gpm). A server wich hands mouse events to non-X programs.
38 +* Gpm: (gpm). Text-mode mouse library and srv daemon.
39 @end direntry
40 @end format
41 @end ifinfo
42
43
44
45 1.1 src/patchsets/gpm/1.20.1/03_all_DESTDIR.patch
46
47 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/03_all_DESTDIR.patch?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/03_all_DESTDIR.patch?rev=1.1&content-type=text/plain
49
50 Index: 03_all_DESTDIR.patch
51 ===================================================================
52 We want to be able to install with `make install DESTDIR=$D`.
53
54 Supporting DESTDIR with `make install` is just good form anyways :)
55
56 diff -Nur gpm-1.20.1.orig/Makefile.in gpm-1.20.1/Makefile.in
57 --- gpm-1.20.1.orig/Makefile.in Tue Dec 24 23:57:16 2002
58 +++ gpm-1.20.1/Makefile.in Fri Jan 31 14:33:45 2003
59 @@ -50,9 +50,9 @@
60 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) $(STRIP)' install
61
62 installdirs:
63 - $(MKDIR) $(libdir) $(bindir) $(sbindir) $(includedir) $(sysconfdir); \
64 + $(MKDIR) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(includedir) $(DESTDIR)$(sysconfdir); \
65 if test "x@ELISP@" != "x" ; then \
66 - $(MKDIR) $(lispdir) ; \
67 + $(MKDIR) $(DESTDIR)$(lispdir) ; \
68 fi
69
70 ### GENERIC
71 diff -Nur gpm-1.20.1.orig/Makefile.include.in gpm-1.20.1/Makefile.include.in
72 --- gpm-1.20.1.orig/Makefile.include.in Tue Dec 24 23:57:16 2002
73 +++ gpm-1.20.1/Makefile.include.in Fri Jan 31 14:34:04 2003
74 @@ -46,7 +46,7 @@
75 TEX = @TEX@
76 TEXINDEX = @TEXINDEX@
77 DVIPS = @DVIPS@
78 -MAKEINFO = @MAKEINFO@ --no-split
79 +MAKEINFO = @MAKEINFO@
80 TEXI2HTML = texi2html -monolithic
81 STRIP = -s
82
83 diff -Nur gpm-1.20.1.orig/contrib/Makefile.in gpm-1.20.1/contrib/Makefile.in
84 --- gpm-1.20.1.orig/contrib/Makefile.in Tue Dec 24 23:57:16 2002
85 +++ gpm-1.20.1/contrib/Makefile.in Fri Jan 31 14:30:12 2003
86 @@ -13,7 +13,7 @@
87
88 install: all
89 if [ -n "$(ELISP)" ]; then for i in `echo $(ELISP)`; do \
90 - $(INSTALL_DATA) $(srcdir)/$$i $(lispdir)/`basename $$i` ;\
91 + $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(lispdir)/`basename $$i` ;\
92 done; fi
93
94 %.elc: %.el
95 diff -Nur gpm-1.20.1.orig/doc/Makefile.in gpm-1.20.1/doc/Makefile.in
96 --- gpm-1.20.1.orig/doc/Makefile.in Tue Dec 24 23:57:16 2002
97 +++ gpm-1.20.1/doc/Makefile.in Fri Jan 31 14:29:48 2003
98 @@ -112,29 +112,15 @@
99 # install & uninstall
100
101 installdirs:
102 - $(MKDIR) $(man1dir) $(man7dir) $(man8dir) $(infodir)
103 + $(MKDIR) $(DESTDIR)$(man1dir) $(DESTDIR)$(man7dir) $(DESTDIR)$(man8dir) $(DESTDIR)$(infodir)
104
105 install: all installdirs
106 - $(INSTALL_DATA) -m 644 mev.1 $(man1dir)
107 - $(INSTALL_DATA) -m 644 mouse-test.1 $(man1dir)
108 - $(INSTALL_DATA) -m 644 gpm-root.1 $(man1dir)
109 - $(INSTALL_DATA) -m 644 gpm-types.7 $(man7dir)
110 - $(INSTALL_DATA) -m 644 gpm.8 $(man8dir)
111 - $(INSTALL_DATA) -m 644 $(srcdir)/gpm.info $(infodir)
112 - # Use install-info if available
113 - -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
114 - if [ -f $(infodir)/dir ] ; then \
115 - install-info --dir-file=$(infodir)/dir $(infodir)/gpm.info; \
116 - fi; \
117 - fi
118 - #itz Sat Dec 26 23:21:05 PST 1998
119 - #i keep all my infopages compressed and i'm tired to do it by
120 - #hand, so check if there are any compressed pages and do this
121 - #one too
122 - -ls $(infodir)/*[-.]info.gz >/dev/null 2>&1 \
123 - && gzip -f $(infodir)/gpm.info
124 - # Hmm.... shouldn't man pages be compressed too?
125 - # maybe they should, but at least at my system they are not.
126 + $(INSTALL_DATA) -m 644 mev.1 $(DESTDIR)$(man1dir)
127 + $(INSTALL_DATA) -m 644 mouse-test.1 $(DESTDIR)$(man1dir)
128 + $(INSTALL_DATA) -m 644 gpm-root.1 $(DESTDIR)$(man1dir)
129 + $(INSTALL_DATA) -m 644 gpm-types.7 $(DESTDIR)$(man7dir)
130 + $(INSTALL_DATA) -m 644 gpm.8 $(DESTDIR)$(man8dir)
131 + $(INSTALL_DATA) -m 644 $(srcdir)/gpm.info $(DESTDIR)$(infodir)
132
133 # This potentially leaves around cached manpages,
134 # e.g. /var/cache/man/cat1/mev.1.gz. Deleting these is not our job,
135 diff -Nur gpm-1.20.1.orig/src/Makefile.in gpm-1.20.1/src/Makefile.in
136 --- gpm-1.20.1.orig/src/Makefile.in Tue Dec 24 23:57:16 2002
137 +++ gpm-1.20.1/src/Makefile.in Fri Jan 31 14:33:02 2003
138 @@ -91,15 +91,15 @@
139 installdirs:
140
141 install: check
142 - $(INSTALL_PROGRAM) gpm $(sbindir)/gpm
143 - $(INSTALL_DATA) -m 644 lib/libgpm.a $(libdir)/libgpm.a
144 - $(INSTALL_DATA) -m 644 $(srcdir)/headers/gpm.h $(includedir)/gpm.h
145 + $(INSTALL_PROGRAM) gpm $(DESTDIR)$(sbindir)/gpm
146 + $(INSTALL_DATA) -m 644 lib/libgpm.a $(DESTDIR)$(libdir)/libgpm.a
147 + $(INSTALL_DATA) -m 644 $(srcdir)/headers/gpm.h $(DESTDIR)$(includedir)/gpm.h
148 # POSIX requires the range of a for loop be nonempty and Bash
149 # 2.x goes along; unfortunately that means an additional
150 # headache in cases like this
151 if test "x@SHLIB@" != "x" ; then \
152 - $(INSTALL_DATA) -m 644 lib/libgpm.so.@abi_full@ $(libdir)/libgpm.so.@abi_full@ ;\
153 - cd $(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so ;\
154 + $(INSTALL_DATA) -m 644 lib/libgpm.so.@abi_full@ $(DESTDIR)$(libdir)/libgpm.so.@abi_full@ ;\
155 + cd $(DESTDIR)$(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so ;\
156 echo "WARNING: We installed a lib, you should now call ldconfig" ; \
157 echo "f.i.: ldconfig -n -l $(libdir)/libgpm.so.@abi_full@" ;\
158 echo "Or to update everything just type ldconfig"; \
159 @@ -107,7 +107,7 @@
160
161 # prog/
162 for i in $(PROG); do \
163 - $(INSTALL_PROGRAM) $$i $(bindir)/`echo $$i | sed 's,prog/,,'` ;\
164 + $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)/`echo $$i | sed 's,prog/,,'` ;\
165 done
166
167 install-strip:
168
169
170
171 1.1 src/patchsets/gpm/1.20.1/04_all_root.patch
172
173 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/04_all_root.patch?rev=1.1&view=markup
174 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/04_all_root.patch?rev=1.1&content-type=text/plain
175
176 Index: 04_all_root.patch
177 ===================================================================
178 Fixes root permissions for gpm.
179
180 --- ./src/prog/gpm-root.y.orgin Sat Feb 23 16:42:23 2002
181 +++ ./src/prog/gpm-root.y Mon Mar 11 17:32:37 2002
182 @@ -433,9 +433,10 @@
183 /*====================================================================*/
184 void f__fix(struct passwd *pass)
185 {
186 - setgid(pass->pw_gid);
187 - initgroups(pass->pw_name, pass->pw_gid);
188 - setuid(pass->pw_uid);
189 + if (setgid(pass->pw_gid) < 0 ||
190 + initgroups(pass->pw_name, pass->pw_gid) < 0 ||
191 + setuid(pass->pw_uid) < 0)
192 + exit(1);
193 setenv("HOME", pass->pw_dir, 1);
194 setenv("LOGNAME", pass->pw_name,1);
195 setenv("USER", pass->pw_name,1);
196
197
198
199 1.1 src/patchsets/gpm/1.20.1/05_all_serialconsole.patch
200
201 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/05_all_serialconsole.patch?rev=1.1&view=markup
202 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/05_all_serialconsole.patch?rev=1.1&content-type=text/plain
203
204 Index: 05_all_serialconsole.patch
205 ===================================================================
206 Trying to run on a serial console doesn't make much sense :).
207
208 --- ./src/headers/message.h.org Sat Feb 23 16:42:23 2002
209 +++ ./src/headers/message.h Tue Mar 12 00:16:35 2002
210 @@ -125,6 +125,7 @@
211 #define GPM_MESS_NOTWRITE "Can you write to %s?"
212 #define GPM_MESS_WRITE_ERR "write(): %s"
213 #define GPM_MESS_OPEN_CON "Opening console failed."
214 +#define GPM_MESS_OPEN_SERIALCON "We seem to be on a serial console."
215 #define GPM_MESS_READ_FIRST "Error in read()ing first: %s"
216 #define GPM_MESS_READ_REST "Error in read()ing rest: %s"
217 #define GPM_MESS_REMOVE_FILES "Removing files %s and %s"
218 --- ./src/gpm.c.org Sat Feb 23 16:42:23 2002
219 +++ ./src/gpm.c Tue Mar 12 00:20:19 2002
220 @@ -38,6 +38,7 @@
221 #include <sys/un.h> /* struct sockaddr_un */
222
223 #include <linux/vt.h> /* VT_GETSTATE */
224 +#include <linux/serial.h> /* for serial console check */
225 #include <sys/kd.h> /* KDGETMODE */
226 #include <termios.h> /* winsize */
227
228 @@ -153,10 +154,23 @@
229 static inline int open_console(const int mode)
230 {
231 int fd;
232 -
233 - if ((fd=open(option.consolename, mode)) < 0)
234 - gpm_report(GPM_PR_OOPS,GPM_MESS_OPEN_CON);
235 + struct stat sb;
236 + int maj, twelve=12;
237 + struct serial_struct si;
238 +
239 + fd = open(option.consolename, mode);
240 + if (fd != -1) {
241 + fstat(fd, &sb);
242 + maj = major(sb.st_rdev);
243 + if (maj != 4 && (maj < 136 || maj > 143)) {
244 + if (ioctl (fd, TIOCLINUX, &twelve) < 0) {
245 + if (si.line > 0)
246 + gpm_report(GPM_PR_OOPS,GPM_MESS_OPEN_SERIALCON);
247 + }
248 + }
249 return fd;
250 + } else
251 + gpm_report(GPM_PR_OOPS,GPM_MESS_OPEN_CON);
252 }
253
254 /*-------------------------------------------------------------------*/
255
256
257
258 1.1 src/patchsets/gpm/1.20.1/08_all_nodebug.patch
259
260 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/08_all_nodebug.patch?rev=1.1&view=markup
261 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/08_all_nodebug.patch?rev=1.1&content-type=text/plain
262
263 Index: 08_all_nodebug.patch
264 ===================================================================
265 Avoid useless debug info under certain circumstances.
266
267 --- gpm-1.20.1/src/lib/report-lib.c.orig Sat Feb 23 16:42:23 2002
268 +++ gpm-1.20.1/src/lib/report-lib.c Fri May 3 20:16:02 2002
269 @@ -30,10 +30,10 @@
270 va_start(ap,text);
271
272 switch(stat) {
273 - case GPM_STAT_INFO : string = GPM_TEXT_INFO ; break;
274 + case GPM_STAT_INFO : string = GPM_TEXT_INFO ; return;
275 case GPM_STAT_WARN : string = GPM_TEXT_WARN ; break;
276 case GPM_STAT_ERR : string = GPM_TEXT_ERR ; break;
277 - case GPM_STAT_DEBUG: string = GPM_TEXT_DEBUG; break;
278 + case GPM_STAT_DEBUG: string = GPM_TEXT_DEBUG; return;
279 case GPM_STAT_OOPS : string = GPM_TEXT_OOPS; break;
280 }
281 fprintf(stderr,"%s[%s(%d)]:\n",string,file,line);
282 --- gpm-1.20.0/src/report.c.orig Sat Feb 23 16:42:23 2002
283 +++ gpm-1.20.0/src/report.c Fri May 3 20:12:51 2002
284 @@ -130,6 +130,7 @@
285 case GPM_RUN_DAEMON:
286 switch(stat) {
287 case GPM_STAT_INFO:
288 + break;
289 #ifdef HAVE_VSYSLOG
290 syslog(LOG_INFO | LOG_USER, GPM_STRING_INFO);
291 vsyslog(LOG_INFO | LOG_USER, text, ap);
292
293
294
295 1.1 src/patchsets/gpm/1.20.1/09_all_logfillup.patch
296
297 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/09_all_logfillup.patch?rev=1.1&view=markup
298 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/09_all_logfillup.patch?rev=1.1&content-type=text/plain
299
300 Index: 09_all_logfillup.patch
301 ===================================================================
302 This is a fix for gpm bad tendency to fill multiple logs with the same info.
303
304 --- gpm-1.20.1/src/lib/liblow.c~ Sun Oct 6 10:36:25 2002
305 +++ gpm-1.20.1/src/lib/liblow.c Sun Oct 6 10:36:25 2002
306 @@ -258,7 +258,7 @@
307 /* do we really need this check ? */
308 if(strncmp(tty,option.consolename,strlen(option.consolename)-1)
309 || !isdigit(tty[strlen(option.consolename)-1])) {
310 - gpm_report(GPM_PR_ERR,"strncmp/isdigit/option.consolename failed");
311 + /* gpm_report(GPM_PR_ERR,"strncmp/isdigit/option.consolename failed"); */
312 goto err;
313 }
314
315 @@ -367,7 +367,7 @@
316
317 /*....................................... Error: free all memory */
318 err:
319 - gpm_report(GPM_PR_ERR,"Oh, oh, it's an error! possibly I die! ");
320 + /* gpm_report(GPM_PR_ERR,"Oh, oh, it's an error! possibly I die! "); */
321 do {
322 new=gpm_stack->next;
323 free(gpm_stack);
324
325
326
327 1.1 src/patchsets/gpm/1.20.1/10_all_link.patch
328
329 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/10_all_link.patch?rev=1.1&view=markup
330 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/10_all_link.patch?rev=1.1&content-type=text/plain
331
332 Index: 10_all_link.patch
333 ===================================================================
334 This is a patch that only uses -lm when necessary. Also does some
335 linking cleanups, and links only with shared -lgpm.
336
337 --- gpm-1.20.1/src/Makefile.in.orig Sat Feb 1 17:15:55 2003
338 +++ gpm-1.20.1/src/Makefile.in Sat Feb 1 17:23:43 2003
339 @@ -70,6 +70,7 @@
340 all: gpm lib/@SHLIB@ lib/libgpm.a $(PROG)
341
342 gpm: $(GOBJ)
343 + $(CC) @LDFLAGS@ $(LDFLAGS) -o $@ $(GOBJ) @LIBS@ $(LIBS) -lm
344
345 # construct dependings of sourcefiles and link sourcefiles
346 $(DEPFILE) dep: prog/gpm-root.c
347 @@ -139,13 +140,14 @@
348 $(YACC) $(YFLAGS) $< && mv y.tab.c prog/gpm-root.c
349
350 # gpm-root needs an own rule, because gpm-root.c is not in $(srcdir)
351 -prog/gpm-root: prog/gpm-root.c
352 +prog/gpm-root: prog/gpm-root.c lib/libgpm.so
353 $(CC) -I. @CPPFLAGS@ $(CPPFLAGS) @CFLAGS@ $(CFLAGS) -c -o $@.o $<
354 - $(CC) @LDFLAGS@ $(LDFLAGS) -o $@ $@.o @LIBS@ $(LIBS) lib/libgpm.a
355 + $(CC) @LDFLAGS@ $(LDFLAGS) -o $@ $@.o @LIBS@ $(LIBS) lib/libgpm.so
356
357 -prog/mouse-test: mice.o twiddler.o synaptics.o
358 +prog/mouse-test: prog/mouse-test.o mice.o twiddler.o synaptics.o
359 + $(CC) @LDFLAGS@ $(LDFLAGS) -o $@ $^ @LIBS@ $(LIBS) -lm
360
361 -$(PROG): lib/libgpm.so lib/@SHLIB@ lib/libgpm.a
362 +$(PROG): lib/libgpm.so
363
364 # Subdirectory lib/
365 lib/libgpm.a: $(LOBJ)
366
367
368
369 1.1 src/patchsets/gpm/1.20.1/11_all_lib_segv.patch
370
371 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/11_all_lib_segv.patch?rev=1.1&view=markup
372 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/11_all_lib_segv.patch?rev=1.1&content-type=text/plain
373
374 Index: 11_all_lib_segv.patch
375 ===================================================================
376 This fixes mc, which was crashing without this simple little fix. :-)
377
378 --- gpm-1.20.1/src/lib/liblow.c.orig Sat Feb 1 16:21:23 2003
379 +++ gpm-1.20.1/src/lib/liblow.c Sat Feb 1 16:43:07 2003
380 @@ -199,6 +199,7 @@
381 Gpm_Stst *new = NULL;
382 char* sock_name = 0;
383
384 + if(!checked_con)
385 option.consolename = NULL;
386
387 gpm_report(GPM_PR_DEBUG,"VC: %d",flag);
388
389
390
391 1.1 src/patchsets/gpm/1.20.1/12_all_linux26-dependcache.patch
392
393 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/12_all_linux26-dependcache.patch?rev=1.1&view=markup
394 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/12_all_linux26-dependcache.patch?rev=1.1&content-type=text/plain
395
396 Index: 12_all_linux26-dependcache.patch
397 ===================================================================
398 Prevent matching against invalid linux-2.6 headers.
399 See http://bugs.gentoo.org/show_bug.cgi?id=66222 for more info.
400
401 --- src/Makefile.in.orig 2004-10-31 17:23:16.412105664 +0000
402 +++ src/Makefile.in 2004-10-31 17:23:45.636055416 +0000
403 @@ -85,7 +85,7 @@
404 # create dependencies
405 for DEPS in `echo *.c */*.c`; do \
406 $(CC) -I. -I $(srcdir) -M @CPPFLAGS@ $(CPPFLAGS) $$DEPS | \
407 - $(SED) 's/\($*\)\.o\([ :]*\)/\1.o \1.lo\2/g' >> $(DEPFILE) ; done
408 + $(SED) 's/\($*\)\.o\([ :]+\)/\1.o \1.lo\2/g' >> $(DEPFILE) ; done
409
410 ### INSTALL
411 check: all
412
413
414
415 1.1 src/patchsets/gpm/1.20.1/20_all_gpm-1.20.1-subscript.patch
416
417 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/20_all_gpm-1.20.1-subscript.patch?rev=1.1&view=markup
418 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/20_all_gpm-1.20.1-subscript.patch?rev=1.1&content-type=text/plain
419
420 Index: 20_all_gpm-1.20.1-subscript.patch
421 ===================================================================
422 Taken from Fedora cvs.
423
424 gunze_calib is declared as int[4], so referring to idx #4 is
425 obviously a bad idea :).
426
427 --- gpm-1.20.1/src/mice.c.lr 2004-02-15 09:19:48.000000000 +0100
428 +++ gpm-1.20.1/src/mice.c 2004-02-15 09:22:18.000000000 +0100
429 @@ -2112,7 +2112,7 @@
430 for (i=0; i<4; i++)
431 if (gunze_calib[i] & ~1023) calibok = 0;
432 if (gunze_calib[0] == gunze_calib[2]) calibok = 0;
433 - if (gunze_calib[1] == gunze_calib[4]) calibok = 0;
434 + if (gunze_calib[1] == gunze_calib[3]) calibok = 0;
435 fclose(f);
436 }
437 if (!calibok) {
438
439
440
441 1.1 src/patchsets/gpm/1.20.1/21_all_synps2-four-way-button.patch
442
443 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/21_all_synps2-four-way-button.patch?rev=1.1&view=markup
444 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/21_all_synps2-four-way-button.patch?rev=1.1&content-type=text/plain
445
446 Index: 21_all_synps2-four-way-button.patch
447 ===================================================================
448 Patch by Pavel Semerad.
449 http://bugs.gentoo.org/show_bug.cgi?id=36790
450
451 I found there are errors in synaptics.c source file. One is overwriting memory
452 (other variables) and second is assign of synaptics internal numbers to
453 state->buttons (struct Gpm_Event).
454
455 This patch solves it. Array boundaries must be set to 8, because of for
456 cycle in tp_process_repeating_actions(). And assign of last_4_way_buttons
457 cannot be done to state->buttons. I have commented it out (and it seems to
458 work), but may be this is not the correct solution.
459
460 --- ./src/synaptics.c.ps
461 +++ ./src/synaptics.c
462 @@ -830,9 +830,9 @@ static int last_corner_action
463 static int last_finger_action = GPM_B_NOT_SET;
464 static int last_normal_button_actions[6] =
465 {GPM_B_NOT_SET,GPM_B_NOT_SET,GPM_B_NOT_SET,GPM_B_NOT_SET,GPM_B_NOT_SET,GPM_B_NOT_SET};
466 -static int last_stick_button_actions[3] =
467 +static int last_stick_button_actions[8] =
468 {GPM_B_NOT_SET,GPM_B_NOT_SET,GPM_B_NOT_SET};
469 -static int last_4_way_button_actions[4] =
470 +static int last_4_way_button_actions[8] =
471 {GPM_B_NOT_SET,GPM_B_NOT_SET,GPM_B_NOT_SET,GPM_B_NOT_SET};
472
473 /* toss status information */
474 @@ -1483,7 +1483,22 @@ static int syn_ps2_process_extended_pack
475 }
476
477 /* Multiplexing with the stick (guest) device. */
478 - state->buttons |= last_4_way_buttons | last_stick_buttons;
479 + if (stick_pressure_enabled) {
480 + tmp_buttons = report->pressure == 0 ? GPM_B_NONE : last_stick_buttons;
481 + if (tmp_buttons || last_stick_buttons) {
482 + tp_process_repeating_actions(state,tmp_buttons,last_stick_buttons,
483 + &last_stick_button_actions[0],stick_actions);
484 + last_stick_buttons = tmp_buttons;
485 + }
486 + }
487 + if (four_way_button_enabled) {
488 + tmp_buttons = report->pressure == 0 ? GPM_B_NONE : last_4_way_buttons;
489 + if (tmp_buttons || last_4_way_buttons) {
490 + tp_process_repeating_actions(state,tmp_buttons,last_4_way_buttons,
491 + &last_4_way_button_actions[0],four_button_actions);
492 + last_4_way_buttons = tmp_buttons;
493 + }
494 + }
495
496 return 0;
497 }
498
499
500
501 1.1 src/patchsets/gpm/1.20.1/25_all_gpm-mousewheel-support.patch
502
503 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/25_all_gpm-mousewheel-support.patch?rev=1.1&view=markup
504 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/25_all_gpm-mousewheel-support.patch?rev=1.1&content-type=text/plain
505
506 Index: 25_all_gpm-mousewheel-support.patch
507 ===================================================================
508 Makes moving the mouse wheel in console equivalent to pressing the
509 arrow keys on your keyboard. It is done by writing the arrow key
510 codes to the terminal (Linux or VT compatible) whenever gpm detects
511 the wheels have spinned, similarly to how it pastes text on
512 pressing button 2.
513
514 Patch by Andrzej Zaborowski <balrog@×××××.org>
515
516 http://bugs.gentoo.org/101605
517
518 --- src/gpm.c
519 +++ src/gpm.c
520 @@ -184,6 +184,35 @@
521 }
522
523 /*-------------------------------------------------------------------*/
524 +/* Emits arrow keys to the console, according to mouse wheel movements */
525 +static inline void emit_keystrokes(int wdx, int wdy)
526 +{
527 + /* TODO: use terminfo */
528 + char c[6] = "\x1b[ABCD";
529 + int fd;
530 +
531 +#define EMIT(n) { \
532 + if (ioctl(fd, TIOCSTI, c + 0) < 0) \
533 + gpm_report(GPM_PR_OOPS, GPM_MESS_IOCTL_TIOCLINUX); \
534 + if (ioctl(fd, TIOCSTI, c + 1) < 0) \
535 + gpm_report(GPM_PR_OOPS, GPM_MESS_IOCTL_TIOCLINUX); \
536 + if (ioctl(fd, TIOCSTI, c + n) < 0) \
537 + gpm_report(GPM_PR_OOPS, GPM_MESS_IOCTL_TIOCLINUX); \
538 + }
539 +
540 + fd = open_console(O_WRONLY);
541 + if (wdx > 0)
542 + EMIT(4)
543 + if (wdx < 0)
544 + EMIT(5)
545 + if (wdy > 0)
546 + EMIT(2)
547 + if (wdy < 0)
548 + EMIT(3)
549 + close(fd);
550 +}
551 +
552 +/*-------------------------------------------------------------------*/
553 static inline void selection_copy(int x1, int y1, int x2, int y2, int mode)
554 {
555 /*
556 @@ -253,6 +282,8 @@
557 if (x2<1) x2++; else if (x2>maxx) x2--;
558 if (y2<1) y2++; else if (y2>maxy) y2--;
559 selection_copy(x2,y2,x2,y2,3); /* just highlight pointer */
560 + if (event->wdx || event->wdy) /* mouse wheel */
561 + emit_keystrokes(event->wdx, event->wdy);
562 return 0;
563
564 case GPM_DRAG:
565 @@ -516,7 +547,8 @@
566 /* up and down, up and down, ... who does a do..while(0) loop ???
567 and then makes a break into it... argh ! */
568
569 - if (!event->dx && !event->dy && (event->buttons==oldB))
570 + if (!event->dx && !event->dy && !event->wdx && !event->wdy &&
571 + (event->buttons==oldB))
572 do { /* so to break */
573 static long awaketime;
574 /*
575
576
577
578 1.1 src/patchsets/gpm/1.20.1/28_all_gpm-OPEN_MAX.patch
579
580 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/28_all_gpm-OPEN_MAX.patch?rev=1.1&view=markup
581 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/28_all_gpm-OPEN_MAX.patch?rev=1.1&content-type=text/plain
582
583 Index: 28_all_gpm-OPEN_MAX.patch
584 ===================================================================
585 Get the value of max file descriptors dynamically.
586
587 http://bugs.gentoo.org/195977
588
589 --- a/src/prog/gpm-root.y
590 +++ b/src/prog/gpm-root.y
591 @@ -526,7 +526,9 @@ int f_bgcmd(int mode, DrawItem *self, int uid)
592 open("/dev/null",O_RDONLY); /* stdin */
593 open(consolename,O_WRONLY); /* stdout */
594 dup(1); /* stderr */
595 - for (i=3;i<OPEN_MAX; i++) close(i);
596 + int open_max = sysconf(_SC_OPEN_MAX);
597 + if (open_max == -1) open_max = 1024;
598 + for (i=3;i<open_max; i++) close(i);
599 execl("/bin/sh","sh","-c",self->arg,(char *)NULL);
600 exit(1); /* shouldn't happen */
601 default: return 0;
602 --- a/src/special.c
603 +++ b/src/special.c
604 @@ -156,7 +156,9 @@ int processSpecial(Gpm_Event *event)
605 open(GPM_NULL_DEV,O_RDONLY); /* stdin */
606 open(console.device, O_WRONLY); /* stdout */
607 dup(1); /* stderr */
608 - for (i=3;i<OPEN_MAX; i++) close(i);
609 + int open_max = sysconf(_SC_OPEN_MAX);
610 + if (open_max == -1) open_max = 1024;
611 + for (i=3;i<open_max; i++) close(i);
612 execl("/bin/sh","sh","-c",command,(char *)NULL);
613 exit(1); /* shouldn't happen */
614
615
616
617 1.1 src/patchsets/gpm/1.20.1/30_all_gpm-1.20.1-weak-wgetch.patch
618
619 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/30_all_gpm-1.20.1-weak-wgetch.patch?rev=1.1&view=markup
620 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/30_all_gpm-1.20.1-weak-wgetch.patch?rev=1.1&content-type=text/plain
621
622 Index: 30_all_gpm-1.20.1-weak-wgetch.patch
623 ===================================================================
624 gpm has optional ncurses support while ncurses has optional gpm
625 support. if both have the optional features enabled, we get a
626 sweet circular dependency (makes prelink angry). so we disable
627 gpm's linking against ncurses and make the ncurses code work with
628 runtime checks.
629
630 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=117150
631 http://bugs.gentoo.org/show_bug.cgi?id=80942
632
633 --- gpm-1.20.1/src/lib/libcurses.c.weak-wgetch 2002-12-24 17:57:16.000000000 -0500
634 +++ gpm-1.20.1/src/lib/libcurses.c 2004-03-22 15:51:24.000000000 -0500
635 @@ -41,7 +41,12 @@
636 #endif /* HAVE_NCURSES_CURSES_H */
637 #endif /* HAVE_NCURSES_H */
638
639 -#define GET(win) ((win) ? wgetch(win) : getch())
640 +/* If win != NULL, it must have been created by ncurses anyway.
641 + Avoid circular library dependencies. */
642 +#pragma weak wgetch
643 +#pragma weak stdscr
644 +
645 +#define GET(win) ((win && wgetch) ? wgetch(win) : getch())
646
647 int Gpm_Wgetch(WINDOW *win)
648 {
649 --- gpm-1.20.1/configure.in.weak-wgetch 2004-03-22 15:49:51.000000000 -0500
650 +++ gpm-1.20.1/configure.in 2004-03-22 15:51:24.000000000 -0500
651 @@ -115,7 +115,7 @@
652 AC_CHECK_LIB($i, wgetch,,,$TERMLIBS)
653 else :; fi
654 done
655 - SHARED_LIBS="$LIBS $TERMLIBS -lc"
656 + SHARED_LIBS="-lc"
657 LIBS=$SAVELIBS ;;
658 esac
659
660 --- gpm-1.20.1/configure.weak-wgetch 2004-03-22 15:49:55.000000000 -0500
661 +++ gpm-1.20.1/configure 2004-03-22 15:51:24.000000000 -0500
662 @@ -4295,7 +4295,7 @@
663
664 else :; fi
665 done
666 - SHARED_LIBS="$LIBS $TERMLIBS -lc"
667 + SHARED_LIBS="-lc"
668 LIBS=$SAVELIBS ;;
669 esac
670
671
672
673
674 1.1 src/patchsets/gpm/1.20.1/40_all_gpm-daemon.patch
675
676 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/40_all_gpm-daemon.patch?rev=1.1&view=markup
677 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/40_all_gpm-daemon.patch?rev=1.1&content-type=text/plain
678
679 Index: 40_all_gpm-daemon.patch
680 ===================================================================
681 Daemons should always close stdin, stdout and stderr after forking otherwise
682 the controlling terminal will have issues closing.
683 Examples include starting over ssh or baselayout-2
684 http://bugs.gentoo.org/182721
685
686 --- a/src/startup.c
687 +++ b/src/startup.c
688 @@ -29,7 +29,7 @@
689 #include <sys/types.h> /* geteuid, mknod */
690 #include <sys/stat.h> /* mknod */
691 #include <fcntl.h> /* mknod */
692 -#include <unistd.h> /* mknod */
693 +#include <unistd.h> /* mknod, daemon */
694
695
696 #include "headers/gpmInt.h"
697 @@ -134,26 +134,17 @@
698 }
699 }
700
701 - if(option.run_status == GPM_RUN_STARTUP ) { /* else is debugging */
702 - /* goto background and become a session leader (Stefan Giessler) */
703 - switch(fork()) {
704 - case -1: gpm_report(GPM_PR_OOPS,GPM_MESS_FORK_FAILED); /* error */
705 - case 0: option.run_status = GPM_RUN_DAEMON; break; /* child */
706 - default: _exit(0); /* parent */
707 - }
708 + if (option.run_status == GPM_RUN_STARTUP ) { /* else is debugging */
709 + if (daemon(0,0))
710 + gpm_report(GPM_PR_OOPS,GPM_MESS_FORK_FAILED); /* error */
711
712 - if (setsid() < 0) gpm_report(GPM_PR_OOPS,GPM_MESS_SETSID_FAILED);
713 + option.run_status = GPM_RUN_DAEMON; /* child */
714 }
715
716 /* damon init: check whether we run or not, display message */
717 check_uniqueness();
718 gpm_report(GPM_PR_INFO,GPM_MESS_STARTED);
719
720 - /* is changing to root needed, because of relative paths ? or can we just
721 - * remove and ignore it ?? FIXME */
722 - if (chdir("/") < 0) gpm_report(GPM_PR_OOPS,GPM_MESS_CHDIR_FAILED);
723 -
724 -
725 //return mouse_table[1].fd; /* the second is handled in the main() */
726
727 /****************** OLD CODE from gpn.c END ***********************/
728
729
730
731 1.1 src/patchsets/gpm/1.20.1/60_all_parallel-build.patch
732
733 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/60_all_parallel-build.patch?rev=1.1&view=markup
734 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gpm/1.20.1/60_all_parallel-build.patch?rev=1.1&content-type=text/plain
735
736 Index: 60_all_parallel-build.patch
737 ===================================================================
738 Fix the targets so that `make -j` works properly ...
739
740 The gpm.man thing in doc/ is kind of a hack, but it's not *my* fault that the
741 man targets are so ugly :).
742
743 -- vapier@g.o
744
745 --- Makefile.in.orig 2005-01-30 06:20:49.419135576 -0500
746 +++ Makefile.in 2005-01-30 06:21:43.715881216 -0500
747 @@ -23,7 +23,7 @@
748
749 ### simple, but effective rules
750
751 -all: dep do-all
752 +all: do-all
753
754 dep:
755 touch src/$(DEPFILE) # to prevent unecessary warnings
756 @@ -58,7 +58,7 @@
757 ### GENERIC
758
759 # do-all goes to all subdirectories and does all
760 -do-%:
761 +do-%: dep
762 @target=`echo $@ | $(SED) -e 's/^do-//'`; \
763 for i in $(SUBDIRS) ; do \
764 if test -f ./$$i/Makefile ; then \
765 --- doc/Makefile.in.orig 2005-01-30 06:09:37.450290368 -0500
766 +++ doc/Makefile.in 2005-01-30 06:16:55.710664664 -0500
767 @@ -32,6 +32,8 @@
768
769 MANPAGES = gpm.8 mev.1 gpm-root.1 gpm-types.7 mouse-test.1
770
771 +all: $(srcdir)/gpm.info gpm.man
772 +
773 # HTML (texi2html)
774 %.html: %.texinfo
775 if [ $(TEXI2HTML) != "no" ]; then $(TEXI2HTML) $< ;fi
776 @@ -55,13 +57,13 @@
777 $(AWK) -f $(srcdir)/mktxt $< > $@
778
779 # MAN (-)
780 -$(MANPAGES): doc.gpm $(srcdir)/manpager
781 +gpm.man: doc.gpm $(srcdir)/manpager
782 $(AWK) -f $(srcdir)/manpager doc.gpm
783 for i in gpm-root.1 gpm-types.7 gpm.8 mev.1 mouse-test.1; do \
784 expand $$i | sed s/^'[ ]*'//g > $$i.new; \
785 mv $$i.new $$i; \
786 done;
787 -
788 + touch gpm.man
789
790 # DVI
791 # This rule is somewhat a rewrite of texi2dvi. I like make more than sh :-)
792 @@ -97,8 +99,6 @@
793
794 # Main portion
795
796 -all: $(srcdir)/gpm.info $(MANPAGES)
797 -
798 # why gpmdoc.ps and gpm.ps??
799 # there is no gpm.ps in my tree and no rule to generate gpm.ps.
800 gpmdoc.ps: gpm.ps
801
802
803
804 --
805 gentoo-commits@l.g.o mailing list