[libopengl-perl] 01/11: Refresh patch disable-glversion.
gregor herrmann
gregoa at debian.org
Sat Aug 5 01:34:09 UTC 2017
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libopengl-perl.
commit a5da8c57c6c8dd8e786405b78a7e49c2becf3a09
Author: gregor herrmann <gregoa at debian.org>
Date: Fri Aug 4 20:09:06 2017 -0400
Refresh patch disable-glversion.
---
debian/patches/disable-glversion | 68 ++++++++++++++++++++++++++--------------
1 file changed, 45 insertions(+), 23 deletions(-)
diff --git a/debian/patches/disable-glversion b/debian/patches/disable-glversion
index 54ffda5..d0d9702 100644
--- a/debian/patches/disable-glversion
+++ b/debian/patches/disable-glversion
@@ -3,7 +3,7 @@ and I am not sure Xvfb would provide the same set of capabilities. Upstream also
includes a gl_exclude.h already that works for us, so just skip the detection.
--- a/Makefile.PL
+++ b/Makefile.PL
-@@ -788,170 +788,6 @@
+@@ -798,192 +798,10 @@
sub get_extensions
{
my($found,$no_excl) = @_;
@@ -74,13 +74,10 @@ includes a gl_exclude.h already that works for us, so just skip the detection.
- print "glversion: $exec\n" if ($verbose);
- my $stat = `$exec`;
- print "\n$stat\n\n" if ($verbose);
--
+- unlink "utils/freeglut.dll" or die "could not remove temporary freeglut: $!" if -f "utils/freeglut.dll";
-
- # Parse glversion.txt file
-- if ( !defined(open(GLDATA,$glv_file)) ) {
-- print "get_extensions: could not open $glv_file: $!\n" if $verbose;
-- return '';
-- }
+- open GLDATA, $glv_file or die "get_extensions: could not open $glv_file: $!\n";
- my $gldata = {};
- my @gldata = <GLDATA>;
- close(GLDATA);
@@ -91,14 +88,12 @@ includes a gl_exclude.h already that works for us, so just skip the detection.
- my($key,$val) = split('=',$line);
- $gldata->{$key} = $val;
- }
-- if (!scalar(keys %$gldata)) {
-- print "get_extensions: no extensions found in $glv_file\n" if $verbose;
-- return '';
-- }
+- die "get_extensions: no extensions found in $glv_file\n" if !keys %$gldata;
-
+- print "This looks like OpenGL Version: $gldata->{VERSION}\n";
-
- # Parse glext_procs.h file
-- return '' if (!open(GLEXT,"glext_procs.h"));
+- open GLEXT, "glext_procs.h" or die "get_extensions: could not open glext_procs.h: $!\n";
- my @lines = <GLEXT>;
- close(GLEXT);
-
@@ -120,19 +115,31 @@ includes a gl_exclude.h already that works for us, so just skip the detection.
- print GLEXC "// OpenGL v".$gldata->{VERSION}.", using ";
-
- # Fix GLUT flags based on results
-- if ($gldata->{GLUT} > 0)
+- if ($gldata->{FREEGLUT})
- {
-- print 'Found FreeGLUT v'.$gldata->{GLUT}."\n";
-- print GLEXC 'FreeGLUT v'.$gldata->{GLUT}."\n";
+- print 'Found FreeGLUT v'.$gldata->{FREEGLUT}."\n";
+- print GLEXC 'FreeGLUT v'.$gldata->{FREEGLUT}."\n";
-
- if (!$found->{FREEGLUT} && !$found->{FREEGLUT32})
- {
- $found->{FREEGLUT} = $lib;
- }
- }
+- elsif ($gldata->{GLUT})
+- {
+- print "Found GLUT - Version: $gldata->{GLUT}\n";
+- }
- else
- {
-- print "Found GLUT - unknown version\n";
+- print "Found no GLUT\n"
+- }
+-
+- my $GL_VERSION;
+- my($GL_VERSION_MAJOR, $GL_VERSION_MINOR);
+- if ($gldata->{VERSION} =~ m|^(\d\.\d+)|)
+- {
+- $GL_VERSION = $1;
+- ($GL_VERSION_MAJOR,$GL_VERSION_MINOR) = split('.', $GL_VERSION);
- }
-
- # Make an empty exclusion file if a Windows distribution build
@@ -145,15 +152,25 @@ includes a gl_exclude.h already that works for us, so just skip the detection.
- else
- {
- print GLEXC "\n";
-- if ($gldata->{VERSION} =~ m|^(\d\.\d+)|)
+- if ($GL_VERSION)
- {
-- my $ver = $1;
-- print GLEXC "#define NO_GL_VERSION_2_0\n" if ($ver < 2.0);
-- print GLEXC "#define NO_GL_VERSION_1_5\n" if ($ver < 1.5);
-- print GLEXC "#define NO_GL_VERSION_1_4\n" if ($ver < 1.4);
-- print GLEXC "#define NO_GL_VERSION_1_3\n" if ($ver < 1.3);
-- print GLEXC "#define NO_GL_VERSION_1_2\n" if ($ver < 1.2);
-- print GLEXC "#define NO_GL_VERSION_1_1\n" if ($ver < 1.1);
+- print GLEXC "#define NO_GL_VERSION_4_5\n" if ($GL_VERSION < 4.5);
+- print GLEXC "#define NO_GL_VERSION_4_4\n" if ($GL_VERSION < 4.4);
+- print GLEXC "#define NO_GL_VERSION_4_3\n" if ($GL_VERSION < 4.3);
+- print GLEXC "#define NO_GL_VERSION_4_2\n" if ($GL_VERSION < 4.2);
+- print GLEXC "#define NO_GL_VERSION_4_1\n" if ($GL_VERSION < 4.1);
+- print GLEXC "#define NO_GL_VERSION_4_0\n" if ($GL_VERSION < 4.0);
+- print GLEXC "#define NO_GL_VERSION_3_3\n" if ($GL_VERSION < 3.3);
+- print GLEXC "#define NO_GL_VERSION_3_2\n" if ($GL_VERSION < 3.2);
+- print GLEXC "#define NO_GL_VERSION_3_1\n" if ($GL_VERSION < 3.1);
+- print GLEXC "#define NO_GL_VERSION_3_0\n" if ($GL_VERSION < 3.0);
+- print GLEXC "#define NO_GL_VERSION_2_1\n" if ($GL_VERSION < 2.1);
+- print GLEXC "#define NO_GL_VERSION_2_0\n" if ($GL_VERSION < 2.0);
+- print GLEXC "#define NO_GL_VERSION_1_5\n" if ($GL_VERSION < 1.5);
+- print GLEXC "#define NO_GL_VERSION_1_4\n" if ($GL_VERSION < 1.4);
+- print GLEXC "#define NO_GL_VERSION_1_3\n" if ($GL_VERSION < 1.3);
+- print GLEXC "#define NO_GL_VERSION_1_2\n" if ($GL_VERSION < 1.2);
+- print GLEXC "#define NO_GL_VERSION_1_1\n" if ($GL_VERSION < 1.1);
- }
-
- foreach my $ext (split(' ',$gldata->{EXTENSIONS}))
@@ -174,3 +191,8 @@ includes a gl_exclude.h already that works for us, so just skip the detection.
# return Distributable Defs
print "Have Version Data\n" if ($verbose);
+ my $defines = '-DHAVE_VER';
+- $defines .= " -DGL_VERSION_USED=$GL_VERSION" if ($GL_VERSION);
+ return $defines;
+ }
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libopengl-perl.git
More information about the Pkg-perl-cvs-commits
mailing list