aboutsummaryrefslogtreecommitdiff
path: root/graphics/freeglut
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2010-07-06 17:35:46 +0000
committerRene Ladan <rene@FreeBSD.org>2010-07-06 17:35:46 +0000
commit55dfb60ebed82e84c393bc95e136fd971bf4562d (patch)
treee3eecb5999df9a89c2d542581ebe7102779415cd /graphics/freeglut
parent6ab8c72d0145c4cb1a2e955f2c92cd22aff859a5 (diff)
downloadports-55dfb60ebed82e84c393bc95e136fd971bf4562d.tar.gz
ports-55dfb60ebed82e84c393bc95e136fd971bf4562d.zip
Notes
Diffstat (limited to 'graphics/freeglut')
-rw-r--r--graphics/freeglut/Makefile57
-rw-r--r--graphics/freeglut/distinfo6
-rw-r--r--graphics/freeglut/files/extra-patch-src__freeglut_joystick.c34
-rw-r--r--graphics/freeglut/files/patch-progs::demos::CallbackMaker::CallbackMaker.c11
-rw-r--r--graphics/freeglut/files/patch-progs::demos::Fractals::fractals.c20
-rw-r--r--graphics/freeglut/files/patch-progs::demos::Fractals_random::fractals_random.c20
-rw-r--r--graphics/freeglut/files/patch-progs::demos::Lorenz::lorenz.c11
-rw-r--r--graphics/freeglut/files/patch-progs::demos::One::one.c11
-rw-r--r--graphics/freeglut/files/patch-progs::demos::shapes::shapes.c11
-rw-r--r--graphics/freeglut/files/patch-src::freeglut_joystick.c34
-rw-r--r--graphics/freeglut/pkg-message13
-rw-r--r--graphics/freeglut/pkg-plist20
12 files changed, 84 insertions, 164 deletions
diff --git a/graphics/freeglut/Makefile b/graphics/freeglut/Makefile
index 1c365ec3997e..11170f18054b 100644
--- a/graphics/freeglut/Makefile
+++ b/graphics/freeglut/Makefile
@@ -1,3 +1,4 @@
+# vim:ts=8:sw=8
# New ports collection makefile for: freeglut
# Date created: Wed Apr 23 2003
# Whom: thierry@pompo.net
@@ -5,36 +6,40 @@
# $FreeBSD$
#
-PORTNAME= freeglut
-PORTVERSION= 2.4.0
-PORTREVISION= 4
-CATEGORIES= graphics
-MASTER_SITES= SF
+PORTNAME= freeglut
+PORTVERSION= 2.6.0
+CATEGORIES= graphics
+MASTER_SITES= SF/${PORTNAME:L}/${PORTNAME:L}/
-MAINTAINER= ports@FreeBSD.org
-COMMENT= An alternative to the OpenGL Utility Toolkit (GLUT) library
+MAINTAINER= aldis@bsdroot.lv
+COMMENT= An alternative to the OpenGL Utility Toolkit (GLUT) library
-CONFLICTS= libglut-[0-9]*
+CONFLICTS= libglut-[0-9].*
-USE_AUTOTOOLS= libtool:22
-GNU_CONFIGURE= yes
-USE_LDCONFIG= yes
-USE_XORG= ice
-USE_GL= glu
-CONFIGURE_ARGS= --disable-warnings
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-lusbhid"
-
-REINPLACE_ARGS= -i ""
+USE_AUTOTOOLS= libtool:22
+GNU_CONFIGURE= yes
+USE_LDCONFIG= yes
+USE_XORG= ice xi
+USE_GL= glu
+CONFIGURE_ARGS= --disable-warnings
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-lusbhid"
+USE_LDCONFIG= yes
DOCS= download.html freeglut.html freeglut_logo.png \
freeglut_user_interface.html index.html ogl_sm.png \
progress.html structure.html
BINS= CallbackMaker Fractals Fractals_random Lorenz One shapes
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 800000
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-src__freeglut_joystick.c
+.endif
+
pre-configure:
-.for fract in /fractals.c _random/fractals_random.c
+.for fract in Fractals/fractals.c Fractals_random/fractals_random.c
@${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|g" \
- ${WRKSRC}/progs/demos/Fractals${fract}
+ ${WRKSRC}/progs/demos/${fract}
.endfor
post-build:
@@ -48,23 +53,19 @@ post-install:
@${INSTALL_DATA} ${WRKSRC}/doc/${FILE} ${DOCSDIR}
.endfor
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
+.endif
+.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
- @${INSTALL_DATA} ${WRKSRC}/progs/demos/Fractals/fractals.dat \
- ${EXAMPLESDIR}
+ @${INSTALL_DATA} ${WRKSRC}/progs/demos/Fractals/fractals.dat ${EXAMPLESDIR}
.for prog in ${BINS}
- @${INSTALL_PROGRAM} ${WRKSRC}/progs/demos/${prog}/.libs/${prog:L} \
- ${EXAMPLESDIR}
+ @${INSTALL_PROGRAM} ${WRKSRC}/progs/demos/${prog}/.libs/${prog:L} ${EXAMPLESDIR}
.endfor
@${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}."
.endif
+.if ${OSVERSION} >= 800000
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
-
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 800064
-BROKEN= does not build
.endif
.include <bsd.port.post.mk>
diff --git a/graphics/freeglut/distinfo b/graphics/freeglut/distinfo
index 5f7c297e7107..74f0732f4e57 100644
--- a/graphics/freeglut/distinfo
+++ b/graphics/freeglut/distinfo
@@ -1,3 +1,3 @@
-MD5 (freeglut-2.4.0.tar.gz) = 6d16873bd876fbf4980a927cfbc496a1
-SHA256 (freeglut-2.4.0.tar.gz) = 269f2d50ba30b381622eb36f20b552ad43a1b43d544b9075e484e7146e81b052
-SIZE (freeglut-2.4.0.tar.gz) = 469557
+MD5 (freeglut-2.6.0.tar.gz) = 39f0f2de89f399529d2b981188082218
+SHA256 (freeglut-2.6.0.tar.gz) = 615b41edc96c405ee6bb7e9a2942642140c3e57c1dd8c68e968a17ddfb59e98f
+SIZE (freeglut-2.6.0.tar.gz) = 1124186
diff --git a/graphics/freeglut/files/extra-patch-src__freeglut_joystick.c b/graphics/freeglut/files/extra-patch-src__freeglut_joystick.c
new file mode 100644
index 000000000000..fa71983cca40
--- /dev/null
+++ b/graphics/freeglut/files/extra-patch-src__freeglut_joystick.c
@@ -0,0 +1,34 @@
+--- ./src/freeglut_joystick.c.orig 2009-11-14 06:31:39.000000000 +0200
++++ ./src/freeglut_joystick.c 2010-05-31 21:27:13.362358514 +0300
+@@ -79,11 +79,13 @@
+ # include <errno.h>
+ # endif
+ # if defined(__FreeBSD__) || defined(__NetBSD__)
++# include <osreldate.h>
+ /* XXX The below hack is done until freeglut's autoconf is updated. */
+ # define HAVE_USB_JS 1
+
+ # if defined(__FreeBSD__)
+ # include <sys/joystick.h>
++# include <dev/usb/usb_ioctl.h>
+ # else
+ /*
+ * XXX NetBSD/amd64 systems may find that they have to steal the
+@@ -200,7 +202,7 @@
+ */
+ static char *fghJoystickWalkUSBdev(int f, char *dev, char *out, int outlen)
+ {
+- struct usb_device_info di;
++/* struct usb_device_info di;
+ int i, a;
+ char *cp;
+
+@@ -221,6 +223,7 @@
+ return out;
+ }
+ }
++ */
+ return NULL;
+ }
+
+
diff --git a/graphics/freeglut/files/patch-progs::demos::CallbackMaker::CallbackMaker.c b/graphics/freeglut/files/patch-progs::demos::CallbackMaker::CallbackMaker.c
deleted file mode 100644
index bbe8f1761274..000000000000
--- a/graphics/freeglut/files/patch-progs::demos::CallbackMaker::CallbackMaker.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- progs/demos/CallbackMaker/CallbackMaker.c.orig Mon Nov 10 17:01:05 2003
-+++ progs/demos/CallbackMaker/CallbackMaker.c Sat Dec 13 14:43:35 2003
-@@ -4,7 +4,7 @@
- */
-
-
--#include <GL/freeglut.h>
-+#include "../../../include/GL/freeglut.h"
- #include <stdio.h>
- #include <stdlib.h>
-
diff --git a/graphics/freeglut/files/patch-progs::demos::Fractals::fractals.c b/graphics/freeglut/files/patch-progs::demos::Fractals::fractals.c
deleted file mode 100644
index 89a3ebe7af57..000000000000
--- a/graphics/freeglut/files/patch-progs::demos::Fractals::fractals.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- progs/demos/Fractals/fractals.c.orig Sun Sep 21 15:47:36 2003
-+++ progs/demos/Fractals/fractals.c Mon Sep 29 23:35:43 2003
-@@ -18,7 +18,7 @@
- * Escape - quit
- */
-
--#include <GL/freeglut.h>
-+#include "../../../include/GL/freeglut.h"
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
-@@ -262,7 +262,7 @@
- if ( argc > 1 )
- readConfigFile ( argv[1] ) ;
- else
-- readConfigFile ( "fractals.dat" ) ;
-+ readConfigFile ( "/usr/local/share/examples/freeglut/fractals.dat" ) ;
-
- glutInit(&argc, argv);
- glutInitWindowSize(500, 250);
diff --git a/graphics/freeglut/files/patch-progs::demos::Fractals_random::fractals_random.c b/graphics/freeglut/files/patch-progs::demos::Fractals_random::fractals_random.c
deleted file mode 100644
index 4d97f39f1720..000000000000
--- a/graphics/freeglut/files/patch-progs::demos::Fractals_random::fractals_random.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- progs/demos/Fractals_random/fractals_random.c.orig Thu Dec 11 02:32:08 2003
-+++ progs/demos/Fractals_random/fractals_random.c Sat Dec 13 10:17:10 2003
-@@ -20,7 +20,7 @@
- * Escape - quit
- */
-
--#include <GL/freeglut.h>
-+#include "../../../include/GL/freeglut.h"
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
-@@ -346,7 +346,7 @@
- if ( argc > 1 )
- readConfigFile ( argv[1] ) ;
- else
-- readConfigFile ( "fractals.dat" ) ;
-+ readConfigFile ( "/usr/local/share/examples/freeglut/fractals.dat" ) ;
-
- fractal_window = glutCreateWindow( window_title );
-
diff --git a/graphics/freeglut/files/patch-progs::demos::Lorenz::lorenz.c b/graphics/freeglut/files/patch-progs::demos::Lorenz::lorenz.c
deleted file mode 100644
index 508cef726b90..000000000000
--- a/graphics/freeglut/files/patch-progs::demos::Lorenz::lorenz.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- progs/demos/Lorenz/lorenz.c.orig Mon Jan 3 11:24:15 2005
-+++ progs/demos/Lorenz/lorenz.c Sat Jun 11 14:06:07 2005
-@@ -31,7 +31,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <math.h>
--#include <GL/freeglut.h>
-+#include "../../../include/GL/freeglut.h"
- #ifdef WIN32
- /* DUMP MEMORY LEAKS */
- #include <crtdbg.h>
diff --git a/graphics/freeglut/files/patch-progs::demos::One::one.c b/graphics/freeglut/files/patch-progs::demos::One::one.c
deleted file mode 100644
index 580d5048e036..000000000000
--- a/graphics/freeglut/files/patch-progs::demos::One::one.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- progs/demos/One/one.c.orig Sat Sep 13 15:35:53 2003
-+++ progs/demos/One/one.c Mon Sep 22 21:56:03 2003
-@@ -19,7 +19,7 @@
- #include <stdio.h>
- #include <stdlib.h>
-
--#include <GL/freeglut.h>
-+#include "../../../include/GL/freeglut.h"
-
- int g_LeaveGameMode = 0;
- int g_InGameMode = 1;
diff --git a/graphics/freeglut/files/patch-progs::demos::shapes::shapes.c b/graphics/freeglut/files/patch-progs::demos::shapes::shapes.c
deleted file mode 100644
index 596ee6c84b98..000000000000
--- a/graphics/freeglut/files/patch-progs::demos::shapes::shapes.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- progs/demos/shapes/shapes.c.orig Sun Dec 7 11:12:22 2003
-+++ progs/demos/shapes/shapes.c Sat Dec 13 14:51:38 2003
-@@ -12,7 +12,7 @@
- * using the + and - keys.
- */
-
--#include <GL/freeglut.h>
-+#include "../../../include/GL/freeglut.h"
-
- #include <stdlib.h>
-
diff --git a/graphics/freeglut/files/patch-src::freeglut_joystick.c b/graphics/freeglut/files/patch-src::freeglut_joystick.c
deleted file mode 100644
index 23f02203881a..000000000000
--- a/graphics/freeglut/files/patch-src::freeglut_joystick.c
+++ /dev/null
@@ -1,34 +0,0 @@
---- src/freeglut_joystick.c.orig Wed May 4 14:53:48 2005
-+++ src/freeglut_joystick.c Sat Jun 11 14:40:48 2005
-@@ -80,7 +80,7 @@
- /* XXX The below hack is done until freeglut's autoconf is updated. */
- # define HAVE_USB_JS 1
-
--# if defined(__FreeBSD__) && __FreeBSD_version >= 500000
-+# if defined(__FreeBSD__)
- # include <sys/joystick.h>
- # else
- /*
-@@ -656,9 +656,9 @@
- if (usage > 0 && usage < _JS_MAX_BUTTONS + 1)
- {
- if (d)
-- joy->os->cache_buttons |= (1 << usage - 1);
-+ joy->os->cache_buttons |= (1 << (usage - 1));
- else
-- joy->os->cache_buttons &= ~(1 << usage - 1);
-+ joy->os->cache_buttons &= ~(1 <<( usage - 1));
- }
- }
- }
-@@ -1060,7 +1060,9 @@
- # ifdef JS_NEW
- unsigned char u;
- # else
-- int counter;
-+# if defined( __linux__ )
-+ int counter;
-+# endif
- # endif
- #endif
-
diff --git a/graphics/freeglut/pkg-message b/graphics/freeglut/pkg-message
index 7bb99a569d93..8bf6ef51a91b 100644
--- a/graphics/freeglut/pkg-message
+++ b/graphics/freeglut/pkg-message
@@ -1,6 +1,9 @@
-******************************************************************
-freeglut requires a DRI / OpenGL enabled-graphic card;
-You may try to run the sample programs to check your installation.
+Since FreeBSD has new USB stack, freeglut normally doesn't build on FreeBSD 8
+(yet). To workaround this I created small, ugly patch. this patch adds one
+include file and comments out content of one function (only leaves return NULL).
-Notice: freeglut is now a GLUT replacement.
-******************************************************************
+I have no idea what kind of side effects this can cause. Joystick wont work.
+There might be ports that won't compile, or apps that may crash because of
+this. I don't know.
+
+If you face any problems delete this port and install graphics/libglut.
diff --git a/graphics/freeglut/pkg-plist b/graphics/freeglut/pkg-plist
index 7061df93885f..8ddb105aab13 100644
--- a/graphics/freeglut/pkg-plist
+++ b/graphics/freeglut/pkg-plist
@@ -5,14 +5,14 @@ include/GL/glut.h
lib/libglut.a
lib/libglut.la
lib/libglut.so
-lib/libglut.so.11
-%%PORTDOCS%%%%EXAMPLESDIR%%/callbackmaker
-%%PORTDOCS%%%%EXAMPLESDIR%%/fractals
-%%PORTDOCS%%%%EXAMPLESDIR%%/fractals_random
-%%PORTDOCS%%%%EXAMPLESDIR%%/fractals.dat
-%%PORTDOCS%%%%EXAMPLESDIR%%/lorenz
-%%PORTDOCS%%%%EXAMPLESDIR%%/one
-%%PORTDOCS%%%%EXAMPLESDIR%%/shapes
+lib/libglut.so.12
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/callbackmaker
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fractals
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fractals_random
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fractals.dat
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/lorenz
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/one
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/shapes
%%PORTDOCS%%%%DOCSDIR%%/download.html
%%PORTDOCS%%%%DOCSDIR%%/freeglut.html
%%PORTDOCS%%%%DOCSDIR%%/freeglut_logo.png
@@ -21,6 +21,6 @@ lib/libglut.so.11
%%PORTDOCS%%%%DOCSDIR%%/ogl_sm.png
%%PORTDOCS%%%%DOCSDIR%%/progress.html
%%PORTDOCS%%%%DOCSDIR%%/structure.html
-@dirrm include/GL
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
+@dirrmtry include/GL