initial import of glut-3.7:

--
The OpenGL Utility Toolkit, a window system independent toolkit for
writing OpenGL programs. It implements a simple windowing application
programming interface (API) for OpenGL.  GLUT is designed for
constructing small to medium sized OpenGL programs. While GLUT is
well-suited to learning OpenGL and developing simple OpenGL
applications, GLUT is not a full-featured toolkit so large applications
requiring sophisticated user interfaces are better off using native
window system toolkits like Motif.
 
WWW: http://reality.sgi.com/opengl/glut3/glut3.html

Submitted by Dan Weeks <danimal@danimal.org>
This commit is contained in:
lebel 2001-06-20 18:55:24 +00:00
parent bedbb908e6
commit 7f08f73fef
18 changed files with 1998 additions and 0 deletions

36
graphics/glut/Makefile Normal file
View File

@ -0,0 +1,36 @@
# $OpenBSD: Makefile,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
COMMENT= "OpenGL Utility Toolkit"
DISTNAME= glut-3.7
CATEGORIES= graphics devel
NEED_VERSION= 1.405
MASTER_SITES= http://reality.sgi.com/opengl/glut3/
HOMEPAGE= http://reality.sgi.com/opengl/glut3/glut3.html
MAINTAINER= Dan Weeks <danimal@danimal.org>
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
CONFIGURE_STYLE= imake
USE_X11= Yes
post-extract:
@perl -i -p -e 's/3GLUT/3/;' ${WRKSRC}/man/glut/*.man
@perl -i -p -e 's/\r//;' ${WRKSRC}/man/glut/*.man
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/include/GL
.for incl in glut glsmap
${INSTALL_DATA} ${WRKSRC}/include/GL/${incl}.h ${PREFIX}/include/GL
.endfor
${INSTALL_DATA_DIR} ${PREFIX}/include/mui
.for incl in browser displaylist gizmo hslider mui textlist uicolor vslider
${INSTALL_DATA} ${WRKSRC}/include/mui/${incl}.h ${PREFIX}/include/mui
.endfor
.include <bsd.port.mk>

3
graphics/glut/files/md5 Normal file
View File

@ -0,0 +1,3 @@
MD5 (glut-3.7.tar.gz) = dc932666e2a1c8a0b148a4c32d111ef3
RMD160 (glut-3.7.tar.gz) = 22171d7b035858522ef79a00dcc664c858ca86a3
SHA1 (glut-3.7.tar.gz) = 4d88591992c15547001c30d5b6d840f672720a5a

View File

@ -0,0 +1,85 @@
$OpenBSD: patch-Glut_cf,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
--- Glut.cf.orig Fri Aug 7 20:13:14 1998
+++ Glut.cf Wed Jun 20 12:11:37 2001
@@ -23,13 +23,13 @@ GLU = -L$(OGLHOME)/lib -lGLU
/* XXX Is this right, Template?? */
INVENTOR = -L$(OGLHOME)/lib -lInventor
GLUT_DEPLIBS = $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
-GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
MUI_DEPLIBS = $(DEPMUI) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
-MUI_LIBS = $(MUI) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+MUI_LIBS = $(MUI) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
GLE_DEPLIBS = $(DEPGLE) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
-GLE_LIBS = $(GLE) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+GLE_LIBS = $(GLE) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
GLSMAP_DEPLIBS = $(DEPGLSMAP) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
-GLSMAP_LIBS = $(GLSMAP) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+GLSMAP_LIBS = $(GLSMAP) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
#else /* Everybody but Sun... */
#ifdef AlphaArchitecture
@@ -60,13 +60,13 @@ INVENTOR = -lInventor
DEPGLUTLIB = $(TOP)/lib/glut/libglut.a
GLUTLIB = $(TOP)/lib/glut/libglut.a
-GLUT_LIBS = $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+GLUT_LIBS = $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
GLUT_DEPLIBS = $(DEPGLUTLIB) $(DEPGLULIB) $(DEPGLLIB) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
-MUI_LIBS = $(MUI) $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+MUI_LIBS = $(MUI) $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
MUI_DEPLIBS = $(DEPMUI) $(DEPGLUTLIB) $(DEPGLULIB) $(DEPGLLIB) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
-GLE_LIBS = $(GLE) $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+GLE_LIBS = $(GLE) $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
GLE_DEPLIBS = $(DEPGLE) $(DEPGLUTLIB) $(DEPGLULIB) $(DEPGLLIB) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
-GLSMAP_LIBS = $(GLSMAP) $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+GLSMAP_LIBS = $(GLSMAP) $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
GLSMAP_DEPLIBS = $(DEPGLSMAP) $(DEPGLUTLIB) $(DEPGLULIB) $(DEPGLLIB) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
#else /* Everybody but Sun or DEC Alpha... */
@@ -87,32 +87,32 @@ EXTRA_INCLUDES = -I$(TOP)/include
#endif
GLUT_DEPLIBS = $(DEPGLUT) $(DEPXMULIB) $(DEPXLIB)
-GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XLIB) MathLibrary
+GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XLIB) MathLibrary -lc_r
OPENGL = -lGL
GLU = -lGLU
INVENTOR = -lInventor
GLUT_DEPLIBS = $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
-GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
MUI_DEPLIBS = $(DEPMUI) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
-MUI_LIBS = $(MUI) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+MUI_LIBS = $(MUI) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
GLE_DEPLIBS = $(DEPGLE) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
-GLE_LIBS = $(GLE) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+GLE_LIBS = $(GLE) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
GLSMAP_DEPLIBS = $(DEPGLSMAP) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
-GLSMAP_LIBS = $(GLSMAP) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
+GLSMAP_LIBS = $(GLSMAP) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary -lc_r
#endif
#endif
#ifndef AlphaArchitecture
-DEPGLUT = $(TOP)/lib/glut/libglut.a
-GLUT = $(TOP)/lib/glut/libglut.a
+DEPGLUT = $(TOP)/lib/glut/libglut.so
+GLUT = $(TOP)/lib/glut/libglut.so
#endif
-DEPMUI = $(TOP)/lib/mui/libmui.a
-MUI = $(TOP)/lib/mui/libmui.a
-DEPGLE = $(TOP)/lib/gle/libgle.a
-GLE = $(TOP)/lib/gle/libgle.a
-DEPGLSMAP = $(TOP)/lib/glsmap/libglsmap.a
-GLSMAP = $(TOP)/lib/glsmap/libglsmap.a
+DEPMUI = $(TOP)/lib/mui/libmui.so
+MUI = $(TOP)/lib/mui/libmui.so
+DEPGLE = $(TOP)/lib/gle/libgle.so
+GLE = $(TOP)/lib/gle/libgle.so
+DEPGLSMAP = $(TOP)/lib/glsmap/libglsmap.so
+GLSMAP = $(TOP)/lib/glsmap/libglsmap.so
CXXEXTRA_INCLUDES = -I/usr/include/CC $(EXTRA_INCLUDES)
GLUT_INVENTOR_DEPLIBS = $(GLUT_DEPLIBS)

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Imakefile,v 1.1.1.1 2001/06/20 18:55:25 lebel Exp $
--- Imakefile.orig Fri Aug 7 20:20:28 1998
+++ Imakefile Wed Jun 20 12:11:38 2001
@@ -1,7 +1,7 @@
#define IHaveSubdirs
#define PassCDebugFlags
-SUBDIRS = lib test progs
+SUBDIRS = lib man
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-lib_Imakefile,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
--- lib/Imakefile.orig Fri Aug 7 20:20:30 1998
+++ lib/Imakefile Wed Jun 20 12:11:38 2001
@@ -7,7 +7,7 @@
/* NOTE: The fglut directory is GLUT FORTRAN bindings which are */
/* specific to IRIX 5.x. See ../README.fortran */
-SUBDIRS = glut mui gle glsmap
+SUBDIRS = glut mui glsmap
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-lib_glsmap_Imakefile,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
--- lib/glsmap/Imakefile.orig Fri Aug 7 20:20:29 1998
+++ lib/glsmap/Imakefile Wed Jun 20 12:11:38 2001
@@ -28,5 +28,9 @@ NormalLibraryObjectRule()
#endif
NormalLibraryTarget(glsmap,$(OBJS))
+InstallLibrary(glsmap,$(USRLIBDIR))
+
+SharedDepLibraryTarget(glsmap,3.7,.,$(OBJS),.,.)
+InstallSharedLibrary(glsmap,3.7,$(USRLIBDIR))
DependTarget()

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-lib_glut_Imakefile,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
--- lib/glut/Imakefile.orig Fri Aug 7 20:20:30 1998
+++ lib/glut/Imakefile Wed Jun 20 12:11:38 2001
@@ -117,6 +117,11 @@ NormalLibraryObjectRule()
#endif
NormalLibraryTarget(glut,$(OBJS))
+InstallLibrary(glut,$(USRLIBDIR))
+
+SharedDepLibraryTarget(glut,3.7,.,$(OBJS),.,.)
+InstallSharedLibrary(glut,3.7,$(USRLIBDIR))
+
/* I've gotten too many complaints from people (mostly Linux users)
trying to build GLUT that have problems using lex and yacc to

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,266 @@
$OpenBSD: patch-lib_glut_strokelex_l,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
--- lib/glut/strokelex.l.orig Fri Aug 7 20:09:09 1998
+++ lib/glut/strokelex.l Wed Jun 20 12:11:38 2001
@@ -1,131 +1,131 @@
-%{
-/* $XConsortium: lex.l,v 5.4 91/08/26 10:55:26 gildea Exp $ */
-
-/*****************************************************************
-Copyright (c) 1989,1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
-
- All Rights Reserved
-
-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, and that the names of Sun Microsystems,
-the X Consortium, and MIT not be used in advertising or publicity
-pertaining to distribution of the software without specific, written
-prior permission.
-
-SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
-SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-
-#include <stdlib.h>
-#include <ctype.h>
-#include <math.h>
-#include "strokegen.h"
-
-#if defined(ISC) && defined(SYSV) && defined(SYSV386) && __STDC__
-extern double atof(char *);
-#endif
-
-#ifdef FLEX_SCANNER
-int yylineno;
-#endif
-
-%}
-%%
-\'[^']*\' |
-\"[^"]*\" return string(yytext, yyleng);
-#.* ;
-[ ,;\t\n]* /* natural dilimters */ ;
-
-[a-zA-Z][a-zA-Z0-9_.]* {
- int token;
- if (token = res_words(yytext))
- return token;
- return string(yytext, yyleng);
- }
-
-[+-]?[0-9]+\.?[0-9]*[eE][+-]?[0-9]+ |
-[+-]?[0-9]+\.[0-9]* |
-\.[0-9]+ {
- yylval.dval = atof(yytext);
- return REAL;
- }
-[+-]?[0-9]+#[0-9]+ {
- return INTEGER;
- }
-[+-]?[0-9]+ {
- yylval.ival = atoi(yytext);
- return INTEGER;
- }
-[()] ;
-%%
-
-int
-res_words(str)
-char str[];
-{
- static struct res_strct {
- char *word;
- int token;
- } res_table[] = {
- {"BOTTOM", BOTTOM},
- {"CENTER", CENTER},
- {"PROPERTIES", PROPERTIES},
- {"CLOSE", CLOSE},
- {"FONTNAME", FONTNAME},
- {"INDEX", INDEX},
- {"MAGIC", MAGIC},
- {"OPEN", OPEN},
- {"RIGHT", RIGHT},
- {"STROKE", STROKE},
- {"TOP", TOP},
- {"VERTICES", VERTICES},
- {"BEARING", BEARING},
- {"L_SPACE", L_SPACE},
- {"WIDTH", WIDTH},
- {"R_SPACE", R_SPACE},
- {"NUM_CH", NUM_CH},
- {0, 0}
- };
-
- {
- register struct res_strct *reserved;
-
- reserved = res_table;
-
- do
- if (!strcmp(str, reserved->word))
- break;
- while ((++reserved)->word != 0);
- return reserved->token;
- }
-}
-
-int
-string(str, n)
-char *str;
-int n;
-{
- if (*str == '\"' || *str == '\'')
- {
- str++;
- n -= 2; /* one for EOL, one for end quote */
- }
- if ((yylval.cval = (char *)malloc(n+1)) != NULL)
- {
- strncpy(yylval.cval, str, n);
- yylval.cval[n] = '\0';
- return STRING;
- }
- else
- return 0;
-}
+%{
+/* $XConsortium: lex.l,v 5.4 91/08/26 10:55:26 gildea Exp $ */
+
+/*****************************************************************
+Copyright (c) 1989,1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
+
+ All Rights Reserved
+
+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, and that the names of Sun Microsystems,
+the X Consortium, and MIT not be used in advertising or publicity
+pertaining to distribution of the software without specific, written
+prior permission.
+
+SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
+SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+
+#include <stdlib.h>
+#include <ctype.h>
+#include <math.h>
+#include "strokegen.h"
+
+#if defined(ISC) && defined(SYSV) && defined(SYSV386) && __STDC__
+extern double atof(char *);
+#endif
+
+#ifdef FLEX_SCANNER
+int yylineno;
+#endif
+
+%}
+%%
+\'[^']*\' |
+\"[^"]*\" return string(yytext, yyleng);
+#.* ;
+[ ,;\t\n]* /* natural dilimters */ ;
+
+[a-zA-Z][a-zA-Z0-9_.]* {
+ int token;
+ if (token = res_words(yytext))
+ return token;
+ return string(yytext, yyleng);
+ }
+
+[+-]?[0-9]+\.?[0-9]*[eE][+-]?[0-9]+ |
+[+-]?[0-9]+\.[0-9]* |
+\.[0-9]+ {
+ yylval.dval = atof(yytext);
+ return REAL;
+ }
+[+-]?[0-9]+#[0-9]+ {
+ return INTEGER;
+ }
+[+-]?[0-9]+ {
+ yylval.ival = atoi(yytext);
+ return INTEGER;
+ }
+[()] ;
+%%
+
+int
+res_words(str)
+char str[];
+{
+ static struct res_strct {
+ char *word;
+ int token;
+ } res_table[] = {
+ {"BOTTOM", BOTTOM},
+ {"CENTER", CENTER},
+ {"PROPERTIES", PROPERTIES},
+ {"CLOSE", CLOSE},
+ {"FONTNAME", FONTNAME},
+ {"INDEX", INDEX},
+ {"MAGIC", MAGIC},
+ {"OPEN", OPEN},
+ {"RIGHT", RIGHT},
+ {"STROKE", STROKE},
+ {"TOP", TOP},
+ {"VERTICES", VERTICES},
+ {"BEARING", BEARING},
+ {"L_SPACE", L_SPACE},
+ {"WIDTH", WIDTH},
+ {"R_SPACE", R_SPACE},
+ {"NUM_CH", NUM_CH},
+ {0, 0}
+ };
+
+ {
+ register struct res_strct *reserved;
+
+ reserved = res_table;
+
+ do
+ if (!strncmp(str, reserved->word, sizeof(str)))
+ break;
+ while ((++reserved)->word != 0);
+ return reserved->token;
+ }
+}
+
+int
+string(str, n)
+char *str;
+int n;
+{
+ if (*str == '\"' || *str == '\'')
+ {
+ str++;
+ n -= 2; /* one for EOL, one for end quote */
+ }
+ if ((yylval.cval = (char *)malloc(n+1)) != NULL)
+ {
+ strncpy(yylval.cval, str, n);
+ yylval.cval[n] = '\0';
+ return STRING;
+ }
+ else
+ return 0;
+}

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-lib_mui_Imakefile,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
--- lib/mui/Imakefile.orig Fri Aug 7 20:20:30 1998
+++ lib/mui/Imakefile Wed Jun 20 12:11:38 2001
@@ -22,5 +22,9 @@ NormalLibraryObjectRule()
#endif
NormalLibraryTarget(mui,$(OBJS))
+InstallLibrary(mui,$(USRLIBDIR))
+
+SharedDepLibraryTarget(mui,3.7,.,$(OBJS),.,.)
+InstallSharedLibrary(mui,3.7,$(USRLIBDIR))
DependTarget()

