aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorlesi <lesi@FreeBSD.org>2004-12-18 03:34:05 +0800
committerlesi <lesi@FreeBSD.org>2004-12-18 03:34:05 +0800
commit29f5727ccee3d3294e909f853469be675dd6aee8 (patch)
treeb6beafe82559e54eb2c34dea190a1053285ed7ec /graphics
parentfd503111b1eec93763dc3b889d14c489fe8d87b8 (diff)
downloadfreebsd-ports-gnome-29f5727ccee3d3294e909f853469be675dd6aee8.tar.gz
freebsd-ports-gnome-29f5727ccee3d3294e909f853469be675dd6aee8.tar.zst
freebsd-ports-gnome-29f5727ccee3d3294e909f853469be675dd6aee8.zip
After a bit of discussion with CPAN maintainer of this module, make it
compile with Mesa 6, but in a way that hopefully doesn't break with older GL. Pointed out by: dosirak via kris
Diffstat (limited to 'graphics')
-rw-r--r--graphics/p5-OpenGL/files/patch-Makefile.PL16
-rw-r--r--graphics/p5-OpenGL/files/patch-gl_util.c24
2 files changed, 38 insertions, 2 deletions
diff --git a/graphics/p5-OpenGL/files/patch-Makefile.PL b/graphics/p5-OpenGL/files/patch-Makefile.PL
index acfd539ac55c..aed25dcb208a 100644
--- a/graphics/p5-OpenGL/files/patch-Makefile.PL
+++ b/graphics/p5-OpenGL/files/patch-Makefile.PL
@@ -1,5 +1,5 @@
---- Makefile.PL.orig Wed Jun 20 16:39:13 2001
-+++ Makefile.PL Thu Oct 10 22:51:15 2002
+--- Makefile.PL.orig Wed Jun 20 08:39:13 2001
++++ Makefile.PL Tue Dec 14 18:36:26 2004
@@ -17,7 +17,7 @@
$pm_lib = (grep /^X11$/, @ARGV) ? '' : '-lopengl';
@@ -9,3 +9,15 @@
@libs = findlib->ext("$libdirs $libs");
+@@ -75,6 +75,11 @@
+
+ $DEFS .= ' -DOS2_GL_DISABLE_MISSING_EXT -DAPIENTRY= -D__PM__'
+ if $^O eq 'os2' and not $x;
++
++# Check for GL extensions header (glext.h)
++$glextout = `echo '\#include <GL/glext.h>' | $Config{cpprun} $includes $Config{cppflags} $Config{cppminus} >/dev/null 2>&1`;
++$no_glext = $?;
++$DEFS .= " -DHAVE_GLEXT_H" unless $no_glext;
+
+ # Should be deduced automatically, but how?!
+ $no_lgcc = (grep /^NO_LGCC$/, @ARGV);
diff --git a/graphics/p5-OpenGL/files/patch-gl_util.c b/graphics/p5-OpenGL/files/patch-gl_util.c
new file mode 100644
index 000000000000..fc3002d1f98d
--- /dev/null
+++ b/graphics/p5-OpenGL/files/patch-gl_util.c
@@ -0,0 +1,24 @@
+--- gl_util.c.orig Wed Jun 20 09:03:02 2001
++++ gl_util.c Tue Dec 14 18:41:08 2004
+@@ -1,5 +1,8 @@
+
+ #include "gl_util.h"
++#if defined(HAVE_GLEXT_H) && !defined(GL_BLEND_EQUATION_EXT)
++#include <GL/glext.h>
++#endif
+
+ int gl_texparameter_count(GLenum pname)
+ {
+@@ -708,6 +711,12 @@
+
+ /* 18 */
+ #ifdef GL_EXT_cmyka
++# ifndef GL_CMYK
++# define GL_CMYK GL_CMYK_EXT
++# endif
++# ifndef GL_CMYKA
++# define GL_CMYKA GL_CMYKA_EXT
++# endif
+ case GL_CMYK:
+ n = 4; break;
+ case GL_CMYKA: