Add freeglut 1.3, an alternative to the OpenGL Utility Toolkit (GLUT) library.

PR:		51453
Submitted by:	thierry@pompo.net
This commit is contained in:
Eric Anholt 2003-05-05 22:16:26 +00:00
parent 3044de721f
commit a8a511ee7a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=80190
19 changed files with 435 additions and 0 deletions

View file

@ -0,0 +1,47 @@
# New ports collection makefile for: freeglut
# Date created: Wed Apr 23 2003
# Whom: thierry@pompo.net
#
# $FreeBSD$
#
PORTNAME= freeglut
PORTVERSION= 1.3
CATEGORIES= x11-toolkits
MASTER_SITES= http://${PORTNAME}.sourceforge.net/
DISTNAME= ${PORTNAME}-${PORTVERSION}-${SNAPDATE}
MAINTAINER= ports@FreeBSD.org
COMMENT= An alternative to the OpenGL Utility Toolkit (GLUT) library
SNAPDATE= 2002-01-25
USE_AUTOMAKE= yes
HAS_CONFIGURE= yes
USE_LIBTOOL= yes
INSTALLS_SHLIB= yes
USE_XLIB= yes
USE_GNOME= glib12
CONFIGURE_ARGS= --x-includes=${X11BASE}/include --x-libraries=${X11BASE}/lib
CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include `${GLIB_CONFIG} --cflags`" \
LDFLAGS="`${GLIB_CONFIG} --libs`"
WRKSRC= ${WRKDIR}/${PORTNAME}-0.1
USE_REINPLACE= yes
REINPLACE_ARGS= -i ""
MK2X11= freeglut-1.3/Makefile.am genfonts/Makefile.am
post-patch:
.for file in ${MK2X11}
@${REINPLACE_CMD} -e "s|%%X11BASE%%|${X11BASE}|g" ${WRKSRC}/${file}
.endfor
post-install:
@${ECHO_MSG}
@${ECHO_MSG} " freeglut requires a DRI enabled-graphic card;"
@${ECHO_MSG} " You may try to run the program 'one' to check your installation."
@${ECHO_MSG}
.include <bsd.port.mk>

View file

@ -0,0 +1 @@
MD5 (freeglut-1.3-2002-01-25.tar.gz) = dbb63a579ba68ee9a1ddecdd9cddc1f2

View file

@ -0,0 +1,27 @@
--- aclocal.m4.orig Sat Jan 26 05:23:11 2002
+++ aclocal.m4 Fri Apr 25 11:25:34 2003
@@ -36,10 +36,10 @@
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(ACLOCAL, ${ACLOCAL})
+AM_MISSING_PROG(AUTOCONF, ${AUTOCONF})
+AM_MISSING_PROG(AUTOMAKE, ${AUTOMAKE})
+AM_MISSING_PROG(AUTOHEADER, ${AUTOHEADER})
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
@@ -123,7 +123,8 @@
AC_CACHE_LOAD
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'

View file

@ -0,0 +1,12 @@
--- configure.in.orig Sat Jan 26 05:22:54 2002
+++ configure.in Fri Apr 25 11:35:52 2003
@@ -9,8 +9,7 @@
AC_C_CONST
AC_EXEEXT
AC_PROG_RANLIB
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
dnl Checks for libraries.

View file

@ -0,0 +1,11 @@
--- freeglut-1.3/Makefile.am.orig Sun Jan 16 16:20:58 2000
+++ freeglut-1.3/Makefile.am Fri Apr 25 00:38:56 2003
@@ -31,7 +31,7 @@
#
# Additional linker flags
#
-libfreeglut_1_3_la_LIBADD = $(LIBM) -L/usr/X11R6/lib -lGL -lGLU -lXext -lX11 -lXxf86vm -lglib
+libfreeglut_1_3_la_LIBADD = $(LIBM) -L%%X11BASE%%/lib -lGL -lGLU -lXext -lX11 -lXxf86vm -lglib12
libfreeglut_1_3_la_LDFLAGS = -version-info 0:0:0
#

View file

@ -0,0 +1,87 @@
--- freeglut-1.3/freeglut_joystick.c.orig Wed Jan 12 07:49:08 2000
+++ freeglut-1.3/freeglut_joystick.c Sun May 4 17:16:24 2003
@@ -32,23 +32,23 @@
* PWO: this is not exactly what Steve Baker has done for PLIB, as I had to convert
* it from C++ to C. And I've also reformatted it a bit (that's my little
* personal deviation :]) I don't really know if it is still portable...
- * Steve: could you please add some comments to the code? :)
+ * Steve: could you please add some comments to the code? :)
*
- * FreeBSD port - courtesy of Stephen Montgomery-Smith <stephen@math.missouri.edu>
+ * FreeBSD port - courtesy of Stephen Montgomery-Smith <stephen@math.missouri.edu>
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-
-#define G_LOG_DOMAIN "freeglut-joystick"
+
+#define G_LOG_DOMAIN "freeglut-joystick"
#include "../include/GL/freeglut.h"
#include "../include/GL/freeglut_internal.h"
-
-/*
- * PWO: I don't like it at all. It's a mess. Could it be cleared?
- */
+
+/*
+ * PWO: I don't like it at all. It's a mess. Could it be cleared?
+ */
#ifdef WIN32
# include <windows.h>
# if defined( __CYGWIN32__ ) || defined( __CYGWIN__ )
@@ -61,7 +61,7 @@
# include <unistd.h>
# include <fcntl.h>
# ifdef __FreeBSD__
-# include <machine/joystick.h>
+# include <sys/joystick.h>
# define JS_DATA_TYPE joystick
# define JS_RETURN (sizeof(struct JS_DATA_TYPE))
# elif defined(__linux__)
@@ -126,7 +126,7 @@
gint tmp_buttons;
float tmp_axes[ _JS_MAX_AXES ];
# else
- JS_DATA_TYPE js;
+ struct JS_DATA_TYPE js;
# endif
gchar fname[ 128 ];
@@ -251,7 +251,7 @@
if( status != JS_RETURN )
{
- g_warning( fname );
+ g_warning( joy->fname );
joy->error = TRUE;
return;
}
@@ -409,12 +409,12 @@
return;
# ifdef __FreeBSD__
- fghJoystickRawRead( buttons, axes );
+ fghJoystickRawRead(joy, buttons, axes );
joy->error = axes[ 0 ] < -1000000000.0f;
if( joy->error )
return ;
- sprintf( joyfname, "%s/.joy%drc", g_getenv( "HOME" ), id );
+ sprintf( joyfname, "%s/.joy%drc", g_getenv( "HOME" ), joy->id );
joyfile = fopen( joyfname, "r" );
joy->error = (joyfile == NULL);
@@ -435,8 +435,8 @@
for( i=0 ; i<_JS_MAX_AXES ; i++ )
{
- dead_band[ i ] = 0.0f;
- saturate [ i ] = 1.0f;
+ joy->dead_band[ i ] = 0.0f;
+ joy->saturate [ i ] = 1.0f;
}
# else

View file

@ -0,0 +1,11 @@
--- genfonts/Makefile.am.orig Sat Jan 8 23:02:55 2000
+++ genfonts/Makefile.am Fri Apr 25 00:32:08 2003
@@ -3,6 +3,6 @@
bin_PROGRAMS = genfonts genstroke
genfonts_SOURCES = genfonts.c
genstroke_SOURCES = genstroke.c
-genfonts_LDADD = -L/usr/X11R6/lib -lglib -lX11 -lXext
-genstroke_LDADD = -lglib
+genfonts_LDADD = -L%%X11BASE%%/lib -lglib12 -lX11 -lXext
+genstroke_LDADD = -lglib12
EXTRA_DIST = genfonts.c genstroke.c

View file

@ -0,0 +1,13 @@
freeglut is a completely OpenSourced alternative to the OpenGL Utility
Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to
support the sample programs in the second edition OpenGL 'RedBook'.
Since then, GLUT has been used in a wide variety of practical applications
because it is simple, universally available and highly portable.
GLUT (and hence freeglut) allows the user to create and manage windows
containing OpenGL contexts on a wide range of platforms and also read the
mouse, keyboard and joystick functions.
freeglut is released under the X-Consortium license.
WWW: http://freeglut.sourceforge.net/

View file

@ -0,0 +1,8 @@
bin/genfonts
bin/genstroke
bin/one
include/GL/freeglut.h
lib/libfreeglut-1.3.so.0
lib/libfreeglut-1.3.so
lib/libfreeglut-1.3.a
@dirrm include/GL

