From flz@xbsd.org  Mon Feb 28 20:14:27 2005
Return-Path: <flz@xbsd.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 73C8316A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 28 Feb 2005 20:14:27 +0000 (GMT)
Received: from smtp.xbsd.org (xbsd.org [82.233.2.192])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7B28343D3F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 28 Feb 2005 20:14:26 +0000 (GMT)
	(envelope-from flz@xbsd.org)
Received: from localhost (localhost.xbsd.org [127.0.0.1])
	by smtp.xbsd.org (Postfix) with ESMTP id AEA2B1162D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 28 Feb 2005 21:17:08 +0100 (CET)
Received: from smtp.xbsd.org ([127.0.0.1])
 by localhost (srv1.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 09259-10 for <FreeBSD-gnats-submit@freebsd.org>;
 Mon, 28 Feb 2005 21:16:55 +0100 (CET)
Received: by smtp.xbsd.org (Postfix, from userid 2001)
	id 3B02B1158A; Mon, 28 Feb 2005 21:16:55 +0100 (CET)
Message-Id: <20050228201655.3B02B1158A@smtp.xbsd.org>
Date: Mon, 28 Feb 2005 21:16:55 +0100 (CET)
From: Florent Thoumie <flz@xbsd.org>
Reply-To: Florent Thoumie <flz@xbsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Update port: x11-wm/tinywm - fix compilation on i386-4
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         78210
>Category:       ports
>Synopsis:       Update port: x11-wm/tinywm - fix compilation on i386-4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    tobez
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 28 20:20:22 GMT 2005
>Closed-Date:    Mon Feb 28 22:33:04 CET 2005
>Last-Modified:  Mon Feb 28 22:33:04 CET 2005
>Originator:     Florent Thoumie
>Release:        FreeBSD 5.3-RELEASE i386
>Organization:
Xbsd.org
>Environment:
System: FreeBSD srv1.xbsd.org 5.3-RELEASE FreeBSD 5.3-RELEASE #2: Wed Nov 24 16:35:34 CET 2004 root@gate.xbsd.org:/usr/src/sys/i386/compile/GATE i386

>Description:

Fix compilation with gcc 2.95.x.

>How-To-Repeat:
	
>Fix:

--- tinywm.diff begins here ---
diff -ruN tinywm.orig/files/patch-Makefile tinywm/files/patch-Makefile
--- tinywm.orig/files/patch-Makefile	Thu Jan  1 01:00:00 1970
+++ tinywm/files/patch-Makefile	Mon Feb 28 21:14:41 2005
@@ -0,0 +1,17 @@
+
+$FreeBSD$
+
+--- Makefile.orig
++++ Makefile
+@@ -1,8 +1,8 @@
+-X11=/usr/X11R6
+-CCOPTS=-Os -pedantic -Wall -std=gnu99
++PREFIX?=/usr/X11R6
++CFLAGS?=-Os -pedantic -Wall
+ 
+ all:
+-	$(CC) $(CCOPTS) -I$(X11)/include -L$(X11)/lib -lX11 -o tinywm tinywm.c
++	$(CC) $(CFLAGS) -I$(PREFIX)/include -L$(PREFIX)/lib -lX11 -o tinywm tinywm.c
+ 
+ clean:
+ 	rm -f tinywm
diff -ruN tinywm.orig/files/patch-tinywm.c tinywm/files/patch-tinywm.c
--- tinywm.orig/files/patch-tinywm.c	Thu Jan  1 01:00:00 1970
+++ tinywm/files/patch-tinywm.c	Mon Feb 28 21:14:41 2005
@@ -0,0 +1,44 @@
+
+$FreeBSD$
+
+--- tinywm.c.orig
++++ tinywm.c
+@@ -12,12 +12,15 @@
+ 
+ int main()
+ {
++    int xdiff, ydiff;
+     Display * dpy = XOpenDisplay(0);
++    XWindowAttributes attr;
++    XButtonEvent start;
++    XEvent ev;
++    Window root = DefaultRootWindow(dpy);
+ 
+     if(!dpy) return 1;
+ 
+-    Window root = DefaultRootWindow(dpy);
+-
+     XGrabKey(dpy, XKeysymToKeycode(dpy, XStringToKeysym("F1")), Mod1Mask, root,
+             True, GrabModeAsync, GrabModeAsync);
+     XGrabButton(dpy, 1, Mod1Mask, root, True, ButtonPressMask, GrabModeAsync,
+@@ -25,9 +28,6 @@
+     XGrabButton(dpy, 3, Mod1Mask, root, True, ButtonPressMask, GrabModeAsync,
+             GrabModeAsync, None, None);
+ 
+-    XWindowAttributes attr;
+-    XButtonEvent start;
+-    XEvent ev;
+     for(;;)
+     {
+         XNextEvent(dpy, &ev);
+@@ -44,8 +44,8 @@
+         else if(ev.type == MotionNotify)
+         {
+             while(XCheckTypedEvent(dpy, MotionNotify, &ev));
+-            int xdiff = ev.xbutton.x_root - start.x_root;
+-            int ydiff = ev.xbutton.y_root - start.y_root;
++            xdiff = ev.xbutton.x_root - start.x_root;
++            ydiff = ev.xbutton.y_root - start.y_root;
+             XMoveResizeWindow(dpy, ev.xmotion.window,
+                 attr.x + (start.button==1 ? xdiff : 0),
+                 attr.y + (start.button==1 ? ydiff : 0),
--- tinywm.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->tobez 
Responsible-Changed-By: tobez 
Responsible-Changed-When: Mon Feb 28 21:21:21 CET 2005 
Responsible-Changed-Why:  
Grab with extreme prejudice. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78210 
State-Changed-From-To: open->closed 
State-Changed-By: tobez 
State-Changed-When: Mon Feb 28 22:32:51 CET 2005 
State-Changed-Why:  
Fix committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78210 
>Unformatted:
