r44566 - in /trunk/libopengl-perl/debian/patches: disable-glversion series
mxey-guest at users.alioth.debian.org
mxey-guest at users.alioth.debian.org
Mon Sep 21 19:49:29 UTC 2009
Author: mxey-guest
Date: Mon Sep 21 19:49:23 2009
New Revision: 44566
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44566
Log:
Added patch disable-glversion to disable autodetection of features
would require X for building
Added:
trunk/libopengl-perl/debian/patches/disable-glversion
Modified:
trunk/libopengl-perl/debian/patches/series
Added: trunk/libopengl-perl/debian/patches/disable-glversion
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libopengl-perl/debian/patches/disable-glversion?rev=44566&op=file
==============================================================================
--- trunk/libopengl-perl/debian/patches/disable-glversion (added)
+++ trunk/libopengl-perl/debian/patches/disable-glversion Mon Sep 21 19:49:23 2009
@@ -1,0 +1,169 @@
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -743,166 +743,6 @@
+ sub get_extensions
+ {
+ my($found,$no_excl) = @_;
+- print "Testing for OpenGL Extensions\n" if ($verbose);
+-
+- # clean up previous output files
+- my $exc_file = 'gl_exclude.h';
+- unlink($exc_file) if (-e $exc_file);
+- my $glv_file = 'utils/glversion.txt';
+- unlink($glv_file) if (-e $glv_file);
+-
+- # Only run the rest if GLUT is installed
+- print "Testing GLUT version\n" if ($verbose);
+- my($lib,$def);
+- if ($found->{FREEGLUT32} || $found->{FREEGLUT})
+- {
+- $lib = $found->{FREEGLUT32} || $found->{FREEGLUT};
+- $def = "HAVE_FREEGLUT";
+- }
+- elsif ($found->{GLUT32} || $found->{GLUT})
+- {
+- $lib = $found->{GLUT32} || $found->{GLUT};
+- $def = "HAVE_GLUT";
+- }
+- elsif ($verbose)
+- {
+- print "GLUT not found\n";
+- }
+-
+- # Platform-specific makefiles for glversion
+- my $make_ver;
+- if ($IS_MINGW)
+- {
+- $make_ver = "&mingw.bat";
+-# $make_ver = '&dmake -f makefile.mingw GLUT_DEF='.$def;
+- print "mingw glversion: '$make_ver'\n" if $verbose>1;
+- }
+- elsif ($IS_W32API)
+- {
+- $make_ver = ";make -f Makefile.cygwin " . (length($lib) ? "GLUT_LIB=$lib " : "") . (length($def) ? "GLUT_DEF=$def " : "");
+- print "cygwin glversion: '$make_ver'\n" if $verbose>1;
+- }
+- elsif ($^O eq 'MSWin32')
+- {
+- $make_ver = '&nmake -f makefile.mak ' . (length($def) ? "GLUT_DEF=$def " : "");
+- print "MSWin32 glversion: '$make_ver'\n" if $verbose>1;
+- }
+- elsif ($^O eq 'darwin')
+- {
+- $make_ver = ";make -f Makefile.macosx " . (length($lib) ? "GLUT_LIB=$lib " : "") . (length($def) ? "GLUT_DEF=$def " : "");
+- print "MacOSX glversion: '$make_ver'\n" if $verbose>1;
+- }
+- else
+- {
+- if ($ENV{TERM} ne 'xterm')
+- {
+- print "\nIn order to test your GPU's capabilities, run this make under an X11 shell\n\n";
+- }
+-
+- $make_ver = ";make -f Makefile " . (length($lib) ? "GLUT_LIB=$lib " : "") . (length($def) ? "GLUT_DEF=$def " : "");
+- print "glversion: '$make_ver'\n" if $verbose>1;
+- }
+- my $exec = 'cd utils'."$make_ver clean".$make_ver;
+- print "glversion: $exec\n" if ($verbose);
+- my $stat = `$exec`;
+- print "\n$stat\n\n" if ($verbose);
+-
+-
+- # Parse glversion.txt file
+- if ( !defined(open(GLDATA,$glv_file)) ) {
+- print "get_extensions: could not open $glv_file: $!\n" if $verbose;
+- return '';
+- }
+- my $gldata = {};
+- my @gldata = <GLDATA>;
+- close(GLDATA);
+-
+- foreach my $line (@gldata)
+- {
+- $line =~ s|[\r\n]+||;
+- 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 '';
+- }
+-
+-
+- # Parse glext_procs.h file
+- return '' if (!open(GLEXT,"glext_procs.h"));
+- my @lines = <GLEXT>;
+- close(GLEXT);
+-
+- my $no_ext = {};
+- foreach my $line (@lines)
+- {
+- next if ($line !~ m|\#ifndef NO_([^\s]+)|);
+- my $ext = $1;
+- next if ($ext =~ m|^GL_VERSION_|);
+- $no_ext->{$ext}++;
+- }
+-
+-
+- # Create gl_exclude.h
+- die "Unable to write to $exc_file\n" if (!open(GLEXC,">$exc_file"));
+- print GLEXC "// OpenGL Extension Exclusions - may be modified before building.\n";
+- print GLEXC "//\n";
+- print GLEXC "// Generated for ".$gldata->{VENDOR}.", ".$gldata->{RENDERER}."\n";
+- print GLEXC "// OpenGL v".$gldata->{VERSION}.", using ";
+-
+- # Fix GLUT flags based on results
+- if ($gldata->{GLUT} > 0)
+- {
+- print 'Found FreeGLUT v'.$gldata->{GLUT}."\n";
+- print GLEXC 'FreeGLUT v'.$gldata->{GLUT}."\n";
+-
+- if (!$found->{FREEGLUT} && !$found->{FREEGLUT32})
+- {
+- $found->{FREEGLUT} = $lib;
+- }
+- }
+- else
+- {
+- print "Found GLUT - unknown version\n";
+- }
+-
+- # Make an empty exclusion file if a Windows distribution build
+- if ($no_excl)
+- {
+- print "OpenGL Extension exclusions disabled\n";
+- print GLEXC "//\n";
+- print GLEXC "// Exclusions omitted for distribution build.\n";
+- }
+- else
+- {
+- print GLEXC "\n";
+- if ($gldata->{VERSION} =~ m|^(\d\.\d+)|)
+- {
+- 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);
+- }
+-
+- foreach my $ext (split(' ',$gldata->{EXTENSIONS}))
+- {
+- next if (!$no_ext->{$ext});
+- $no_ext->{$ext} = 0;
+- }
+-
+- foreach my $ext (sort keys(%$no_ext))
+- {
+- next if (!$no_ext->{$ext});
+- print GLEXC "#define NO_$ext\n";
+- }
+- }
+-
+- close(GLEXC);
+-
+
+ # return Distributable Defs
+ print "Have Version Data\n" if ($verbose);
Modified: trunk/libopengl-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libopengl-perl/debian/patches/series?rev=44566&op=diff
==============================================================================
--- trunk/libopengl-perl/debian/patches/series (original)
+++ trunk/libopengl-perl/debian/patches/series Mon Sep 21 19:49:23 2009
@@ -1,3 +1,4 @@
+disable-glversion
glext_procs-replacement
examples-perl-path
use-systems-gl
More information about the Pkg-perl-cvs-commits
mailing list