View File

@ -0,0 +1,34 @@
$OpenBSD: patch-lib_mui_browseparse_c,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
--- lib/mui/browseparse.c.orig Fri Aug 7 20:15:06 1998
+++ lib/mui/browseparse.c Wed Jun 20 12:11:38 2001
@@ -58,15 +58,15 @@ void parsebrowsefile(FILE *f)
while (0 != fgets(buffer, 299, f))
switch(buffer[0]) {
case 'D':
- strcpy(currentdirectoryname, &buffer[2]);
+ strlcpy(currentdirectoryname, &buffer[2], sizeof(currentdirectoryname));
nukecr(currentdirectoryname);
break;
case 'F':
- strcpy(currentfilename, &buffer[2]);
+ strlcpy(currentfilename, &buffer[2], sizeof(currentfilename));
nukecr(currentfilename);
break;
case 'P':
- strcpy(browseprompt, &buffer[2]);
+ strlcpy(browseprompt, &buffer[2], sizeof(browseprompt));
nukecr(browseprompt);
break;
case 'X':
@@ -86,9 +86,9 @@ void setcurrentfilename(char *s)
sptr = &s[len-1];
while (sptr != s) {
if (*sptr == '/') {
- strcpy(currentfilename, sptr+1);
+ strlcpy(currentfilename, sptr+1, sizeof(currentfilename));
*sptr = 0;
- strcpy(currentdirectoryname, s);
+ strlcpy(currentdirectoryname, s, sizeof(currentdirectoryname));
return;
}
sptr--;

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-lib_mui_browser_c,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
--- lib/mui/browser.c.orig Fri Aug 7 20:15:07 1998
+++ lib/mui/browser.c Wed Jun 20 12:11:38 2001
@@ -176,7 +176,7 @@ void handletextbox(muiObject *obj, enum
strncpy(directory, s, slash-s);
directory[slash-s] = 0;
} else {
- strcat(directory, "/");
+ strlcat(directory, "/", sizeof(directory));
strncat(directory, s, slash-s);
}
}
@@ -233,7 +233,7 @@ void maketestui(void)
muiSetCallback(tl, handlefileselection);
cd(directory);
- strcpy(originaldir, directory);
+ strlcpy(originaldir, directory, sizeof(originaldir));
}
void main(int argc, char **argv)
@@ -243,7 +243,7 @@ void main(int argc, char **argv)
f = fopen(BROWSEFILE, "r");
parsebrowsefile(f);
fclose(f);
- strcpy(directory, currentdirectoryname);
+ strlcpy(directory, currentdirectoryname, sizeof(directory));
maketestui();
glutInit(&argc, argv);
if (argc > 1) mui_singlebuffered = 1;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-man_Imakefile,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
--- man/Imakefile.orig Fri Aug 7 20:20:31 1998
+++ man/Imakefile Wed Jun 20 12:11:38 2001
@@ -1,7 +1,7 @@
#define IHaveSubdirs
#define PassCDebugFlags
-SUBDIRS = glut gle
+SUBDIRS = glut
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-man_glut_Imakefile,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
--- man/glut/Imakefile.orig Fri Aug 7 20:20:31 1998
+++ man/glut/Imakefile Wed Jun 20 12:11:38 2001
@@ -15,9 +15,9 @@ MANSUFFIX = $(LIBMANSUFFIX)glut
MANPACKAGE = /GLUT
#endif
-all:
- @echo 'The default rule in GLUT API man page Makefile is a no-op.'
- @echo 'Try "make install.man" to build and install man pages.'
+all::
+# @echo 'The default rule in GLUT API man page Makefile is a no-op.'
+# @echo 'Try "make install.man" to build and install man pages.'
InstallManPageLong(glutAddMenuEntry,$(MANDIR),glutAddMenuEntry)
InstallManPageLong(glutAddSubMenu,$(MANDIR),glutAddSubMenu)