View file

@ -22,6 +22,7 @@
SUBDIR += fox
SUBDIR += fox-devel
SUBDIR += fox-xunicode
SUBDIR += freeglut
SUBDIR += gail
SUBDIR += gal
SUBDIR += gal2

View file

@ -0,0 +1,47 @@
# New ports collection makefile for: freeglut
# Date created: Wed Apr 23 2003
# Whom: thierry@pompo.net
#
# $FreeBSD$
#
PORTNAME= freeglut
PORTVERSION= 1.3
CATEGORIES= x11-toolkits
MASTER_SITES= http://${PORTNAME}.sourceforge.net/
DISTNAME= ${PORTNAME}-${PORTVERSION}-${SNAPDATE}
MAINTAINER= ports@FreeBSD.org
COMMENT= An alternative to the OpenGL Utility Toolkit (GLUT) library
SNAPDATE= 2002-01-25
USE_AUTOMAKE= yes
HAS_CONFIGURE= yes
USE_LIBTOOL= yes
INSTALLS_SHLIB= yes
USE_XLIB= yes
USE_GNOME= glib12
CONFIGURE_ARGS= --x-includes=${X11BASE}/include --x-libraries=${X11BASE}/lib
CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include `${GLIB_CONFIG} --cflags`" \
LDFLAGS="`${GLIB_CONFIG} --libs`"
WRKSRC= ${WRKDIR}/${PORTNAME}-0.1
USE_REINPLACE= yes
REINPLACE_ARGS= -i ""
MK2X11= freeglut-1.3/Makefile.am genfonts/Makefile.am
post-patch:
.for file in ${MK2X11}
@${REINPLACE_CMD} -e "s|%%X11BASE%%|${X11BASE}|g" ${WRKSRC}/${file}
.endfor
post-install:
@${ECHO_MSG}
@${ECHO_MSG} " freeglut requires a DRI enabled-graphic card;"
@${ECHO_MSG} " You may try to run the program 'one' to check your installation."
@${ECHO_MSG}
.include <bsd.port.mk>

View file

@ -0,0 +1 @@
MD5 (freeglut-1.3-2002-01-25.tar.gz) = dbb63a579ba68ee9a1ddecdd9cddc1f2

View file

@ -0,0 +1,27 @@
--- aclocal.m4.orig Sat Jan 26 05:23:11 2002
+++ aclocal.m4 Fri Apr 25 11:25:34 2003
@@ -36,10 +36,10 @@
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(ACLOCAL, ${ACLOCAL})
+AM_MISSING_PROG(AUTOCONF, ${AUTOCONF})
+AM_MISSING_PROG(AUTOMAKE, ${AUTOMAKE})
+AM_MISSING_PROG(AUTOHEADER, ${AUTOHEADER})
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
@@ -123,7 +123,8 @@
AC_CACHE_LOAD
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'

View file

@ -0,0 +1,12 @@
--- configure.in.orig Sat Jan 26 05:22:54 2002
+++ configure.in Fri Apr 25 11:35:52 2003
@@ -9,8 +9,7 @@
AC_C_CONST
AC_EXEEXT
AC_PROG_RANLIB
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
dnl Checks for libraries.

View file

@ -0,0 +1,11 @@
--- freeglut-1.3/Makefile.am.orig Sun Jan 16 16:20:58 2000
+++ freeglut-1.3/Makefile.am Fri Apr 25 00:38:56 2003
@@ -31,7 +31,7 @@
#
# Additional linker flags
#
-libfreeglut_1_3_la_LIBADD = $(LIBM) -L/usr/X11R6/lib -lGL -lGLU -lXext -lX11 -lXxf86vm -lglib
+libfreeglut_1_3_la_LIBADD = $(LIBM) -L%%X11BASE%%/lib -lGL -lGLU -lXext -lX11 -lXxf86vm -lglib12
libfreeglut_1_3_la_LDFLAGS = -version-info 0:0:0
#

View file

@ -0,0 +1,87 @@
--- freeglut-1.3/freeglut_joystick.c.orig Wed Jan 12 07:49:08 2000
+++ freeglut-1.3/freeglut_joystick.c Sun May 4 17:16:24 2003
@@ -32,23 +32,23 @@
* PWO: this is not exactly what Steve Baker has done for PLIB, as I had to convert
* it from C++ to C. And I've also reformatted it a bit (that's my little
* personal deviation :]) I don't really know if it is still portable...
- * Steve: could you please add some comments to the code? :)
+ * Steve: could you please add some comments to the code? :)
*
- * FreeBSD port - courtesy of Stephen Montgomery-Smith <stephen@math.missouri.edu>
+ * FreeBSD port - courtesy of Stephen Montgomery-Smith <stephen@math.missouri.edu>
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-
-#define G_LOG_DOMAIN "freeglut-joystick"
+
+#define G_LOG_DOMAIN "freeglut-joystick"
#include "../include/GL/freeglut.h"
#include "../include/GL/freeglut_internal.h"
-
-/*
- * PWO: I don't like it at all. It's a mess. Could it be cleared?
- */
+
+/*
+ * PWO: I don't like it at all. It's a mess. Could it be cleared?
+ */
#ifdef WIN32
# include <windows.h>
# if defined( __CYGWIN32__ ) || defined( __CYGWIN__ )
@@ -61,7 +61,7 @@
# include <unistd.h>
# include <fcntl.h>
# ifdef __FreeBSD__
-# include <machine/joystick.h>
+# include <sys/joystick.h>
# define JS_DATA_TYPE joystick
# define JS_RETURN (sizeof(struct JS_DATA_TYPE))
# elif defined(__linux__)
@@ -126,7 +126,7 @@
gint tmp_buttons;
float tmp_axes[ _JS_MAX_AXES ];
# else
- JS_DATA_TYPE js;
+ struct JS_DATA_TYPE js;
# endif
gchar fname[ 128 ];
@@ -251,7 +251,7 @@
if( status != JS_RETURN )
{
- g_warning( fname );
+ g_warning( joy->fname );
joy->error = TRUE;
return;
}
@@ -409,12 +409,12 @@
return;
# ifdef __FreeBSD__
- fghJoystickRawRead( buttons, axes );
+ fghJoystickRawRead(joy, buttons, axes );
joy->error = axes[ 0 ] < -1000000000.0f;
if( joy->error )
return ;
- sprintf( joyfname, "%s/.joy%drc", g_getenv( "HOME" ), id );
+ sprintf( joyfname, "%s/.joy%drc", g_getenv( "HOME" ), joy->id );
joyfile = fopen( joyfname, "r" );
joy->error = (joyfile == NULL);
@@ -435,8 +435,8 @@
for( i=0 ; i<_JS_MAX_AXES ; i++ )
{
- dead_band[ i ] = 0.0f;
- saturate [ i ] = 1.0f;
+ joy->dead_band[ i ] = 0.0f;
+ joy->saturate [ i ] = 1.0f;
}
# else

View file

@ -0,0 +1,11 @@
--- genfonts/Makefile.am.orig Sat Jan 8 23:02:55 2000
+++ genfonts/Makefile.am Fri Apr 25 00:32:08 2003
@@ -3,6 +3,6 @@
bin_PROGRAMS = genfonts genstroke
genfonts_SOURCES = genfonts.c
genstroke_SOURCES = genstroke.c
-genfonts_LDADD = -L/usr/X11R6/lib -lglib -lX11 -lXext
-genstroke_LDADD = -lglib
+genfonts_LDADD = -L%%X11BASE%%/lib -lglib12 -lX11 -lXext
+genstroke_LDADD = -lglib12
EXTRA_DIST = genfonts.c genstroke.c

View file

@ -0,0 +1,13 @@
freeglut is a completely OpenSourced alternative to the OpenGL Utility
Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to
support the sample programs in the second edition OpenGL 'RedBook'.
Since then, GLUT has been used in a wide variety of practical applications
because it is simple, universally available and highly portable.
GLUT (and hence freeglut) allows the user to create and manage windows
containing OpenGL contexts on a wide range of platforms and also read the
mouse, keyboard and joystick functions.
freeglut is released under the X-Consortium license.
WWW: http://freeglut.sourceforge.net/

View file

@ -0,0 +1,8 @@
bin/genfonts
bin/genstroke
bin/one
include/GL/freeglut.h
lib/libfreeglut-1.3.so.0
lib/libfreeglut-1.3.so
lib/libfreeglut-1.3.a
@dirrm include/GL