From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jun 28 02:00:20 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 022BE16A43D for ; Tue, 28 Jun 2005 02:00:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C812F43D49 for ; Tue, 28 Jun 2005 02:00:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j5S20Ja2062005 for ; Tue, 28 Jun 2005 02:00:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j5S20JRu062001; Tue, 28 Jun 2005 02:00:19 GMT (envelope-from gnats) Resent-Date: Tue, 28 Jun 2005 02:00:19 GMT Resent-Message-Id: <200506280200.j5S20JRu062001@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Matthew Luckie Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57B1B16A425 for ; Tue, 28 Jun 2005 01:50:59 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FA9843D66 for ; Tue, 28 Jun 2005 01:50:52 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j5S1ondG058302 for ; Tue, 28 Jun 2005 01:50:49 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j5S1onA7058281; Tue, 28 Jun 2005 01:50:49 GMT (envelope-from nobody) Message-Id: <200506280150.j5S1onA7058281@www.freebsd.org> Date: Tue, 28 Jun 2005 01:50:49 GMT From: Matthew Luckie To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/82710: [patch] xscreensaver does not compile on 4.X X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2005 02:00:20 -0000 >Number: 82710 >Category: ports >Synopsis: [patch] xscreensaver does not compile on 4.X >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 28 02:00:19 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Matthew Luckie >Release: 4.11-RELEASE-p8 >Organization: >Environment: FreeBSD lycra.luckie.org.nz 4.11-RELEASE-p8 FreeBSD 4.11-RELEASE-p8 #1: Wed May 11 14:02:09 NZST 2005 root@lycra.luckie.org.nz:/files/freebsd_src/sys/compile/lycra i386 >Description: antmaze.c has two major problems: - it declares an array with 1 less element than it needs - it uses C99isms. the patch below fixes these problems and allows antmaze to compile (and xscreensaver). >How-To-Repeat: cc -Wall -Wstrict-prototypes -Wnested-externs -std=c89 -U__STRICT_ANSI__ -c -I. -I. -I./../../utils -I./.. -I../.. -I/usr/local/include/atk-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/X11R6/include/gtk-2.0 -I/usr/X11R6/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/X11R6/include/pango-1.0 -I/usr/local/include/freetype2 -I/usr/X11R6/include/libglade-2.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/X11R6/include/gtk-2.0 -I/usr/X11R6/include -DSTANDALONE -DUSE_GL -DHAVE_CONFIG_H -O -pipe -I/usr/local/include -I/usr/local/include/gnome-xml -I/usr/X11R6/include antmaze.c antmaze.c:203: warning: excess elements in array initializer antmaze.c:203: warning: (near initialization for `antmaterial') antmaze.c:208: warning: excess elements in array initializer antmaze.c:208: warning: (near initialization for `antdirection') antmaze.c:214: warning: excess elements in array initializer antmaze.c:214: warning: (near initialization for `antposition') antmaze.c:235: warning: excess elements in array initializer antmaze.c:235: warning: (near initialization for `bposition') antmaze.c:252: warning: excess elements in array initializer antmaze.c:252: warning: (near initialization for `part') antmaze.c: In function `makeCheckImage': antmaze.c:276: warning: suggest parentheses around comparison in operand of ^ antmaze.c:272: warning: unused variable `k' antmaze.c:272: warning: unused variable `c' antmaze.c:272: warning: unused variable `r' antmaze.c: In function `makeBrushedImage': antmaze.c:305: warning: unused variable `k' antmaze.c:305: warning: unused variable `r' antmaze.c: In function `update_ants': antmaze.c:988: syntax error before `df' antmaze.c:989: `df' undeclared (first use in this function) antmaze.c:989: (Each undeclared identifier is reported only once antmaze.c:989: for each function it appears in.) antmaze.c:1001: syntax error before `df' antmaze.c:1174: syntax error before `double' antmaze.c:1175: `dt' undeclared (first use in this function) antmaze.c: In function `pinit': antmaze.c:1186: warning: unused variable `status' antmaze.c: At top level: antmaze.c:116: warning: `MaterialMagenta' defined but not used antmaze.c:154: warning: `mySphere2' defined but not used gmake[1]: *** [antmaze.o] Error 1 gmake[1]: Leaving directory `/usr/tmp/files/freebsd_ports/x11/xscreensaver/work/xscreensaver-4.22/hacks/glx' gmake: *** [all] Error 5 *** Error code 2 Stop in /files/freebsd_ports/x11/xscreensaver. >Fix: put this as a patch in x11/xscreensaver/files/ --- hacks/glx/antmaze.c.orig Tue Jun 28 13:40:57 2005 +++ hacks/glx/antmaze.c Tue Jun 28 13:36:46 2005 @@ -193,7 +193,7 @@ /* no cone */ static Bool myCone2(float radius) { return True; } -#define ANTCOUNT 4 +#define ANTCOUNT 5 #define PI 3.14157 static int focus = 0; @@ -971,6 +971,7 @@ double fadeoutspeed = 0.0; void update_ants(void) { + GLfloat df[4]; int i; /* fade out */ @@ -985,7 +986,8 @@ fadeout += fadeoutspeed; - GLfloat df[4] = {0.8*fadeout, 0.8*fadeout, 0.8*fadeout, 1.0}; + df[0] = df[1] = df[2] = 0.8*fadeout; + df[3] = 1.0; glLightfv(GL_LIGHT0, GL_DIFFUSE, df); glLightfv(GL_LIGHT1, GL_DIFFUSE, df); } @@ -998,7 +1000,8 @@ fadeoutspeed = 0.0; entroducing = 12; } - GLfloat df[4] = {0.8*fadeout, 0.8*fadeout, 0.8*fadeout, 1.0}; + df[0] = df[1] = df[2] = 0.8*fadeout; + df[3] = 1.0; glLightfv(GL_LIGHT0, GL_DIFFUSE, df); glLightfv(GL_LIGHT1, GL_DIFFUSE, df); } @@ -1159,7 +1162,7 @@ /* difference */ double dx = antpath[i][part[i]][0] - antposition[i][0]; double dz = - antpath[i][part[i]][1] + antposition[i][1]; - double theta, ideal; + double theta, ideal, dt; if(dz > EPSILON) theta = atan(dz/dx); @@ -1171,7 +1174,7 @@ ideal += Pi; /* compute correction */ - double dt = sign(ideal) * min(fabs(ideal), PI/90.0); + dt = sign(ideal) * min(fabs(ideal), PI/90.0); antdirection[i] += dt; if(antdirection[i] > 2.0*PI) antdirection[i] = 0.0; >Release-Note: >Audit-Trail: >Unformatted: