1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-12 03:00:28 +00:00
freebsd-ports/graphics/p5-OpenGL/files/patch-Makefile.PL
Dejan Lesjak 4b6e2f97a3 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
2004-12-17 19:34:05 +00:00

24 lines
756 B
Perl

--- 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';
-$libs = "-lGLU -lGLUT -lGLX $pm_lib -lMesaGLU -lMesaGLUT -lMesaGLX -lglut";
+$libs = "-lglut %%PTHREAD_LIBS%%";
@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);