Date: Mon, 28 Feb 2005 21:16:55 +0100 (CET) From: Florent Thoumie <flz@xbsd.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/78210: Update port: x11-wm/tinywm - fix compilation on i386-4 Message-ID: <20050228201655.3B02B1158A@smtp.xbsd.org> Resent-Message-ID: <200502282020.j1SKKMTY087948@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 78210 >Category: ports >Synopsis: Update port: x11-wm/tinywm - fix compilation on i386-4 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Feb 28 20:20:22 GMT 2005 >Closed-Date: >Last-Modified: >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: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050228201655.3B02B1158A>