pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/x11/xscreensaver Do not use old pipes.c file from xscr...
details: https://anonhg.NetBSD.org/pkgsrc/rev/578f07bd07fa
branches: trunk
changeset: 366623:578f07bd07fa
user: wiz <wiz%pkgsrc.org@localhost>
date: Wed Aug 16 21:44:05 2017 +0000
description:
Do not use old pipes.c file from xscreensaver-5.17.
Bump PKGREVISION.
diffstat:
x11/xscreensaver/Makefile | 7 +-
x11/xscreensaver/files/pipes.c | 1107 ----------------------------------------
2 files changed, 2 insertions(+), 1112 deletions(-)
diffs (truncated from 1134 to 300 lines):
diff -r f16ef04a0dba -r 578f07bd07fa x11/xscreensaver/Makefile
--- a/x11/xscreensaver/Makefile Wed Aug 16 21:22:11 2017 +0000
+++ b/x11/xscreensaver/Makefile Wed Aug 16 21:44:05 2017 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.110 2017/08/16 07:33:39 wiz Exp $
+# $NetBSD: Makefile,v 1.111 2017/08/16 21:44:05 wiz Exp $
COMMENT= Screen saver and locker for the X window system
+PKGREVISION= 1
CONFLICTS+= xscreensaver-gnome<4.14
@@ -15,10 +16,6 @@
EGDIR= ${PREFIX}/share/examples/xscreensaver
MESSAGE_SUBST+= EGDIR=${EGDIR:Q}
-# use pipes from 5.17, the new version is too slow
-post-extract:
- ${CP} ${FILESDIR}/pipes.c ${WRKSRC}/hacks/glx
-
INSTALLATION_DIRS= ${EGDIR}/pam.d
post-install:
diff -r f16ef04a0dba -r 578f07bd07fa x11/xscreensaver/files/pipes.c
--- a/x11/xscreensaver/files/pipes.c Wed Aug 16 21:22:11 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1107 +0,0 @@
-/* -*- Mode: C; tab-width: 4 -*- */
-/* pipes --- 3D selfbuiding pipe system */
-
-#if 0
-static const char sccsid[] = "@(#)pipes.c 4.07 97/11/24 xlockmore";
-#endif
-
-/*-
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * This file is provided AS IS with no warranties of any kind. The author
- * shall have no liability with respect to the infringement of copyrights,
- * trade secrets or any patents by this file or any part thereof. In no
- * event will the author be liable for any lost revenue or profits or
- * other special, indirect and consequential damages.
- *
- * This program was inspired on a WindowsNT(R)'s screen saver. It was written
- * from scratch and it was not based on any other source code.
- *
- * ==========================================================================
- * The routine myElbow is derivated from the doughnut routine from the MesaGL
- * library (more especifically the Mesaaux library) written by Brian Paul.
- * ==========================================================================
- *
- * Thanks goes to Brian Paul for making it possible and inexpensive to use
- * OpenGL at home.
- *
- * Since I'm not a native English speaker, my apologies for any grammatical
- * mistake.
- *
- * My e-mail address is
- * m-vianna%usa.net@localhost
- * Marcelo F. Vianna (Apr-09-1997)
- *
- * Revision History:
- * 29-Apr-97: Factory equipment by Ed Mackey. Productive day today, eh?
- * 29-Apr-97: Less tight turns Jeff Epler <jepler%inetnebr.com@localhost>
- * 29-Apr-97: Efficiency speed-ups by Marcelo F. Vianna
- */
-
-#ifdef STANDALONE
-# define DEFAULTS "*delay: 10000 \n" \
- "*count: 2 \n" \
- "*cycles: 5 \n" \
- "*size: 500 \n" \
- "*showFPS: False \n" \
- "*fpsSolid: True \n"
-
-# define refresh_pipes 0
-# define pipes_handle_event 0
-# include "xlockmore.h" /* from the xscreensaver distribution */
-#else /* !STANDALONE */
-# include "xlock.h" /* from the xlockmore distribution */
-#endif /* !STANDALONE */
-
-#ifdef USE_GL
-
-#ifdef HAVE_COCOA
-# include "jwxyz.h"
-#else
-# include <X11/Xlib.h>
-# include <GL/gl.h>
-# include <GL/glu.h>
-#endif
-
-#ifdef HAVE_JWZGLES
-# include "jwzgles.h"
-#endif /* HAVE_JWZGLES */
-
-#include "sphere.h"
-#include "buildlwo.h"
-#include "teapot.h"
-
-#define DEF_FACTORY "2"
-#define DEF_FISHEYE "True"
-#define DEF_TIGHTTURNS "False"
-#define DEF_ROTATEPIPES "True"
-#define DEF_DBUF "False"
-#define NofSysTypes 3
-
-static int factory;
-static Bool fisheye, tightturns, rotatepipes;
-static Bool dbuf_p;
-
-static XrmOptionDescRec opts[] =
-{
- {"-factory", ".pipes.factory", XrmoptionSepArg, 0},
- {"-fisheye", ".pipes.fisheye", XrmoptionNoArg, "on"},
- {"+fisheye", ".pipes.fisheye", XrmoptionNoArg, "off"},
- {"-tightturns", ".pipes.tightturns", XrmoptionNoArg, "on"},
- {"+tightturns", ".pipes.tightturns", XrmoptionNoArg, "off"},
- {"-rotatepipes", ".pipes.rotatepipes", XrmoptionNoArg, "on"},
- {"+rotatepipes", ".pipes.rotatepipes", XrmoptionNoArg, "off"},
- {"-db", ".pipes.doubleBuffer", XrmoptionNoArg, "on"},
- {"+db", ".pipes.doubleBuffer", XrmoptionNoArg, "off"},
-};
-static argtype vars[] =
-{
- {&factory, "factory", "Factory", DEF_FACTORY, t_Int},
- {&fisheye, "fisheye", "Fisheye", DEF_FISHEYE, t_Bool},
- {&tightturns, "tightturns", "Tightturns", DEF_TIGHTTURNS, t_Bool},
- {&rotatepipes, "rotatepipes", "Rotatepipes", DEF_ROTATEPIPES, t_Bool},
- {&dbuf_p, "doubleBuffer", "DoubleBuffer", DEF_DBUF, t_Bool}
-};
-static OptionStruct desc[] =
-{
- {"-factory num", "how much extra equipment in pipes (0 for none)"},
- {"-/+fisheye", "turn on/off zoomed-in view of pipes"},
- {"-/+tightturns", "turn on/off tight turns"},
- {"-/+rotatepipes", "turn on/off pipe system rotation per screenful"},
- {"-/+db", "turn on/off double buffering"}
-};
-
-ENTRYPOINT ModeSpecOpt pipes_opts =
-{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc};
-
-#ifdef USE_MODULES
-ModStruct pipes_description =
-{"pipes", "init_pipes", "draw_pipes", "release_pipes",
- "draw_pipes",
- "change_pipes", NULL, &pipes_opts,
- 1000, 2, 5, 500, 4, 1.0, "",
- "Shows a selfbuilding pipe system", 0, NULL};
-
-#endif
-
-#define Scale4Window 0.1
-#define Scale4Iconic 0.07
-
-#define one_third 0.3333333333333333333
-
-#define dirNone -1
-#define dirUP 0
-#define dirDOWN 1
-#define dirLEFT 2
-#define dirRIGHT 3
-#define dirNEAR 4
-#define dirFAR 5
-
-#define HCELLS 33
-#define VCELLS 25
-#define DEFINEDCOLORS 7
-#define elbowradius 0.5
-
-/*************************************************************************/
-
-typedef struct {
- int flip;
-
- GLint WindH, WindW;
- int Cells[HCELLS][VCELLS][HCELLS];
- int usedcolors[DEFINEDCOLORS];
- int directions[6];
- int ndirections;
- int nowdir, olddir;
- int system_number;
- int counter;
- int PX, PY, PZ;
- int number_of_systems;
- int system_type;
- int system_length;
- int turncounter;
- Window window;
- const float *system_color;
- GLfloat initial_rotation;
- GLuint valve, bolts, betweenbolts, elbowbolts, elbowcoins;
- GLuint guagehead, guageface, guagedial, guageconnector, teapot;
- int teapot_polys;
- int reset;
- GLXContext *glx_context;
-} pipesstruct;
-
-extern struct lwo LWO_BigValve, LWO_PipeBetweenBolts, LWO_Bolts3D;
-extern struct lwo LWO_GuageHead, LWO_GuageFace, LWO_GuageDial, LWO_GuageConnector;
-extern struct lwo LWO_ElbowBolts, LWO_ElbowCoins;
-
-static const float front_shininess[] = {60.0};
-static const float front_specular[] = {0.7, 0.7, 0.7, 1.0};
-static const float ambient0[] = {0.4, 0.4, 0.4, 1.0};
-static const float diffuse0[] = {1.0, 1.0, 1.0, 1.0};
-static const float ambient1[] = {0.2, 0.2, 0.2, 1.0};
-static const float diffuse1[] = {0.5, 0.5, 0.5, 1.0};
-static const float position0[] = {1.0, 1.0, 1.0, 0.0};
-static const float position1[] = {-1.0, -1.0, 1.0, 0.0};
-static const float lmodel_ambient[] = {0.5, 0.5, 0.5, 1.0};
-static const float lmodel_twoside[] = {GL_TRUE};
-
-static const float MaterialRed[] = {0.7, 0.0, 0.0, 1.0};
-static const float MaterialGreen[] = {0.1, 0.5, 0.2, 1.0};
-static const float MaterialBlue[] = {0.0, 0.0, 0.7, 1.0};
-static const float MaterialCyan[] = {0.2, 0.5, 0.7, 1.0};
-static const float MaterialYellow[] = {0.7, 0.7, 0.0, 1.0};
-static const float MaterialMagenta[] = {0.6, 0.2, 0.5, 1.0};
-static const float MaterialWhite[] = {0.7, 0.7, 0.7, 1.0};
-static const float MaterialGray[] = {0.2, 0.2, 0.2, 1.0};
-
-static pipesstruct *pipes = NULL;
-
-
-static void
-MakeTube(ModeInfo *mi, int direction)
-{
- float an;
- float SINan_3, COSan_3;
-
- /*dirUP = 00000000 */
- /*dirDOWN = 00000001 */
- /*dirLEFT = 00000010 */
- /*dirRIGHT = 00000011 */
- /*dirNEAR = 00000100 */
- /*dirFAR = 00000101 */
-
- if (!(direction & 4)) {
- glRotatef(90.0, (direction & 2) ? 0.0 : 1.0,
- (direction & 2) ? 1.0 : 0.0, 0.0);
- }
- glBegin(GL_QUAD_STRIP);
- for (an = 0.0; an <= 2.0 * M_PI; an += M_PI / 12.0) {
- glNormal3f((COSan_3 = cos(an) / 3.0), (SINan_3 = sin(an) / 3.0), 0.0);
- glVertex3f(COSan_3, SINan_3, one_third);
- glVertex3f(COSan_3, SINan_3, -one_third);
- mi->polygon_count++;
- }
- glEnd();
-}
-
-static void
-mySphere(float radius, Bool wire)
-{
-#if 0
- GLUquadricObj *quadObj;
-
- quadObj = gluNewQuadric();
- gluQuadricDrawStyle(quadObj, (GLenum) GLU_FILL);
- gluSphere(quadObj, radius, 16, 16);
- gluDeleteQuadric(quadObj);
-#else
- glPushMatrix();
- glScalef (radius, radius, radius);
- glRotatef (90, 1, 0, 0);
- unit_sphere (16, 16, wire);
- glPopMatrix();
-#endif
-}
-
-static void
-myElbow(ModeInfo * mi, int bolted)
-{
-#define nsides 25
-#define rings 25
-#define r one_third
-#define R one_third
-
- pipesstruct *pp = &pipes[MI_SCREEN(mi)];
-
- int i, j;
- GLfloat p0[3], p1[3], p2[3], p3[3];
- GLfloat n0[3], n1[3], n2[3], n3[3];
- GLfloat COSphi, COSphi1, COStheta, COStheta1;
- GLfloat _SINtheta, _SINtheta1;
-
- for (i = 0; i <= rings / 4; i++) {
- GLfloat theta, theta1;
-
- theta = (GLfloat) i *2.0 * M_PI / rings;
-
- theta1 = (GLfloat) (i + 1) * 2.0 * M_PI / rings;
- for (j = 0; j < nsides; j++) {
- GLfloat phi, phi1;
Home |
Main Index |
Thread Index |
Old Index