summaryrefslogtreecommitdiff
path: root/x11/xscreensaver
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2003-06-24 10:22:46 +0000
committerwiz <wiz@pkgsrc.org>2003-06-24 10:22:46 +0000
commit1a898aa4600aad4007beffdd372c18c955afa37b (patch)
treeba355d0e1a92995689263e68af3010552c4a5837 /x11/xscreensaver
parentbc27e29fe2ae95b3f160c8b2d32b47ceaaf9ff7a (diff)
downloadpkgsrc-1a898aa4600aad4007beffdd372c18c955afa37b.tar.gz
Update to 4.11:
* New hacks, `hypertorus', `cubestorm', `glknots', `blocktube', and `glmatrix'. * Updates to `cloudlife', `engine', `xmatrix', and `sonar'. * Rewrote `glslideshow': it should work on somewhat wimpier video cards now. * Various portability tweaks.
Diffstat (limited to 'x11/xscreensaver')
-rw-r--r--x11/xscreensaver/Makefile.common4
-rw-r--r--x11/xscreensaver/PLIST37
-rw-r--r--x11/xscreensaver/distinfo8
-rw-r--r--x11/xscreensaver/patches/patch-ae863
4 files changed, 41 insertions, 871 deletions
diff --git a/x11/xscreensaver/Makefile.common b/x11/xscreensaver/Makefile.common
index b330ff4f44f..d196214653a 100644
--- a/x11/xscreensaver/Makefile.common
+++ b/x11/xscreensaver/Makefile.common
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile.common,v 1.50 2003/06/23 14:23:13 jschauma Exp $
+# $NetBSD: Makefile.common,v 1.51 2003/06/24 10:22:46 wiz Exp $
#
-DISTNAME= xscreensaver-4.10
+DISTNAME= xscreensaver-4.11
CATEGORIES= x11
MASTER_SITES= ${HOMEPAGE} \
ftp://ftp.fu-berlin.de/unix/X11/graphics/xscreensaver/
diff --git a/x11/xscreensaver/PLIST b/x11/xscreensaver/PLIST
index 6891f9a51ad..f103f057c5b 100644
--- a/x11/xscreensaver/PLIST
+++ b/x11/xscreensaver/PLIST
@@ -1,5 +1,4 @@
-@comment $NetBSD: PLIST,v 1.13 2003/05/23 09:39:52 wiz Exp $
-@comment bin/screensaver-properties-capplet
+@comment $NetBSD: PLIST,v 1.14 2003/06/24 10:22:47 wiz Exp $
bin/xscreensaver
bin/xscreensaver-command
bin/xscreensaver-demo
@@ -18,6 +17,7 @@ libexec/xscreensaver/atunnel
libexec/xscreensaver/barcode
libexec/xscreensaver/blaster
libexec/xscreensaver/blitspin
+libexec/xscreensaver/blocktube
libexec/xscreensaver/bouboule
libexec/xscreensaver/bouncingcow
libexec/xscreensaver/boxed
@@ -41,6 +41,7 @@ libexec/xscreensaver/config/atunnel.xml
libexec/xscreensaver/config/barcode.xml
libexec/xscreensaver/config/blaster.xml
libexec/xscreensaver/config/blitspin.xml
+libexec/xscreensaver/config/blocktube.xml
libexec/xscreensaver/config/bouboule.xml
libexec/xscreensaver/config/bouncingcow.xml
libexec/xscreensaver/config/boxed.xml
@@ -59,6 +60,7 @@ libexec/xscreensaver/config/cosmos.xml
libexec/xscreensaver/config/critical.xml
libexec/xscreensaver/config/crystal.xml
libexec/xscreensaver/config/cubenetic.xml
+libexec/xscreensaver/config/cubestorm.xml
libexec/xscreensaver/config/cynosure.xml
libexec/xscreensaver/config/dangerball.xml
libexec/xscreensaver/config/decayscreen.xml
@@ -89,6 +91,8 @@ libexec/xscreensaver/config/gears.xml
libexec/xscreensaver/config/gflux.xml
libexec/xscreensaver/config/glblur.xml
libexec/xscreensaver/config/glforestfire.xml
+libexec/xscreensaver/config/glknots.xml
+libexec/xscreensaver/config/glmatrix.xml
libexec/xscreensaver/config/glplanet.xml
libexec/xscreensaver/config/glslideshow.xml
libexec/xscreensaver/config/glsnake.xml
@@ -103,6 +107,7 @@ libexec/xscreensaver/config/helix.xml
libexec/xscreensaver/config/hopalong.xml
libexec/xscreensaver/config/hyperball.xml
libexec/xscreensaver/config/hypercube.xml
+libexec/xscreensaver/config/hypertorus.xml
libexec/xscreensaver/config/ifs.xml
libexec/xscreensaver/config/imsmap.xml
libexec/xscreensaver/config/interference.xml
@@ -207,6 +212,7 @@ libexec/xscreensaver/coral
libexec/xscreensaver/critical
libexec/xscreensaver/crystal
libexec/xscreensaver/cubenetic
+libexec/xscreensaver/cubestorm
libexec/xscreensaver/cynosure
libexec/xscreensaver/dangerball
libexec/xscreensaver/decayscreen
@@ -236,6 +242,8 @@ libexec/xscreensaver/gears
libexec/xscreensaver/gflux
libexec/xscreensaver/glblur
libexec/xscreensaver/glforestfire
+libexec/xscreensaver/glknots
+libexec/xscreensaver/glmatrix
libexec/xscreensaver/glplanet
libexec/xscreensaver/glslideshow
libexec/xscreensaver/glsnake
@@ -249,6 +257,7 @@ libexec/xscreensaver/helix
libexec/xscreensaver/hopalong
libexec/xscreensaver/hyperball
libexec/xscreensaver/hypercube
+libexec/xscreensaver/hypertorus
libexec/xscreensaver/ifs
libexec/xscreensaver/imsmap
libexec/xscreensaver/interference
@@ -352,6 +361,7 @@ man/man1/atunnel.1
man/man1/barcode.1
man/man1/blaster.1
man/man1/blitspin.1
+man/man1/blocktube.1
man/man1/bouboule.1
man/man1/bouncingcow.1
man/man1/boxed.1
@@ -363,11 +373,13 @@ man/man1/bumps.1
man/man1/cage.1
man/man1/ccurve.1
man/man1/circuit.1
+man/man1/cloudlife.1
man/man1/compass.1
man/man1/coral.1
man/man1/critical.1
man/man1/crystal.1
man/man1/cubenetic.1
+man/man1/cubestorm.1
man/man1/cynosure.1
man/man1/dangerball.1
man/man1/decayscreen.1
@@ -397,6 +409,8 @@ man/man1/gears.1
man/man1/gflux.1
man/man1/glblur.1
man/man1/glforestfire.1
+man/man1/glknots.1
+man/man1/glmatrix.1
man/man1/glplanet.1
man/man1/glslideshow.1
man/man1/glsnake.1
@@ -410,6 +424,7 @@ man/man1/helix.1
man/man1/hopalong.1
man/man1/hyperball.1
man/man1/hypercube.1
+man/man1/hypertorus.1
man/man1/ifs.1
man/man1/imsmap.1
man/man1/interference.1
@@ -509,10 +524,6 @@ man/man1/xspirograph.1
man/man1/xsublim.1
man/man1/xteevee.1
man/man1/zoom.1
-@comment share/applications/screensaver-properties.desktop
-@comment share/control-center-2.0/capplets/screensaver-properties.desktop
-@comment share/control-center/Desktop/screensaver-properties.desktop
-@comment share/control-center/capplets/screensaver-properties.desktop
${PKGLOCALEDIR}/locale/ca/LC_MESSAGES/xscreensaver.mo
${PKGLOCALEDIR}/locale/da/LC_MESSAGES/xscreensaver.mo
${PKGLOCALEDIR}/locale/de/LC_MESSAGES/xscreensaver.mo
@@ -535,14 +546,14 @@ ${PKGLOCALEDIR}/locale/vi/LC_MESSAGES/xscreensaver.mo
${PKGLOCALEDIR}/locale/wa/LC_MESSAGES/xscreensaver.mo
${PKGLOCALEDIR}/locale/zh_CN/LC_MESSAGES/xscreensaver.mo
${PKGLOCALEDIR}/locale/zh_TW/LC_MESSAGES/xscreensaver.mo
-share/xscreensaver/screensaver-cmndln.xpm
-share/xscreensaver/screensaver-colorselector.xpm
-share/xscreensaver/screensaver-diagnostic.xpm
-share/xscreensaver/screensaver-locking.xpm
-share/xscreensaver/screensaver-power.xpm
-share/xscreensaver/screensaver-snap.xpm
+share/pixmaps/xscreensaver.xpm
+share/xscreensaver/screensaver-cmndln.png
+share/xscreensaver/screensaver-colorselector.png
+share/xscreensaver/screensaver-diagnostic.png
+share/xscreensaver/screensaver-locking.png
+share/xscreensaver/screensaver-power.png
+share/xscreensaver/screensaver-snap.png
share/xscreensaver/xscreensaver-demo.glade2
-share/xscreensaver/xscreensaver.xpm
@dirrm share/xscreensaver
@dirrm libexec/xscreensaver/config
@dirrm libexec/xscreensaver
diff --git a/x11/xscreensaver/distinfo b/x11/xscreensaver/distinfo
index 16028720ce4..7064a907fea 100644
--- a/x11/xscreensaver/distinfo
+++ b/x11/xscreensaver/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.26 2003/05/23 09:39:52 wiz Exp $
+$NetBSD: distinfo,v 1.27 2003/06/24 10:22:47 wiz Exp $
-SHA1 (xscreensaver-4.10.tar.gz) = 335680994fcd74261192cca060e2b3ffdd6f0c10
-Size (xscreensaver-4.10.tar.gz) = 3593957 bytes
+SHA1 (xscreensaver-4.11.tar.gz) = 35ed2910975fe5fd565f48519b90ba6c47726145
+Size (xscreensaver-4.11.tar.gz) = 3744413 bytes
SHA1 (patch-aa) = 0b4de3babe3fe191943ce31c055e8047911c1326
SHA1 (patch-ab) = 3dc02761edb19658e17935bd245208fa7387316d
SHA1 (patch-ac) = 430b3318a1d1623c5ac2ba51dd531c3bff8c9a70
SHA1 (patch-ad) = 64cd7a683da1afea599d1e8b8dffd951243c9d9b
-SHA1 (patch-ae) = 69b71676f23f6a6e5fb8b2d25eaf21a8388236f8
+SHA1 (patch-ae) = 16d0c8b50b2601458aaec09d1c7425fb23308225
diff --git a/x11/xscreensaver/patches/patch-ae b/x11/xscreensaver/patches/patch-ae
index be8f77ceb78..c1150730270 100644
--- a/x11/xscreensaver/patches/patch-ae
+++ b/x11/xscreensaver/patches/patch-ae
@@ -1,853 +1,12 @@
-$NetBSD: patch-ae,v 1.8 2003/05/23 09:39:53 wiz Exp $
+$NetBSD: patch-ae,v 1.9 2003/06/24 10:22:47 wiz Exp $
---- hacks/glx/klein.c.orig Tue May 20 13:33:47 2003
-+++ hacks/glx/klein.c
-@@ -1,424 +1,424 @@
--/* -*- Mode: C; tab-width: 4 -*- */
--/* Klein --- Klein Bottle, Moebius and other parametric surfaces
-- * visualization */
--
--/*
-- * Revision History:
-- * 2000: written by Andrey Mirtchovski <mirtchov@cpsc.ucalgary.ca
-- *
-- * 01-Mar-2003 mirtchov modified as a xscreensaver hack
-- *
-- */
--
--/*-
-- * due to a Bug/feature in VMS X11/Intrinsic.h has to be placed before xlock.
-- * otherwise caddr_t is not defined correctly
-- */
--
--#include <X11/Intrinsic.h>
--
--#ifdef STANDALONE
--# define PROGCLASS "Klein"
--# define HACK_INIT init_klein
--# define HACK_DRAW draw_klein
--# define HACK_RESHAPE reshape_klein
--# define HACK_HANDLE_EVENT klein_handle_event
--# define EVENT_MASK PointerMotionMask
--# define klein_opts xlockmore_opts
--
--
--#define DEF_SPIN "True"
--#define DEF_WANDER "False"
--#define DEF_RANDOM "False"
--#define DEF_SPEED "150"
--
--# define DEFAULTS "*delay: 20000 \n" \
-- "*showFPS: False \n" \
-- "*wireframe: False \n" \
-- "*random: " DEF_RANDOM "\n" \
-- "*speed: " DEF_SPEED "\n" \
-- "*spin: " DEF_SPIN "\n" \
-- "*wander: " DEF_WANDER "\n" \
--
--# include "xlockmore.h" /* from the xscreensaver distribution */
--#else /* !STANDALONE */
--# include "xlock.h" /* from the xlockmore distribution */
--#endif /* !STANDALONE */
--
--#ifdef USE_GL
--
--#include <GL/glu.h>
--#include "rotator.h"
--#include "gltrackball.h"
--
--#undef countof
--#define countof(x) (sizeof((x))/sizeof((*x)))
--
--/* surfaces being drawn */
--enum {
-- KLEIN = 0,
-- DINI,
-- ENNEPER,
-- KUEN,
-- MOEBIUS,
-- SEASHELL,
-- SWALLOWTAIL,
-- BOHEM,
-- SURFACE_LAST,
--};
--
--/* primitives to draw with
-- * note that we skip the polygons and
-- * triangle fans -- too slow
-- *
-- * also removed triangle_strip and quads --
-- * just doesn't look good enough
-- */
--enum {
-- MY_POINTS = 0,
-- MY_LINES,
-- MY_LINE_LOOP,
-- MY_PRIM_LAST,
--};
--
--
--static Bool rand;
--static int render;
--static int speed;
--static Bool do_spin;
--static Bool do_wander;
--
--static XrmOptionDescRec opts[] = {
-- {"-speed", ".speed", XrmoptionSepArg, (caddr_t) 0 },
-- { "-spin", ".spin", XrmoptionNoArg, "True" },
-- { "+spin", ".spin", XrmoptionNoArg, "False" },
-- { "-wander", ".wander", XrmoptionNoArg, "True" },
-- { "+wander", ".wander", XrmoptionNoArg, "False" },
-- { "-random", ".rand", XrmoptionNoArg, "True" },
-- { "+random", ".rand", XrmoptionNoArg, "False" },
--};
--
--static argtype vars[] = {
-- {(caddr_t *) &rand, "rand", "Random", DEF_RANDOM, t_Bool},
-- {(caddr_t *) &do_spin, "spin", "Spin", DEF_SPIN, t_Bool},
-- {(caddr_t *) &do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
-- {(caddr_t *) &speed, "speed", "Speed", DEF_SPEED, t_Int},
--};
--
--
--ModeSpecOpt klein_opts = {countof(opts), opts, countof(vars), vars, NULL};
--
--
--
--typedef struct{
-- GLfloat x;
-- GLfloat y;
-- GLfloat z;
--} GL_VECTOR;
--
--typedef struct {
-- GLXContext *glx_context;
-- Window window;
-- rotator *rot;
-- trackball_state *trackball;
-- Bool button_down_p;
--
-- int render;
-- int surface;
--
-- float du, dv;
-- float a, b, c;
--
--} kleinstruct;
--
--static kleinstruct *klein = NULL;
--
--
--static void
--draw(ModeInfo *mi)
--{
-- kleinstruct *kp = &klein[MI_SCREEN(mi)];
-- static float step = 0.0;
-- double u, v;
-- float coord[3];
--
-- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
--
-- glEnable(GL_DEPTH_TEST);
-- glEnable(GL_NORMALIZE);
-- glEnable(GL_CULL_FACE);
--
-- glPushMatrix();
--
-- {
-- double x, y, z;
-- get_position (kp->rot, &x, &y, &z, !kp->button_down_p);
-- glTranslatef((x - 0.5) * 10,
-- (y - 0.5) * 10,
-- (z - 0.5) * 20);
--
-- gltrackball_rotate (kp->trackball);
--
-- get_rotation (kp->rot, &x, &y, &z, !kp->button_down_p);
-- glRotatef (x * 360, 1.0, 0.0, 0.0);
-- glRotatef (y * 360, 0.0, 1.0, 0.0);
-- glRotatef (z * 360, 0.0, 0.0, 1.0);
-- }
--
-- glScalef( 4.0, 4.0, 4.0 );
--
-- glBegin(kp->render);
-- switch(kp->surface) {
-- case KLEIN:
-- for(u = -M_PI; u < M_PI; u+=kp->du){
-- for(v = -M_PI; v < M_PI; v+=kp->dv){
-- coord[0] = cos(u)*(kp->a + sin(v)*cos(u/2) -
-- sin(2*v)*sin(u/2)/2);
-- coord[1] = sin(u)*(kp->a + sin(v)*cos(u/2) -
-- sin(2*v)*sin(u/2)/2);
-- coord[2] = sin(u/2)*sin(v) + cos(u/2)*sin(2*v)/2;
-- glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-- glVertex3fv(coord);
-- }
-- }
-- break;
-- case DINI:
-- for(u = -M_PI; u < M_PI; u+=kp->du){
-- for(v = -M_PI; v < M_PI; v+=kp->dv){
-- coord[0] = kp->a*cos(u)*sin(v);
-- coord[1] = kp->a*sin(u)*sin(v);
-- coord[2] = kp->a*(cos(v) + sin(tan((v/2))))+0.2*u;
-- glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-- glVertex3fv(coord);
-- }
-- }
-- break;
-- case ENNEPER:
-- for(u = -M_PI; u < M_PI; u+=kp->du){
-- for(v = -M_PI; v < M_PI; v+=kp->dv){
-- coord[0] = kp->a*(u-(u*u*u/3)+u*v*v);
-- coord[1] = kp->b*(v-(v*v*v/3)+u*u*v);
-- coord[2] = u*u-v*v;
-- glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-- glVertex3fv(coord);
-- }
-- }
-- break;
-- case KUEN:
-- for(u = -M_PI; u < M_PI; u+=kp->du){
-- for(v = -M_PI; v < M_PI; v+=kp->dv){
-- coord[0] = 2*(cos(u)+u*sin(u))*sin(v)/(1+u*u*sin(v)*sin(v));
-- coord[1] = 2*(sin(u)-u*cos(u))*sin(v)/(1+u*u*sin(v)*sin(v));
-- coord[2] = sin(tan(v/2))+2*cos(v)/(1+u*u*sin(v)*sin(v));
--
-- glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-- glVertex3fv(coord);
-- }
-- }
-- break;
-- case MOEBIUS:
-- for(u = -M_PI; u < M_PI; u+=kp->du){
-- for(v = -M_PI; v < M_PI; v+=kp->dv){
-- coord[0] = cos(u)+v*cos(u/2)*cos(u);
-- coord[1] = sin(u)+v*cos(u/2)*sin(u);
-- coord[2] = v*sin(u/2);
-- glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-- glVertex3fv(coord);
-- }
-- }
-- break;
-- case SEASHELL:
-- for(u = 0; u < 2*M_PI; u+=kp->du){
-- for(v = 0; v < 2*M_PI; v+=kp->dv){
-- coord[0] = kp->a*(1-v/(2*M_PI))*cos(2*v)*(1+cos(u))+sin(kp->c+=0.00001)*cos(2*v);
-- coord[1] = kp->a*(1-v/(2*M_PI))*sin(2*v)*(1+cos(u))+cos(kp->c+=0.00001)*sin(2*v);
-- coord[2] = sin(kp->b+=0.00001)*v/(2*M_PI)+kp->a*(1-v/(2*M_PI))*sin(u);
-- glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-- glVertex3fv(coord);
-- }
-- }
-- break;
-- case SWALLOWTAIL:
-- for(u = -M_PI; u < M_PI; u+=kp->du){
-- for(v = -M_PI; v < M_PI; v+=kp->dv){
-- coord[0] = u*pow(v,2) + 3*pow(v,4);
-- coord[1] = -2*u*v - 4*pow(v,3);
-- coord[2] = u;
-- glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-- glVertex3fv(coord);
-- }
-- }
-- break;
-- case BOHEM:
-- for(u = -M_PI; u < M_PI; u+=kp->du){
-- for(v = -M_PI; v < M_PI; v+=kp->dv){
-- coord[0] = kp->a*cos(u);
-- coord[1] = 1.5*cos(v) + kp->a*sin(u);
-- coord[2] = sin(v);
-- glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-- glVertex3fv(coord);
-- }
-- }
-- break;
-- default:
-- for(u = -M_PI; u < M_PI; u+=kp->du){
-- for(v = -M_PI; v < M_PI; v+=kp->dv){
-- coord[0] = sin(u)*kp->a;
-- coord[1] = cos(u)*kp->a;
-- coord[2] = sin(u/2)*cos(v) + cos(u/2)*sin(v);
-- glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-- glVertex3fv(coord);
-- }
-- }
-- break;
-- }
-- glEnd();
-- glPopMatrix();
--
--
-- kp->a = sin(step+=0.01);
-- kp->b = cos(step+=0.01);
--}
--
--
--/* new window size or exposure */
--void
--reshape_klein(ModeInfo *mi, int width, int height)
--{
-- GLfloat h = (GLfloat) height / (GLfloat) width;
--
-- glViewport(0, 0, (GLint) width, (GLint) height);
-- glMatrixMode(GL_PROJECTION);
-- glLoadIdentity();
-- gluPerspective (30.0, 1/h, 1.0, 100.0);
--
-- glMatrixMode(GL_MODELVIEW);
-- glLoadIdentity();
-- gluLookAt( 0.0, 0.0, 30.0,
-- 0.0, 0.0, 0.0,
-- 0.0, 1.0, 0.0);
--
-- glClear(GL_COLOR_BUFFER_BIT);
--}
--
--
--Bool
--klein_handle_event (ModeInfo *mi, XEvent *event)
--{
-- kleinstruct *kp = &klein[MI_SCREEN(mi)];
--
-- if (event->xany.type == ButtonPress && event->xbutton.button & Button1) {
-- kp->button_down_p = True;
-- gltrackball_start (kp->trackball, event->xbutton.x, event->xbutton.y, MI_WIDTH (mi), MI_HEIGHT (mi));
-- return True;
-- } else if (event->xany.type == ButtonRelease && event->xbutton.button & Button1) {
-- kp->button_down_p = False;
-- return True;
-- } else if (event->xany.type == MotionNotify && kp->button_down_p) {
-- gltrackball_track (kp->trackball, event->xmotion.x, event->xmotion.y, MI_WIDTH (mi), MI_HEIGHT (mi));
-- return True;
-- }
--
-- return False;
--}
--
--
--void
--init_klein(ModeInfo *mi)
--{
-- int screen = MI_SCREEN(mi);
-- kleinstruct *kp;
--
-- if (klein == NULL) {
-- if ((klein = (kleinstruct *) calloc(MI_NUM_SCREENS(mi), sizeof (kleinstruct))) == NULL)
-- return;
-- }
-- kp = &klein[screen];
--
-- kp->window = MI_WINDOW(mi);
--
-- {
-- double spin_speed = 1.0;
-- double wander_speed = 0.03;
-- kp->rot = make_rotator (do_spin ? spin_speed : 0,
-- do_spin ? spin_speed : 0,
-- do_spin ? spin_speed : 0,
-- 1.0,
-- do_wander ? wander_speed : 0,
-- True);
-- kp->trackball = gltrackball_init ();
-- }
--
-- if(rand) {
-- render = random() % MY_PRIM_LAST;
-- kp->surface = random() % SURFACE_LAST;
-- } else {
-- render = MY_LINE_LOOP;
-- kp->surface = KLEIN;
-- }
--
-- switch (render) {
-- case MY_POINTS: kp->render = GL_POINTS; break;
-- case MY_LINES: kp->render = GL_LINES; break;
-- case MY_LINE_LOOP: kp->render = GL_LINE_LOOP; break;
-- default:
-- kp->render = GL_LINE_LOOP;
-- }
--/*kp->render=GL_TRIANGLE_FAN;*/
--/*kp->render=GL_POLYGON;*/
--
-- kp->du = 0.07;
-- kp->dv = 0.07;
-- kp->a = kp->b = 1;
-- kp->c = 0.1;
--
--
-- if ((kp->glx_context = init_GL(mi)) != NULL) {
-- reshape_klein(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
-- } else {
-- MI_CLEARWINDOW(mi);
-- }
--}
--
--void
--draw_klein(ModeInfo * mi)
--{
-- kleinstruct *kp = &klein[MI_SCREEN(mi)];
-- Display *display = MI_DISPLAY(mi);
-- Window window = MI_WINDOW(mi);
--
-- if (!kp->glx_context) return;
--
-- glDrawBuffer(GL_BACK);
--
-- glXMakeCurrent(display, window, *(kp->glx_context));
-- draw(mi);
-- if (mi->fps_p) do_fps (mi);
-- glFinish();
-- glXSwapBuffers(display, window);
--}
--
--void
--release_klein(ModeInfo * mi)
--{
-- if (klein != NULL) {
-- int screen;
--
-- for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-- kleinstruct *kp = &klein[screen];
--
-- if (kp->glx_context) {
-- /* Display lists MUST be freed while their glXContext is current. */
-- glXMakeCurrent(MI_DISPLAY(mi), kp->window, *(kp->glx_context));
-- }
-- }
-- (void) free((void *) klein);
-- klein = NULL;
-- }
-- FreeAllGL(mi);
--}
--
--
--/*********************************************************/
--
--#endif
-+/* -*- Mode: C; tab-width: 4 -*- */
-+/* Klein --- Klein Bottle, Moebius and other parametric surfaces
-+ * visualization */
-+
-+/*
-+ * Revision History:
-+ * 2000: written by Andrey Mirtchovski <mirtchov@cpsc.ucalgary.ca
-+ *
-+ * 01-Mar-2003 mirtchov modified as a xscreensaver hack
-+ *
-+ */
-+
-+/*-
-+ * due to a Bug/feature in VMS X11/Intrinsic.h has to be placed before xlock.
-+ * otherwise caddr_t is not defined correctly
-+ */
-+
-+#include <X11/Intrinsic.h>
-+
-+#ifdef STANDALONE
-+# define PROGCLASS "Klein"
-+# define HACK_INIT init_klein
-+# define HACK_DRAW draw_klein
-+# define HACK_RESHAPE reshape_klein
-+# define HACK_HANDLE_EVENT klein_handle_event
-+# define EVENT_MASK PointerMotionMask
-+# define klein_opts xlockmore_opts
-+
-+
-+#define DEF_SPIN "True"
-+#define DEF_WANDER "False"
-+#define DEF_RANDOM "False"
-+#define DEF_SPEED "150"
-+
-+# define DEFAULTS "*delay: 20000 \n" \
-+ "*showFPS: False \n" \
-+ "*wireframe: False \n" \
-+ "*random: " DEF_RANDOM "\n" \
-+ "*speed: " DEF_SPEED "\n" \
-+ "*spin: " DEF_SPIN "\n" \
-+ "*wander: " DEF_WANDER "\n" \
-+
-+# include "xlockmore.h" /* from the xscreensaver distribution */
-+#else /* !STANDALONE */
-+# include "xlock.h" /* from the xlockmore distribution */
-+#endif /* !STANDALONE */
-+
-+#ifdef USE_GL
-+
-+#include <GL/glu.h>
-+#include "rotator.h"
-+#include "gltrackball.h"
-+
-+#undef countof
-+#define countof(x) (sizeof((x))/sizeof((*x)))
-+
-+/* surfaces being drawn */
-+enum {
-+ KLEIN = 0,
-+ DINI,
-+ ENNEPER,
-+ KUEN,
-+ MOEBIUS,
-+ SEASHELL,
-+ SWALLOWTAIL,
-+ BOHEM,
-+ SURFACE_LAST,
-+};
-+
-+/* primitives to draw with
-+ * note that we skip the polygons and
-+ * triangle fans -- too slow
-+ *
-+ * also removed triangle_strip and quads --
-+ * just doesn't look good enough
-+ */
-+enum {
-+ MY_POINTS = 0,
-+ MY_LINES,
-+ MY_LINE_LOOP,
-+ MY_PRIM_LAST,
-+};
-+
-+
-+static Bool rand;
-+static int render;
-+static int speed;
-+static Bool do_spin;
-+static Bool do_wander;
-+
-+static XrmOptionDescRec opts[] = {
-+ {"-speed", ".speed", XrmoptionSepArg, (caddr_t) 0 },
-+ { "-spin", ".spin", XrmoptionNoArg, "True" },
-+ { "+spin", ".spin", XrmoptionNoArg, "False" },
-+ { "-wander", ".wander", XrmoptionNoArg, "True" },
-+ { "+wander", ".wander", XrmoptionNoArg, "False" },
-+ { "-random", ".rand", XrmoptionNoArg, "True" },
-+ { "+random", ".rand", XrmoptionNoArg, "False" },
-+};
-+
-+static argtype vars[] = {
-+ {(caddr_t *) &rand, "rand", "Random", DEF_RANDOM, t_Bool},
-+ {(caddr_t *) &do_spin, "spin", "Spin", DEF_SPIN, t_Bool},
-+ {(caddr_t *) &do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
-+ {(caddr_t *) &speed, "speed", "Speed", DEF_SPEED, t_Int},
-+};
-+
-+
-+ModeSpecOpt klein_opts = {countof(opts), opts, countof(vars), vars, NULL};
-+
-+
-+
-+typedef struct{
-+ GLfloat x;
-+ GLfloat y;
-+ GLfloat z;
-+} GL_VECTOR;
-+
-+typedef struct {
-+ GLXContext *glx_context;
-+ Window window;
-+ rotator *rot;
-+ trackball_state *trackball;
-+ Bool button_down_p;
-+
-+ int render;
-+ int surface;
-+
-+ float du, dv;
-+ float a, b, c;
-+
-+} kleinstruct;
-+
-+static kleinstruct *klein = NULL;
-+
-+
-+static void
-+draw(ModeInfo *mi)
-+{
-+ kleinstruct *kp = &klein[MI_SCREEN(mi)];
-+ static float step = 0.0;
-+ double u, v;
-+ float coord[3];
-+
-+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-+
-+ glEnable(GL_DEPTH_TEST);
-+ glEnable(GL_NORMALIZE);
-+ glEnable(GL_CULL_FACE);
-+
-+ glPushMatrix();
-+
-+ {
-+ double x, y, z;
-+ get_position (kp->rot, &x, &y, &z, !kp->button_down_p);
-+ glTranslatef((x - 0.5) * 10,
-+ (y - 0.5) * 10,
-+ (z - 0.5) * 20);
-+
-+ gltrackball_rotate (kp->trackball);
-+
-+ get_rotation (kp->rot, &x, &y, &z, !kp->button_down_p);
-+ glRotatef (x * 360, 1.0, 0.0, 0.0);
-+ glRotatef (y * 360, 0.0, 1.0, 0.0);
-+ glRotatef (z * 360, 0.0, 0.0, 1.0);
-+ }
-+
-+ glScalef( 4.0, 4.0, 4.0 );
-+
-+ glBegin(kp->render);
-+ switch(kp->surface) {
-+ case KLEIN:
-+ for(u = -M_PI; u < M_PI; u+=kp->du){
-+ for(v = -M_PI; v < M_PI; v+=kp->dv){
-+ coord[0] = cos(u)*(kp->a + sin(v)*cos(u/2) -
-+ sin(2*v)*sin(u/2)/2);
-+ coord[1] = sin(u)*(kp->a + sin(v)*cos(u/2) -
-+ sin(2*v)*sin(u/2)/2);
-+ coord[2] = sin(u/2)*sin(v) + cos(u/2)*sin(2*v)/2;
-+ glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-+ glVertex3fv(coord);
-+ }
-+ }
-+ break;
-+ case DINI:
-+ for(u = -M_PI; u < M_PI; u+=kp->du){
-+ for(v = -M_PI; v < M_PI; v+=kp->dv){
-+ coord[0] = kp->a*cos(u)*sin(v);
-+ coord[1] = kp->a*sin(u)*sin(v);
-+ coord[2] = kp->a*(cos(v) + sin(tan((v/2))))+0.2*u;
-+ glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-+ glVertex3fv(coord);
-+ }
-+ }
-+ break;
-+ case ENNEPER:
-+ for(u = -M_PI; u < M_PI; u+=kp->du){
-+ for(v = -M_PI; v < M_PI; v+=kp->dv){
-+ coord[0] = kp->a*(u-(u*u*u/3)+u*v*v);
-+ coord[1] = kp->b*(v-(v*v*v/3)+u*u*v);
-+ coord[2] = u*u-v*v;
-+ glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-+ glVertex3fv(coord);
-+ }
-+ }
-+ break;
-+ case KUEN:
-+ for(u = -M_PI; u < M_PI; u+=kp->du){
-+ for(v = -M_PI; v < M_PI; v+=kp->dv){
-+ coord[0] = 2*(cos(u)+u*sin(u))*sin(v)/(1+u*u*sin(v)*sin(v));
-+ coord[1] = 2*(sin(u)-u*cos(u))*sin(v)/(1+u*u*sin(v)*sin(v));
-+ coord[2] = sin(tan(v/2))+2*cos(v)/(1+u*u*sin(v)*sin(v));
-+
-+ glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-+ glVertex3fv(coord);
-+ }
-+ }
-+ break;
-+ case MOEBIUS:
-+ for(u = -M_PI; u < M_PI; u+=kp->du){
-+ for(v = -M_PI; v < M_PI; v+=kp->dv){
-+ coord[0] = cos(u)+v*cos(u/2)*cos(u);
-+ coord[1] = sin(u)+v*cos(u/2)*sin(u);
-+ coord[2] = v*sin(u/2);
-+ glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-+ glVertex3fv(coord);
-+ }
-+ }
-+ break;
-+ case SEASHELL:
-+ for(u = 0; u < 2*M_PI; u+=kp->du){
-+ for(v = 0; v < 2*M_PI; v+=kp->dv){
-+ coord[0] = kp->a*(1-v/(2*M_PI))*cos(2*v)*(1+cos(u))+sin(kp->c+=0.00001)*cos(2*v);
-+ coord[1] = kp->a*(1-v/(2*M_PI))*sin(2*v)*(1+cos(u))+cos(kp->c+=0.00001)*sin(2*v);
-+ coord[2] = sin(kp->b+=0.00001)*v/(2*M_PI)+kp->a*(1-v/(2*M_PI))*sin(u);
-+ glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-+ glVertex3fv(coord);
-+ }
-+ }
-+ break;
-+ case SWALLOWTAIL:
-+ for(u = -M_PI; u < M_PI; u+=kp->du){
-+ for(v = -M_PI; v < M_PI; v+=kp->dv){
-+ coord[0] = u*pow(v,2) + 3*pow(v,4);
-+ coord[1] = -2*u*v - 4*pow(v,3);
-+ coord[2] = u;
-+ glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-+ glVertex3fv(coord);
-+ }
-+ }
-+ break;
-+ case BOHEM:
-+ for(u = -M_PI; u < M_PI; u+=kp->du){
-+ for(v = -M_PI; v < M_PI; v+=kp->dv){
-+ coord[0] = kp->a*cos(u);
-+ coord[1] = 1.5*cos(v) + kp->a*sin(u);
-+ coord[2] = sin(v);
-+ glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-+ glVertex3fv(coord);
-+ }
-+ }
-+ break;
-+ default:
-+ for(u = -M_PI; u < M_PI; u+=kp->du){
-+ for(v = -M_PI; v < M_PI; v+=kp->dv){
-+ coord[0] = sin(u)*kp->a;
-+ coord[1] = cos(u)*kp->a;
-+ coord[2] = sin(u/2)*cos(v) + cos(u/2)*sin(v);
-+ glColor3f(coord[0]+0.7, coord[1]+0.7, coord[2]+0.7);
-+ glVertex3fv(coord);
-+ }
-+ }
-+ break;
-+ }
-+ glEnd();
-+ glPopMatrix();
-+
-+
-+ kp->a = sin(step+=0.01);
-+ kp->b = cos(step+=0.01);
-+}
-+
-+
-+/* new window size or exposure */
-+void
-+reshape_klein(ModeInfo *mi, int width, int height)
-+{
-+ GLfloat h = (GLfloat) height / (GLfloat) width;
-+
-+ glViewport(0, 0, (GLint) width, (GLint) height);
-+ glMatrixMode(GL_PROJECTION);
-+ glLoadIdentity();
-+ gluPerspective (30.0, 1/h, 1.0, 100.0);
-+
-+ glMatrixMode(GL_MODELVIEW);
-+ glLoadIdentity();
-+ gluLookAt( 0.0, 0.0, 30.0,
-+ 0.0, 0.0, 0.0,
-+ 0.0, 1.0, 0.0);
-+
-+ glClear(GL_COLOR_BUFFER_BIT);
-+}
-+
-+
-+Bool
-+klein_handle_event (ModeInfo *mi, XEvent *event)
-+{
-+ kleinstruct *kp = &klein[MI_SCREEN(mi)];
-+
-+ if (event->xany.type == ButtonPress && event->xbutton.button & Button1) {
-+ kp->button_down_p = True;
-+ gltrackball_start (kp->trackball, event->xbutton.x, event->xbutton.y, MI_WIDTH (mi), MI_HEIGHT (mi));
-+ return True;
-+ } else if (event->xany.type == ButtonRelease && event->xbutton.button & Button1) {
-+ kp->button_down_p = False;
-+ return True;
-+ } else if (event->xany.type == MotionNotify && kp->button_down_p) {
-+ gltrackball_track (kp->trackball, event->xmotion.x, event->xmotion.y, MI_WIDTH (mi), MI_HEIGHT (mi));
-+ return True;
-+ }
-+
-+ return False;
-+}
-+
-+
-+void
-+init_klein(ModeInfo *mi)
-+{
-+ int screen = MI_SCREEN(mi);
-+ kleinstruct *kp;
-+
-+ if (klein == NULL) {
-+ if ((klein = (kleinstruct *) calloc(MI_NUM_SCREENS(mi), sizeof (kleinstruct))) == NULL)
-+ return;
-+ }
-+ kp = &klein[screen];
-+
-+ kp->window = MI_WINDOW(mi);
-+
-+ {
-+ double spin_speed = 1.0;
-+ double wander_speed = 0.03;
-+ kp->rot = make_rotator (do_spin ? spin_speed : 0,
-+ do_spin ? spin_speed : 0,
-+ do_spin ? spin_speed : 0,
-+ 1.0,
-+ do_wander ? wander_speed : 0,
-+ True);
-+ kp->trackball = gltrackball_init ();
-+ }
-+
-+ if(rand) {
-+ render = random() % MY_PRIM_LAST;
-+ kp->surface = random() % SURFACE_LAST;
-+ } else {
-+ render = MY_LINE_LOOP;
-+ kp->surface = KLEIN;
-+ }
-+
-+ switch (render) {
-+ case MY_POINTS: kp->render = GL_POINTS; break;
-+ case MY_LINES: kp->render = GL_LINES; break;
-+ case MY_LINE_LOOP: kp->render = GL_LINE_LOOP; break;
-+ default:
-+ kp->render = GL_LINE_LOOP;
-+ }
-+/*kp->render=GL_TRIANGLE_FAN;*/
-+/*kp->render=GL_POLYGON;*/
-+
-+ kp->du = 0.07;
-+ kp->dv = 0.07;
-+ kp->a = kp->b = 1;
-+ kp->c = 0.1;
-+
-+
-+ if ((kp->glx_context = init_GL(mi)) != NULL) {
-+ reshape_klein(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
-+ } else {
-+ MI_CLEARWINDOW(mi);
-+ }
-+}
-+
-+void
-+draw_klein(ModeInfo * mi)
-+{
-+ kleinstruct *kp = &klein[MI_SCREEN(mi)];
-+ Display *display = MI_DISPLAY(mi);
-+ Window window = MI_WINDOW(mi);
-+
-+ if (!kp->glx_context) return;
-+
-+ glDrawBuffer(GL_BACK);
-+
-+ glXMakeCurrent(display, window, *(kp->glx_context));
-+ draw(mi);
-+ if (mi->fps_p) do_fps (mi);
-+ glFinish();
-+ glXSwapBuffers(display, window);
-+}
-+
-+void
-+release_klein(ModeInfo * mi)
-+{
-+ if (klein != NULL) {
-+ int screen;
-+
-+ for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-+ kleinstruct *kp = &klein[screen];
-+
-+ if (kp->glx_context) {
-+ /* Display lists MUST be freed while their glXContext is current. */
-+ glXMakeCurrent(MI_DISPLAY(mi), kp->window, *(kp->glx_context));
-+ }
-+ }
-+ (void) free((void *) klein);
-+ klein = NULL;
-+ }
-+ FreeAllGL(mi);
-+}
-+
-+
-+/*********************************************************/
-+
-+#endif
+--- driver/xscreensaver.h.orig Sat Jun 7 10:22:21 2003
++++ driver/xscreensaver.h
+@@ -12,6 +12,7 @@
+ #ifndef __XSCREENSAVER_H__
+ #define __XSCREENSAVER_H__
+
++#include <signal.h>
+ #include <stdlib.h>
+ #ifdef HAVE_UNISTD_H
+ # include <unistd.h>