Skip to content

Commit 73614b1

Browse files
committed
add ExtUtils::Depends support in addition to OpenGL::Config
1 parent 83b7005 commit 73614b1

File tree

5 files changed

+42
-1
lines changed

5 files changed

+42
-1
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
- add glpErrorString
22
- add _o aliases for all functions taking OpenGL::Array args
33
- use OpenGL::Modern for _c and simple bindings
4+
- add ExtUtils::Depends support in addition to OpenGL::Config, including `use Inline with => 'OpenGL'`
45

56
0.7006 2025-04-14
67
- incorporate Acme::MITHALDU::BleedingOpenGL changes - thanks @wchristian

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ lib/OpenGL/GLUT.pm
7575
lib/OpenGL/GLUT.xs
7676
lib/OpenGL/GLX.pm
7777
lib/OpenGL/GLX.xs
78+
lib/OpenGL/Install/Files.pm
7879
lib/OpenGL/Install/typemap
7980
lib/OpenGL/Matrix.pm
8081
lib/OpenGL/Matrix.xs

MANIFEST.SKIP

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
^.*.tar.gz
4242
^.git
43-
^lib/OpenGL/Config.pm
43+
^lib/OpenGL/Config\.pm
4444
^Makefile$
4545
^MYMETA.json
4646
^MYMETA.yml

lib/OpenGL.pm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4598,4 +4598,9 @@ sub glpCheckExtension
45984598
return 0;
45994599
}
46004600

4601+
sub Inline {
4602+
require OpenGL::Install::Files;
4603+
goto &OpenGL::Install::Files::Inline;
4604+
}
4605+
46014606
1;

lib/OpenGL/Install/Files.pm

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# maintained manually, based on output from EU:D
2+
package OpenGL::Install::Files;
3+
use strict;
4+
use warnings;
5+
require OpenGL::Config;
6+
7+
our $CORE = undef;
8+
foreach (@INC) {
9+
if ( -f $_ . "/OpenGL/Install/Files.pm") {
10+
$CORE = $_ . "/OpenGL/Install/";
11+
last;
12+
}
13+
}
14+
15+
our $self = {
16+
deps => [],
17+
inc => $OpenGL::Config->{INC},
18+
libs => $OpenGL::Config->{LIBS},
19+
typemaps => [$CORE."typemap"],
20+
};
21+
22+
our @deps = @{ $self->{deps} };
23+
our @typemaps = @{ $self->{typemaps} };
24+
our $libs = $self->{libs};
25+
our $inc = $self->{inc};
26+
27+
sub deps { @{ $self->{deps} }; }
28+
29+
sub Inline {
30+
my ($class, $lang) = @_;
31+
+{ map { (uc($_) => $self->{$_}) } qw(inc libs typemaps) };
32+
}
33+
34+
1;

0 commit comments

Comments
 (0)