10
graphics/glut/pkg/DESCR Normal file
View File

@ -0,0 +1,10 @@
The OpenGL Utility Toolkit, a window system independent toolkit for
writing OpenGL programs. It implements a simple windowing application
programming interface (API) for OpenGL. GLUT is designed for
constructing small to medium sized OpenGL programs. While GLUT is
well-suited to learning OpenGL and developing simple OpenGL
applications, GLUT is not a full-featured toolkit so large applications
requiring sophisticated user interfaces are better off using native
window system toolkits like Motif.
WWW: ${HOMEPAGE}

View File

@ -0,0 +1,5 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
lib/libglsmap.so.3.7
lib/libglut.so.3.7
lib/libmui.so.3.7
DYNLIBDIR(%D/lib)

123
graphics/glut/pkg/PLIST Normal file
View File

@ -0,0 +1,123 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
include/GL/glsmap.h
include/GL/glut.h
include/mui/browser.h
include/mui/displaylist.h
include/mui/gizmo.h
include/mui/hslider.h
include/mui/mui.h
include/mui/textlist.h
include/mui/uicolor.h
include/mui/vslider.h
lib/libglsmap.a
lib/libglut.a
lib/libmui.a
%%SHARED%%
man/cat3/glut.0
man/cat3/glutAddMenuEntry.0
man/cat3/glutAddSubMenu.0
man/cat3/glutAttachMenu.0
man/cat3/glutBitmapCharacter.0
man/cat3/glutBitmapLength.0
man/cat3/glutBitmapWidth.0
man/cat3/glutButtonBoxFunc.0
man/cat3/glutChangeToMenuEntry.0
man/cat3/glutChangeToSubMenu.0
man/cat3/glutCopyColormap.0
man/cat3/glutCreateMenu.0
man/cat3/glutCreateSubWindow.0
man/cat3/glutCreateWindow.0
man/cat3/glutDestroyMenu.0
man/cat3/glutDestroyWindow.0
man/cat3/glutDetachMenu.0
man/cat3/glutDeviceGet.0
man/cat3/glutDialsFunc.0
man/cat3/glutDisplayFunc.0
man/cat3/glutEnterGameMode.0
man/cat3/glutEntryFunc.0
man/cat3/glutEstablishOverlay.0
man/cat3/glutExtensionSupported.0
man/cat3/glutForceJoystickFunc.0
man/cat3/glutFullScreen.0
man/cat3/glutGameModeGet.0
man/cat3/glutGameModeString.0
man/cat3/glutGet.0
man/cat3/glutGetColor.0
man/cat3/glutGetMenu.0
man/cat3/glutGetModifiers.0
man/cat3/glutGetWindow.0
man/cat3/glutHideOverlay.0
man/cat3/glutHideWindow.0
man/cat3/glutIconifyWindow.0
man/cat3/glutIdleFunc.0
man/cat3/glutIgnoreKeyRepeat.0
man/cat3/glutInit.0
man/cat3/glutInitDisplayMode.0
man/cat3/glutInitDisplayString.0
man/cat3/glutInitWindowPosition.0
man/cat3/glutJoystickFunc.0
man/cat3/glutKeyboardFunc.0
man/cat3/glutKeyboardUpFunc.0
man/cat3/glutLayerGet.0
man/cat3/glutLeaveGameMode.0
man/cat3/glutMainLoop.0
man/cat3/glutMenuStatusFunc.0
man/cat3/glutMotionFunc.0
man/cat3/glutMouseFunc.0
man/cat3/glutOverlayDisplayFunc.0
man/cat3/glutPassiveMotionFunc.0
man/cat3/glutPopWindow.0
man/cat3/glutPositionWindow.0
man/cat3/glutPostOverlayRedisplay.0
man/cat3/glutPostRedisplay.0
man/cat3/glutPushWindow.0
man/cat3/glutRemoveMenuItem.0
man/cat3/glutRemoveOverlay.0
man/cat3/glutReportErrors.0
man/cat3/glutReshapeFunc.0
man/cat3/glutReshapeWindow.0
man/cat3/glutSetColor.0
man/cat3/glutSetCursor.0
man/cat3/glutSetIconTitle.0
man/cat3/glutSetKeyRepeat.0
man/cat3/glutSetMenu.0
man/cat3/glutSetWindow.0
man/cat3/glutSetWindowTitle.0
man/cat3/glutShowOverlay.0
man/cat3/glutShowWindow.0
man/cat3/glutSolidCone.0
man/cat3/glutSolidCube.0
man/cat3/glutSolidDodecahedron.0
man/cat3/glutSolidIcosahedron.0
man/cat3/glutSolidOctahedron.0
man/cat3/glutSolidSphere.0
man/cat3/glutSolidTeapot.0
man/cat3/glutSolidTetrahedron.0
man/cat3/glutSolidTorus.0
man/cat3/glutSpaceballButtonFunc.0
man/cat3/glutSpaceballMotionFunc.0
man/cat3/glutSpaceballRotateFunc.0
man/cat3/glutSpecialFunc.0
man/cat3/glutSpecialUpFunc.0
man/cat3/glutStrokeCharacter.0
man/cat3/glutStrokeLength.0
man/cat3/glutStrokeWidth.0
man/cat3/glutSwapBuffers.0
man/cat3/glutTabletButtonFunc.0
man/cat3/glutTabletMotionFunc.0
man/cat3/glutTimerFunc.0
man/cat3/glutUseLayer.0
man/cat3/glutVisibilityFunc.0
man/cat3/glutWarpPointer.0
man/cat3/glutWireCone.0
man/cat3/glutWireCube.0
man/cat3/glutWireDodecahedron.0
man/cat3/glutWireIcosahedron.0
man/cat3/glutWireOctahedron.0
man/cat3/glutWireSphere.0
man/cat3/glutWireTeapot.0
man/cat3/glutWireTetrahedron.0
man/cat3/glutWireTorus.0
man/cat3/intro.0
@dirrm include/mui
@dirrm include/GL

View File

@ -0,0 +1,11 @@
$OpenBSD: SECURITY,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
GLUT uses strcpy, strcmp, strcat, and sprintf
in a few functions. The included patches correct
the usage.
Files affected are:
${WRKSRC}/lib/glut/strokegen.y
${WRKSRC}/lib/glut/strokelex.l
${WRKSRC}/lib/mui/browseparse.c
${WRKSRC}/lib/mui/browser.c