This repository was archived by the owner on Mar 19, 2025. It is now read-only.
File tree 4 files changed +26
-9
lines changed
4 files changed +26
-9
lines changed Original file line number Diff line number Diff line change 1
1
Revision history for Perl extension OpenGL::GLU.
2
2
3
3
0.02_01 TBD
4
-
4
+ - Fix gl.h and glu.h includes for __APPLE__
5
+ The Apple convention is <OpenGL/gl.h> and <OpenGL/glu.h>
6
+ where OpenGL is the name of the framework.
5
7
6
8
0.02 2017-02-13 10:26:37-05:00
7
9
- Change minimum perl version to 5.8
Original file line number Diff line number Diff line change 15
15
16
16
#include "const-c.inc"
17
17
18
- #if defined(HAVE_AGL_GLUT )
18
+ #if defined(__APPLE__ )
19
19
#include <OpenGL/glu.h>
20
20
#else
21
21
#include <GL/glu.h>
Original file line number Diff line number Diff line change 1
1
use 5.008;
2
2
use ExtUtils::MakeMaker;
3
- # See lib/ExtUtils/MakeMaker.pm for details of how to influence
4
- # the contents of the Makefile that is written.
5
- my $LIBS = ' ' ;
6
- if ($^O eq ' MSWin32' ) {
7
- $LIBS = ' -lopengl32 -lglu32' ;
8
- } else {
9
- $LIBS = ' -lGL -lGLU' ;
3
+ use Devel::CheckOS qw( os_is) ;
4
+ my ( $LIBS , $DYNS );
5
+
6
+ $LIBS = ' ' ;
7
+ $DYNS = {};
8
+
9
+ if ( os_is( ' MSWin32' ) ) {
10
+ $LIBS = ' -lopengl32 -lglu32' ;
11
+ }
12
+ elsif ( os_is( ' Cygwin' ) ) {
13
+ $LIBS = ' -lGL -lGLU' ;
14
+ }
15
+ elsif ( os_is( ' MacOSX' ) ) {
16
+ $DYNS = { ' OTHERLDFLAGS' => ' -framework OpenGL' };
17
+ }
18
+ else {
19
+ $LIBS = ' -lGL -lGLU' ;
10
20
}
11
21
12
22
WriteMakefile(
@@ -17,6 +27,7 @@ WriteMakefile(
17
27
AUTHOR => ' chm@cpan.org' ,
18
28
LICENSE => ' perl' ,
19
29
LIBS => [$LIBS ], # e.g., '-lm'
30
+ ' dynamic_lib' => $DYNS ,
20
31
DEFINE => ' -DGL_OES_EGL_image=1' , # e.g., '-DHAVE_SOMETHING'
21
32
INC => ' -I.' , # e.g., '-I. -I/usr/include/other'
22
33
# Un-comment this if you add C files to link with later:
Original file line number Diff line number Diff line change 3
3
#include "XSUB.h"
4
4
#include "ppport.h"
5
5
6
+ #if defined(__APPLE__ )
7
+ #include <OpenGL/gl.h>
8
+ #else
6
9
#include <GL/gl.h>
10
+ #endif
7
11
8
12
#ifndef GL_CMYK
9
13
#define GL_CMYK GL_CMYK_EXT
You can’t perform that action at this time.
0 commit comments