void-packages/srcpkgs/perl-OpenGL/patches/0001-no_glversion.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

54 lines
1.9 KiB
Diff

--- a/Makefile.PL
+++ b/Makefile.PL
@@ -879,9 +879,9 @@ sub get_extensions
my($key,$val) = split('=',$line);
$gldata->{$key} = $val;
}
- die "get_extensions: no extensions found in $glv_file\n" if !keys %$gldata;
+ #die "get_extensions: no extensions found in $glv_file\n" if !keys %$gldata;
- print "This looks like OpenGL Version: $gldata->{VERSION}\n";
+ #print "This looks like OpenGL Version: $gldata->{VERSION}\n";
# Parse glext_procs.h file
open GLEXT, "glext_procs.h" or die "get_extensions: could not open glext_procs.h: $!\n";
@@ -902,8 +902,8 @@ sub get_extensions
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 ";
+ #print GLEXC "// Generated for ".$gldata->{VENDOR}.", ".$gldata->{RENDERER}."\n";
+ #print GLEXC "// OpenGL v".$gldata->{VERSION}.", using ";
# Fix GLUT flags based on results
if ($gldata->{FREEGLUT})
@@ -927,11 +927,11 @@ sub get_extensions
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);
- }
+ #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
if ($no_excl)
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -21,7 +21,8 @@ EXTRALIBS=-lGLU -lXi -lXmu -lXext -lX11 -lm
all: glversion.txt
glversion.txt: glversion
- ./glversion > glversion.txt
+ #./glversion > glversion.txt
+ touch glversion.txt
glversion: glversion.o
${LINK} glversion.o ${LDFLAGS} ${EXTRALIBS} -o glversion